diff --git a/dist/infinitegrid.js b/dist/infinitegrid.js
index 88404a5f2..f4ab70a72 100644
--- a/dist/infinitegrid.js
+++ b/dist/infinitegrid.js
@@ -780,8 +780,8 @@ function getShapes(frame) {
};
}
/**
- * @classdesc FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.
- * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.
+ * @classdesc FrameLayout is a layout that allows you to place cards in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.
+ * @ko FrameLayout은 주어진 프레임에 맞춰 카드를 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.
* @class eg.InfiniteGrid.FrameLayout
* @param {Object} [options] The option object of eg.InfiniteGrid.FrameLayout module eg.InfiniteGrid.FrameLayout 모듈의 옵션 객체
* @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간
@@ -1243,7 +1243,7 @@ var InfiniteGrid = function (_Component) {
* @param {String} [options.itemSelector] A selector to select card elements that make up the layout레이아웃을 구성하는 카드 엘리먼트를 선택할 선택자(selector)
* @param {Boolean} [options.useRecycle=true] Indicates whether keep the number of DOMs is maintained. If the useRecycle value is 'true', keep the number of DOMs is maintained. If the useRecycle value is 'false', the number of DOMs will increase as card elements are added. DOM의 수를 유지할지 여부를 나타낸다. useRecycle 값이 'true'이면 DOM 개수를 일정하게 유지한다. useRecycle 값이 'false' 이면 카드 엘리먼트가 추가될수록 DOM 개수가 계속 증가한다.
* @param {Boolean} [options.isOverflowScroll=false] Indicates whether overflow:scroll is appliedoverflow:scroll 적용여부를 결정한다.
- * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향
+ * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향)
* @param {Boolean} [options.isEqualSize=false] Indicates whether sizes of all card elements are equal to one another. If sizes of card elements to be arranged are all equal and this option is set to "true", the performance of layout arrangement can be improved. 카드 엘리먼트의 크기가 동일한지 여부. 배치될 카드 엘리먼트의 크기가 모두 동일할 때 이 옵션을 'true'로 설정하면 레이아웃 배치 성능을 높일 수 있다
* @param {Number} [options.threshold=100] The threshold size of an event area where card elements are added to a layout.레이아웃에 카드 엘리먼트를 추가하는 이벤트가 발생하는 기준 영역의 크기.
*/
@@ -2615,8 +2615,8 @@ var START = _consts.ALIGN.START,
JUSTIFY = _consts.ALIGN.JUSTIFY;
/**
- * @classdesc GridLayout is a layout in which images with the same width are arranged in a staggered arrangement, like a stack of bricks. Adjust the width of all images to the same size, find the lowest height column, and insert a new image.
- * @ko GridLayout는 벽돌을 쌓아 올린 모양처럼 동일한 너비를 가진 이미지가 엇갈려 배열되는 레이아웃이다. 모든 이미지의 너비를 동일한 크기로 조정하고, 가장 높이가 낮은 열을 찾아 새로운 이미지를 삽입한다. 따라서 배치된 이미지 사이에 빈 공간이 생기지는 않지만 배치된 레이아웃의 아래쪽은 울퉁불퉁해진다.
+ * @classdesc The GridLayout is a layout that stacks cards with the same width as a stack of bricks. Adjust the width of all images to the same size, find the lowest height column, and insert a new card.
+ * @ko GridLayout는 벽돌을 쌓아 올린 모양처럼 동일한 너비를 가진 카드를 쌓는 레이아웃이다. 모든 이미지의 너비를 동일한 크기로 조정하고, 가장 높이가 낮은 열을 찾아 새로운 이미지를 삽입한다. 따라서 배치된 카드 사이에 빈 공간이 생기지는 않지만 배치된 레이아웃의 아래쪽은 울퉁불퉁해진다.
* @class eg.InfiniteGrid.GridLayout
* @param {Object} [options] The option object of eg.InfiniteGrid.GridLayout module eg.InfiniteGrid.GridLayout 모듈의 옵션 객체
* @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간
@@ -2948,8 +2948,8 @@ function getColumn(item) {
}
/**
- * @classdesc FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.
- * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.
+ * @classdesc SquareLayout is a layout that places all cards like squares on a checkerboard, and important cards are n times larger. The main card can be enlarged, and then a small card can be placed to naturally show the relationship of the card.
+ * @ko SquareLayout은 바둑판처럼 모든 카드를 정사각형으로 배치하고 중요한 카드는 크기를 N배로 키워서 보여주는 레이아웃이다. 주요 카드를 크게 표시하고, 그 다음에 작은 카드를 배치해 자연스럽게 카드의 관계를 나타낼 수 있습니다.
* @class eg.InfiniteGrid.SquareLayout
* @extends eg.InfiniteGrid.FrameLayout
* @param {Object} [options] The option object of eg.InfiniteGrid.SquareLayout module eg.InfiniteGrid.SquareLayout 모듈의 옵션 객체
@@ -3146,8 +3146,8 @@ function fitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertica
}
/**
- * @classdesc PackingLayout show important images bigger without sacrificing the inherent size of the image. Rows and columns are separated so that images are dynamically placed within the horizontal and vertical space rather than arranged in an orderly fashion.
- * @ko PackingLayout은 이미지의 본래 크기에 따른 비중을 해치지 않으면서 중요한 이미지는 더 크게 보여 준다. 행과 열이 구분돼 이미지를 정돈되게 배치하는 대신 가로세로 일정 공간 내에서 동적으로 이미지를 배치한다.
+ * @classdesc The PackingLayout is a layout that shows the important cards bigger without sacrificing the weight of the cards. Rows and columns are separated so that cards are dynamically placed within the horizontal and vertical space rather than arranged in an orderly fashion.
+ * @ko PackingLayout은 카드의 본래 크기에 따른 비중을 해치지 않으면서 중요한 카드는 더 크게 보여 주는 레이아웃이다. 행과 열이 구분돼 이미지를 정돈되게 배치하는 대신 가로세로 일정 공간 내에서 동적으로 카드를 배치한다.
* @class eg.InfiniteGrid.PackingLayout
* @param {Object} [options] The option object of eg.InfiniteGrid.PackingLayout module eg.InfiniteGrid.PackingLayout 모듈의 옵션 객체
* @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간
@@ -3592,8 +3592,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
- * @classdesc 'justified' is a printing term with the meaning that 'it fits in one row wide'. JustifiedLayout is a layout in which the image is filled up on the basis of a line given a width in the meaning of the term.
- * @ko 'justified'는 '1행의 너비에 맞게 꼭 들어찬'이라는 의미를 가진 인쇄 용어다. 용어의 의미대로 너비가 주어진 한 행을 기준으로 이미지가 가득 차도록 배치하는 레이아웃이다.
+ * @classdesc 'justified' is a printing term with the meaning that 'it fits in one row wide'. JustifiedLayout is a layout that the card is filled up on the basis of a line given a size.
+ * @ko 'justified'는 '1행의 너비에 맞게 꼭 들어찬'이라는 의미를 가진 인쇄 용어다. 용어의 의미대로 너비가 주어진 사이즈를 기준으로 카드가 가득 차도록 배치하는 레이아웃이다.
* @class eg.InfiniteGrid.JustifiedLayout
* @param {Object} [options] The option object of eg.InfiniteGrid.JustifiedLayout module eg.InfiniteGrid.JustifiedLayout 모듈의 옵션 객체
* @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간
diff --git a/dist/infinitegrid.js.map b/dist/infinitegrid.js.map
index 6664ddae4..b78dc6c70 100644
--- a/dist/infinitegrid.js.map
+++ b/dist/infinitegrid.js.map
@@ -1 +1 @@
-{"version":3,"file":"infinitegrid.js","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 01d0436942cf47468893","webpack:///./src/consts.js","webpack:///./src/utils.js","webpack:///./src/browser.js","webpack:///./src/DOMRenderer.js","webpack:///./src/layouts/FrameLayout.js","webpack:///./src/index.js","webpack:///./src/InfiniteGrid.js","webpack:///external {\"commonjs\":\"@egjs/component\",\"commonjs2\":\"@egjs/component\",\"amd\":\"@egjs/component\",\"root\":[\"eg\",\"Component\"]}","webpack:///./src/ItemManager.js","webpack:///./src/ImageLoaded.js","webpack:///./src/Watcher.js","webpack:///./src/layouts/GridLayout.js","webpack:///./src/layouts/SquareLayout.js","webpack:///./src/layouts/PackingLayout.js","webpack:///./src/layouts/lib/BoxModel.js","webpack:///./src/layouts/JustifiedLayout.js","webpack:///./src/layouts/lib/dijkstra.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@egjs/component\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"@egjs/component\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"InfiniteGrid\"] = factory(require(\"@egjs/component\"));\n\telse\n\t\troot[\"eg\"] = root[\"eg\"] || {}, root[\"eg\"][\"InfiniteGrid\"] = factory(root[\"eg\"][\"Component\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_7__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 01d0436942cf47468893","\"use strict\";\n\nexports.__esModule = true;\nexports.DEFENSE_BROWSER = exports.WEBKIT_VERSION = exports.PROCESSING = exports.LOADING_PREPEND = exports.LOADING_APPEND = exports.IDLE = exports.ALIGN = exports.isMobile = exports.agent = exports.DEFAULT_OPTIONS = exports.GROUPKEY_ATT = exports.DUMMY_POSITION = exports.SINGLE = exports.MULTI = exports.NO_TRUSTED = exports.TRUSTED = exports.NO_CACHE = exports.CACHE = exports.HORIZONTAL = exports.VERTICAL = exports.PREPEND = exports.APPEND = exports.IGNORE_CLASSNAME = exports.CONTAINER_CLASSNAME = exports.RETRY = exports.IS_ANDROID2 = exports.IS_IOS = exports.IS_IE = exports.SUPPORT_PASSIVE = exports.SUPPORT_ADDEVENTLISTENER = exports.SUPPORT_COMPUTEDSTYLE = undefined;\n\nvar _browser = require(\"./browser\");\n\nvar ua = _browser.window.navigator.userAgent;\n\nvar SUPPORT_COMPUTEDSTYLE = exports.SUPPORT_COMPUTEDSTYLE = !!(\"getComputedStyle\" in _browser.window);\nvar SUPPORT_ADDEVENTLISTENER = exports.SUPPORT_ADDEVENTLISTENER = !!(\"addEventListener\" in document);\nvar SUPPORT_PASSIVE = exports.SUPPORT_PASSIVE = function () {\n\tvar supportsPassiveOption = false;\n\n\ttry {\n\t\tif (SUPPORT_ADDEVENTLISTENER && Object.defineProperty) {\n\t\t\tdocument.addEventListener(\"test\", null, Object.defineProperty({}, \"passive\", {\n\t\t\t\tget: function get() {\n\t\t\t\t\tsupportsPassiveOption = true;\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\t} catch (e) {}\n\treturn supportsPassiveOption;\n}();\n\nvar IS_IE = exports.IS_IE = /MSIE|Trident|Windows Phone|Edge/.test(ua);\nvar IS_IOS = exports.IS_IOS = /iPhone|iPad/.test(ua);\nvar IS_ANDROID2 = exports.IS_ANDROID2 = /Android 2\\./.test(ua);\nvar RETRY = exports.RETRY = 3;\nvar CONTAINER_CLASSNAME = exports.CONTAINER_CLASSNAME = \"_eg-infinitegrid-container_\";\nvar IGNORE_CLASSNAME = exports.IGNORE_CLASSNAME = \"_eg-infinitegrid-ignore_\";\n\nvar APPEND = exports.APPEND = true;\nvar PREPEND = exports.PREPEND = false;\nvar VERTICAL = exports.VERTICAL = \"vertical\";\nvar HORIZONTAL = exports.HORIZONTAL = \"horizontal\";\nvar CACHE = exports.CACHE = true;\nvar NO_CACHE = exports.NO_CACHE = false;\nvar TRUSTED = exports.TRUSTED = true;\nvar NO_TRUSTED = exports.NO_TRUSTED = false;\nvar MULTI = exports.MULTI = true;\nvar SINGLE = exports.SINGLE = false;\nvar DUMMY_POSITION = exports.DUMMY_POSITION = -100000;\nvar GROUPKEY_ATT = exports.GROUPKEY_ATT = \"data-groupkey\";\n\nvar DEFAULT_OPTIONS = exports.DEFAULT_OPTIONS = {\n\thorizontal: false,\n\tmargin: 0\n};\n\nvar agent = exports.agent = ua.toLowerCase();\nvar isMobile = exports.isMobile = /mobi|ios|android/.test(agent);\n\nvar ALIGN = exports.ALIGN = {\n\tSTART: \"start\",\n\tCENTER: \"center\",\n\tEND: \"end\",\n\tJUSTIFY: \"justify\"\n};\n\nvar IDLE = exports.IDLE = 0;\nvar LOADING_APPEND = exports.LOADING_APPEND = 1;\nvar LOADING_PREPEND = exports.LOADING_PREPEND = 2;\nvar PROCESSING = exports.PROCESSING = 4;\n\nvar webkit = /applewebkit\\/([\\d|.]*)/g.exec(agent);\n\nvar WEBKIT_VERSION = exports.WEBKIT_VERSION = webkit && parseInt(webkit[1], 10) || 0;\nvar DEFENSE_BROWSER = exports.DEFENSE_BROWSER = WEBKIT_VERSION && WEBKIT_VERSION < 537;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/consts.js\n// module id = 0\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\nexports.STYLE = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.toArray = toArray;\nexports.fill = fill;\nexports.$ = $;\nexports.addEvent = addEvent;\nexports.removeEvent = removeEvent;\nexports.scroll = scroll;\nexports.scrollTo = scrollTo;\nexports.scrollBy = scrollBy;\nexports.getStyles = getStyles;\nexports.innerWidth = innerWidth;\nexports.innerHeight = innerHeight;\nexports.getStyleNames = getStyleNames;\nexports.assignOptions = assignOptions;\nexports.toZeroArray = toZeroArray;\nexports.isWindow = isWindow;\nexports.indexOf = indexOf;\n\nvar _browser = require(\"./browser\");\n\nvar _consts = require(\"./consts\");\n\nfunction toArray(nodes) {\n\t// SCRIPT5014 in IE8\n\tvar array = [];\n\n\tif (nodes) {\n\t\tfor (var i = 0, len = nodes.length; i < len; i++) {\n\t\t\tarray.push(nodes[i]);\n\t\t}\n\t}\n\treturn array;\n}\nfunction fill(length, value) {\n\tvar array = (typeof length === \"undefined\" ? \"undefined\" : _typeof(length)) === \"object\" ? length : new Array(length);\n\tvar len = array.length;\n\n\tfor (var i = len - 1; i >= 0; --i) {\n\t\tarray[i] = value;\n\t}\n\treturn array;\n}\n/**\n * Select or create element\n * @param {String|HTMLElement|jQuery} param\n * when string given is as HTML tag, then create element\n * otherwise it returns selected elements\n * @param {Boolean} multi\n * @returns {HTMLElement}\n */\nfunction $(param) {\n\tvar multi = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n\tvar el = void 0;\n\n\tif (typeof param === \"string\") {\n\t\t// String (HTML, Selector)\n\t\t// check if string is HTML tag format\n\t\tvar match = param.match(/^<([A-z]+)\\s*([^>]*)>/);\n\n\t\t// creating element\n\t\tif (match) {\n\t\t\t// HTML\n\t\t\tvar dummy = _browser.document.createElement(\"div\");\n\n\t\t\tdummy.innerHTML = param;\n\t\t\tel = dummy.childNodes;\n\t\t} else {\n\t\t\t// Selector\n\t\t\tel = _browser.document.querySelectorAll(param);\n\t\t}\n\t\tif (multi) {\n\t\t\tel = toArray(el);\n\t\t} else {\n\t\t\tel = el && el.length > 0 && el[0] || undefined;\n\t\t}\n\t} else if (param === _browser.window) {\n\t\t// window\n\t\tel = param;\n\t} else if (param.nodeName && (param.nodeType === 1 || param.nodeType === 9)) {\n\t\t// HTMLElement, Document\n\t\tel = param;\n\t} else if (\"jQuery\" in _browser.window && param instanceof _browser.window.jQuery || param.constructor.prototype.jquery) {\n\t\t// jQuery\n\t\tel = multi ? param.toArray() : param.get(0);\n\t} else if (Array.isArray(param)) {\n\t\tel = param.map(function (v) {\n\t\t\treturn $(v);\n\t\t});\n\t\tif (!multi) {\n\t\t\tel = el.length >= 1 ? el[0] : undefined;\n\t\t}\n\t}\n\treturn el;\n}\nfunction addEvent(element, type, handler, eventListenerOptions) {\n\tif (_consts.SUPPORT_ADDEVENTLISTENER) {\n\t\tvar options = eventListenerOptions || false;\n\n\t\tif ((typeof eventListenerOptions === \"undefined\" ? \"undefined\" : _typeof(eventListenerOptions)) === \"object\") {\n\t\t\toptions = _consts.SUPPORT_PASSIVE ? eventListenerOptions : false;\n\t\t}\n\t\telement.addEventListener(type, handler, options);\n\t} else if (element.attachEvent) {\n\t\telement.attachEvent(\"on\" + type, handler);\n\t} else {\n\t\telement[\"on\" + type] = handler;\n\t}\n}\nfunction removeEvent(element, type, handler) {\n\tif (element.removeEventListener) {\n\t\telement.removeEventListener(type, handler, false);\n\t} else if (element.detachEvent) {\n\t\telement.detachEvent(\"on\" + type, handler);\n\t} else {\n\t\telement[\"on\" + type] = null;\n\t}\n}\nfunction scroll(el, isVertical) {\n\tvar prop = \"scroll\" + (isVertical ? \"Top\" : \"Left\");\n\n\tif (el === _browser.window) {\n\t\treturn _browser.window[isVertical ? \"pageYOffset\" : \"pageXOffset\"] || _browser.document.body[prop] || _browser.document.documentElement[prop];\n\t} else {\n\t\treturn el[prop];\n\t}\n}\nfunction scrollTo(el, x, y) {\n\tif (el === _browser.window) {\n\t\tel.scroll(x, y);\n\t} else {\n\t\tel.scrollLeft = x;\n\t\tel.scrollTop = y;\n\t}\n}\nfunction scrollBy(el, x, y) {\n\tif (el === _browser.window) {\n\t\tel.scrollBy(x, y);\n\t} else {\n\t\tel.scrollLeft += x;\n\t\tel.scrollTop += y;\n\t}\n}\nfunction getStyles(el) {\n\treturn _consts.SUPPORT_COMPUTEDSTYLE ? _browser.window.getComputedStyle(el) : el.currentStyle;\n}\nfunction _getSize(el, name) {\n\tif (el === _browser.window) {\n\t\t// WINDOW\n\t\treturn el.document.documentElement[\"client\" + name];\n\t} else if (el.nodeType === 9) {\n\t\t// DOCUMENT_NODE\n\t\tvar doc = el.documentElement;\n\n\t\treturn Math.max(el.body[\"scroll\" + name], doc[\"scroll\" + name], el.body[\"offset\" + name], doc[\"offset\" + name], doc[\"client\" + name]);\n\t} else {\n\t\t// NODE\n\t\tvar style = getStyles(el);\n\t\tvar value = style[name.toLowerCase()];\n\n\t\treturn parseFloat(/auto|%/.test(value) ? el[\"offset\" + name] : style[name.toLowerCase()]);\n\t}\n}\nfunction innerWidth(el) {\n\treturn _getSize(el, \"Width\");\n}\nfunction innerHeight(el) {\n\treturn _getSize(el, \"Height\");\n}\nvar STYLE = exports.STYLE = {\n\tvertical: {\n\t\tpos1: \"top\",\n\t\tendPos1: \"bottom\",\n\t\tsize1: \"height\",\n\t\tpos2: \"left\",\n\t\tendPos2: \"right\",\n\t\tsize2: \"width\"\n\t},\n\thorizontal: {\n\t\tpos1: \"left\",\n\t\tendPos1: \"right\",\n\t\tsize1: \"width\",\n\t\tpos2: \"top\",\n\t\tendPos2: \"bottom\",\n\t\tsize2: \"height\"\n\t}\n};\n\nfunction getStyleNames(isHorizontal) {\n\treturn STYLE[isHorizontal ? _consts.HORIZONTAL : _consts.VERTICAL];\n}\n\nfunction assignOptions(defaultOptions, options) {\n\treturn _extends({}, _consts.DEFAULT_OPTIONS, defaultOptions, options);\n}\n\nfunction toZeroArray(outline) {\n\tif (!outline || !outline.length) {\n\t\treturn [0];\n\t}\n\treturn outline;\n}\n\nfunction isWindow(el) {\n\treturn el === _browser.window;\n}\n\nfunction indexOf(arr, target) {\n\tvar isRight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n\tif (!isRight) {\n\t\treturn arr.indexOf(target);\n\t}\n\tvar length = arr.length;\n\n\tfor (var i = length - 1; i >= 0; --i) {\n\t\tif (arr[i] !== target) {\n\t\t\tcontinue;\n\t\t}\n\t\treturn i;\n\t}\n\treturn -1;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utils.js\n// module id = 1\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n/* eslint-disable no-new-func, no-nested-ternary */\nvar win = window;\n/* eslint-enable no-new-func, no-nested-ternary */\n\nexports.window = window;\nvar document = exports.document = win.document;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser.js\n// module id = 2\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defense(element) {\n\tvar container = document.createElement(\"div\");\n\n\tcontainer.className = _consts.CONTAINER_CLASSNAME;\n\tcontainer.style.position = \"relative\";\n\tcontainer.style.height = \"100%\";\n\n\tvar children = element.children;\n\tvar length = children.length; // for IE8\n\n\tfor (var i = 0; i < length; i++) {\n\t\tcontainer.appendChild(children[0]);\n\t}\n\n\telement.appendChild(container);\n\treturn container;\n}\n\nvar DOMRenderer = function () {\n\tDOMRenderer.renderItem = function renderItem(item, styles) {\n\t\tif (item.el) {\n\t\t\tvar elStyle = item.el.style;\n\n\t\t\t// for debugging\n\t\t\titem.el.setAttribute(_consts.GROUPKEY_ATT, item.groupKey);\n\t\t\telStyle.position = \"absolute\";\n\t\t\t[\"left\", \"top\", \"width\", \"height\"].forEach(function (p) {\n\t\t\t\tp in styles && (elStyle[p] = styles[p] + \"px\");\n\t\t\t});\n\t\t}\n\t};\n\n\tDOMRenderer.renderItems = function renderItems(items) {\n\t\titems.forEach(function (item) {\n\t\t\tDOMRenderer.renderItem(item, item.rect);\n\t\t});\n\t};\n\n\tDOMRenderer.removeItems = function removeItems(items) {\n\t\titems.forEach(function (item) {\n\t\t\tif (item.el) {\n\t\t\t\tDOMRenderer.removeElement(item.el);\n\t\t\t\titem.el = null;\n\t\t\t}\n\t\t});\n\t};\n\n\tDOMRenderer.removeElement = function removeElement(element) {\n\t\telement.parentNode.removeChild(element);\n\t};\n\n\tDOMRenderer.createElements = function createElements(items) {\n\t\tvar elements = (0, _utils.$)(items.reduce(function (acc, v, i) {\n\t\t\tacc.push(v.content.replace(/^[\\s\\uFEFF]+|[\\s\\uFEFF]+$/g, \"\"));\n\t\t\treturn acc;\n\t\t}, []).join(\"\"), _consts.MULTI);\n\n\t\treturn items.map(function (item, index) {\n\t\t\titem.el = elements[index];\n\t\t\treturn item;\n\t\t});\n\t};\n\n\tfunction DOMRenderer(element, options) {\n\t\t_classCallCheck(this, DOMRenderer);\n\n\t\t_extends(this.options = {\n\t\t\tisOverflowScroll: false,\n\t\t\tisEqualSize: false,\n\t\t\tisVertical: true\n\t\t}, options);\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tcontainer: -1,\n\t\t\tview: -1,\n\t\t\titem: null\n\t\t};\n\t\tthis._init(element);\n\t\tthis.resize();\n\t}\n\n\tDOMRenderer.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\tcssText: this.container.style.cssText,\n\t\t\toptions: _extends({}, this.options),\n\t\t\t_size: _extends({}, this._size)\n\t\t};\n\t};\n\n\tDOMRenderer.prototype.setStatus = function setStatus(status, items) {\n\t\tthis.container.style.cssText = status.cssText;\n\t\t_extends(this.options, status.options);\n\t\t_extends(this._size, status._size);\n\n\t\tDOMRenderer.renderItems(items);\n\t\tthis._insert(items, _consts.APPEND);\n\t};\n\n\tDOMRenderer.prototype.updateSize = function updateSize(items) {\n\t\tvar _this = this;\n\n\t\treturn items.map(function (item) {\n\t\t\tif (item.el) {\n\t\t\t\tif (_this.options.isEqualSize) {\n\t\t\t\t\t_this._size.item = _this._size.item || {\n\t\t\t\t\t\twidth: (0, _utils.innerWidth)(item.el),\n\t\t\t\t\t\theight: (0, _utils.innerHeight)(item.el)\n\t\t\t\t\t};\n\t\t\t\t\titem.size = _extends({}, _this._size.item);\n\t\t\t\t} else {\n\t\t\t\t\titem.size = {\n\t\t\t\t\t\twidth: (0, _utils.innerWidth)(item.el),\n\t\t\t\t\t\theight: (0, _utils.innerHeight)(item.el)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif (!item.orgSize) {\n\t\t\t\t\titem.orgSize = _extends({}, item.size);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t};\n\n\tDOMRenderer.prototype._init = function _init(el) {\n\t\tvar element = (0, _utils.$)(el);\n\t\tvar style = (0, _utils.getStyles)(element);\n\n\t\tthis._orgStyle = {};\n\n\t\tif (style.position === \"static\") {\n\t\t\tthis._orgStyle.position = element.style.position;\n\t\t\telement.style.position = \"relative\";\n\t\t}\n\t\tif (this.options.isOverflowScroll) {\n\t\t\tvar target = this.options.isVertical ? [\"Y\", \"X\"] : [\"X\", \"Y\"];\n\n\t\t\tthis._orgStyle.overflowX = element.style.overflowX;\n\t\t\tthis._orgStyle.overflowY = element.style.overflowY;\n\t\t\telement.style[\"overflow\" + target[0]] = \"scroll\";\n\t\t\telement.style[\"overflow\" + target[1]] = \"hidden\";\n\t\t\tthis.view = element;\n\t\t\t// defense code for android < 4.4 or webkit < 537\n\t\t\tthis.container = !this.options.isVertical && _consts.DEFENSE_BROWSER ? _defense(element) : element;\n\t\t} else {\n\t\t\tthis.view = window;\n\t\t\tthis.container = element;\n\t\t}\n\t};\n\n\tDOMRenderer.prototype.append = function append(items) {\n\t\tthis._insert(items, _consts.APPEND, {\n\t\t\ttop: _consts.DUMMY_POSITION,\n\t\t\tleft: _consts.DUMMY_POSITION\n\t\t});\n\t};\n\n\tDOMRenderer.prototype.prepend = function prepend(items) {\n\t\tthis._insert(items, _consts.PREPEND, {\n\t\t\ttop: _consts.DUMMY_POSITION,\n\t\t\tleft: _consts.DUMMY_POSITION\n\t\t});\n\t};\n\n\tDOMRenderer.prototype.clear = function clear() {\n\t\tthis.container.innerHTML = \"\";\n\t\tif (!this.options.isOverflowScroll) {\n\t\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = \"\";\n\t\t}\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tviewport: -1,\n\t\t\tcontainer: -1,\n\t\t\tview: -1\n\t\t};\n\t};\n\n\tDOMRenderer.prototype.createAndInsert = function createAndInsert(items, isAppend) {\n\t\tvar itemsWithElement = DOMRenderer.createElements(items);\n\n\t\tDOMRenderer.renderItems(itemsWithElement);\n\t\tthis._insert(itemsWithElement, isAppend);\n\t};\n\n\tDOMRenderer.prototype._insert = function _insert(items, isAppend, styles) {\n\t\tvar df = document.createDocumentFragment();\n\n\t\titems.forEach(function (item) {\n\t\t\tstyles && DOMRenderer.renderItem(item, styles);\n\t\t\tisAppend ? df.appendChild(item.el) : df.insertBefore(item.el, df.firstChild);\n\t\t});\n\t\tisAppend ? this.container.appendChild(df) : this.container.insertBefore(df, this.container.firstChild);\n\t};\n\n\tDOMRenderer.prototype._calcSize = function _calcSize() {\n\t\treturn this.options.isVertical ? (0, _utils.innerWidth)(this.container) : (0, _utils.innerHeight)(this.container);\n\t};\n\n\tDOMRenderer.prototype.getViewSize = function getViewSize() {\n\t\treturn this._size.view;\n\t};\n\n\tDOMRenderer.prototype.scrollBy = function scrollBy(point) {\n\t\tvar pos = this.options.isVertical ? [0, point] : [point, 0];\n\n\t\t_utils.scrollBy.apply(undefined, [this.view].concat(pos));\n\t};\n\n\tDOMRenderer.prototype.getContainerOffset = function getContainerOffset() {\n\t\treturn this._size.containerOffset;\n\t};\n\n\tDOMRenderer.prototype.getViewportSize = function getViewportSize() {\n\t\tthis.resize();\n\t\treturn this._size.viewport;\n\t};\n\n\tDOMRenderer.prototype.setContainerSize = function setContainerSize(size) {\n\t\tif (!this.options.isOverflowScroll || !this.options.isVertical && _consts.DEFENSE_BROWSER) {\n\t\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = size + \"px\";\n\t\t}\n\t};\n\n\tDOMRenderer.prototype.resize = function resize() {\n\t\tvar isVertical = this.options.isVertical;\n\n\t\tif (this.isNeededResize()) {\n\t\t\tthis._size = {\n\t\t\t\tcontainerOffset: this.options.isOverflowScroll ? 0 : this.container[\"offset\" + (isVertical ? \"Top\" : \"Left\")],\n\t\t\t\tviewport: this._calcSize(),\n\t\t\t\tview: isVertical ? (0, _utils.innerHeight)(this.view) : (0, _utils.innerWidth)(this.view),\n\t\t\t\titem: null\n\t\t\t};\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis._size.view = isVertical ? (0, _utils.innerHeight)(this.view) : (0, _utils.innerWidth)(this.view);\n\t\t}\n\t\treturn false;\n\t};\n\n\tDOMRenderer.prototype.isNeededResize = function isNeededResize() {\n\t\treturn this._calcSize() !== this._size.viewport;\n\t};\n\n\tDOMRenderer.prototype.destroy = function destroy() {\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tviewport: -1,\n\t\t\tview: -1,\n\t\t\titem: null\n\t\t};\n\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = \"\";\n\t\tfor (var p in this._orgStyle) {\n\t\t\tthis[this.options.isOverflowScroll ? \"view\" : \"container\"].style[p] = this._orgStyle[p];\n\t\t}\n\t};\n\n\treturn DOMRenderer;\n}();\n\nexports[\"default\"] = DOMRenderer;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/DOMRenderer.js\n// module id = 3\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/*\nFrame\n[\n[1, 1, 1, 1, 1],\n[0, 0, 2, 2, 2],\n[0, 0, 2, 2, 2],\n[3, 4, 5, 5, 5],\n]\n*/\nfunction disableFrame(frame, type, x, y, width, height) {\n\tfor (var i = y; i < y + height; ++i) {\n\t\tfor (var j = x; j < x + width; ++j) {\n\t\t\tif (type !== frame[i][j]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tframe[i][j] = 0;\n\t\t}\n\t}\n}\nfunction searchShapeInFrame(frame, type, top, left, width, height) {\n\tvar size = {\n\t\tleft: left,\n\t\ttop: top,\n\t\ttype: type,\n\t\twidth: 1,\n\t\theight: 1\n\t};\n\n\tfor (var i = left; i < width; ++i) {\n\t\tif (frame[top][i] === type) {\n\t\t\tsize.width = i - left + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\tfor (var _i = top; _i < height; ++_i) {\n\t\tif (frame[_i][left] === type) {\n\t\t\tsize.height = _i - top + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\t// After finding the shape, it will not find again.\n\tdisableFrame(frame, type, left, top, size.width, size.height);\n\treturn size;\n}\nfunction getShapes(frame) {\n\tvar height = frame.length;\n\tvar width = height ? frame[0].length : 0;\n\tvar shapes = [];\n\n\tfor (var i = 0; i < height; ++i) {\n\t\tfor (var j = 0; j < width; ++j) {\n\t\t\tvar type = frame[i][j];\n\n\t\t\tif (!type) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Separate shapes with other numbers.\n\t\t\tshapes.push(searchShapeInFrame(frame, type, i, j, width, height));\n\t\t}\n\t}\n\tshapes.sort(function (a, b) {\n\t\treturn a.type < b.type ? -1 : 1;\n\t});\n\treturn {\n\t\tshapes: shapes,\n\t\twidth: width,\n\t\theight: height\n\t};\n}\n/**\n * @classdesc FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.\n * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.\n * @class eg.InfiniteGrid.FrameLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.FrameLayout module eg.InfiniteGrid.FrameLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @param {Boolean} [options.frame=[]] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @param {Boolean} [options.frameFill=true] Make sure that the frame can be attached after the previous frame. 다음 프레임이 전 프레임에 이어 붙일 수 있는지 있는지 확인한다. \n * @example\n```\n\n```\n **/\n\nvar FrameLayout = function () {\n\tfunction FrameLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, FrameLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\titemSize: 0,\n\t\t\tframe: [],\n\t\t\tframeFill: true\n\t\t}, options);\n\t\tvar frame = this.options.frame.map(function (row) {\n\t\t\treturn row.slice();\n\t\t});\n\t\t// divide frame into shapes.\n\t\tvar shapes = getShapes(frame);\n\n\t\tthis._itemSize = this.options.itemSize || 0;\n\t\tthis._shapes = shapes;\n\t\tthis._size = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tFrameLayout.prototype._getItemSize = function _getItemSize() {\n\t\tthis._checkItemSize();\n\n\t\treturn this._itemSize;\n\t};\n\n\tFrameLayout.prototype._checkItemSize = function _checkItemSize() {\n\t\tif (this.options.itemSize) {\n\t\t\tthis._itemSize = this.options.itemSize;\n\t\t\treturn;\n\t\t}\n\t\tvar style = this._style;\n\t\tvar size = style.size2;\n\t\tvar margin = this.options.margin;\n\n\t\t// if itemSize is not in options, caculate itemSize from size.\n\t\tthis._itemSize = (this._size + margin) / this._shapes[size] - margin;\n\t};\n\n\tFrameLayout.prototype._layout = function _layout(items) {\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar length = items.length;\n\t\tvar style = this._style;\n\t\tvar _options = this.options,\n\t\t margin = _options.margin,\n\t\t frameFill = _options.frameFill;\n\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar itemSize = this._getItemSize();\n\t\tvar isItemObject = (typeof itemSize === \"undefined\" ? \"undefined\" : _typeof(itemSize)) === \"object\";\n\t\tvar itemSize2 = isItemObject ? itemSize[size2Name] : itemSize;\n\t\tvar itemSize1 = isItemObject ? itemSize[size1Name] : itemSize;\n\t\tvar shapesSize = this._shapes[size2Name];\n\t\tvar shapes = this._shapes.shapes;\n\t\tvar shapesLength = shapes.length;\n\t\tvar startOutline = (0, _utils.fill)(shapesSize, _consts.DUMMY_POSITION);\n\t\tvar endOutline = (0, _utils.fill)(shapesSize, _consts.DUMMY_POSITION);\n\t\tvar dist = 0;\n\t\tvar end = 0;\n\t\tvar startIndex = -1;\n\t\tvar endIndex = -1;\n\t\tvar minPos = -1;\n\t\tvar maxPos = -1;\n\n\t\tif (!shapesLength) {\n\t\t\treturn { start: outline, end: outline, startIndex: startIndex, endIndex: endIndex };\n\t\t}\n\t\tfor (var i = 0; i < length; i += shapesLength) {\n\t\t\tfor (var j = 0; j < shapesLength && i + j < length; ++j) {\n\t\t\t\tvar _item$rect;\n\n\t\t\t\tvar item = items[i + j];\n\t\t\t\tvar shape = shapes[j];\n\t\t\t\tvar shapePos1 = shape[pos1Name];\n\t\t\t\tvar shapePos2 = shape[pos2Name];\n\t\t\t\tvar shapeSize1 = shape[size1Name];\n\t\t\t\tvar shapeSize2 = shape[size2Name];\n\t\t\t\tvar pos1 = end - dist + shapePos1 * (itemSize1 + margin);\n\t\t\t\tvar pos2 = shapePos2 * (itemSize2 + margin);\n\t\t\t\tvar size1 = shapeSize1 * (itemSize1 + margin) - margin;\n\t\t\t\tvar size2 = shapeSize2 * (itemSize2 + margin) - margin;\n\n\t\t\t\tfor (var k = shapePos2; k < shapePos2 + shapeSize2 && k < shapesSize; ++k) {\n\t\t\t\t\tif (startOutline[k] === _consts.DUMMY_POSITION) {\n\t\t\t\t\t\tstartOutline[k] = pos1;\n\t\t\t\t\t}\n\t\t\t\t\tif (startIndex === -1) {\n\t\t\t\t\t\tminPos = pos1;\n\t\t\t\t\t\tstartIndex = i + j;\n\t\t\t\t\t\tmaxPos = pos1 + size1 + margin;\n\t\t\t\t\t\tendIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tif (minPos > pos1) {\n\t\t\t\t\t\tminPos = pos1;\n\t\t\t\t\t\tstartIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tif (maxPos < pos1 + size1 + margin) {\n\t\t\t\t\t\tmaxPos = pos1 + size1 + margin;\n\t\t\t\t\t\tendIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tstartOutline[k] = Math.min(startOutline[k], pos1);\n\t\t\t\t\tendOutline[k] = Math.max(endOutline[k], pos1 + size1 + margin);\n\t\t\t\t}\n\t\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);\n\t\t\t}\n\t\t\tend = Math.max.apply(Math, endOutline);\n\t\t\t// check dist once\n\t\t\tif (i !== 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// find & fill empty block\n\t\t\tif (!frameFill) {\n\t\t\t\tdist = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdist = end;\n\n\t\t\tfor (var _j = 0; _j < shapesSize; ++_j) {\n\t\t\t\tif (startOutline[_j] === _consts.DUMMY_POSITION) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// the dist between frame's end outline and next frame's start outline\n\t\t\t\t// expect that next frame's start outline is startOutline[j] + end\n\t\t\t\tdist = Math.min(startOutline[_j] + end - endOutline[_j], dist);\n\t\t\t}\n\t\t}\n\t\tfor (var _i2 = 0; _i2 < shapesSize; ++_i2) {\n\t\t\tif (startOutline[_i2] !== _consts.DUMMY_POSITION) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tstartOutline[_i2] = Math.max.apply(Math, startOutline);\n\t\t\tendOutline[_i2] = startOutline[_i2];\n\t\t}\n\t\t// The target outline is start outline when type is APPENDING\n\t\tvar targetOutline = isAppend ? startOutline : endOutline;\n\t\tvar prevOutlineEnd = outline.length === 0 ? 0 : Math[isAppend ? \"max\" : \"min\"].apply(Math, outline);\n\t\tvar prevOutlineDist = isAppend ? 0 : end;\n\n\t\tif (frameFill && outline.length === shapesSize) {\n\t\t\tprevOutlineDist = -_consts.DUMMY_POSITION;\n\t\t\tfor (var _i3 = 0; _i3 < shapesSize; ++_i3) {\n\t\t\t\tif (startOutline[_i3] === endOutline[_i3]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// if appending type is PREPEND, subtract dist from appending group's height.\n\n\t\t\t\tprevOutlineDist = Math.min(targetOutline[_i3] + prevOutlineEnd - outline[_i3], prevOutlineDist);\n\t\t\t}\n\t\t}\n\t\tfor (var _i4 = 0; _i4 < shapesSize; ++_i4) {\n\t\t\tstartOutline[_i4] += prevOutlineEnd - prevOutlineDist;\n\t\t\tendOutline[_i4] += prevOutlineEnd - prevOutlineDist;\n\t\t}\n\t\titems.forEach(function (item) {\n\t\t\titem.rect[pos1Name] += prevOutlineEnd - prevOutlineDist;\n\t\t});\n\t\treturn {\n\t\t\tstart: startOutline,\n\t\t\tend: endOutline,\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tFrameLayout.prototype._insert = function _insert(items, outline, type) {\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tFrameLayout.prototype.layout = function layout(groups, outlines) {\n\t\tvar length = groups.length;\n\t\tvar point = outlines;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.FrameLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tFrameLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tFrameLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tFrameLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\n\treturn FrameLayout;\n}();\n\nexports[\"default\"] = FrameLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/FrameLayout.js\n// module id = 4\n// module chunks = 0 1","\"use strict\";\n\nvar _InfiniteGrid = require(\"./InfiniteGrid\");\n\nvar _InfiniteGrid2 = _interopRequireDefault(_InfiniteGrid);\n\nvar _GridLayout = require(\"./layouts/GridLayout\");\n\nvar _GridLayout2 = _interopRequireDefault(_GridLayout);\n\nvar _FrameLayout = require(\"./layouts/FrameLayout\");\n\nvar _FrameLayout2 = _interopRequireDefault(_FrameLayout);\n\nvar _SquareLayout = require(\"./layouts/SquareLayout\");\n\nvar _SquareLayout2 = _interopRequireDefault(_SquareLayout);\n\nvar _PackingLayout = require(\"./layouts/PackingLayout\");\n\nvar _PackingLayout2 = _interopRequireDefault(_PackingLayout);\n\nvar _JustifiedLayout = require(\"./layouts/JustifiedLayout\");\n\nvar _JustifiedLayout2 = _interopRequireDefault(_JustifiedLayout);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n/**\n * Copyright (c) NAVER Corp.\n * egjs-infinitegrid projects are licensed under the MIT license\n */\n_InfiniteGrid2[\"default\"].GridLayout = _GridLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].FrameLayout = _FrameLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].SquareLayout = _SquareLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].PackingLayout = _PackingLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].JustifiedLayout = _JustifiedLayout2[\"default\"];\n\nmodule.exports = _InfiniteGrid2[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/index.js\n// module id = 5\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; /**\n * Copyright (c) 2017 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\n\nvar _component = require(\"@egjs/component\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _ItemManager = require(\"./ItemManager\");\n\nvar _ItemManager2 = _interopRequireDefault(_ItemManager);\n\nvar _DOMRenderer = require(\"./DOMRenderer\");\n\nvar _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);\n\nvar _ImageLoaded = require(\"./ImageLoaded\");\n\nvar _ImageLoaded2 = _interopRequireDefault(_ImageLoaded);\n\nvar _Watcher = require(\"./Watcher\");\n\nvar _Watcher2 = _interopRequireDefault(_Watcher);\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// IE8\n// https://stackoverflow.com/questions/43216659/babel-ie8-inherit-issue-with-object-create\n/* eslint-disable */\nif (typeof Object.create !== \"function\") {\n\tObject.create = function (o, properties) {\n\t\tif ((typeof o === \"undefined\" ? \"undefined\" : _typeof(o)) !== \"object\" && typeof o !== \"function\") {\n\t\t\tthrow new TypeError(\"Object prototype may only be an Object: \" + o);\n\t\t} else if (o === null) {\n\t\t\tthrow new Error(\"This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument.\");\n\t\t}\n\t\tfunction F() {}\n\t\tF.prototype = o;\n\t\treturn new F();\n\t};\n}\n/* eslint-enable */\n\n/**\n * A module used to arrange card elements including content infinitely according to layout type. With this module, you can implement various layouts composed of different card elements whose sizes vary. It guarantees performance by maintaining the number of DOMs the module is handling under any circumstance\n * @ko 콘텐츠가 있는 카드 엘리먼트를 레이아웃 타입에 따라 무한으로 배치하는 모듈. 다양한 크기의 카드 엘리먼트를 다양한 레이아웃으로 배치할 수 있다. 카드 엘리먼트의 개수가 계속 늘어나도 모듈이 처리하는 DOM의 개수를 일정하게 유지해 최적의 성능을 보장한다\n * @alias eg.InfiniteGrid\n * @extends eg.Component\n *\n * @example\n```\n
\n\t- \n\t\t
test1
\n\t \n\t- \n\t\t
test2
\n\t \n\t- \n\t\t
test3
\n\t \n\t- \n\t\t
test4
\n\t \n\t- \n\t\t
test5
\n\t \n\t- \n\t\t
test6
\n\t \n
\n\n```\n *\n * @support {\"ie\": \"8+\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"2.1+ (except 3.x)\"}\n **/\n\nvar InfiniteGrid = function (_Component) {\n\t_inherits(InfiniteGrid, _Component);\n\n\t/**\n * @param {HTMLElement|String|jQuery} element A base element for a module 모듈을 적용할 기준 엘리먼트\n * @param {Object} [options] The option object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 옵션 객체\n * @param {String} [options.itemSelector] A selector to select card elements that make up the layout레이아웃을 구성하는 카드 엘리먼트를 선택할 선택자(selector)\n * @param {Boolean} [options.useRecycle=true] Indicates whether keep the number of DOMs is maintained. If the useRecycle value is 'true', keep the number of DOMs is maintained. If the useRecycle value is 'false', the number of DOMs will increase as card elements are added. DOM의 수를 유지할지 여부를 나타낸다. useRecycle 값이 'true'이면 DOM 개수를 일정하게 유지한다. useRecycle 값이 'false' 이면 카드 엘리먼트가 추가될수록 DOM 개수가 계속 증가한다.\n * @param {Boolean} [options.isOverflowScroll=false] Indicates whether overflow:scroll is appliedoverflow:scroll 적용여부를 결정한다.\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향\n * @param {Boolean} [options.isEqualSize=false] Indicates whether sizes of all card elements are equal to one another. If sizes of card elements to be arranged are all equal and this option is set to \"true\", the performance of layout arrangement can be improved. 카드 엘리먼트의 크기가 동일한지 여부. 배치될 카드 엘리먼트의 크기가 모두 동일할 때 이 옵션을 'true'로 설정하면 레이아웃 배치 성능을 높일 수 있다\n * @param {Number} [options.threshold=100] The threshold size of an event area where card elements are added to a layout.레이아웃에 카드 엘리먼트를 추가하는 이벤트가 발생하는 기준 영역의 크기.\n */\n\tfunction InfiniteGrid(element, options) {\n\t\t_classCallCheck(this, InfiniteGrid);\n\n\t\tvar _this = _possibleConstructorReturn(this, _Component.call(this));\n\n\t\t_extends(_this.options = {\n\t\t\titemSelector: \"*\",\n\t\t\tisOverflowScroll: false,\n\t\t\tthreshold: 100,\n\t\t\tisEqualSize: false,\n\t\t\tuseRecycle: true,\n\t\t\thorizontal: false\n\t\t}, options);\n\t\t_consts.IS_ANDROID2 && (_this.options.isOverflowScroll = false);\n\t\t_this._isVertical = !_this.options.horizontal;\n\t\t_this._reset();\n\t\t_this._items = new _ItemManager2[\"default\"]();\n\t\t_this._renderer = new _DOMRenderer2[\"default\"](element, {\n\t\t\tisOverflowScroll: _this.options.isOverflowScroll,\n\t\t\tisEqualSize: _this.options.isEqualSize,\n\t\t\tisVertical: _this._isVertical\n\t\t});\n\t\t_this._watcher = new _Watcher2[\"default\"](_this._renderer, {\n\t\t\tlayout: function layout() {\n\t\t\t\treturn _this.layout();\n\t\t\t},\n\t\t\tcheck: function check(param) {\n\t\t\t\treturn _this._onCheck(param);\n\t\t\t}\n\t\t});\n\t\treturn _this;\n\t}\n\t/**\n * Adds a card element at the bottom of a layout. This method is available only if the isProcessing() method returns false.\n * @ko 카드 엘리먼트를 레이아웃 아래에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다\n * 이 메소드는 isProcessing()의 반환값이 false일 경우에만 사용 가능하다.\n * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트의 배열\n * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.\n * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.append(\"<div class='item'>test1</div><div class='item'>test2</div>\");\n * infinitegrid.append([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]);\n * infinitegrid.append([HTMLElement1, HTMLElement2]);\n * infinitegrid.append(jQuery([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]));\n */\n\n\n\tInfiniteGrid.prototype.append = function append(elements, groupKey) {\n\t\tthis._layout && this._insert(elements, _consts.APPEND, groupKey);\n\t\treturn this;\n\t};\n\t/**\n * Adds a card element at the top of a layout. This method is available only if the isProcessing() method returns false.\n * @ko 카드 엘리먼트를 레이아웃의 위에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다\n * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트 배열\n * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.\n * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.prepend(\"<div class='item'>test1</div><div class='item'>test2</div>\");\n * infinitegrid.prepend([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]);\n * infinitegrid.prepend([HTMLElement1, HTMLElement2]);\n * infinitegrid.prepend(jQuery([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]));\n */\n\n\n\tInfiniteGrid.prototype.prepend = function prepend(elements, groupKey) {\n\t\tthis._layout && this._insert(elements, _consts.PREPEND, groupKey);\n\t\treturn this;\n\t};\n\t/**\n * Specifies the Layout class to use.\n * @ko 사용할 Layout 클래스를 지정한다.\n * @param {Class} LayoutKlass The Layout class to use 사용할 Layout 클래스\n * @param {Object} options Options to apply to the Layout.Layout에 적용할 옵션\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.setLayout(eg.InfiniteGrid.GridLayout, {\n * margin: 10,\n * align: \"start\"\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.JustifiedLayout, {\n * margin: 10,\n * minSize: 100,\n * maxSize: 200\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.SquareLayout, {\n * margin: 10,\n * column: 2\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.FrameLayout, {\n * margin: 10,\n * frame: [\n * [1, 2],\n * [4, 3],\n * ]\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.PackingLayout, {\n * margin: 10,\n * aspectRatio: 1.5\n * });\n */\n\n\n\tInfiniteGrid.prototype.setLayout = function setLayout(LayoutKlass, options) {\n\t\tthis._layout = new LayoutKlass(_extends(options || {}, {\n\t\t\thorizontal: !this._isVertical\n\t\t}));\n\t\tthis._layout.setSize(this._renderer.getViewportSize());\n\t\treturn this;\n\t};\n\t/**\n * Returns the layouted items.\n * @ko 레이아웃된 아이템들을 반환한다.\n * @param {Boolean} includeCached Indicates whether to include the cached items. 캐싱된 아이템을 포함할지 여부를 나타낸다.\n * @returns {Array} List of items 아이템의 목록\n */\n\n\n\tInfiniteGrid.prototype.getItems = function getItems() {\n\t\tvar includeCached = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n\t\treturn this[includeCached ? \"_getItems\" : \"_getVisibleItems\"]();\n\t};\n\n\tInfiniteGrid.prototype._getItems = function _getItems() {\n\t\treturn this._items.pluck(\"items\", 0, this._items.size());\n\t};\n\n\tInfiniteGrid.prototype._getVisibleItems = function _getVisibleItems() {\n\t\treturn this._items.pluck(\"items\", this._status.startCursor, this._status.endCursor);\n\t};\n\n\tInfiniteGrid.prototype._updateEdge = function _updateEdge() {\n\t\tthis._status.start = this._items.getEdge(\"start\", this._status.startCursor, this._status.endCursor);\n\t\tthis._status.end = this._items.getEdge(\"end\", this._status.startCursor, this._status.endCursor);\n\t};\n\n\tInfiniteGrid.prototype._getEdgeOffset = function _getEdgeOffset(cursor) {\n\t\tvar rect = null;\n\n\t\tif (!this._status[cursor]) {\n\t\t\tvar item = this._items.getEdge(cursor);\n\n\t\t\tthis._status[cursor] = item;\n\t\t}\n\n\t\tif (this._status[cursor]) {\n\t\t\trect = this._status[cursor].rect;\n\t\t\tif (cursor === \"start\") {\n\t\t\t\trect.bottom = rect.top + this._status[cursor].size.height;\n\t\t\t\trect.right = rect.left + this._status[cursor].size.width;\n\t\t\t}\n\t\t}\n\t\treturn rect;\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._fit = function _fit() {\n\t\tvar scrollCycle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"after\";\n\n\t\t// for caching\n\t\tif (!this._layout) {\n\t\t\treturn 0;\n\t\t}\n\t\tvar base = this._getEdgeValue(\"start\");\n\t\tvar margin = this._getLoadingStatus() === _consts.LOADING_PREPEND && this._status.loadingSize || 0;\n\n\t\tif (!this.options.useRecycle || _consts.DEFENSE_BROWSER) {\n\t\t\tif (scrollCycle === \"before\" && margin && base < margin) {\n\t\t\t\tthis._renderer.scrollBy(-Math.abs(base) + margin);\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\t} else if (scrollCycle === \"after\" && base < 0) {\n\t\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\t\tthis._renderer.scrollBy(Math.abs(base));\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (base !== 0 || margin) {\n\t\t\tvar isProcessing = this._isProcessing();\n\n\t\t\tthis._process(_consts.PROCESSING);\n\t\t\tif (scrollCycle === \"before\") {\n\t\t\t\tthis._renderer.scrollBy(-Math.abs(base) + margin);\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t}\n\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\tif (scrollCycle === \"after\") {\n\t\t\t\tthis._renderer.scrollBy(Math.abs(base) + margin);\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t}\n\t\t\tif (!isProcessing) {\n\t\t\t\tthis._process(_consts.PROCESSING, false);\n\t\t\t}\n\t\t}\n\t\treturn base;\n\t};\n\n\tInfiniteGrid.prototype._getEdgeValue = function _getEdgeValue(cursor) {\n\t\treturn this._items.getEdgeValue(cursor, this._status.startCursor, this._status.endCursor);\n\t};\n\t/**\n * Rearranges a layout.\n * @ko 레이아웃을 다시 배치한다.\n * @param {Boolean} [isRelayout=true] Indicates whether a card element is being relayouted 카드 엘리먼트 재배치 여부\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.layout = function layout() {\n\t\tvar _this2 = this;\n\n\t\tvar isRelayout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n\t\tif (!this._layout || this._isProcessing()) {\n\t\t\treturn this;\n\t\t}\n\t\t// check childElement\n\t\tif (!this._items.size()) {\n\t\t\tthis._insert((0, _utils.toArray)(this._renderer.container.children), true);\n\t\t\treturn this;\n\t\t}\n\t\tthis._process(_consts.PROCESSING);\n\n\t\tvar data = void 0;\n\t\tvar outline = void 0;\n\n\t\tif (isRelayout) {\n\t\t\t// remove cache\n\t\t\tdata = this._items.get(this._status.startCursor, this._status.endCursor);\n\t\t\tif (this._renderer.resize()) {\n\t\t\t\tthis._layout.setSize(this._renderer.getViewportSize());\n\t\t\t\tdata.forEach(function (v) {\n\t\t\t\t\tdata.items = _this2._renderer.updateSize(v.items);\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tdata = this._items.get(this._status.startCursor, this._items.size());\n\t\t\toutline = this._items.getOutline(this._status.startCursor, \"start\");\n\t\t}\n\t\tif (!data.length) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._layout.layout(data, outline);\n\n\t\tif (isRelayout) {\n\t\t\tthis._items._data.forEach(function (group, cursor) {\n\t\t\t\tif (_this2._status.startCursor <= cursor && cursor <= _this2._status.endCursor) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgroup.outlines.start = [];\n\t\t\t\tgroup.outlines.end = [];\n\t\t\t});\n\t\t} else {\n\t\t\tdata.forEach(function (v) {\n\t\t\t\treturn _this2._items.set(v, v.groupKey);\n\t\t\t});\n\t\t}\n\t\tthis._onLayoutComplete(data, _consts.APPEND, _consts.NO_TRUSTED, false);\n\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\tisRelayout && this._watcher.setScrollPos();\n\n\t\treturn this;\n\t};\n\t/**\n * Removes a item element on a grid layout.\n * @ko 그리드 레이아웃의 카드 엘리먼트를 삭제한다.\n * @param {HTMLElement} item element to be removed 삭제될 아이템 엘리먼트\n * @return {Object} Removed item element 삭제된 아이템 엘리먼트 정보\n */\n\n\n\tInfiniteGrid.prototype.remove = function remove(element) {\n\t\tif (element) {\n\t\t\tvar items = this._items.remove(element, this._status.startCursor, this._status.endCursor);\n\n\t\t\tif (items) {\n\t\t\t\t_DOMRenderer2[\"default\"].removeElement(element);\n\t\t\t\treturn items;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tInfiniteGrid.prototype._getNextItems = function _getNextItems(isAppend) {\n\t\tvar items = [];\n\t\tvar size = this._items.size();\n\n\t\t// from cache\n\t\tif (size > 0 && this._status.startCursor !== -1 && this._status.endCursor !== -1) {\n\t\t\tif (isAppend && size > this._status.endCursor + 1) {\n\t\t\t\titems = this._items.pluck(\"items\", this._status.endCursor + 1);\n\t\t\t} else if (!isAppend && this._status.startCursor > 0) {\n\t\t\t\titems = this._items.pluck(\"items\", this._status.startCursor - 1);\n\t\t\t}\n\t\t}\n\t\treturn items;\n\t};\n\t/**\n * Returns the list of group keys which belongs to card elements currently being maintained. You can use the append() or prepend() method to configure group keys so that multiple card elements can be managed at once. If you do not use these methods to configure group keys, groupkey is automatically generated.\n * @ko 현재 유지하고 있는 카드 엘리먼트의 그룹 키 목록을 반환한다. 여러 개의 카드 엘리먼트를 묶어서 관리할 수 있도록 append() 메서드나 prepend() 메서드에서 그룹 키를 지정할 수 있다. append() 메서드나 prepend() 메서드에서 그룹 키를 지정하지 않았다면 자동으로 그룹키가 생성된다.\n * @param {Boolean} includeCached Indicates whether to include the cached groups. 캐싱된 그룹을 포함할지 여부를 나타낸다.\n * @return {Array} List of group keys 그룹 키의 목록\n */\n\n\n\tInfiniteGrid.prototype.getGroupKeys = function getGroupKeys(includeCached) {\n\t\tvar data = includeCached ? this._items.get() : this._items.get(this._status.startCursor, this._status.endCursor);\n\n\t\treturn data.map(function (v) {\n\t\t\treturn v.groupKey;\n\t\t});\n\t};\n\t/**\n * Returns the current state of a module such as location information. You can use the setStatus() method to restore the information returned through a call to this method.\n * @ko 카드의 위치 정보 등 모듈의 현재 상태 정보를 반환한다. 이 메서드가 반환한 정보를 저장해 두었다가 setStatus() 메서드로 복원할 수 있다\n * @return {Object} State object of the eg.InfiniteGrid moduleeg.InfiniteGrid 모듈의 상태 객체\n */\n\n\n\tInfiniteGrid.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\toptions: _extends({}, this.options),\n\t\t\t_status: _extends({}, this._status),\n\t\t\t_items: this._items.getStatus(),\n\t\t\t_renderer: this._renderer.getStatus(),\n\t\t\t_watcher: this._watcher.getStatus()\n\t\t};\n\t};\n\t/**\n * Sets the state of the eg.InfiniteGrid module with the information returned through a call to the getStatue() method.\n * @ko getStatue() 메서드가 저장한 정보로 eg.InfiniteGrid 모듈의 상태를 설정한다.\n * @param {Object} status State object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 상태 객체\n * @param {boolean} [applyScrollPos=true] Checks whether to scroll스크롤의 위치를 복원할지 결정한다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.setStatus = function setStatus(status) {\n\t\tvar applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tif (!status || !status.options || !status._status || !status._renderer || !status._items || !status._watcher) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._watcher.detachEvent();\n\t\t_extends(this.options, status.options);\n\t\t_extends(this._status, status._status);\n\t\tthis._items.setStatus(status._items, this._status.startCursor, this._status.endCursor);\n\t\tthis._renderer.setStatus(status._renderer, this._getVisibleItems());\n\t\tthis._watcher.setStatus(status._watcher, applyScrollPos);\n\t\tthis._updateEdge();\n\t\tthis._watcher.attachEvent();\n\t\treturn this;\n\t};\n\t/**\n * Clears added card elements and data.\n * @ko 추가된 카드 엘리먼트와 데이터를 모두 지운다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.clear = function clear() {\n\t\tthis._items.clear();\n\t\tthis._renderer.clear();\n\t\tthis._reset();\n\t\tthis._appendLoadingBar();\n\t\treturn this;\n\t};\n\t/**\n * Specifies the Loading Bar to use for append or prepend items.\n * @ko 아이템을 append 또는 prepend 하기 위해 사용할 로딩 바를 지정한다.\n * @param {String|Object} [userLoadingBar={}] The loading bar HTML markup or element or element selector 로딩 바 HTML 또는 element 또는 selector \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.setLoadingBar = function setLoadingBar() {\n\t\tvar userLoadingBar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\tvar loadingBarObj = (typeof userLoadingBar === \"undefined\" ? \"undefined\" : _typeof(userLoadingBar)) === \"object\" ? userLoadingBar : {\n\t\t\t\"append\": userLoadingBar,\n\t\t\t\"prepend\": userLoadingBar\n\t\t};\n\n\t\tthis._status.loadingSize = 0;\n\t\tthis._status.loadingStyle = {};\n\t\tthis._loadingBar = this._loadingBar || {};\n\t\tvar loadingBar = this._loadingBar;\n\n\t\tfor (var type in loadingBarObj) {\n\t\t\tloadingBar[type] = (0, _utils.$)(loadingBarObj[type]);\n\t\t\tloadingBar[type].className += \" \" + _consts.IGNORE_CLASSNAME;\n\t\t}\n\t\tthis._appendLoadingBar();\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._appendLoadingBar = function _appendLoadingBar() {\n\t\tvar loadingBar = this._loadingBar;\n\t\tvar container = this._renderer.container;\n\n\t\tfor (var type in loadingBar) {\n\t\t\tcontainer.appendChild(loadingBar[type]);\n\t\t}\n\t};\n\t/**\n * Checks whether a card element or data is being added.\n * @ko 카드 엘리먼트 추가 또는 데이터 로딩이 진행 중인지 확인한다\n * @return {Boolean} Indicates whether a card element or data is being added 카드 엘리먼트 추가 또는 데이터 로딩 진행 중 여부\n */\n\n\n\tInfiniteGrid.prototype.isProcessing = function isProcessing() {\n\t\treturn this._isProcessing() || this._isLoading();\n\t};\n\n\tInfiniteGrid.prototype._isProcessing = function _isProcessing() {\n\t\treturn (this._status.processingStatus & _consts.PROCESSING) > 0;\n\t};\n\n\tInfiniteGrid.prototype._isLoading = function _isLoading() {\n\t\treturn this._getLoadingStatus() > 0;\n\t};\n\n\tInfiniteGrid.prototype._getLoadingStatus = function _getLoadingStatus() {\n\t\treturn this._status.processingStatus & (_consts.LOADING_APPEND | _consts.LOADING_PREPEND);\n\t};\n\n\tInfiniteGrid.prototype._process = function _process(status) {\n\t\tvar isAdd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tif (isAdd) {\n\t\t\tthis._status.processingStatus |= status;\n\t\t} else {\n\t\t\tthis._status.processingStatus -= this._status.processingStatus & status;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._insert = function _insert(elements, isAppend, groupKey) {\n\t\tif (this._isProcessing() || elements.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tvar key = typeof groupKey === \"undefined\" ? new Date().getTime() + Math.floor(Math.random() * 1000) : groupKey;\n\t\tvar items = _ItemManager2[\"default\"].from((0, _utils.$)(elements, true), this.options.itemSelector, {\n\t\t\tisAppend: isAppend,\n\t\t\tgroupKey: key\n\t\t});\n\n\t\tif (!items.length) {\n\t\t\treturn;\n\t\t}\n\t\tthis._postLayout(_consts.NO_CACHE, items, isAppend, _consts.NO_TRUSTED);\n\t};\n\t// add items, and remove items for recycling\n\n\n\tInfiniteGrid.prototype._recycle = function _recycle(isAppend) {\n\t\tvar remove = [];\n\n\t\tif (this._status.startCursor !== this._status.endCursor) {\n\t\t\tfor (var i = this._status.startCursor; i <= this._status.endCursor; i++) {\n\t\t\t\tremove.push(this._isVisible(i));\n\t\t\t}\n\t\t}\n\t\tvar start = remove.indexOf(isAppend ? 1 : -1);\n\t\tvar end = remove.lastIndexOf(isAppend ? 1 : -1);\n\t\tvar visible = remove.indexOf(0);\n\n\t\tif (visible === -1 || start === -1 || end === -1) {\n\t\t\treturn;\n\t\t}\n\n\t\tstart = this._status.startCursor + (isAppend ? 0 : start);\n\t\tend = isAppend ? this._status.startCursor + end : this._status.endCursor;\n\t\t_DOMRenderer2[\"default\"].removeItems(this._items.pluck(\"items\", start, end));\n\t\tif (isAppend) {\n\t\t\tthis._status.startCursor = end + 1;\n\t\t} else {\n\t\t\tthis._status.endCursor = start - 1;\n\t\t}\n\t};\n\t/**\n * Returns the element of loading bar.\n * @ko 로딩 바의 element를 반환한다.\n * @param {Boolean} [isAppend=currentLoadingBar|true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.\n * @return {Element} The element of loading bar. 로딩 바의 element\n */\n\n\n\tInfiniteGrid.prototype.getLoadingBar = function getLoadingBar() {\n\t\tvar isAppend = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._getLoadingStatus() !== _consts.LOADING_PREPEND;\n\n\t\treturn this._loadingBar[isAppend ? \"append\" : \"prepend\"];\n\t};\n\t/**\n * Start loading for append/prepend during loading data.\n * @ko 데이터가 로딩되는 동안 append/prepend하길 위해 로딩을 시작한다.\n * @param {Boolean} [isAppend=true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.\n * @param {Object} [userStyle = {display: \"block\"}] custom style to apply to this loading bar for start. 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일 \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.startLoading = function startLoading(isAppend) {\n\t\tvar userStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { display: \"block\" };\n\n\t\tif (this._isLoading()) {\n\t\t\treturn this;\n\t\t}\n\t\tvar type = isAppend ? \"append\" : \"prepend\";\n\n\t\tthis._process(isAppend ? _consts.LOADING_APPEND : _consts.LOADING_PREPEND);\n\t\tif (!this._loadingBar[type]) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._renderLoading(userStyle);\n\t\tthis._status.loadingStyle = userStyle;\n\t\tif (!isAppend) {\n\t\t\tthis._fit(\"before\");\n\t\t} else {\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") + this._status.loadingSize);\n\t\t}\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._renderLoading = function _renderLoading() {\n\t\tvar _extends2;\n\n\t\tvar userStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._status.loadingStyle;\n\n\t\tif (!this._isLoading()) {\n\t\t\treturn;\n\t\t}\n\t\tvar isAppend = this._getLoadingStatus() === _consts.LOADING_APPEND;\n\t\tvar el = this._loadingBar[isAppend ? \"append\" : \"prepend\"];\n\n\t\tif (!el) {\n\t\t\treturn;\n\t\t}\n\t\tthis._status.loadingSize = this._isVertical ? (0, _utils.innerHeight)(el) : (0, _utils.innerWidth)(el);\n\t\tvar pos = isAppend ? this._getEdgeValue(\"end\") : this._getEdgeValue(\"start\") - this._status.loadingSize;\n\t\tvar style = _extends((_extends2 = {\n\t\t\tposition: \"absolute\"\n\t\t}, _extends2[this._isVertical ? \"top\" : \"left\"] = pos + \"px\", _extends2), userStyle);\n\n\t\tfor (var property in style) {\n\t\t\tel.style[property] = style[property];\n\t\t}\n\t};\n\t/**\n * End loading after startLoading() for append/prepend\n * @ko append/prepend하길 위해 startLoading() 호출해선 걸었던 로딩을 끝낸다.\n * @param {Object} [userStyle = {display: \"none\"}] custom style to apply to this loading bar for end 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일 \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.endLoading = function endLoading() {\n\t\tvar _extends3;\n\n\t\tvar userStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { display: \"none\" };\n\n\t\tif (!this._isLoading()) {\n\t\t\treturn this;\n\t\t}\n\t\tvar isAppend = this._getLoadingStatus() === _consts.LOADING_APPEND;\n\t\tvar type = isAppend ? \"append\" : \"prepend\";\n\t\tvar el = this._loadingBar[type];\n\t\tvar size = this._status.loadingSize;\n\n\t\tthis._process(_consts.LOADING_APPEND | _consts.LOADING_PREPEND, false);\n\t\tthis._status.loadingSize = 0;\n\t\tthis._status.loadingStyle = {};\n\t\tif (!el) {\n\t\t\treturn this;\n\t\t}\n\t\tvar style = _extends((_extends3 = {}, _extends3[this._isVertical ? \"top\" : \"left\"] = -size + \"px\", _extends3), userStyle);\n\n\t\tfor (var property in style) {\n\t\t\tel.style[property] = style[property];\n\t\t}\n\t\tif (!isAppend) {\n\t\t\tthis._renderer.scrollBy(-size);\n\t\t\tthis._watcher.setScrollPos();\n\t\t\tthis._items.fit(size, this._isVertical);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\"));\n\t\t}\n\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\"));\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._postLayout = function _postLayout(fromCache, items, isAppend, isTrusted) {\n\t\tvar _this3 = this;\n\n\t\tvar outline = this._items.getOutline(isAppend ? this._status.endCursor : this._status.startCursor, isAppend ? \"end\" : \"start\");\n\n\t\tvar fromRelayout = false;\n\n\t\tif (fromCache) {\n\t\t\tvar cacheOutline = this._items.getOutline(isAppend ? this._status.endCursor + 1 : this._status.startCursor - 1, isAppend ? \"start\" : \"end\");\n\n\t\t\tfromRelayout = outline.length === cacheOutline.length ? !outline.every(function (v, index) {\n\t\t\t\treturn v === cacheOutline[index];\n\t\t\t}) : true;\n\n\t\t\tif (!fromRelayout) {\n\t\t\t\tthis._renderer.createAndInsert(items, isAppend);\n\t\t\t\tthis._updateCursor(isAppend);\n\t\t\t\tthis._onLayoutComplete(items, isAppend, isTrusted);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\t\tthis._process(_consts.PROCESSING);\n\t\tvar method = isAppend ? \"append\" : \"prepend\";\n\n\t\tfromCache && _DOMRenderer2[\"default\"].createElements(items);\n\t\tthis._renderer[method](items);\n\t\t// check image sizes after elements are attated on DOM\n\t\t_ImageLoaded2[\"default\"].check(items.map(function (item) {\n\t\t\treturn item.el;\n\t\t}), function () {\n\t\t\tvar layouted = _this3._layout[method](_this3._renderer.updateSize(items), outline);\n\n\t\t\tif (fromCache) {\n\t\t\t\t_this3._setItems(layouted);\n\t\t\t} else {\n\t\t\t\t_this3._insertItems(layouted, isAppend);\n\t\t\t}\n\t\t\t_this3._updateCursor(isAppend);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(layouted.items);\n\t\t\t_this3._onLayoutComplete(layouted.items, isAppend, isTrusted);\n\t\t});\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._isVisible = function _isVisible(index) {\n\t\tvar min = Math.min.apply(Math, this._items.getOutline(index, \"start\"));\n\t\tvar max = Math.max.apply(Math, this._items.getOutline(index, \"end\"));\n\t\tvar pos = this._watcher.getScrollPos();\n\t\tvar viewSize = this._renderer.getViewSize();\n\n\t\tif (pos + viewSize + this.options.threshold < min) {\n\t\t\treturn -1;\n\t\t} else if (pos - this.options.threshold > max) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t};\n\n\tInfiniteGrid.prototype._updateCursor = function _updateCursor(isAppend) {\n\t\tif (this.options.useRecycle) {\n\t\t\tif (isAppend) {\n\t\t\t\tthis._status.endCursor++;\n\t\t\t} else if (this._status.startCursor > 0) {\n\t\t\t\tthis._status.startCursor--;\n\t\t\t} else {\n\t\t\t\tthis._status.endCursor++; // outside prepend\n\t\t\t}\n\t\t\tif (this._status.startCursor < 0) {\n\t\t\t\tthis._status.startCursor = 0;\n\t\t\t}\n\t\t} else {\n\t\t\tthis._status.startCursor = 0;\n\t\t\tthis._status.endCursor = this._items.size() - 1;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._setItems = function _setItems(layouted) {\n\t\tvar groupKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : layouted.items && layouted.items[0].groupKey || 0;\n\n\t\tlayouted.groupKey = groupKey;\n\t\tthis._items.set(layouted, groupKey);\n\t};\n\n\tInfiniteGrid.prototype._insertItems = function _insertItems(layouted, isAppend) {\n\t\tlayouted.groupKey = layouted.items[0].groupKey;\n\t\tthis._items[isAppend ? \"append\" : \"prepend\"](layouted);\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._requestAppend = function _requestAppend() {\n\t\tvar items = this._getNextItems(_consts.APPEND);\n\n\t\tif (this._isProcessing()) {\n\t\t\treturn;\n\t\t}\n\t\tif (items.length) {\n\t\t\tthis._postLayout(_consts.CACHE, items, _consts.APPEND, _consts.TRUSTED);\n\t\t} else {\n\t\t\t/**\n * This event is fired when a card element must be added at the bottom or right of a layout because there is no card to be displayed on screen when a user scrolls near bottom or right.\n * @ko 카드 엘리먼트가 레이아웃의 아래나 오른쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 아래나 오른쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다\n * @event eg.InfiniteGrid#append\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 마지막 그룹의 그룹키\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\t\tthis.trigger(\"append\", {\n\t\t\t\tisTrusted: true,\n\t\t\t\tgroupKey: this.getGroupKeys().pop()\n\t\t\t});\n\t\t}\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._requestPrepend = function _requestPrepend() {\n\t\tvar items = this._getNextItems(_consts.PREPEND);\n\n\t\tif (this._isProcessing()) {\n\t\t\treturn;\n\t\t}\n\t\tif (items.length) {\n\t\t\tthis._postLayout(_consts.CACHE, items, _consts.PREPEND, _consts.TRUSTED);\n\t\t} else {\n\t\t\t/**\n * This event is fired when a card element must be added at the top or left of a layout because there is no card to be displayed on screen when a user scrolls near top or left.\n * @ko 카드가 레이아웃의 위나 왼쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 위나 왼쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다.\n * @event eg.InfiniteGrid#prepend\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 첫번째 그룹의 그룹키\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\t\tthis.trigger(\"prepend\", {\n\t\t\t\tisTrusted: true,\n\t\t\t\tgroupKey: this.getGroupKeys().shift()\n\t\t\t});\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._onCheck = function _onCheck(_ref) {\n\t\tvar isForward = _ref.isForward,\n\t\t scrollPos = _ref.scrollPos,\n\t\t horizontal = _ref.horizontal,\n\t\t orgScrollPos = _ref.orgScrollPos;\n\n\t\t/**\n * This event is fired when the user scrolls.\n * @ko 사용자가 스크롤 할 경우 발생하는 이벤트.\n * @event eg.InfiniteGrid#change\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {Boolean} param.isForward Indicates whether the scroll progression direction is forward or backword. 스크롤 진행방향이 앞쪽으로 진행하는 지, 뒤쪽으로 진행하는지를 나타낸다.\n * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값\n * @param {Boolean} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n * @param {Boolean} options.horizontal Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향\n */\n\t\tthis.trigger(\"change\", {\n\t\t\tisForward: isForward,\n\t\t\thorizontal: horizontal,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: orgScrollPos\n\t\t});\n\t\tvar rect = this._getEdgeOffset(isForward ? \"end\" : \"start\");\n\t\tvar isProcessing = this.isProcessing();\n\n\t\tif (!rect) {\n\t\t\treturn;\n\t\t}\n\t\tvar targetPos = isForward ? rect[horizontal ? \"left\" : \"top\"] - this._renderer.getViewSize() : rect[horizontal ? \"right\" : \"bottom\"];\n\n\t\tif (!isProcessing && isForward) {\n\t\t\tif (scrollPos >= targetPos) {\n\t\t\t\tthis._requestAppend();\n\t\t\t}\n\t\t} else if (scrollPos <= targetPos) {\n\t\t\tthis._fit(\"before\");\n\t\t\tthis._requestPrepend();\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._onLayoutComplete = function _onLayoutComplete(items, isAppend) {\n\t\tvar isTrusted = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\t\tvar useRecycle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.options.useRecycle;\n\n\t\tthis._isLoading() && this._renderLoading();\n\t\t!isAppend && this._fit(\"after\");\n\t\tuseRecycle && this._recycle(isAppend);\n\n\t\tvar size = this._getEdgeValue(\"end\");\n\n\t\t// recycle after _fit beacause prepend and append are occured simultaneously by scroll.\n\t\tthis._updateEdge();\n\n\t\tisAppend && this._renderer.setContainerSize(size + this._status.loadingSize || 0);\n\t\tthis._process(_consts.PROCESSING, false);\n\n\t\tvar scrollPos = this._watcher.getScrollPos();\n\n\t\t/**\n * This event is fired when layout is successfully arranged through a call to the append(), prepend(), or layout() method.\n * @ko 레이아웃 배치가 완료됐을 때 발생하는 이벤트. append() 메서드나 prepend() 메서드, layout() 메서드 호출 후 카드의 배치가 완료됐을 때 발생한다\n * @event eg.InfiniteGrid#layoutComplete\n *\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {Array} param.target Rearranged card elements재배치된 카드 엘리먼트들\n * @param {Boolean} param.isAppend Checks whether the append() method is used to add a card element. It returns true even though the layoutComplete event is fired after the layout() method is called. 카드 엘리먼트가 append() 메서드로 추가됐는지 확인한다. layout() 메서드가 호출된 후 layoutComplete 이벤트가 발생해도 'true'를 반환한다.\n * @param {Boolean} param.isScroll Checks whether scrolling has occurred after the append(), prepend(), ..., etc method is called\n * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값\n * @param {Number} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값\n * @param {Number} param.size The size of container element 컨테이너 엘리먼트의 크기\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\tthis.trigger(\"layoutComplete\", {\n\t\t\ttarget: items.concat(),\n\t\t\tisAppend: isAppend,\n\t\t\tisTrusted: isTrusted,\n\t\t\tisScroll: this._renderer.getViewSize() < this._renderer.getContainerOffset() + size,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: this._watcher.getOrgScrollPos(),\n\t\t\tsize: size\n\t\t});\n\n\t\tif (isAppend && scrollPos >= size) {\n\t\t\tthis._requestAppend();\n\t\t} else if (!isAppend && scrollPos <= this._getEdgeValue(\"start\")) {\n\t\t\tthis._fit(\"before\");\n\t\t\tthis._requestPrepend();\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._reset = function _reset() {\n\t\tthis._status = {\n\t\t\tprocessingStatus: _consts.IDLE,\n\t\t\tloadingSize: 0,\n\t\t\tstartCursor: -1,\n\t\t\tendCursor: -1,\n\t\t\tstart: null,\n\t\t\tend: null\n\t\t};\n\t};\n\t/**\n * Destroys elements, properties, and events used on a grid layout.\n * @ko 그리드 레이아웃에 사용한 엘리먼트와 속성, 이벤트를 해제한다\n */\n\n\n\tInfiniteGrid.prototype.destroy = function destroy() {\n\t\tthis.off();\n\t\tthis._watcher.destroy();\n\t\tthis._reset();\n\t\tthis._items.clear();\n\t\tthis._renderer.destroy();\n\t};\n\n\treturn InfiniteGrid;\n}(_component2[\"default\"]);\n\nInfiniteGrid.VERSION = \"3.0.0-rc\";\n\nexports[\"default\"] = InfiniteGrid;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/InfiniteGrid.js\n// module id = 6\n// module chunks = 0 1","module.exports = __WEBPACK_EXTERNAL_MODULE_7__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"commonjs\":\"@egjs/component\",\"commonjs2\":\"@egjs/component\",\"amd\":\"@egjs/component\",\"root\":[\"eg\",\"Component\"]}\n// module id = 7\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"./consts\");\n\nvar _DOMRenderer = require(\"./DOMRenderer\");\n\nvar _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ItemManager = function () {\n\tItemManager.from = function from(elements, selector, _ref) {\n\t\tvar groupKey = _ref.groupKey,\n\t\t isAppend = _ref.isAppend;\n\n\t\tvar filted = ItemManager.selectItems((0, _utils.$)(elements, _consts.MULTI), selector);\n\n\t\t// Item Structure\n\t\treturn (0, _utils.toArray)(filted).map(function (el) {\n\t\t\treturn {\n\t\t\t\tel: el,\n\t\t\t\tgroupKey: groupKey,\n\t\t\t\tcontent: el.outerHTML\n\t\t\t};\n\t\t});\n\t};\n\n\tItemManager.selectItems = function selectItems(elements, selector) {\n\t\treturn elements.filter(function (v) {\n\t\t\tvar classNames = v.className.split(\" \");\n\n\t\t\tif (classNames.some(function (c) {\n\t\t\t\treturn c === _consts.IGNORE_CLASSNAME;\n\t\t\t})) {\n\t\t\t\treturn false;\n\t\t\t} else if (selector === \"*\") {\n\t\t\t\treturn v;\n\t\t\t} else {\n\t\t\t\treturn classNames.some(function (c) {\n\t\t\t\t\treturn c === selector;\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\tItemManager.pluck = function pluck(data, property) {\n\t\treturn data.reduce(function (acc, v) {\n\t\t\treturn acc.concat(v[property]);\n\t\t}, []);\n\t};\n\n\tfunction ItemManager() {\n\t\t_classCallCheck(this, ItemManager);\n\n\t\tthis.clear();\n\t}\n\n\tItemManager.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\t_data: this._data.map(function (data) {\n\t\t\t\tvar items = data.items.map(function (item) {\n\t\t\t\t\tvar item2 = _extends({}, item);\n\n\t\t\t\t\tdelete item2.el;\n\t\t\t\t\treturn item2;\n\t\t\t\t});\n\t\t\t\tvar data2 = _extends({}, data);\n\n\t\t\t\tdata2.items = items;\n\t\t\t\treturn data2;\n\t\t\t})\n\t\t};\n\t};\n\n\tItemManager.prototype.setStatus = function setStatus(status, start, end) {\n\t\tvar data = status._data;\n\n\t\tfor (var i = start; i <= end; i++) {\n\t\t\tdata[i].items = _DOMRenderer2[\"default\"].createElements(data[i].items);\n\t\t}\n\t\tthis.set(data);\n\t};\n\n\tItemManager.prototype.size = function size() {\n\t\treturn this._data.length;\n\t};\n\n\tItemManager.prototype.fit = function fit(base, isVertical) {\n\t\tif (!this._data.length) {\n\t\t\treturn;\n\t\t}\n\t\tvar property = isVertical ? \"top\" : \"left\";\n\n\t\tif (base !== 0) {\n\t\t\tthis._data = this._data.map(function (v) {\n\t\t\t\tv.items = v.items.map(function (item) {\n\t\t\t\t\titem.rect[property] -= base;\n\t\t\t\t\treturn item;\n\t\t\t\t});\n\t\t\t\tv.outlines.start = v.outlines.start.map(function (start) {\n\t\t\t\t\treturn start - base;\n\t\t\t\t});\n\t\t\t\tv.outlines.end = v.outlines.end.map(function (end) {\n\t\t\t\t\treturn end - base;\n\t\t\t\t});\n\t\t\t\treturn v;\n\t\t\t});\n\t\t}\n\t};\n\n\tItemManager.prototype.pluck = function pluck(property, start, end) {\n\t\tif (typeof start !== \"undefined\") {\n\t\t\tif (typeof end !== \"undefined\") {\n\t\t\t\treturn ItemManager.pluck(this._data.slice(start, end + 1), property);\n\t\t\t} else {\n\t\t\t\treturn ItemManager.pluck(this._data.slice(start, start + 1), property);\n\t\t\t}\n\t\t} else {\n\t\t\treturn ItemManager.pluck(this._data, property);\n\t\t}\n\t};\n\n\tItemManager.prototype.getOutline = function getOutline(index, property) {\n\t\tif (this._data.length) {\n\t\t\treturn this._data[index].outlines[property];\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t};\n\n\tItemManager.prototype.getEdgeIndex = function getEdgeIndex(cursor, start, end) {\n\t\tvar prop = cursor === \"start\" ? \"min\" : \"max\";\n\t\tvar index = -1;\n\t\tvar targetValue = cursor === \"start\" ? Infinity : -Infinity;\n\n\t\tfor (var i = start; i <= end; i++) {\n\t\t\tvar value = Math[prop].apply(Math, this.getOutline(i, cursor));\n\n\t\t\tif (cursor === \"start\" && targetValue > value || cursor === \"end\" && targetValue < value) {\n\t\t\t\ttargetValue = value;\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t};\n\n\tItemManager.prototype.getEdge = function getEdge(cursor, start, end) {\n\t\tvar dataIdx = this.getEdgeIndex(cursor, start, end);\n\t\tvar items = this.pluck(\"items\", dataIdx);\n\n\t\tif (items.length) {\n\t\t\tvar itemIdx = this.getOutline(dataIdx, cursor + \"Index\");\n\n\t\t\treturn items.length > itemIdx ? items[itemIdx] : null;\n\t\t}\n\t\treturn null;\n\t};\n\n\tItemManager.prototype.getEdgeValue = function getEdgeValue(cursor, start, end) {\n\t\tvar outlines = this.pluck(\"outlines\", this.getEdgeIndex(cursor, start, end)).reduce(function (acc, v) {\n\t\t\treturn acc.concat(v[cursor]);\n\t\t}, []);\n\n\t\treturn outlines.length ? Math[cursor === \"start\" ? \"min\" : \"max\"].apply(Math, outlines) : 0;\n\t};\n\n\tItemManager.prototype.append = function append(layouted) {\n\t\tthis._data.push(layouted);\n\t\treturn layouted.items;\n\t};\n\n\tItemManager.prototype.prepend = function prepend(layouted) {\n\t\tthis._data.unshift(layouted);\n\t\treturn layouted.items;\n\t};\n\n\tItemManager.prototype.clear = function clear() {\n\t\tthis._data = [];\n\t};\n\n\tItemManager.prototype.remove = function remove(element, start, end) {\n\t\tvar items = null;\n\t\tvar key = element.getAttribute(_consts.GROUPKEY_ATT);\n\t\tvar data = this.get(start, end).filter(function (v) {\n\t\t\treturn String(v.groupKey) === key;\n\t\t});\n\n\t\tif (!data.length) {\n\t\t\treturn items;\n\t\t}\n\t\tdata = data[0];\n\n\t\tvar len = data.items.length;\n\t\tvar idx = -1;\n\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tif (data.items[i].el === element) {\n\t\t\t\tidx = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (~idx) {\n\t\t\t// remove item information\n\t\t\tdata.items.splice(idx, 1);\n\t\t\tthis.set(data, key);\n\t\t\titems = data.items;\n\t\t}\n\t\treturn items;\n\t};\n\n\tItemManager.prototype.get = function get(start, end) {\n\t\tif (typeof start !== \"undefined\") {\n\t\t\tif (typeof end !== \"undefined\") {\n\t\t\t\treturn this._data.slice(start, end + 1);\n\t\t\t} else {\n\t\t\t\treturn this._data.slice(start, start + 1);\n\t\t\t}\n\t\t} else {\n\t\t\treturn this._data.concat();\n\t\t}\n\t};\n\n\tItemManager.prototype.set = function set(data, key) {\n\t\tif (typeof key !== \"undefined\" && !Array.isArray(data)) {\n\t\t\tvar len = this._data.length;\n\t\t\tvar idx = -1;\n\n\t\t\tfor (var i = 0; i < len; i++) {\n\t\t\t\tif (this._data[i].groupKey === key) {\n\t\t\t\t\tidx = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t~idx && (this._data[idx] = data);\n\t\t} else {\n\t\t\tthis._data = data.concat();\n\t\t}\n\t};\n\n\treturn ItemManager;\n}();\n\nexports[\"default\"] = ItemManager;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/ItemManager.js\n// module id = 8\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ImageLoaded = function () {\n\tfunction ImageLoaded() {\n\t\t_classCallCheck(this, ImageLoaded);\n\t}\n\n\tImageLoaded.waitImageLoaded = function waitImageLoaded(needCheck, callback) {\n\t\tvar checkCount = needCheck.length;\n\t\tvar checkImage = function checkImage() {\n\t\t\tcheckCount--;\n\t\t\tcheckCount <= 0 && callback && callback();\n\t\t};\n\t\tvar onCheck = function onCheck(e) {\n\t\t\t(0, _utils.removeEvent)(e.target || e.srcElement, \"load\", onCheck);\n\t\t\t(0, _utils.removeEvent)(e.target || e.srcElement, \"error\", onCheck);\n\t\t\tcheckImage();\n\t\t};\n\n\t\t// workaround for IE\n\t\t_consts.IS_IE && needCheck.forEach(function (v) {\n\t\t\treturn v.setAttribute(\"src\", v.getAttribute(\"src\"));\n\t\t});\n\t\tneedCheck.forEach(function (v) {\n\t\t\tif (v.complete) {\n\t\t\t\tcheckImage();\n\t\t\t} else {\n\t\t\t\t(0, _utils.addEvent)(v, \"load\", onCheck);\n\t\t\t\t(0, _utils.addEvent)(v, \"error\", onCheck);\n\t\t\t}\n\t\t});\n\t};\n\n\tImageLoaded.checkImageLoaded = function checkImageLoaded(el) {\n\t\tif (el.tagName === \"IMG\") {\n\t\t\treturn !el.complete ? [el] : [];\n\t\t} else {\n\t\t\treturn (0, _utils.toArray)(el.querySelectorAll(\"img\")).filter(function (v) {\n\t\t\t\tif (v.nodeType && [1, 9, 11].indexOf(v.nodeType) !== -1) {\n\t\t\t\t\treturn !v.complete;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\tImageLoaded.check = function check(elements, callback) {\n\t\tvar _this = this;\n\n\t\tvar needCheck = elements.reduce(function (acc, v) {\n\t\t\treturn acc.concat(_this.checkImageLoaded(v));\n\t\t}, []);\n\n\t\tif (needCheck.length > 0) {\n\t\t\tImageLoaded.waitImageLoaded(needCheck, callback);\n\t\t} else {\n\t\t\t// convert to async\n\t\t\tsetTimeout(function () {\n\t\t\t\tcallback && callback();\n\t\t\t}, 0);\n\t\t}\n\t};\n\n\treturn ImageLoaded;\n}();\n\nexports[\"default\"] = ImageLoaded;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/ImageLoaded.js\n// module id = 9\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Watcher = function () {\n\tfunction Watcher(renderer, callback) {\n\t\t_classCallCheck(this, Watcher);\n\n\t\t_extends(this._callback = {\n\t\t\tlayout: null,\n\t\t\tcheck: null\n\t\t}, callback);\n\t\tthis._timer = {\n\t\t\tresize: null\n\t\t\t// doubleCheck: null,\n\t\t\t// doubleCheckCount: RETRY,\n\t\t};\n\t\tthis.reset();\n\t\tthis._renderer = renderer;\n\t\tthis._onCheck = this._onCheck.bind(this);\n\t\tthis._onResize = this._onResize.bind(this);\n\t\tthis.attachEvent();\n\t\tthis.setScrollPos();\n\t}\n\n\tWatcher.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\t_prevPos: this._prevPos,\n\t\t\tscrollPos: this.getOrgScrollPos()\n\t\t};\n\t};\n\n\tWatcher.prototype.setStatus = function setStatus(status) {\n\t\tvar applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tthis._prevPos = status._prevPos;\n\t\tapplyScrollPos && this.scrollTo(status.scrollPos);\n\t};\n\n\tWatcher.prototype.scrollTo = function scrollTo(pos) {\n\t\tvar arrPos = this._renderer.options.isVertical ? [0, pos] : [pos, 0];\n\n\t\t_utils.scrollTo.apply(undefined, [this._renderer.view].concat(arrPos));\n\t};\n\n\tWatcher.prototype.getScrollPos = function getScrollPos() {\n\t\treturn this._prevPos;\n\t};\n\n\tWatcher.prototype.setScrollPos = function setScrollPos(pos) {\n\t\tvar rawPos = pos;\n\n\t\tif (typeof pos === \"undefined\") {\n\t\t\trawPos = this.getOrgScrollPos();\n\t\t}\n\t\tthis._prevPos = rawPos - this._renderer.getContainerOffset();\n\t};\n\n\tWatcher.prototype.attachEvent = function attachEvent() {\n\t\t(0, _utils.addEvent)(this._renderer.view, \"scroll\", this._onCheck);\n\t\t(0, _utils.addEvent)(window, \"resize\", this._onResize);\n\t};\n\n\tWatcher.prototype.getOrgScrollPos = function getOrgScrollPos() {\n\t\treturn (0, _utils.scroll)(this._renderer.view, this._renderer.options.isVertical);\n\t};\n\n\tWatcher.prototype.reset = function reset() {\n\t\tthis._prevPos = null;\n\t};\n\n\tWatcher.prototype._onCheck = function _onCheck() {\n\t\tvar prevPos = this.getScrollPos();\n\t\tvar orgScrollPos = this.getOrgScrollPos();\n\n\t\tthis.setScrollPos(orgScrollPos);\n\t\tvar scrollPos = this.getScrollPos();\n\n\t\tif (prevPos === null || _consts.IS_IOS && orgScrollPos === 0 || prevPos === scrollPos) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._callback.check && this._callback.check({\n\t\t\tisForward: prevPos < scrollPos,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: orgScrollPos,\n\t\t\thorizontal: !this._renderer.options.isVertical\n\t\t});\n\t};\n\n\tWatcher.prototype._onResize = function _onResize() {\n\t\tvar _this = this;\n\n\t\tif (this._timer.resize) {\n\t\t\tclearTimeout(this._timer.resize);\n\t\t}\n\t\tthis._timer.resize = setTimeout(function () {\n\t\t\t_this._renderer.isNeededResize() && _this._callback.layout && _this._callback.layout();\n\t\t\t_this._timer.resize = null;\n\t\t\t_this.reset();\n\t\t}, 100);\n\t};\n\n\tWatcher.prototype.detachEvent = function detachEvent() {\n\t\t(0, _utils.removeEvent)(window, \"resize\", this._onResize);\n\t};\n\n\tWatcher.prototype.destroy = function destroy() {\n\t\tthis.detachEvent();\n\t\tthis.reset();\n\t};\n\n\treturn Watcher;\n}();\n\nexports[\"default\"] = Watcher;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Watcher.js\n// module id = 10\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// ALIGN\nvar START = _consts.ALIGN.START,\n CENTER = _consts.ALIGN.CENTER,\n END = _consts.ALIGN.END,\n JUSTIFY = _consts.ALIGN.JUSTIFY;\n\n/**\n * @classdesc GridLayout is a layout in which images with the same width are arranged in a staggered arrangement, like a stack of bricks. Adjust the width of all images to the same size, find the lowest height column, and insert a new image.\n * @ko GridLayout는 벽돌을 쌓아 올린 모양처럼 동일한 너비를 가진 이미지가 엇갈려 배열되는 레이아웃이다. 모든 이미지의 너비를 동일한 크기로 조정하고, 가장 높이가 낮은 열을 찾아 새로운 이미지를 삽입한다. 따라서 배치된 이미지 사이에 빈 공간이 생기지는 않지만 배치된 레이아웃의 아래쪽은 울퉁불퉁해진다.\n * @class eg.InfiniteGrid.GridLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.GridLayout module eg.InfiniteGrid.GridLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.align=START] Align of the position of the items (START, CENTER, END, JUSTIFY) 아이템들의 위치의 정렬 (START, CENTER, END, JUSTIFY)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @example\n```\n\n```\n **/\n\nvar GridLayout = function () {\n\tfunction GridLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, GridLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\talign: START,\n\t\t\titemSize: 0\n\t\t}, options);\n\t\tthis._size = 0;\n\t\tthis._columnSize = 0;\n\t\tthis._columnLength = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tGridLayout.prototype.getPoints = function getPoints(outlines) {\n\t\tvar pos = this.options.horizontal ? \"left\" : \"top\";\n\n\t\treturn outlines.map(function (outline) {\n\t\t\treturn outline[pos];\n\t\t});\n\t};\n\n\tGridLayout.prototype.checkColumn = function checkColumn(item) {\n\t\tvar margin = this.options.margin;\n\t\tvar sizeName = this.options.horizontal ? \"height\" : \"width\";\n\t\tvar columnSize = this.options.itemSize || item && item.size[sizeName] || 0;\n\n\t\tthis._columnSize = columnSize;\n\t\tif (!columnSize) {\n\t\t\tthis._columnLength = 1;\n\t\t\treturn;\n\t\t}\n\t\tthis._columnLength = Math.max(parseInt((this._size + margin) / (columnSize + margin), 10), 1);\n\t};\n\n\tGridLayout.prototype._layout = function _layout(items, outline, isAppend) {\n\t\tvar length = items.length;\n\t\tvar margin = this.options.margin;\n\t\tvar align = this.options.align;\n\t\tvar style = this._style;\n\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar columnSize = this._columnSize;\n\t\tvar columnLength = this._columnLength;\n\n\t\tvar size = this._size;\n\t\tvar viewDist = size - (columnSize + margin) * columnLength + margin;\n\n\t\tvar pointCaculateName = isAppend ? \"min\" : \"max\";\n\t\tvar startOutline = outline.slice();\n\t\tvar endOutline = outline.slice();\n\t\tvar startIndex = 0;\n\t\tvar endIndex = -1;\n\t\tvar endPos = -1;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar _item$rect;\n\n\t\t\tvar point = Math[pointCaculateName].apply(Math, endOutline) || 0;\n\t\t\tvar index = endOutline.indexOf(point);\n\t\t\tvar item = items[isAppend ? i : length - 1 - i];\n\t\t\tvar size1 = item.size[size1Name];\n\t\t\tvar size2 = item.size[size2Name];\n\t\t\tvar pos1 = isAppend ? point : point - margin - size1;\n\t\t\tvar endPos1 = pos1 + size1 + margin;\n\n\t\t\tif (index === -1) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\tvar pos2 = (columnSize + margin) * index;\n\n\t\t\t// ALIGN\n\t\t\tif (align === CENTER) {\n\t\t\t\tpos2 += viewDist / 2;\n\t\t\t} else if (align === END) {\n\t\t\t\tpos2 += viewDist + columnSize - size2;\n\t\t\t} else if (align === JUSTIFY) {\n\t\t\t\tif (columnLength <= 1) {\n\t\t\t\t\tpos2 += viewDist / 2;\n\t\t\t\t} else {\n\t\t\t\t\tpos2 = (size - columnSize) / (columnLength - 1) * index;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// tetris\n\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect);\n\t\t\titem.column = index;\n\t\t\tendOutline[index] = isAppend ? endPos1 : pos1;\n\t\t\tif (endIndex === -1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tendPos = endPos1;\n\t\t\t} else if (endPos < endPos1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tendPos = endPos1;\n\t\t\t}\n\t\t}\n\t\tif (!isAppend) {\n\t\t\titems.sort(function (a, b) {\n\t\t\t\tvar item1pos1 = a.rect[pos1Name];\n\t\t\t\tvar item1pos2 = a.rect[pos2Name];\n\t\t\t\tvar item2pos1 = b.rect[pos1Name];\n\t\t\t\tvar item2pos2 = b.rect[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\tendIndex = length - 1;\n\t\t}\n\t\t// if append items, startOutline is low, endOutline is high\n\t\t// if prepend items, startOutline is high, endOutline is low\n\t\treturn {\n\t\t\tstart: isAppend ? startOutline : endOutline,\n\t\t\tend: isAppend ? endOutline : startOutline,\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tGridLayout.prototype._insert = function _insert() {\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar type = arguments[2];\n\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\tvar startOutline = outline;\n\n\t\tif (!this._columnLength) {\n\t\t\tthis.checkColumn(items[0]);\n\t\t}\n\t\tif (outline.length !== this._columnLength) {\n\t\t\tstartOutline = (0, _utils.fill)(this._columnLength, outline.length === 0 ? 0 : Math[type === _consts.APPEND ? \"min\" : \"max\"].apply(Math, outline) || 0);\n\t\t}\n\n\t\tvar result = this._layout(clone, startOutline, type);\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: result\n\t\t};\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.layout = function layout() {\n\t\tvar _this = this;\n\n\t\tvar groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\tvar firstItem = groups.length && groups[0].items.length && groups[0].items[0] || 0;\n\n\t\tthis.checkColumn(firstItem);\n\n\t\t// if outlines' length and columns' length are now same, re-caculate outlines.\n\t\tvar startOutline = void 0;\n\n\t\tif (outline.length !== this._columnLength) {\n\t\t\tvar pos = outline.length === 0 ? 0 : Math.min.apply(Math, outline);\n\n\t\t\t// re-layout items.\n\t\t\tstartOutline = (0, _utils.fill)(this._columnLength, pos);\n\t\t} else {\n\t\t\tstartOutline = outline.slice();\n\t\t}\n\t\tgroups.forEach(function (group) {\n\t\t\tvar items = group.items;\n\t\t\tvar result = _this._layout(items, startOutline, _consts.APPEND);\n\n\t\t\tgroup.outlines = result;\n\t\t\tstartOutline = result.end;\n\t\t});\n\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.GridLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tGridLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\n\treturn GridLayout;\n}();\n\nexports[\"default\"] = GridLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/GridLayout.js\n// module id = 11\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _FrameLayout2 = require(\"./FrameLayout\");\n\nvar _FrameLayout3 = _interopRequireDefault(_FrameLayout2);\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction makeShapeOutline(outline, itemSize, columnLength, isAppend) {\n\tvar point = Math[isAppend ? \"min\" : \"max\"].apply(Math, outline) || 0;\n\n\tif (outline.length !== columnLength) {\n\t\treturn (0, _utils.fill)(columnLength, 0);\n\t}\n\treturn outline.map(function (l) {\n\t\treturn parseInt((l - point) / itemSize, 10);\n\t});\n}\nfunction getColumn(item) {\n\tif (item.column) {\n\t\treturn item.column;\n\t}\n\tvar column = 0;\n\n\tif (item.el) {\n\t\tvar dataset = item.el.dataset;\n\n\t\tif (dataset) {\n\t\t\tcolumn = dataset.column || 1;\n\t\t} else {\n\t\t\tcolumn = item.el.getAttribute(\"column\") || 1;\n\t\t}\n\t} else {\n\t\tcolumn = 1;\n\t}\n\titem.column = column;\n\treturn column;\n}\n\n/**\n * @classdesc FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.\n * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.\n * @class eg.InfiniteGrid.SquareLayout\n * @extends eg.InfiniteGrid.FrameLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.SquareLayout module eg.InfiniteGrid.SquareLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @example\n```\n\n```\n **/\n\nvar SquareLayout = function (_FrameLayout) {\n\t_inherits(SquareLayout, _FrameLayout);\n\n\tfunction SquareLayout() {\n\t\t_classCallCheck(this, SquareLayout);\n\n\t\treturn _possibleConstructorReturn(this, _FrameLayout.apply(this, arguments));\n\t}\n\n\tSquareLayout.prototype._checkItemSize = function _checkItemSize() {\n\t\tvar column = this.options.column;\n\n\t\tif (!column) {\n\t\t\t_FrameLayout.prototype._checkItemSize.call(this);\n\t\t\treturn;\n\t\t}\n\t\tvar margin = this.options.margin;\n\n\t\t// if itemSize is not in options, caculate itemSize from size.\n\t\tthis._itemSize = (this._size + margin) / column - margin;\n\t};\n\n\tSquareLayout.prototype._layout = function _layout(items) {\n\t\tvar _shapes;\n\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar itemSize = this._getItemSize();\n\t\tvar margin = this.options.margin;\n\t\tvar columnLength = this.options.column || parseInt((this._size + margin) / (itemSize + margin), 10) || 1;\n\t\tvar length = items.length;\n\t\tvar endOutline = makeShapeOutline(outline, itemSize, columnLength, isAppend);\n\t\tvar pointCaculateName = isAppend ? \"min\" : \"max\";\n\t\tvar shapes = [];\n\t\tvar sign = isAppend ? 1 : -1;\n\t\tvar style = this._style;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar _shapes$push;\n\n\t\t\tvar point = Math[pointCaculateName].apply(Math, endOutline);\n\t\t\tvar index = (0, _utils.indexOf)(endOutline, point, !isAppend);\n\t\t\tvar item = items[i];\n\t\t\tvar columnWidth = item.columnWidth;\n\t\t\tvar column = columnWidth && columnWidth[0] === columnLength && columnWidth[1] || getColumn(item);\n\t\t\tvar columnCount = 1;\n\n\t\t\tif (column > 1) {\n\t\t\t\tfor (var j = 1; j < column && (isAppend && index + j < columnLength || !isAppend && index - j >= 0); ++j) {\n\t\t\t\t\tif (isAppend && endOutline[index + sign * j] <= point || !isAppend && endOutline[index + sign * j] >= point) {\n\t\t\t\t\t\t++columnCount;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (!isAppend) {\n\t\t\t\t\tindex -= columnCount - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\titem.columnWidth = [columnLength, columnCount];\n\t\t\tshapes.push((_shapes$push = {\n\t\t\t\twidth: columnCount,\n\t\t\t\theight: columnCount\n\t\t\t}, _shapes$push[pos1Name] = point - (!isAppend ? columnCount : 0), _shapes$push[pos2Name] = index, _shapes$push.index = i, _shapes$push));\n\t\t\tfor (var _j = 0; _j < columnCount; ++_j) {\n\t\t\t\tendOutline[index + _j] = point + sign * columnCount;\n\t\t\t}\n\t\t}\n\t\tthis._shapes = (_shapes = {\n\t\t\tshapes: shapes\n\t\t}, _shapes[style.size2] = columnLength, _shapes);\n\n\t\tvar result = _FrameLayout.prototype._layout.call(this, items, outline, isAppend);\n\n\t\tif (!isAppend) {\n\t\t\tvar lastItem = items[items.length - 1];\n\n\t\t\tshapes.sort(function (shape1, shape2) {\n\t\t\t\tvar item1pos1 = shape1[pos1Name];\n\t\t\t\tvar item1pos2 = shape1[pos2Name];\n\t\t\t\tvar item2pos1 = shape2[pos1Name];\n\t\t\t\tvar item2pos2 = shape2[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\titems.sort(function (a, b) {\n\t\t\t\tvar item1pos1 = a.rect[pos1Name];\n\t\t\t\tvar item1pos2 = a.rect[pos2Name];\n\t\t\t\tvar item2pos1 = b.rect[pos1Name];\n\t\t\t\tvar item2pos2 = b.rect[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\tresult.startIndex = 0;\n\t\t\tresult.endIndex = items.indexOf(lastItem);\n\t\t}\n\t\treturn result;\n\t};\n\n\treturn SquareLayout;\n}(_FrameLayout3[\"default\"]);\n\nexports[\"default\"] = SquareLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/SquareLayout.js\n// module id = 12\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _BoxModel = require(\"./lib/BoxModel.js\");\n\nvar _BoxModel2 = _interopRequireDefault(_BoxModel);\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getCost(originLength, length) {\n\tvar cost = originLength / length;\n\n\tif (cost < 1) {\n\t\tcost = 1 / cost;\n\t}\n\n\treturn cost - 1;\n}\nfunction fitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical) {\n\titem.setHeight(itemFitSize.height);\n\titem.setWidth(itemFitSize.width);\n\tbestFitArea.setHeight(containerFitSize.height);\n\tbestFitArea.setWidth(containerFitSize.width);\n\n\tif (layoutVertical) {\n\t\titem.setTop(bestFitArea.getTop() + bestFitArea.getHeight());\n\t\titem.setLeft(bestFitArea.getLeft());\n\t} else {\n\t\titem.setLeft(bestFitArea.getLeft() + bestFitArea.getWidth());\n\t\titem.setTop(bestFitArea.getTop());\n\t}\n}\n\n/**\n * @classdesc PackingLayout show important images bigger without sacrificing the inherent size of the image. Rows and columns are separated so that images are dynamically placed within the horizontal and vertical space rather than arranged in an orderly fashion.\n * @ko PackingLayout은 이미지의 본래 크기에 따른 비중을 해치지 않으면서 중요한 이미지는 더 크게 보여 준다. 행과 열이 구분돼 이미지를 정돈되게 배치하는 대신 가로세로 일정 공간 내에서 동적으로 이미지를 배치한다.\n * @class eg.InfiniteGrid.PackingLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.PackingLayout module eg.InfiniteGrid.PackingLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.aspectRatio=1] The aspect ratio of the group 그룹의 가로 세로 비 \n * @param {Boolean} [options.sizeWeight=1] The size weight when placing an image 이미지를 배치할 때 사이즈 가중치 \n * @param {Boolean} [options.ratioWeight=1] The ratio weight when placing an image 이미지를 배치할 때 비율 가중치 \n * @example\n```\n\n```\n **/\n\nvar PackingLayout = function () {\n\tfunction PackingLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, PackingLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\taspectRatio: 1,\n\t\t\tsizeWeight: 1,\n\t\t\tratioWeight: 1\n\t\t}, options);\n\t\tthis._size = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tPackingLayout.prototype._findBestFitArea = function _findBestFitArea(container, item) {\n\t\tif (container.getRatio() === 0) {\n\t\t\t// 아이템 최초 삽입시 전체영역 지정\n\t\t\tcontainer.setOriginWidth(item.getWidth());\n\t\t\tcontainer.setOriginHeight(item.getHeight());\n\t\t\tcontainer.setWidth(item.getWidth());\n\t\t\tcontainer.setHeight(item.getHeight());\n\t\t\treturn;\n\t\t}\n\n\t\tvar bestFitArea = null;\n\t\tvar minCost = 10000000;\n\t\tvar layoutVertical = false;\n\t\tvar itemFitSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tvar containerFitSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tvar _options = this.options,\n\t\t sizeWeight = _options.sizeWeight,\n\t\t ratioWeight = _options.ratioWeight;\n\n\n\t\tcontainer.innerItem().forEach(function (v) {\n\t\t\tvar containerSizeCost = getCost(v.getOriginSize(), v.getSize()) * sizeWeight;\n\t\t\tvar containerRatioCost = getCost(v.getOriginRatio(), v.getRatio()) * ratioWeight;\n\t\t\tvar cost = void 0;\n\n\t\t\tfor (var i = 0; i < 2; ++i) {\n\t\t\t\tvar itemWidth = void 0;\n\t\t\t\tvar itemHeight = void 0;\n\t\t\t\tvar containerWidth = void 0;\n\t\t\t\tvar containerHeight = void 0;\n\n\t\t\t\tif (i === 0) {\n\t\t\t\t\t// 상하에 아이템 추가\n\t\t\t\t\titemWidth = v.getWidth();\n\t\t\t\t\titemHeight = v.getHeight() * (item.getHeight() / (v.getOriginHeight() + item.getHeight()));\n\t\t\t\t\tcontainerWidth = v.getWidth();\n\t\t\t\t\tcontainerHeight = v.getHeight() - itemHeight;\n\t\t\t\t} else {\n\t\t\t\t\t// 좌우에 아이템 추가\n\t\t\t\t\titemHeight = v.getHeight();\n\t\t\t\t\titemWidth = v.getWidth() * (item.getWidth() / (v.getOriginWidth() + item.getWidth()));\n\t\t\t\t\tcontainerHeight = v.getHeight();\n\t\t\t\t\tcontainerWidth = v.getWidth() - itemWidth;\n\t\t\t\t}\n\n\t\t\t\tvar itemSize = itemWidth * itemHeight;\n\t\t\t\tvar itemRatio = itemWidth / itemHeight;\n\t\t\t\tvar containerSize = containerWidth * containerHeight;\n\t\t\t\tvar containerRatio = containerHeight / containerHeight;\n\n\t\t\t\tcost = getCost(item.getSize(), itemSize) * sizeWeight;\n\t\t\t\tcost += getCost(item.getRatio(), itemRatio) * ratioWeight;\n\t\t\t\tcost += getCost(v.getOriginSize(), containerSize) * sizeWeight - containerSizeCost;\n\t\t\t\tcost += getCost(v.getOriginRatio(), containerRatio) * ratioWeight - containerRatioCost;\n\n\t\t\t\tif (cost === Math.min(cost, minCost)) {\n\t\t\t\t\tminCost = cost;\n\t\t\t\t\tbestFitArea = v;\n\t\t\t\t\tlayoutVertical = i === 0;\n\t\t\t\t\titemFitSize.width = itemWidth;\n\t\t\t\t\titemFitSize.height = itemHeight;\n\t\t\t\t\tcontainerFitSize.width = containerWidth;\n\t\t\t\t\tcontainerFitSize.height = containerHeight;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical);\n\t};\n\n\tPackingLayout.prototype._layout = function _layout(items) {\n\t\tvar _this = this;\n\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar style = this._style;\n\t\tvar isHorizontal = this.options.horizontal;\n\t\tvar aspectRatio = this.options.aspectRatio;\n\t\tvar margin = this.options.margin;\n\t\tvar pos1Name = style.pos1;\n\t\tvar size1Name = style.size1;\n\t\tvar containerWidth = this._size * (isHorizontal ? aspectRatio : 1);\n\t\tvar containerHeight = this._size / (isHorizontal ? 1 : aspectRatio);\n\t\tvar containerSize1 = isHorizontal ? containerWidth : containerHeight;\n\t\tvar prevOutline = (0, _utils.toZeroArray)(outline);\n\t\tvar start = isAppend ? Math.max.apply(Math, prevOutline) : Math.min.apply(Math, prevOutline) - containerSize1 - margin;\n\t\tvar end = start + containerSize1 + margin;\n\t\tvar container = new _BoxModel2[\"default\"]({});\n\n\t\tvar startIndex = -1;\n\t\tvar endIndex = -1;\n\t\tvar startPos = -1;\n\t\tvar endPos = -1;\n\n\t\titems.forEach(function (item) {\n\t\t\tvar model = new _BoxModel2[\"default\"]({\n\t\t\t\toriginWidth: item.orgSize.width,\n\t\t\t\toriginHeight: item.orgSize.height,\n\t\t\t\twidth: item.orgSize.width,\n\t\t\t\theight: item.orgSize.height\n\t\t\t});\n\n\t\t\t_this._findBestFitArea(container, model);\n\t\t\tcontainer.pushItem(model);\n\t\t\tcontainer.scaleTo(containerWidth + margin, containerHeight + margin);\n\t\t});\n\t\titems.forEach(function (item, i) {\n\t\t\tvar boxItem = container.innerItem()[i];\n\t\t\t// console.log(\"boxItem\", boxItem, boxItem instanceof BoxModel);\n\t\t\tvar width = boxItem.getWidth();\n\t\t\tvar height = boxItem.getHeight();\n\t\t\tvar top = boxItem.getTop();\n\t\t\tvar left = boxItem.getLeft();\n\n\t\t\titem.rect = { top: top, left: left, width: width - margin, height: height - margin };\n\t\t\titem.rect[pos1Name] += start;\n\n\t\t\tif (startIndex === -1) {\n\t\t\t\tstartIndex = i;\n\t\t\t\tendIndex = i;\n\t\t\t\tstartPos = item.rect[pos1Name];\n\t\t\t\tendPos = startPos;\n\t\t\t}\n\t\t\tif (startPos > item.rect[pos1Name]) {\n\t\t\t\tstartPos = item.rect[pos1Name];\n\t\t\t\tstartIndex = i;\n\t\t\t}\n\t\t\tif (endPos < item.rect[pos1Name] + item.rect[size1Name] + margin) {\n\t\t\t\tendPos = item.rect[pos1Name] + item.rect[size1Name] + margin;\n\t\t\t\tendIndex = i;\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tstart: [start],\n\t\t\tend: [end],\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tPackingLayout.prototype._insert = function _insert() {\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar type = arguments[2];\n\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tPackingLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tPackingLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tPackingLayout.prototype.layout = function layout() {\n\t\tvar groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\tvar length = groups.length;\n\t\tvar point = outline;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.PackingLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tPackingLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\n\treturn PackingLayout;\n}();\n\nexports[\"default\"] = PackingLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/PackingLayout.js\n// module id = 13\n// module chunks = 0 1","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar BoxModel = function () {\n\tfunction BoxModel(option) {\n\t\t_classCallCheck(this, BoxModel);\n\n\t\tthis._originWidth = option.originWidth || 0;\n\t\tthis._originHeight = option.originHeight || 0;\n\t\tthis._width = option.width || 0;\n\t\tthis._height = option.height || 0;\n\t\tthis._left = option.left || 0;\n\t\tthis._top = option.top || 0;\n\t\tthis._item = option.item;\n\t\tthis._innerItem = option.innerItem || [];\n\t}\n\n\tBoxModel.prototype.getOriginWidth = function getOriginWidth() {\n\t\treturn this._originWidth;\n\t};\n\n\tBoxModel.prototype.setOriginWidth = function setOriginWidth(width) {\n\t\tthis._originWidth = width;\n\t};\n\n\tBoxModel.prototype.getOriginHeight = function getOriginHeight() {\n\t\treturn this._originHeight;\n\t};\n\n\tBoxModel.prototype.setOriginHeight = function setOriginHeight(height) {\n\t\tthis._originHeight = height;\n\t};\n\n\tBoxModel.prototype.getWidth = function getWidth() {\n\t\treturn this._width;\n\t};\n\n\tBoxModel.prototype.setWidth = function setWidth(width) {\n\t\tthis._width = width;\n\t};\n\n\tBoxModel.prototype.getHeight = function getHeight() {\n\t\treturn this._height;\n\t};\n\n\tBoxModel.prototype.setHeight = function setHeight(height) {\n\t\tthis._height = height;\n\t};\n\n\tBoxModel.prototype.getLeft = function getLeft() {\n\t\treturn this._left;\n\t};\n\n\tBoxModel.prototype.setLeft = function setLeft(left) {\n\t\tthis._left = left;\n\t};\n\n\tBoxModel.prototype.getTop = function getTop() {\n\t\treturn this._top;\n\t};\n\n\tBoxModel.prototype.setTop = function setTop(top) {\n\t\tthis._top = top;\n\t};\n\n\tBoxModel.prototype.innerItem = function innerItem() {\n\t\treturn this._innerItem;\n\t};\n\n\tBoxModel.prototype.scaleTo = function scaleTo(width, height) {\n\t\tvar scaleX = this._width === 0 ? 0 : width / this._width;\n\t\tvar scaleY = this._height === 0 ? 0 : height / this._height;\n\n\t\tthis._innerItem.forEach(function (v) {\n\t\t\tif (scaleX !== 0) {\n\t\t\t\tv._left *= scaleX;\n\t\t\t\tv._width *= scaleX;\n\t\t\t}\n\t\t\tif (scaleY !== 0) {\n\t\t\t\tv._top *= scaleY;\n\t\t\t\tv._height *= scaleY;\n\t\t\t}\n\t\t});\n\n\t\tthis._width = width;\n\t\tthis._height = height;\n\t};\n\n\tBoxModel.prototype.pushItem = function pushItem(item) {\n\t\tthis._innerItem.push(item);\n\t};\n\n\tBoxModel.prototype.getOriginSize = function getOriginSize() {\n\t\treturn this._originWidth * this._originHeight;\n\t};\n\n\tBoxModel.prototype.getSize = function getSize() {\n\t\treturn this._width * this._height;\n\t};\n\n\tBoxModel.prototype.getOriginRatio = function getOriginRatio() {\n\t\treturn this._originHeight === 0 ? 0 : this._originWidth / this._originHeight;\n\t};\n\n\tBoxModel.prototype.getRatio = function getRatio() {\n\t\treturn this._height === 0 ? 0 : this._width / this._height;\n\t};\n\n\tBoxModel.prototype.isSmallerThen = function isSmallerThen(box) {\n\t\treturn this._width <= box._width && this._height <= box._height;\n\t};\n\n\tBoxModel.prototype.isEqual = function isEqual(box) {\n\t\treturn this._left === box._left && this._top === box._top && this._width === box._width && this._height === box._height;\n\t};\n\n\treturn BoxModel;\n}();\n\nmodule.exports = BoxModel;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/lib/BoxModel.js\n// module id = 14\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _dijkstra = require(\"./lib/dijkstra\");\n\nvar _dijkstra2 = _interopRequireDefault(_dijkstra);\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * @classdesc 'justified' is a printing term with the meaning that 'it fits in one row wide'. JustifiedLayout is a layout in which the image is filled up on the basis of a line given a width in the meaning of the term.\n * @ko 'justified'는 '1행의 너비에 맞게 꼭 들어찬'이라는 의미를 가진 인쇄 용어다. 용어의 의미대로 너비가 주어진 한 행을 기준으로 이미지가 가득 차도록 배치하는 레이아웃이다.\n * @class eg.InfiniteGrid.JustifiedLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.JustifiedLayout module eg.InfiniteGrid.JustifiedLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.minSize=0] Minimum size of item to be resized 아이템이 조정되는 최소 크기 \n * @param {Boolean} [options.maxSize=0] Maximum size of item to be resized 아이템이 조정되는 최대 크기 \n * @example\n```\n\n```\n **/\nvar JustifiedLayout = function () {\n\tfunction JustifiedLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, JustifiedLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\tminSize: 0,\n\t\t\tmaxSize: 0\n\t\t}, options);\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t\tthis._size = 0;\n\t}\n\n\tJustifiedLayout.prototype._layout = function _layout(items, outline, isAppend) {\n\t\tvar _this = this;\n\n\t\tvar style = this._style;\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar startIndex = 0;\n\t\tvar endIndex = items.length;\n\t\tvar graph = function graph(_start) {\n\t\t\tvar results = {};\n\t\t\tvar start = +_start.replace(/[^0-9]/g, \"\");\n\t\t\tvar length = endIndex + 1;\n\n\t\t\tfor (var i = start + 1; i < length; ++i) {\n\t\t\t\tif (i - start > 8) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tvar cost = _this._getCost(items, start, i, size1Name, size2Name);\n\n\t\t\t\tif (cost < 0 && i === length - 1) {\n\t\t\t\t\tcost = 0;\n\t\t\t\t}\n\t\t\t\tif (cost !== null) {\n\t\t\t\t\tresults[\"node\" + i] = Math.pow(cost, 2);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn results;\n\t\t};\n\t\t// shortest path for items' total height.\n\t\tvar path = _dijkstra2[\"default\"].find_path(graph, \"node\" + startIndex, \"node\" + endIndex);\n\n\t\treturn this._setStyle(items, path, outline, isAppend);\n\t};\n\n\tJustifiedLayout.prototype._getSize = function _getSize(items, size1Name, size2Name) {\n\t\tvar margin = this.options.margin;\n\t\tvar size = items.reduce(function (sum, item) {\n\t\t\treturn sum + item.size[size2Name] / item.size[size1Name];\n\t\t}, 0);\n\n\t\treturn (this._size - margin * (items.length - 1)) / size;\n\t};\n\n\tJustifiedLayout.prototype._getCost = function _getCost(items, i, j, size1Name, size2Name) {\n\t\tvar size = this._getSize(items.slice(i, j), size1Name, size2Name);\n\t\tvar min = this.options.minSize || 0;\n\t\tvar max = this.options.maxSize || Infinity;\n\n\t\tif (isFinite(max)) {\n\t\t\t// if this size is not in range, the cost increases sharply.\n\t\t\tif (size < min) {\n\t\t\t\treturn Math.pow(size - min, 2) + Math.pow(max, 2);\n\t\t\t} else if (size > max) {\n\t\t\t\treturn Math.pow(size - max, 2) + Math.pow(max, 2);\n\t\t\t} else {\n\t\t\t\t// if this size in range, the cost is negative or low.\n\t\t\t\treturn Math.min(size - max, min - size);\n\t\t\t}\n\t\t}\n\t\t// if max is infinite type, caculate cost only with \"min\".\n\t\tif (size < min) {\n\t\t\treturn Math.max(Math.pow(min, 2), Math.pow(size, 2));\n\t\t}\n\t\treturn size - min;\n\t};\n\n\tJustifiedLayout.prototype._setStyle = function _setStyle(items, path) {\n\t\tvar outline = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n\t\tvar isAppend = arguments[3];\n\n\t\tvar style = this._style;\n\t\t// if direction is vertical\n\t\t// pos1 : top, pos11 : bottom\n\t\t// size1 : height\n\t\t// pos2 : left, pos22 : right\n\t\t// size2 : width\n\n\t\t// if direction is horizontal\n\t\t// pos1 : left, pos11 : right\n\t\t// size1 : width\n\t\t// pos2 : top, pos22 : bottom\n\t\t// size2 : height\n\t\tvar pos1Name = style.pos1;\n\t\tvar size1Name = style.size1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar size2Name = style.size2;\n\t\tvar length = path.length;\n\t\tvar margin = this.options.margin;\n\t\tvar startPoint = outline[0] || 0;\n\t\tvar endPoint = startPoint;\n\t\tvar height = 0;\n\n\t\tfor (var i = 0; i < length - 1; ++i) {\n\t\t\tvar path1 = parseInt(path[i].replace(\"node\", \"\"), 10);\n\t\t\tvar path2 = parseInt(path[i + 1].replace(\"node\", \"\"), 10);\n\t\t\t// pathItems(path1 to path2) are in 1 line.\n\t\t\tvar pathItems = items.slice(path1, path2);\n\t\t\tvar pathItemsLength = pathItems.length;\n\t\t\tvar size1 = this._getSize(pathItems, size1Name, size2Name);\n\t\t\tvar pos1 = endPoint;\n\n\t\t\tfor (var j = 0; j < pathItemsLength; ++j) {\n\t\t\t\tvar _item$rect;\n\n\t\t\t\tvar item = pathItems[j];\n\t\t\t\tvar size2 = item.size[size2Name] / item.size[size1Name] * size1;\n\t\t\t\t// item has margin bottom and right.\n\t\t\t\t// first item has not margin.\n\t\t\t\tvar prevItemRect = j === 0 ? 0 : pathItems[j - 1].rect;\n\t\t\t\tvar pos2 = prevItemRect ? prevItemRect[pos2Name] + prevItemRect[size2Name] + margin : 0;\n\n\t\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);\n\t\t\t}\n\t\t\theight += margin + size1;\n\t\t\tendPoint = startPoint + height;\n\t\t}\n\t\tvar itemsLength = items.length;\n\t\tvar startIndex = itemsLength ? 0 : -1;\n\t\tvar endIndex = itemsLength ? itemsLength - 1 : -1;\n\n\t\tif (isAppend) {\n\t\t\t// previous group's end outline is current group's start outline\n\t\t\treturn {\n\t\t\t\tstart: [startPoint],\n\t\t\t\tend: [endPoint],\n\t\t\t\tstartIndex: startIndex,\n\t\t\t\tendIndex: endIndex\n\t\t\t};\n\t\t}\n\t\t// for prepend, only substract height from position.\n\t\t// always start is lower than end.\n\n\t\tfor (var _i = 0; _i < itemsLength; ++_i) {\n\t\t\tvar _item = items[_i];\n\n\t\t\t// move items as long as height for prepend\n\t\t\t_item.rect[pos1Name] -= height;\n\t\t}\n\t\treturn {\n\t\t\tstart: [startPoint - height],\n\t\t\tend: [startPoint], // endPoint - height = startPoint\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tJustifiedLayout.prototype._insert = function _insert(items, outline, type) {\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.JustifiedLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tJustifiedLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tJustifiedLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tJustifiedLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100]);\n */\n\n\n\tJustifiedLayout.prototype.layout = function layout(groups, outlines) {\n\t\tvar length = groups.length;\n\t\tvar point = outlines;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\n\treturn JustifiedLayout;\n}();\n\nexports[\"default\"] = JustifiedLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/JustifiedLayout.js\n// module id = 15\n// module chunks = 0 1","'use strict';\n\n/* eslint-disable */\n/******************************************************************************\n * Created 2008-08-19.\n *\n * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.\n *\n * Copyright (C) 2008\n * Wyatt Baldwin \n * All rights reserved\n *\n * Licensed under the MIT license.\n *\n * http://www.opensource.org/licenses/mit-license.php\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *****************************************************************************/\n(function () {\n var dijkstra = {\n single_source_shortest_paths: function single_source_shortest_paths(graph, s, d) {\n // Predecessor map for each node that has been encountered.\n // node ID => predecessor node ID\n var predecessors = {};\n\n // Costs of shortest paths from s to all nodes encountered.\n // node ID => cost\n var costs = {};\n costs[s] = 0;\n\n // Costs of shortest paths from s to all nodes encountered; differs from\n // `costs` in that it provides easy access to the node that currently has\n // the known shortest path from s.\n // XXX: Do we actually need both `costs` and `open`?\n var open = new BinaryHeap(function (x) {\n return x.cost;\n });\n open.push({ value: s, cost: 0 });\n\n var closest, u, cost_of_s_to_u, adjacent_nodes, cost_of_e, cost_of_s_to_u_plus_cost_of_e, cost_of_s_to_v, first_visit;\n while (open.size()) {\n // In the nodes remaining in graph that have a known cost from s,\n // find the node, u, that currently has the shortest path from s.\n closest = open.pop();\n u = closest.value;\n cost_of_s_to_u = closest.cost;\n\n // Get nodes adjacent to u...\n adjacent_nodes = graph(u) || {};\n\n // ...and explore the edges that connect u to those nodes, updating\n // the cost of the shortest paths to any or all of those nodes as\n // necessary. v is the node across the current edge from u.\n for (var v in adjacent_nodes) {\n // Get the cost of the edge running from u to v.\n cost_of_e = adjacent_nodes[v];\n\n // Cost of s to u plus the cost of u to v across e--this is *a*\n // cost from s to v that may or may not be less than the current\n // known cost to v.\n cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;\n\n // If we haven't visited v yet OR if the current known cost from s to\n // v is greater than the new cost we just found (cost of s to u plus\n // cost of u to v across e), update v's cost in the cost list and\n // update v's predecessor in the predecessor list (it's now u).\n cost_of_s_to_v = costs[v];\n first_visit = typeof costs[v] === 'undefined';\n if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {\n costs[v] = cost_of_s_to_u_plus_cost_of_e;\n open.push({ value: v, cost: cost_of_s_to_u_plus_cost_of_e });\n predecessors[v] = u;\n }\n }\n }\n\n if (typeof costs[d] === 'undefined') {\n var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');\n throw new Error(msg);\n }\n\n return predecessors;\n },\n\n extract_shortest_path_from_predecessor_list: function extract_shortest_path_from_predecessor_list(predecessors, d) {\n var nodes = [];\n var u = d;\n var predecessor;\n while (u) {\n nodes.push(u);\n predecessor = predecessors[u];\n u = predecessors[u];\n }\n nodes.reverse();\n return nodes;\n },\n\n find_path: function find_path(graph, s, d) {\n var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);\n return dijkstra.extract_shortest_path_from_predecessor_list(predecessors, d);\n }\n\n };\n\n function BinaryHeap(scoreFunction) {\n this.content = [];\n this.scoreFunction = scoreFunction;\n }\n\n BinaryHeap.prototype = {\n push: function push(element) {\n // Add the new element to the end of the array.\n this.content.push(element);\n // Allow it to bubble up.\n this.bubbleUp(this.content.length - 1);\n },\n\n pop: function pop() {\n // Store the first element so we can return it later.\n var result = this.content[0];\n // Get the element at the end of the array.\n var end = this.content.pop();\n // If there are any elements left, put the end element at the\n // start, and let it sink down.\n if (this.content.length > 0) {\n this.content[0] = end;\n this.sinkDown(0);\n }\n return result;\n },\n\n remove: function remove(node) {\n var len = this.content.length;\n // To remove a value, we must search through the array to find\n // it.\n for (var i = 0; i < len; i++) {\n if (this.content[i] === node) {\n // When it is found, the process seen in 'pop' is repeated\n // to fill up the hole.\n var end = this.content.pop();\n if (i !== len - 1) {\n this.content[i] = end;\n if (this.scoreFunction(end) < this.scoreFunction(node)) {\n this.bubbleUp(i);\n } else {\n this.sinkDown(i);\n }\n }\n return;\n }\n }\n throw new Error('Node not found.');\n },\n\n size: function size() {\n return this.content.length;\n },\n\n bubbleUp: function bubbleUp(n) {\n // Fetch the element that has to be moved.\n var element = this.content[n];\n // When at 0, an element can not go up any further.\n while (n > 0) {\n // Compute the parent element's index, and fetch it.\n var parentN = Math.floor((n + 1) / 2) - 1,\n parent = this.content[parentN];\n // Swap the elements if the parent is greater.\n if (this.scoreFunction(element) < this.scoreFunction(parent)) {\n this.content[parentN] = element;\n this.content[n] = parent;\n // Update 'n' to continue at the new position.\n n = parentN;\n }\n // Found a parent that is less, no need to move it further.\n else {\n break;\n }\n }\n },\n\n sinkDown: function sinkDown(n) {\n // Look up the target element and its score.\n var length = this.content.length,\n element = this.content[n],\n elemScore = this.scoreFunction(element);\n\n while (true) {\n // Compute the indices of the child elements.\n var child2N = (n + 1) * 2,\n child1N = child2N - 1;\n // This is used to store the new position of the element,\n // if any.\n var swap = null;\n // If the first child exists (is inside the array)...\n if (child1N < length) {\n // Look it up and compute its score.\n var child1 = this.content[child1N],\n child1Score = this.scoreFunction(child1);\n // If the score is less than our element's, we need to swap.\n if (child1Score < elemScore) {\n swap = child1N;\n }\n }\n // Do the same checks for the other child.\n if (child2N < length) {\n var child2 = this.content[child2N],\n child2Score = this.scoreFunction(child2);\n if (child2Score < (swap == null ? elemScore : child1Score)) {\n swap = child2N;\n }\n }\n\n // If the element needs to be moved, swap it, and continue.\n if (swap !== null) {\n this.content[n] = this.content[swap];\n this.content[swap] = element;\n n = swap;\n }\n // Otherwise, we are done.\n else {\n break;\n }\n }\n }\n };\n\n /**\n * Browserify 지원을 위한 모듈화 코드\n */\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = dijkstra;\n } else {\n window.dijkstra = dijkstra;\n }\n})();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/lib/dijkstra.js\n// module id = 16\n// module chunks = 0 1"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACh9BA;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"infinitegrid.js","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap f874972a8481c9f038ec","webpack:///./src/consts.js","webpack:///./src/utils.js","webpack:///./src/browser.js","webpack:///./src/DOMRenderer.js","webpack:///./src/layouts/FrameLayout.js","webpack:///./src/index.js","webpack:///./src/InfiniteGrid.js","webpack:///external {\"commonjs\":\"@egjs/component\",\"commonjs2\":\"@egjs/component\",\"amd\":\"@egjs/component\",\"root\":[\"eg\",\"Component\"]}","webpack:///./src/ItemManager.js","webpack:///./src/ImageLoaded.js","webpack:///./src/Watcher.js","webpack:///./src/layouts/GridLayout.js","webpack:///./src/layouts/SquareLayout.js","webpack:///./src/layouts/PackingLayout.js","webpack:///./src/layouts/lib/BoxModel.js","webpack:///./src/layouts/JustifiedLayout.js","webpack:///./src/layouts/lib/dijkstra.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@egjs/component\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"@egjs/component\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"InfiniteGrid\"] = factory(require(\"@egjs/component\"));\n\telse\n\t\troot[\"eg\"] = root[\"eg\"] || {}, root[\"eg\"][\"InfiniteGrid\"] = factory(root[\"eg\"][\"Component\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_7__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap f874972a8481c9f038ec","\"use strict\";\n\nexports.__esModule = true;\nexports.DEFENSE_BROWSER = exports.WEBKIT_VERSION = exports.PROCESSING = exports.LOADING_PREPEND = exports.LOADING_APPEND = exports.IDLE = exports.ALIGN = exports.isMobile = exports.agent = exports.DEFAULT_OPTIONS = exports.GROUPKEY_ATT = exports.DUMMY_POSITION = exports.SINGLE = exports.MULTI = exports.NO_TRUSTED = exports.TRUSTED = exports.NO_CACHE = exports.CACHE = exports.HORIZONTAL = exports.VERTICAL = exports.PREPEND = exports.APPEND = exports.IGNORE_CLASSNAME = exports.CONTAINER_CLASSNAME = exports.RETRY = exports.IS_ANDROID2 = exports.IS_IOS = exports.IS_IE = exports.SUPPORT_PASSIVE = exports.SUPPORT_ADDEVENTLISTENER = exports.SUPPORT_COMPUTEDSTYLE = undefined;\n\nvar _browser = require(\"./browser\");\n\nvar ua = _browser.window.navigator.userAgent;\n\nvar SUPPORT_COMPUTEDSTYLE = exports.SUPPORT_COMPUTEDSTYLE = !!(\"getComputedStyle\" in _browser.window);\nvar SUPPORT_ADDEVENTLISTENER = exports.SUPPORT_ADDEVENTLISTENER = !!(\"addEventListener\" in document);\nvar SUPPORT_PASSIVE = exports.SUPPORT_PASSIVE = function () {\n\tvar supportsPassiveOption = false;\n\n\ttry {\n\t\tif (SUPPORT_ADDEVENTLISTENER && Object.defineProperty) {\n\t\t\tdocument.addEventListener(\"test\", null, Object.defineProperty({}, \"passive\", {\n\t\t\t\tget: function get() {\n\t\t\t\t\tsupportsPassiveOption = true;\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\t} catch (e) {}\n\treturn supportsPassiveOption;\n}();\n\nvar IS_IE = exports.IS_IE = /MSIE|Trident|Windows Phone|Edge/.test(ua);\nvar IS_IOS = exports.IS_IOS = /iPhone|iPad/.test(ua);\nvar IS_ANDROID2 = exports.IS_ANDROID2 = /Android 2\\./.test(ua);\nvar RETRY = exports.RETRY = 3;\nvar CONTAINER_CLASSNAME = exports.CONTAINER_CLASSNAME = \"_eg-infinitegrid-container_\";\nvar IGNORE_CLASSNAME = exports.IGNORE_CLASSNAME = \"_eg-infinitegrid-ignore_\";\n\nvar APPEND = exports.APPEND = true;\nvar PREPEND = exports.PREPEND = false;\nvar VERTICAL = exports.VERTICAL = \"vertical\";\nvar HORIZONTAL = exports.HORIZONTAL = \"horizontal\";\nvar CACHE = exports.CACHE = true;\nvar NO_CACHE = exports.NO_CACHE = false;\nvar TRUSTED = exports.TRUSTED = true;\nvar NO_TRUSTED = exports.NO_TRUSTED = false;\nvar MULTI = exports.MULTI = true;\nvar SINGLE = exports.SINGLE = false;\nvar DUMMY_POSITION = exports.DUMMY_POSITION = -100000;\nvar GROUPKEY_ATT = exports.GROUPKEY_ATT = \"data-groupkey\";\n\nvar DEFAULT_OPTIONS = exports.DEFAULT_OPTIONS = {\n\thorizontal: false,\n\tmargin: 0\n};\n\nvar agent = exports.agent = ua.toLowerCase();\nvar isMobile = exports.isMobile = /mobi|ios|android/.test(agent);\n\nvar ALIGN = exports.ALIGN = {\n\tSTART: \"start\",\n\tCENTER: \"center\",\n\tEND: \"end\",\n\tJUSTIFY: \"justify\"\n};\n\nvar IDLE = exports.IDLE = 0;\nvar LOADING_APPEND = exports.LOADING_APPEND = 1;\nvar LOADING_PREPEND = exports.LOADING_PREPEND = 2;\nvar PROCESSING = exports.PROCESSING = 4;\n\nvar webkit = /applewebkit\\/([\\d|.]*)/g.exec(agent);\n\nvar WEBKIT_VERSION = exports.WEBKIT_VERSION = webkit && parseInt(webkit[1], 10) || 0;\nvar DEFENSE_BROWSER = exports.DEFENSE_BROWSER = WEBKIT_VERSION && WEBKIT_VERSION < 537;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/consts.js\n// module id = 0\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\nexports.STYLE = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.toArray = toArray;\nexports.fill = fill;\nexports.$ = $;\nexports.addEvent = addEvent;\nexports.removeEvent = removeEvent;\nexports.scroll = scroll;\nexports.scrollTo = scrollTo;\nexports.scrollBy = scrollBy;\nexports.getStyles = getStyles;\nexports.innerWidth = innerWidth;\nexports.innerHeight = innerHeight;\nexports.getStyleNames = getStyleNames;\nexports.assignOptions = assignOptions;\nexports.toZeroArray = toZeroArray;\nexports.isWindow = isWindow;\nexports.indexOf = indexOf;\n\nvar _browser = require(\"./browser\");\n\nvar _consts = require(\"./consts\");\n\nfunction toArray(nodes) {\n\t// SCRIPT5014 in IE8\n\tvar array = [];\n\n\tif (nodes) {\n\t\tfor (var i = 0, len = nodes.length; i < len; i++) {\n\t\t\tarray.push(nodes[i]);\n\t\t}\n\t}\n\treturn array;\n}\nfunction fill(length, value) {\n\tvar array = (typeof length === \"undefined\" ? \"undefined\" : _typeof(length)) === \"object\" ? length : new Array(length);\n\tvar len = array.length;\n\n\tfor (var i = len - 1; i >= 0; --i) {\n\t\tarray[i] = value;\n\t}\n\treturn array;\n}\n/**\n * Select or create element\n * @param {String|HTMLElement|jQuery} param\n * when string given is as HTML tag, then create element\n * otherwise it returns selected elements\n * @param {Boolean} multi\n * @returns {HTMLElement}\n */\nfunction $(param) {\n\tvar multi = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n\tvar el = void 0;\n\n\tif (typeof param === \"string\") {\n\t\t// String (HTML, Selector)\n\t\t// check if string is HTML tag format\n\t\tvar match = param.match(/^<([A-z]+)\\s*([^>]*)>/);\n\n\t\t// creating element\n\t\tif (match) {\n\t\t\t// HTML\n\t\t\tvar dummy = _browser.document.createElement(\"div\");\n\n\t\t\tdummy.innerHTML = param;\n\t\t\tel = dummy.childNodes;\n\t\t} else {\n\t\t\t// Selector\n\t\t\tel = _browser.document.querySelectorAll(param);\n\t\t}\n\t\tif (multi) {\n\t\t\tel = toArray(el);\n\t\t} else {\n\t\t\tel = el && el.length > 0 && el[0] || undefined;\n\t\t}\n\t} else if (param === _browser.window) {\n\t\t// window\n\t\tel = param;\n\t} else if (param.nodeName && (param.nodeType === 1 || param.nodeType === 9)) {\n\t\t// HTMLElement, Document\n\t\tel = param;\n\t} else if (\"jQuery\" in _browser.window && param instanceof _browser.window.jQuery || param.constructor.prototype.jquery) {\n\t\t// jQuery\n\t\tel = multi ? param.toArray() : param.get(0);\n\t} else if (Array.isArray(param)) {\n\t\tel = param.map(function (v) {\n\t\t\treturn $(v);\n\t\t});\n\t\tif (!multi) {\n\t\t\tel = el.length >= 1 ? el[0] : undefined;\n\t\t}\n\t}\n\treturn el;\n}\nfunction addEvent(element, type, handler, eventListenerOptions) {\n\tif (_consts.SUPPORT_ADDEVENTLISTENER) {\n\t\tvar options = eventListenerOptions || false;\n\n\t\tif ((typeof eventListenerOptions === \"undefined\" ? \"undefined\" : _typeof(eventListenerOptions)) === \"object\") {\n\t\t\toptions = _consts.SUPPORT_PASSIVE ? eventListenerOptions : false;\n\t\t}\n\t\telement.addEventListener(type, handler, options);\n\t} else if (element.attachEvent) {\n\t\telement.attachEvent(\"on\" + type, handler);\n\t} else {\n\t\telement[\"on\" + type] = handler;\n\t}\n}\nfunction removeEvent(element, type, handler) {\n\tif (element.removeEventListener) {\n\t\telement.removeEventListener(type, handler, false);\n\t} else if (element.detachEvent) {\n\t\telement.detachEvent(\"on\" + type, handler);\n\t} else {\n\t\telement[\"on\" + type] = null;\n\t}\n}\nfunction scroll(el, isVertical) {\n\tvar prop = \"scroll\" + (isVertical ? \"Top\" : \"Left\");\n\n\tif (el === _browser.window) {\n\t\treturn _browser.window[isVertical ? \"pageYOffset\" : \"pageXOffset\"] || _browser.document.body[prop] || _browser.document.documentElement[prop];\n\t} else {\n\t\treturn el[prop];\n\t}\n}\nfunction scrollTo(el, x, y) {\n\tif (el === _browser.window) {\n\t\tel.scroll(x, y);\n\t} else {\n\t\tel.scrollLeft = x;\n\t\tel.scrollTop = y;\n\t}\n}\nfunction scrollBy(el, x, y) {\n\tif (el === _browser.window) {\n\t\tel.scrollBy(x, y);\n\t} else {\n\t\tel.scrollLeft += x;\n\t\tel.scrollTop += y;\n\t}\n}\nfunction getStyles(el) {\n\treturn _consts.SUPPORT_COMPUTEDSTYLE ? _browser.window.getComputedStyle(el) : el.currentStyle;\n}\nfunction _getSize(el, name) {\n\tif (el === _browser.window) {\n\t\t// WINDOW\n\t\treturn el.document.documentElement[\"client\" + name];\n\t} else if (el.nodeType === 9) {\n\t\t// DOCUMENT_NODE\n\t\tvar doc = el.documentElement;\n\n\t\treturn Math.max(el.body[\"scroll\" + name], doc[\"scroll\" + name], el.body[\"offset\" + name], doc[\"offset\" + name], doc[\"client\" + name]);\n\t} else {\n\t\t// NODE\n\t\tvar style = getStyles(el);\n\t\tvar value = style[name.toLowerCase()];\n\n\t\treturn parseFloat(/auto|%/.test(value) ? el[\"offset\" + name] : style[name.toLowerCase()]);\n\t}\n}\nfunction innerWidth(el) {\n\treturn _getSize(el, \"Width\");\n}\nfunction innerHeight(el) {\n\treturn _getSize(el, \"Height\");\n}\nvar STYLE = exports.STYLE = {\n\tvertical: {\n\t\tpos1: \"top\",\n\t\tendPos1: \"bottom\",\n\t\tsize1: \"height\",\n\t\tpos2: \"left\",\n\t\tendPos2: \"right\",\n\t\tsize2: \"width\"\n\t},\n\thorizontal: {\n\t\tpos1: \"left\",\n\t\tendPos1: \"right\",\n\t\tsize1: \"width\",\n\t\tpos2: \"top\",\n\t\tendPos2: \"bottom\",\n\t\tsize2: \"height\"\n\t}\n};\n\nfunction getStyleNames(isHorizontal) {\n\treturn STYLE[isHorizontal ? _consts.HORIZONTAL : _consts.VERTICAL];\n}\n\nfunction assignOptions(defaultOptions, options) {\n\treturn _extends({}, _consts.DEFAULT_OPTIONS, defaultOptions, options);\n}\n\nfunction toZeroArray(outline) {\n\tif (!outline || !outline.length) {\n\t\treturn [0];\n\t}\n\treturn outline;\n}\n\nfunction isWindow(el) {\n\treturn el === _browser.window;\n}\n\nfunction indexOf(arr, target) {\n\tvar isRight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n\tif (!isRight) {\n\t\treturn arr.indexOf(target);\n\t}\n\tvar length = arr.length;\n\n\tfor (var i = length - 1; i >= 0; --i) {\n\t\tif (arr[i] !== target) {\n\t\t\tcontinue;\n\t\t}\n\t\treturn i;\n\t}\n\treturn -1;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utils.js\n// module id = 1\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n/* eslint-disable no-new-func, no-nested-ternary */\nvar win = window;\n/* eslint-enable no-new-func, no-nested-ternary */\n\nexports.window = window;\nvar document = exports.document = win.document;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser.js\n// module id = 2\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defense(element) {\n\tvar container = document.createElement(\"div\");\n\n\tcontainer.className = _consts.CONTAINER_CLASSNAME;\n\tcontainer.style.position = \"relative\";\n\tcontainer.style.height = \"100%\";\n\n\tvar children = element.children;\n\tvar length = children.length; // for IE8\n\n\tfor (var i = 0; i < length; i++) {\n\t\tcontainer.appendChild(children[0]);\n\t}\n\n\telement.appendChild(container);\n\treturn container;\n}\n\nvar DOMRenderer = function () {\n\tDOMRenderer.renderItem = function renderItem(item, styles) {\n\t\tif (item.el) {\n\t\t\tvar elStyle = item.el.style;\n\n\t\t\t// for debugging\n\t\t\titem.el.setAttribute(_consts.GROUPKEY_ATT, item.groupKey);\n\t\t\telStyle.position = \"absolute\";\n\t\t\t[\"left\", \"top\", \"width\", \"height\"].forEach(function (p) {\n\t\t\t\tp in styles && (elStyle[p] = styles[p] + \"px\");\n\t\t\t});\n\t\t}\n\t};\n\n\tDOMRenderer.renderItems = function renderItems(items) {\n\t\titems.forEach(function (item) {\n\t\t\tDOMRenderer.renderItem(item, item.rect);\n\t\t});\n\t};\n\n\tDOMRenderer.removeItems = function removeItems(items) {\n\t\titems.forEach(function (item) {\n\t\t\tif (item.el) {\n\t\t\t\tDOMRenderer.removeElement(item.el);\n\t\t\t\titem.el = null;\n\t\t\t}\n\t\t});\n\t};\n\n\tDOMRenderer.removeElement = function removeElement(element) {\n\t\telement.parentNode.removeChild(element);\n\t};\n\n\tDOMRenderer.createElements = function createElements(items) {\n\t\tvar elements = (0, _utils.$)(items.reduce(function (acc, v, i) {\n\t\t\tacc.push(v.content.replace(/^[\\s\\uFEFF]+|[\\s\\uFEFF]+$/g, \"\"));\n\t\t\treturn acc;\n\t\t}, []).join(\"\"), _consts.MULTI);\n\n\t\treturn items.map(function (item, index) {\n\t\t\titem.el = elements[index];\n\t\t\treturn item;\n\t\t});\n\t};\n\n\tfunction DOMRenderer(element, options) {\n\t\t_classCallCheck(this, DOMRenderer);\n\n\t\t_extends(this.options = {\n\t\t\tisOverflowScroll: false,\n\t\t\tisEqualSize: false,\n\t\t\tisVertical: true\n\t\t}, options);\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tcontainer: -1,\n\t\t\tview: -1,\n\t\t\titem: null\n\t\t};\n\t\tthis._init(element);\n\t\tthis.resize();\n\t}\n\n\tDOMRenderer.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\tcssText: this.container.style.cssText,\n\t\t\toptions: _extends({}, this.options),\n\t\t\t_size: _extends({}, this._size)\n\t\t};\n\t};\n\n\tDOMRenderer.prototype.setStatus = function setStatus(status, items) {\n\t\tthis.container.style.cssText = status.cssText;\n\t\t_extends(this.options, status.options);\n\t\t_extends(this._size, status._size);\n\n\t\tDOMRenderer.renderItems(items);\n\t\tthis._insert(items, _consts.APPEND);\n\t};\n\n\tDOMRenderer.prototype.updateSize = function updateSize(items) {\n\t\tvar _this = this;\n\n\t\treturn items.map(function (item) {\n\t\t\tif (item.el) {\n\t\t\t\tif (_this.options.isEqualSize) {\n\t\t\t\t\t_this._size.item = _this._size.item || {\n\t\t\t\t\t\twidth: (0, _utils.innerWidth)(item.el),\n\t\t\t\t\t\theight: (0, _utils.innerHeight)(item.el)\n\t\t\t\t\t};\n\t\t\t\t\titem.size = _extends({}, _this._size.item);\n\t\t\t\t} else {\n\t\t\t\t\titem.size = {\n\t\t\t\t\t\twidth: (0, _utils.innerWidth)(item.el),\n\t\t\t\t\t\theight: (0, _utils.innerHeight)(item.el)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif (!item.orgSize) {\n\t\t\t\t\titem.orgSize = _extends({}, item.size);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t};\n\n\tDOMRenderer.prototype._init = function _init(el) {\n\t\tvar element = (0, _utils.$)(el);\n\t\tvar style = (0, _utils.getStyles)(element);\n\n\t\tthis._orgStyle = {};\n\n\t\tif (style.position === \"static\") {\n\t\t\tthis._orgStyle.position = element.style.position;\n\t\t\telement.style.position = \"relative\";\n\t\t}\n\t\tif (this.options.isOverflowScroll) {\n\t\t\tvar target = this.options.isVertical ? [\"Y\", \"X\"] : [\"X\", \"Y\"];\n\n\t\t\tthis._orgStyle.overflowX = element.style.overflowX;\n\t\t\tthis._orgStyle.overflowY = element.style.overflowY;\n\t\t\telement.style[\"overflow\" + target[0]] = \"scroll\";\n\t\t\telement.style[\"overflow\" + target[1]] = \"hidden\";\n\t\t\tthis.view = element;\n\t\t\t// defense code for android < 4.4 or webkit < 537\n\t\t\tthis.container = !this.options.isVertical && _consts.DEFENSE_BROWSER ? _defense(element) : element;\n\t\t} else {\n\t\t\tthis.view = window;\n\t\t\tthis.container = element;\n\t\t}\n\t};\n\n\tDOMRenderer.prototype.append = function append(items) {\n\t\tthis._insert(items, _consts.APPEND, {\n\t\t\ttop: _consts.DUMMY_POSITION,\n\t\t\tleft: _consts.DUMMY_POSITION\n\t\t});\n\t};\n\n\tDOMRenderer.prototype.prepend = function prepend(items) {\n\t\tthis._insert(items, _consts.PREPEND, {\n\t\t\ttop: _consts.DUMMY_POSITION,\n\t\t\tleft: _consts.DUMMY_POSITION\n\t\t});\n\t};\n\n\tDOMRenderer.prototype.clear = function clear() {\n\t\tthis.container.innerHTML = \"\";\n\t\tif (!this.options.isOverflowScroll) {\n\t\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = \"\";\n\t\t}\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tviewport: -1,\n\t\t\tcontainer: -1,\n\t\t\tview: -1\n\t\t};\n\t};\n\n\tDOMRenderer.prototype.createAndInsert = function createAndInsert(items, isAppend) {\n\t\tvar itemsWithElement = DOMRenderer.createElements(items);\n\n\t\tDOMRenderer.renderItems(itemsWithElement);\n\t\tthis._insert(itemsWithElement, isAppend);\n\t};\n\n\tDOMRenderer.prototype._insert = function _insert(items, isAppend, styles) {\n\t\tvar df = document.createDocumentFragment();\n\n\t\titems.forEach(function (item) {\n\t\t\tstyles && DOMRenderer.renderItem(item, styles);\n\t\t\tisAppend ? df.appendChild(item.el) : df.insertBefore(item.el, df.firstChild);\n\t\t});\n\t\tisAppend ? this.container.appendChild(df) : this.container.insertBefore(df, this.container.firstChild);\n\t};\n\n\tDOMRenderer.prototype._calcSize = function _calcSize() {\n\t\treturn this.options.isVertical ? (0, _utils.innerWidth)(this.container) : (0, _utils.innerHeight)(this.container);\n\t};\n\n\tDOMRenderer.prototype.getViewSize = function getViewSize() {\n\t\treturn this._size.view;\n\t};\n\n\tDOMRenderer.prototype.scrollBy = function scrollBy(point) {\n\t\tvar pos = this.options.isVertical ? [0, point] : [point, 0];\n\n\t\t_utils.scrollBy.apply(undefined, [this.view].concat(pos));\n\t};\n\n\tDOMRenderer.prototype.getContainerOffset = function getContainerOffset() {\n\t\treturn this._size.containerOffset;\n\t};\n\n\tDOMRenderer.prototype.getViewportSize = function getViewportSize() {\n\t\tthis.resize();\n\t\treturn this._size.viewport;\n\t};\n\n\tDOMRenderer.prototype.setContainerSize = function setContainerSize(size) {\n\t\tif (!this.options.isOverflowScroll || !this.options.isVertical && _consts.DEFENSE_BROWSER) {\n\t\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = size + \"px\";\n\t\t}\n\t};\n\n\tDOMRenderer.prototype.resize = function resize() {\n\t\tvar isVertical = this.options.isVertical;\n\n\t\tif (this.isNeededResize()) {\n\t\t\tthis._size = {\n\t\t\t\tcontainerOffset: this.options.isOverflowScroll ? 0 : this.container[\"offset\" + (isVertical ? \"Top\" : \"Left\")],\n\t\t\t\tviewport: this._calcSize(),\n\t\t\t\tview: isVertical ? (0, _utils.innerHeight)(this.view) : (0, _utils.innerWidth)(this.view),\n\t\t\t\titem: null\n\t\t\t};\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis._size.view = isVertical ? (0, _utils.innerHeight)(this.view) : (0, _utils.innerWidth)(this.view);\n\t\t}\n\t\treturn false;\n\t};\n\n\tDOMRenderer.prototype.isNeededResize = function isNeededResize() {\n\t\treturn this._calcSize() !== this._size.viewport;\n\t};\n\n\tDOMRenderer.prototype.destroy = function destroy() {\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tviewport: -1,\n\t\t\tview: -1,\n\t\t\titem: null\n\t\t};\n\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = \"\";\n\t\tfor (var p in this._orgStyle) {\n\t\t\tthis[this.options.isOverflowScroll ? \"view\" : \"container\"].style[p] = this._orgStyle[p];\n\t\t}\n\t};\n\n\treturn DOMRenderer;\n}();\n\nexports[\"default\"] = DOMRenderer;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/DOMRenderer.js\n// module id = 3\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/*\nFrame\n[\n[1, 1, 1, 1, 1],\n[0, 0, 2, 2, 2],\n[0, 0, 2, 2, 2],\n[3, 4, 5, 5, 5],\n]\n*/\nfunction disableFrame(frame, type, x, y, width, height) {\n\tfor (var i = y; i < y + height; ++i) {\n\t\tfor (var j = x; j < x + width; ++j) {\n\t\t\tif (type !== frame[i][j]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tframe[i][j] = 0;\n\t\t}\n\t}\n}\nfunction searchShapeInFrame(frame, type, top, left, width, height) {\n\tvar size = {\n\t\tleft: left,\n\t\ttop: top,\n\t\ttype: type,\n\t\twidth: 1,\n\t\theight: 1\n\t};\n\n\tfor (var i = left; i < width; ++i) {\n\t\tif (frame[top][i] === type) {\n\t\t\tsize.width = i - left + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\tfor (var _i = top; _i < height; ++_i) {\n\t\tif (frame[_i][left] === type) {\n\t\t\tsize.height = _i - top + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\t// After finding the shape, it will not find again.\n\tdisableFrame(frame, type, left, top, size.width, size.height);\n\treturn size;\n}\nfunction getShapes(frame) {\n\tvar height = frame.length;\n\tvar width = height ? frame[0].length : 0;\n\tvar shapes = [];\n\n\tfor (var i = 0; i < height; ++i) {\n\t\tfor (var j = 0; j < width; ++j) {\n\t\t\tvar type = frame[i][j];\n\n\t\t\tif (!type) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Separate shapes with other numbers.\n\t\t\tshapes.push(searchShapeInFrame(frame, type, i, j, width, height));\n\t\t}\n\t}\n\tshapes.sort(function (a, b) {\n\t\treturn a.type < b.type ? -1 : 1;\n\t});\n\treturn {\n\t\tshapes: shapes,\n\t\twidth: width,\n\t\theight: height\n\t};\n}\n/**\n * @classdesc FrameLayout is a layout that allows you to place cards in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.\n * @ko FrameLayout은 주어진 프레임에 맞춰 카드를 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.\n * @class eg.InfiniteGrid.FrameLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.FrameLayout module eg.InfiniteGrid.FrameLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @param {Boolean} [options.frame=[]] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @param {Boolean} [options.frameFill=true] Make sure that the frame can be attached after the previous frame. 다음 프레임이 전 프레임에 이어 붙일 수 있는지 있는지 확인한다. \n * @example\n```\n\n```\n **/\n\nvar FrameLayout = function () {\n\tfunction FrameLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, FrameLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\titemSize: 0,\n\t\t\tframe: [],\n\t\t\tframeFill: true\n\t\t}, options);\n\t\tvar frame = this.options.frame.map(function (row) {\n\t\t\treturn row.slice();\n\t\t});\n\t\t// divide frame into shapes.\n\t\tvar shapes = getShapes(frame);\n\n\t\tthis._itemSize = this.options.itemSize || 0;\n\t\tthis._shapes = shapes;\n\t\tthis._size = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tFrameLayout.prototype._getItemSize = function _getItemSize() {\n\t\tthis._checkItemSize();\n\n\t\treturn this._itemSize;\n\t};\n\n\tFrameLayout.prototype._checkItemSize = function _checkItemSize() {\n\t\tif (this.options.itemSize) {\n\t\t\tthis._itemSize = this.options.itemSize;\n\t\t\treturn;\n\t\t}\n\t\tvar style = this._style;\n\t\tvar size = style.size2;\n\t\tvar margin = this.options.margin;\n\n\t\t// if itemSize is not in options, caculate itemSize from size.\n\t\tthis._itemSize = (this._size + margin) / this._shapes[size] - margin;\n\t};\n\n\tFrameLayout.prototype._layout = function _layout(items) {\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar length = items.length;\n\t\tvar style = this._style;\n\t\tvar _options = this.options,\n\t\t margin = _options.margin,\n\t\t frameFill = _options.frameFill;\n\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar itemSize = this._getItemSize();\n\t\tvar isItemObject = (typeof itemSize === \"undefined\" ? \"undefined\" : _typeof(itemSize)) === \"object\";\n\t\tvar itemSize2 = isItemObject ? itemSize[size2Name] : itemSize;\n\t\tvar itemSize1 = isItemObject ? itemSize[size1Name] : itemSize;\n\t\tvar shapesSize = this._shapes[size2Name];\n\t\tvar shapes = this._shapes.shapes;\n\t\tvar shapesLength = shapes.length;\n\t\tvar startOutline = (0, _utils.fill)(shapesSize, _consts.DUMMY_POSITION);\n\t\tvar endOutline = (0, _utils.fill)(shapesSize, _consts.DUMMY_POSITION);\n\t\tvar dist = 0;\n\t\tvar end = 0;\n\t\tvar startIndex = -1;\n\t\tvar endIndex = -1;\n\t\tvar minPos = -1;\n\t\tvar maxPos = -1;\n\n\t\tif (!shapesLength) {\n\t\t\treturn { start: outline, end: outline, startIndex: startIndex, endIndex: endIndex };\n\t\t}\n\t\tfor (var i = 0; i < length; i += shapesLength) {\n\t\t\tfor (var j = 0; j < shapesLength && i + j < length; ++j) {\n\t\t\t\tvar _item$rect;\n\n\t\t\t\tvar item = items[i + j];\n\t\t\t\tvar shape = shapes[j];\n\t\t\t\tvar shapePos1 = shape[pos1Name];\n\t\t\t\tvar shapePos2 = shape[pos2Name];\n\t\t\t\tvar shapeSize1 = shape[size1Name];\n\t\t\t\tvar shapeSize2 = shape[size2Name];\n\t\t\t\tvar pos1 = end - dist + shapePos1 * (itemSize1 + margin);\n\t\t\t\tvar pos2 = shapePos2 * (itemSize2 + margin);\n\t\t\t\tvar size1 = shapeSize1 * (itemSize1 + margin) - margin;\n\t\t\t\tvar size2 = shapeSize2 * (itemSize2 + margin) - margin;\n\n\t\t\t\tfor (var k = shapePos2; k < shapePos2 + shapeSize2 && k < shapesSize; ++k) {\n\t\t\t\t\tif (startOutline[k] === _consts.DUMMY_POSITION) {\n\t\t\t\t\t\tstartOutline[k] = pos1;\n\t\t\t\t\t}\n\t\t\t\t\tif (startIndex === -1) {\n\t\t\t\t\t\tminPos = pos1;\n\t\t\t\t\t\tstartIndex = i + j;\n\t\t\t\t\t\tmaxPos = pos1 + size1 + margin;\n\t\t\t\t\t\tendIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tif (minPos > pos1) {\n\t\t\t\t\t\tminPos = pos1;\n\t\t\t\t\t\tstartIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tif (maxPos < pos1 + size1 + margin) {\n\t\t\t\t\t\tmaxPos = pos1 + size1 + margin;\n\t\t\t\t\t\tendIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tstartOutline[k] = Math.min(startOutline[k], pos1);\n\t\t\t\t\tendOutline[k] = Math.max(endOutline[k], pos1 + size1 + margin);\n\t\t\t\t}\n\t\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);\n\t\t\t}\n\t\t\tend = Math.max.apply(Math, endOutline);\n\t\t\t// check dist once\n\t\t\tif (i !== 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// find & fill empty block\n\t\t\tif (!frameFill) {\n\t\t\t\tdist = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdist = end;\n\n\t\t\tfor (var _j = 0; _j < shapesSize; ++_j) {\n\t\t\t\tif (startOutline[_j] === _consts.DUMMY_POSITION) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// the dist between frame's end outline and next frame's start outline\n\t\t\t\t// expect that next frame's start outline is startOutline[j] + end\n\t\t\t\tdist = Math.min(startOutline[_j] + end - endOutline[_j], dist);\n\t\t\t}\n\t\t}\n\t\tfor (var _i2 = 0; _i2 < shapesSize; ++_i2) {\n\t\t\tif (startOutline[_i2] !== _consts.DUMMY_POSITION) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tstartOutline[_i2] = Math.max.apply(Math, startOutline);\n\t\t\tendOutline[_i2] = startOutline[_i2];\n\t\t}\n\t\t// The target outline is start outline when type is APPENDING\n\t\tvar targetOutline = isAppend ? startOutline : endOutline;\n\t\tvar prevOutlineEnd = outline.length === 0 ? 0 : Math[isAppend ? \"max\" : \"min\"].apply(Math, outline);\n\t\tvar prevOutlineDist = isAppend ? 0 : end;\n\n\t\tif (frameFill && outline.length === shapesSize) {\n\t\t\tprevOutlineDist = -_consts.DUMMY_POSITION;\n\t\t\tfor (var _i3 = 0; _i3 < shapesSize; ++_i3) {\n\t\t\t\tif (startOutline[_i3] === endOutline[_i3]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// if appending type is PREPEND, subtract dist from appending group's height.\n\n\t\t\t\tprevOutlineDist = Math.min(targetOutline[_i3] + prevOutlineEnd - outline[_i3], prevOutlineDist);\n\t\t\t}\n\t\t}\n\t\tfor (var _i4 = 0; _i4 < shapesSize; ++_i4) {\n\t\t\tstartOutline[_i4] += prevOutlineEnd - prevOutlineDist;\n\t\t\tendOutline[_i4] += prevOutlineEnd - prevOutlineDist;\n\t\t}\n\t\titems.forEach(function (item) {\n\t\t\titem.rect[pos1Name] += prevOutlineEnd - prevOutlineDist;\n\t\t});\n\t\treturn {\n\t\t\tstart: startOutline,\n\t\t\tend: endOutline,\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tFrameLayout.prototype._insert = function _insert(items, outline, type) {\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tFrameLayout.prototype.layout = function layout(groups, outlines) {\n\t\tvar length = groups.length;\n\t\tvar point = outlines;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.FrameLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tFrameLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tFrameLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tFrameLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\n\treturn FrameLayout;\n}();\n\nexports[\"default\"] = FrameLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/FrameLayout.js\n// module id = 4\n// module chunks = 0 1","\"use strict\";\n\nvar _InfiniteGrid = require(\"./InfiniteGrid\");\n\nvar _InfiniteGrid2 = _interopRequireDefault(_InfiniteGrid);\n\nvar _GridLayout = require(\"./layouts/GridLayout\");\n\nvar _GridLayout2 = _interopRequireDefault(_GridLayout);\n\nvar _FrameLayout = require(\"./layouts/FrameLayout\");\n\nvar _FrameLayout2 = _interopRequireDefault(_FrameLayout);\n\nvar _SquareLayout = require(\"./layouts/SquareLayout\");\n\nvar _SquareLayout2 = _interopRequireDefault(_SquareLayout);\n\nvar _PackingLayout = require(\"./layouts/PackingLayout\");\n\nvar _PackingLayout2 = _interopRequireDefault(_PackingLayout);\n\nvar _JustifiedLayout = require(\"./layouts/JustifiedLayout\");\n\nvar _JustifiedLayout2 = _interopRequireDefault(_JustifiedLayout);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n/**\n * Copyright (c) NAVER Corp.\n * egjs-infinitegrid projects are licensed under the MIT license\n */\n_InfiniteGrid2[\"default\"].GridLayout = _GridLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].FrameLayout = _FrameLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].SquareLayout = _SquareLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].PackingLayout = _PackingLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].JustifiedLayout = _JustifiedLayout2[\"default\"];\n\nmodule.exports = _InfiniteGrid2[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/index.js\n// module id = 5\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; /**\n * Copyright (c) 2017 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\n\nvar _component = require(\"@egjs/component\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _ItemManager = require(\"./ItemManager\");\n\nvar _ItemManager2 = _interopRequireDefault(_ItemManager);\n\nvar _DOMRenderer = require(\"./DOMRenderer\");\n\nvar _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);\n\nvar _ImageLoaded = require(\"./ImageLoaded\");\n\nvar _ImageLoaded2 = _interopRequireDefault(_ImageLoaded);\n\nvar _Watcher = require(\"./Watcher\");\n\nvar _Watcher2 = _interopRequireDefault(_Watcher);\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// IE8\n// https://stackoverflow.com/questions/43216659/babel-ie8-inherit-issue-with-object-create\n/* eslint-disable */\nif (typeof Object.create !== \"function\") {\n\tObject.create = function (o, properties) {\n\t\tif ((typeof o === \"undefined\" ? \"undefined\" : _typeof(o)) !== \"object\" && typeof o !== \"function\") {\n\t\t\tthrow new TypeError(\"Object prototype may only be an Object: \" + o);\n\t\t} else if (o === null) {\n\t\t\tthrow new Error(\"This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument.\");\n\t\t}\n\t\tfunction F() {}\n\t\tF.prototype = o;\n\t\treturn new F();\n\t};\n}\n/* eslint-enable */\n\n/**\n * A module used to arrange card elements including content infinitely according to layout type. With this module, you can implement various layouts composed of different card elements whose sizes vary. It guarantees performance by maintaining the number of DOMs the module is handling under any circumstance\n * @ko 콘텐츠가 있는 카드 엘리먼트를 레이아웃 타입에 따라 무한으로 배치하는 모듈. 다양한 크기의 카드 엘리먼트를 다양한 레이아웃으로 배치할 수 있다. 카드 엘리먼트의 개수가 계속 늘어나도 모듈이 처리하는 DOM의 개수를 일정하게 유지해 최적의 성능을 보장한다\n * @alias eg.InfiniteGrid\n * @extends eg.Component\n *\n * @example\n```\n\n\t- \n\t\t
test1
\n\t \n\t- \n\t\t
test2
\n\t \n\t- \n\t\t
test3
\n\t \n\t- \n\t\t
test4
\n\t \n\t- \n\t\t
test5
\n\t \n\t- \n\t\t
test6
\n\t \n
\n\n```\n *\n * @support {\"ie\": \"8+\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"2.1+ (except 3.x)\"}\n **/\n\nvar InfiniteGrid = function (_Component) {\n\t_inherits(InfiniteGrid, _Component);\n\n\t/**\n * @param {HTMLElement|String|jQuery} element A base element for a module 모듈을 적용할 기준 엘리먼트\n * @param {Object} [options] The option object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 옵션 객체\n * @param {String} [options.itemSelector] A selector to select card elements that make up the layout레이아웃을 구성하는 카드 엘리먼트를 선택할 선택자(selector)\n * @param {Boolean} [options.useRecycle=true] Indicates whether keep the number of DOMs is maintained. If the useRecycle value is 'true', keep the number of DOMs is maintained. If the useRecycle value is 'false', the number of DOMs will increase as card elements are added. DOM의 수를 유지할지 여부를 나타낸다. useRecycle 값이 'true'이면 DOM 개수를 일정하게 유지한다. useRecycle 값이 'false' 이면 카드 엘리먼트가 추가될수록 DOM 개수가 계속 증가한다.\n * @param {Boolean} [options.isOverflowScroll=false] Indicates whether overflow:scroll is appliedoverflow:scroll 적용여부를 결정한다.\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향)\n * @param {Boolean} [options.isEqualSize=false] Indicates whether sizes of all card elements are equal to one another. If sizes of card elements to be arranged are all equal and this option is set to \"true\", the performance of layout arrangement can be improved. 카드 엘리먼트의 크기가 동일한지 여부. 배치될 카드 엘리먼트의 크기가 모두 동일할 때 이 옵션을 'true'로 설정하면 레이아웃 배치 성능을 높일 수 있다\n * @param {Number} [options.threshold=100] The threshold size of an event area where card elements are added to a layout.레이아웃에 카드 엘리먼트를 추가하는 이벤트가 발생하는 기준 영역의 크기.\n */\n\tfunction InfiniteGrid(element, options) {\n\t\t_classCallCheck(this, InfiniteGrid);\n\n\t\tvar _this = _possibleConstructorReturn(this, _Component.call(this));\n\n\t\t_extends(_this.options = {\n\t\t\titemSelector: \"*\",\n\t\t\tisOverflowScroll: false,\n\t\t\tthreshold: 100,\n\t\t\tisEqualSize: false,\n\t\t\tuseRecycle: true,\n\t\t\thorizontal: false\n\t\t}, options);\n\t\t_consts.IS_ANDROID2 && (_this.options.isOverflowScroll = false);\n\t\t_this._isVertical = !_this.options.horizontal;\n\t\t_this._reset();\n\t\t_this._items = new _ItemManager2[\"default\"]();\n\t\t_this._renderer = new _DOMRenderer2[\"default\"](element, {\n\t\t\tisOverflowScroll: _this.options.isOverflowScroll,\n\t\t\tisEqualSize: _this.options.isEqualSize,\n\t\t\tisVertical: _this._isVertical\n\t\t});\n\t\t_this._watcher = new _Watcher2[\"default\"](_this._renderer, {\n\t\t\tlayout: function layout() {\n\t\t\t\treturn _this.layout();\n\t\t\t},\n\t\t\tcheck: function check(param) {\n\t\t\t\treturn _this._onCheck(param);\n\t\t\t}\n\t\t});\n\t\treturn _this;\n\t}\n\t/**\n * Adds a card element at the bottom of a layout. This method is available only if the isProcessing() method returns false.\n * @ko 카드 엘리먼트를 레이아웃 아래에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다\n * 이 메소드는 isProcessing()의 반환값이 false일 경우에만 사용 가능하다.\n * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트의 배열\n * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.\n * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.append(\"<div class='item'>test1</div><div class='item'>test2</div>\");\n * infinitegrid.append([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]);\n * infinitegrid.append([HTMLElement1, HTMLElement2]);\n * infinitegrid.append(jQuery([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]));\n */\n\n\n\tInfiniteGrid.prototype.append = function append(elements, groupKey) {\n\t\tthis._layout && this._insert(elements, _consts.APPEND, groupKey);\n\t\treturn this;\n\t};\n\t/**\n * Adds a card element at the top of a layout. This method is available only if the isProcessing() method returns false.\n * @ko 카드 엘리먼트를 레이아웃의 위에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다\n * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트 배열\n * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.\n * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.prepend(\"<div class='item'>test1</div><div class='item'>test2</div>\");\n * infinitegrid.prepend([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]);\n * infinitegrid.prepend([HTMLElement1, HTMLElement2]);\n * infinitegrid.prepend(jQuery([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]));\n */\n\n\n\tInfiniteGrid.prototype.prepend = function prepend(elements, groupKey) {\n\t\tthis._layout && this._insert(elements, _consts.PREPEND, groupKey);\n\t\treturn this;\n\t};\n\t/**\n * Specifies the Layout class to use.\n * @ko 사용할 Layout 클래스를 지정한다.\n * @param {Class} LayoutKlass The Layout class to use 사용할 Layout 클래스\n * @param {Object} options Options to apply to the Layout.Layout에 적용할 옵션\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.setLayout(eg.InfiniteGrid.GridLayout, {\n * margin: 10,\n * align: \"start\"\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.JustifiedLayout, {\n * margin: 10,\n * minSize: 100,\n * maxSize: 200\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.SquareLayout, {\n * margin: 10,\n * column: 2\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.FrameLayout, {\n * margin: 10,\n * frame: [\n * [1, 2],\n * [4, 3],\n * ]\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.PackingLayout, {\n * margin: 10,\n * aspectRatio: 1.5\n * });\n */\n\n\n\tInfiniteGrid.prototype.setLayout = function setLayout(LayoutKlass, options) {\n\t\tthis._layout = new LayoutKlass(_extends(options || {}, {\n\t\t\thorizontal: !this._isVertical\n\t\t}));\n\t\tthis._layout.setSize(this._renderer.getViewportSize());\n\t\treturn this;\n\t};\n\t/**\n * Returns the layouted items.\n * @ko 레이아웃된 아이템들을 반환한다.\n * @param {Boolean} includeCached Indicates whether to include the cached items. 캐싱된 아이템을 포함할지 여부를 나타낸다.\n * @returns {Array} List of items 아이템의 목록\n */\n\n\n\tInfiniteGrid.prototype.getItems = function getItems() {\n\t\tvar includeCached = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n\t\treturn this[includeCached ? \"_getItems\" : \"_getVisibleItems\"]();\n\t};\n\n\tInfiniteGrid.prototype._getItems = function _getItems() {\n\t\treturn this._items.pluck(\"items\", 0, this._items.size());\n\t};\n\n\tInfiniteGrid.prototype._getVisibleItems = function _getVisibleItems() {\n\t\treturn this._items.pluck(\"items\", this._status.startCursor, this._status.endCursor);\n\t};\n\n\tInfiniteGrid.prototype._updateEdge = function _updateEdge() {\n\t\tthis._status.start = this._items.getEdge(\"start\", this._status.startCursor, this._status.endCursor);\n\t\tthis._status.end = this._items.getEdge(\"end\", this._status.startCursor, this._status.endCursor);\n\t};\n\n\tInfiniteGrid.prototype._getEdgeOffset = function _getEdgeOffset(cursor) {\n\t\tvar rect = null;\n\n\t\tif (!this._status[cursor]) {\n\t\t\tvar item = this._items.getEdge(cursor);\n\n\t\t\tthis._status[cursor] = item;\n\t\t}\n\n\t\tif (this._status[cursor]) {\n\t\t\trect = this._status[cursor].rect;\n\t\t\tif (cursor === \"start\") {\n\t\t\t\trect.bottom = rect.top + this._status[cursor].size.height;\n\t\t\t\trect.right = rect.left + this._status[cursor].size.width;\n\t\t\t}\n\t\t}\n\t\treturn rect;\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._fit = function _fit() {\n\t\tvar scrollCycle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"after\";\n\n\t\t// for caching\n\t\tif (!this._layout) {\n\t\t\treturn 0;\n\t\t}\n\t\tvar base = this._getEdgeValue(\"start\");\n\t\tvar margin = this._getLoadingStatus() === _consts.LOADING_PREPEND && this._status.loadingSize || 0;\n\n\t\tif (!this.options.useRecycle || _consts.DEFENSE_BROWSER) {\n\t\t\tif (scrollCycle === \"before\" && margin && base < margin) {\n\t\t\t\tthis._renderer.scrollBy(-Math.abs(base) + margin);\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\t} else if (scrollCycle === \"after\" && base < 0) {\n\t\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\t\tthis._renderer.scrollBy(Math.abs(base));\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (base !== 0 || margin) {\n\t\t\tvar isProcessing = this._isProcessing();\n\n\t\t\tthis._process(_consts.PROCESSING);\n\t\t\tif (scrollCycle === \"before\") {\n\t\t\t\tthis._renderer.scrollBy(-Math.abs(base) + margin);\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t}\n\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\tif (scrollCycle === \"after\") {\n\t\t\t\tthis._renderer.scrollBy(Math.abs(base) + margin);\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t}\n\t\t\tif (!isProcessing) {\n\t\t\t\tthis._process(_consts.PROCESSING, false);\n\t\t\t}\n\t\t}\n\t\treturn base;\n\t};\n\n\tInfiniteGrid.prototype._getEdgeValue = function _getEdgeValue(cursor) {\n\t\treturn this._items.getEdgeValue(cursor, this._status.startCursor, this._status.endCursor);\n\t};\n\t/**\n * Rearranges a layout.\n * @ko 레이아웃을 다시 배치한다.\n * @param {Boolean} [isRelayout=true] Indicates whether a card element is being relayouted 카드 엘리먼트 재배치 여부\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.layout = function layout() {\n\t\tvar _this2 = this;\n\n\t\tvar isRelayout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n\t\tif (!this._layout || this._isProcessing()) {\n\t\t\treturn this;\n\t\t}\n\t\t// check childElement\n\t\tif (!this._items.size()) {\n\t\t\tthis._insert((0, _utils.toArray)(this._renderer.container.children), true);\n\t\t\treturn this;\n\t\t}\n\t\tthis._process(_consts.PROCESSING);\n\n\t\tvar data = void 0;\n\t\tvar outline = void 0;\n\n\t\tif (isRelayout) {\n\t\t\t// remove cache\n\t\t\tdata = this._items.get(this._status.startCursor, this._status.endCursor);\n\t\t\tif (this._renderer.resize()) {\n\t\t\t\tthis._layout.setSize(this._renderer.getViewportSize());\n\t\t\t\tdata.forEach(function (v) {\n\t\t\t\t\tdata.items = _this2._renderer.updateSize(v.items);\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tdata = this._items.get(this._status.startCursor, this._items.size());\n\t\t\toutline = this._items.getOutline(this._status.startCursor, \"start\");\n\t\t}\n\t\tif (!data.length) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._layout.layout(data, outline);\n\n\t\tif (isRelayout) {\n\t\t\tthis._items._data.forEach(function (group, cursor) {\n\t\t\t\tif (_this2._status.startCursor <= cursor && cursor <= _this2._status.endCursor) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgroup.outlines.start = [];\n\t\t\t\tgroup.outlines.end = [];\n\t\t\t});\n\t\t} else {\n\t\t\tdata.forEach(function (v) {\n\t\t\t\treturn _this2._items.set(v, v.groupKey);\n\t\t\t});\n\t\t}\n\t\tthis._onLayoutComplete(data, _consts.APPEND, _consts.NO_TRUSTED, false);\n\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\tisRelayout && this._watcher.setScrollPos();\n\n\t\treturn this;\n\t};\n\t/**\n * Removes a item element on a grid layout.\n * @ko 그리드 레이아웃의 카드 엘리먼트를 삭제한다.\n * @param {HTMLElement} item element to be removed 삭제될 아이템 엘리먼트\n * @return {Object} Removed item element 삭제된 아이템 엘리먼트 정보\n */\n\n\n\tInfiniteGrid.prototype.remove = function remove(element) {\n\t\tif (element) {\n\t\t\tvar items = this._items.remove(element, this._status.startCursor, this._status.endCursor);\n\n\t\t\tif (items) {\n\t\t\t\t_DOMRenderer2[\"default\"].removeElement(element);\n\t\t\t\treturn items;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tInfiniteGrid.prototype._getNextItems = function _getNextItems(isAppend) {\n\t\tvar items = [];\n\t\tvar size = this._items.size();\n\n\t\t// from cache\n\t\tif (size > 0 && this._status.startCursor !== -1 && this._status.endCursor !== -1) {\n\t\t\tif (isAppend && size > this._status.endCursor + 1) {\n\t\t\t\titems = this._items.pluck(\"items\", this._status.endCursor + 1);\n\t\t\t} else if (!isAppend && this._status.startCursor > 0) {\n\t\t\t\titems = this._items.pluck(\"items\", this._status.startCursor - 1);\n\t\t\t}\n\t\t}\n\t\treturn items;\n\t};\n\t/**\n * Returns the list of group keys which belongs to card elements currently being maintained. You can use the append() or prepend() method to configure group keys so that multiple card elements can be managed at once. If you do not use these methods to configure group keys, groupkey is automatically generated.\n * @ko 현재 유지하고 있는 카드 엘리먼트의 그룹 키 목록을 반환한다. 여러 개의 카드 엘리먼트를 묶어서 관리할 수 있도록 append() 메서드나 prepend() 메서드에서 그룹 키를 지정할 수 있다. append() 메서드나 prepend() 메서드에서 그룹 키를 지정하지 않았다면 자동으로 그룹키가 생성된다.\n * @param {Boolean} includeCached Indicates whether to include the cached groups. 캐싱된 그룹을 포함할지 여부를 나타낸다.\n * @return {Array} List of group keys 그룹 키의 목록\n */\n\n\n\tInfiniteGrid.prototype.getGroupKeys = function getGroupKeys(includeCached) {\n\t\tvar data = includeCached ? this._items.get() : this._items.get(this._status.startCursor, this._status.endCursor);\n\n\t\treturn data.map(function (v) {\n\t\t\treturn v.groupKey;\n\t\t});\n\t};\n\t/**\n * Returns the current state of a module such as location information. You can use the setStatus() method to restore the information returned through a call to this method.\n * @ko 카드의 위치 정보 등 모듈의 현재 상태 정보를 반환한다. 이 메서드가 반환한 정보를 저장해 두었다가 setStatus() 메서드로 복원할 수 있다\n * @return {Object} State object of the eg.InfiniteGrid moduleeg.InfiniteGrid 모듈의 상태 객체\n */\n\n\n\tInfiniteGrid.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\toptions: _extends({}, this.options),\n\t\t\t_status: _extends({}, this._status),\n\t\t\t_items: this._items.getStatus(),\n\t\t\t_renderer: this._renderer.getStatus(),\n\t\t\t_watcher: this._watcher.getStatus()\n\t\t};\n\t};\n\t/**\n * Sets the state of the eg.InfiniteGrid module with the information returned through a call to the getStatue() method.\n * @ko getStatue() 메서드가 저장한 정보로 eg.InfiniteGrid 모듈의 상태를 설정한다.\n * @param {Object} status State object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 상태 객체\n * @param {boolean} [applyScrollPos=true] Checks whether to scroll스크롤의 위치를 복원할지 결정한다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.setStatus = function setStatus(status) {\n\t\tvar applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tif (!status || !status.options || !status._status || !status._renderer || !status._items || !status._watcher) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._watcher.detachEvent();\n\t\t_extends(this.options, status.options);\n\t\t_extends(this._status, status._status);\n\t\tthis._items.setStatus(status._items, this._status.startCursor, this._status.endCursor);\n\t\tthis._renderer.setStatus(status._renderer, this._getVisibleItems());\n\t\tthis._watcher.setStatus(status._watcher, applyScrollPos);\n\t\tthis._updateEdge();\n\t\tthis._watcher.attachEvent();\n\t\treturn this;\n\t};\n\t/**\n * Clears added card elements and data.\n * @ko 추가된 카드 엘리먼트와 데이터를 모두 지운다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.clear = function clear() {\n\t\tthis._items.clear();\n\t\tthis._renderer.clear();\n\t\tthis._reset();\n\t\tthis._appendLoadingBar();\n\t\treturn this;\n\t};\n\t/**\n * Specifies the Loading Bar to use for append or prepend items.\n * @ko 아이템을 append 또는 prepend 하기 위해 사용할 로딩 바를 지정한다.\n * @param {String|Object} [userLoadingBar={}] The loading bar HTML markup or element or element selector 로딩 바 HTML 또는 element 또는 selector \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.setLoadingBar = function setLoadingBar() {\n\t\tvar userLoadingBar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\tvar loadingBarObj = (typeof userLoadingBar === \"undefined\" ? \"undefined\" : _typeof(userLoadingBar)) === \"object\" ? userLoadingBar : {\n\t\t\t\"append\": userLoadingBar,\n\t\t\t\"prepend\": userLoadingBar\n\t\t};\n\n\t\tthis._status.loadingSize = 0;\n\t\tthis._status.loadingStyle = {};\n\t\tthis._loadingBar = this._loadingBar || {};\n\t\tvar loadingBar = this._loadingBar;\n\n\t\tfor (var type in loadingBarObj) {\n\t\t\tloadingBar[type] = (0, _utils.$)(loadingBarObj[type]);\n\t\t\tloadingBar[type].className += \" \" + _consts.IGNORE_CLASSNAME;\n\t\t}\n\t\tthis._appendLoadingBar();\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._appendLoadingBar = function _appendLoadingBar() {\n\t\tvar loadingBar = this._loadingBar;\n\t\tvar container = this._renderer.container;\n\n\t\tfor (var type in loadingBar) {\n\t\t\tcontainer.appendChild(loadingBar[type]);\n\t\t}\n\t};\n\t/**\n * Checks whether a card element or data is being added.\n * @ko 카드 엘리먼트 추가 또는 데이터 로딩이 진행 중인지 확인한다\n * @return {Boolean} Indicates whether a card element or data is being added 카드 엘리먼트 추가 또는 데이터 로딩 진행 중 여부\n */\n\n\n\tInfiniteGrid.prototype.isProcessing = function isProcessing() {\n\t\treturn this._isProcessing() || this._isLoading();\n\t};\n\n\tInfiniteGrid.prototype._isProcessing = function _isProcessing() {\n\t\treturn (this._status.processingStatus & _consts.PROCESSING) > 0;\n\t};\n\n\tInfiniteGrid.prototype._isLoading = function _isLoading() {\n\t\treturn this._getLoadingStatus() > 0;\n\t};\n\n\tInfiniteGrid.prototype._getLoadingStatus = function _getLoadingStatus() {\n\t\treturn this._status.processingStatus & (_consts.LOADING_APPEND | _consts.LOADING_PREPEND);\n\t};\n\n\tInfiniteGrid.prototype._process = function _process(status) {\n\t\tvar isAdd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tif (isAdd) {\n\t\t\tthis._status.processingStatus |= status;\n\t\t} else {\n\t\t\tthis._status.processingStatus -= this._status.processingStatus & status;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._insert = function _insert(elements, isAppend, groupKey) {\n\t\tif (this._isProcessing() || elements.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tvar key = typeof groupKey === \"undefined\" ? new Date().getTime() + Math.floor(Math.random() * 1000) : groupKey;\n\t\tvar items = _ItemManager2[\"default\"].from((0, _utils.$)(elements, true), this.options.itemSelector, {\n\t\t\tisAppend: isAppend,\n\t\t\tgroupKey: key\n\t\t});\n\n\t\tif (!items.length) {\n\t\t\treturn;\n\t\t}\n\t\tthis._postLayout(_consts.NO_CACHE, items, isAppend, _consts.NO_TRUSTED);\n\t};\n\t// add items, and remove items for recycling\n\n\n\tInfiniteGrid.prototype._recycle = function _recycle(isAppend) {\n\t\tvar remove = [];\n\n\t\tif (this._status.startCursor !== this._status.endCursor) {\n\t\t\tfor (var i = this._status.startCursor; i <= this._status.endCursor; i++) {\n\t\t\t\tremove.push(this._isVisible(i));\n\t\t\t}\n\t\t}\n\t\tvar start = remove.indexOf(isAppend ? 1 : -1);\n\t\tvar end = remove.lastIndexOf(isAppend ? 1 : -1);\n\t\tvar visible = remove.indexOf(0);\n\n\t\tif (visible === -1 || start === -1 || end === -1) {\n\t\t\treturn;\n\t\t}\n\n\t\tstart = this._status.startCursor + (isAppend ? 0 : start);\n\t\tend = isAppend ? this._status.startCursor + end : this._status.endCursor;\n\t\t_DOMRenderer2[\"default\"].removeItems(this._items.pluck(\"items\", start, end));\n\t\tif (isAppend) {\n\t\t\tthis._status.startCursor = end + 1;\n\t\t} else {\n\t\t\tthis._status.endCursor = start - 1;\n\t\t}\n\t};\n\t/**\n * Returns the element of loading bar.\n * @ko 로딩 바의 element를 반환한다.\n * @param {Boolean} [isAppend=currentLoadingBar|true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.\n * @return {Element} The element of loading bar. 로딩 바의 element\n */\n\n\n\tInfiniteGrid.prototype.getLoadingBar = function getLoadingBar() {\n\t\tvar isAppend = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._getLoadingStatus() !== _consts.LOADING_PREPEND;\n\n\t\treturn this._loadingBar[isAppend ? \"append\" : \"prepend\"];\n\t};\n\t/**\n * Start loading for append/prepend during loading data.\n * @ko 데이터가 로딩되는 동안 append/prepend하길 위해 로딩을 시작한다.\n * @param {Boolean} [isAppend=true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.\n * @param {Object} [userStyle = {display: \"block\"}] custom style to apply to this loading bar for start. 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일 \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.startLoading = function startLoading(isAppend) {\n\t\tvar userStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { display: \"block\" };\n\n\t\tif (this._isLoading()) {\n\t\t\treturn this;\n\t\t}\n\t\tvar type = isAppend ? \"append\" : \"prepend\";\n\n\t\tthis._process(isAppend ? _consts.LOADING_APPEND : _consts.LOADING_PREPEND);\n\t\tif (!this._loadingBar[type]) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._renderLoading(userStyle);\n\t\tthis._status.loadingStyle = userStyle;\n\t\tif (!isAppend) {\n\t\t\tthis._fit(\"before\");\n\t\t} else {\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") + this._status.loadingSize);\n\t\t}\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._renderLoading = function _renderLoading() {\n\t\tvar _extends2;\n\n\t\tvar userStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._status.loadingStyle;\n\n\t\tif (!this._isLoading()) {\n\t\t\treturn;\n\t\t}\n\t\tvar isAppend = this._getLoadingStatus() === _consts.LOADING_APPEND;\n\t\tvar el = this._loadingBar[isAppend ? \"append\" : \"prepend\"];\n\n\t\tif (!el) {\n\t\t\treturn;\n\t\t}\n\t\tthis._status.loadingSize = this._isVertical ? (0, _utils.innerHeight)(el) : (0, _utils.innerWidth)(el);\n\t\tvar pos = isAppend ? this._getEdgeValue(\"end\") : this._getEdgeValue(\"start\") - this._status.loadingSize;\n\t\tvar style = _extends((_extends2 = {\n\t\t\tposition: \"absolute\"\n\t\t}, _extends2[this._isVertical ? \"top\" : \"left\"] = pos + \"px\", _extends2), userStyle);\n\n\t\tfor (var property in style) {\n\t\t\tel.style[property] = style[property];\n\t\t}\n\t};\n\t/**\n * End loading after startLoading() for append/prepend\n * @ko append/prepend하길 위해 startLoading() 호출해선 걸었던 로딩을 끝낸다.\n * @param {Object} [userStyle = {display: \"none\"}] custom style to apply to this loading bar for end 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일 \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.endLoading = function endLoading() {\n\t\tvar _extends3;\n\n\t\tvar userStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { display: \"none\" };\n\n\t\tif (!this._isLoading()) {\n\t\t\treturn this;\n\t\t}\n\t\tvar isAppend = this._getLoadingStatus() === _consts.LOADING_APPEND;\n\t\tvar type = isAppend ? \"append\" : \"prepend\";\n\t\tvar el = this._loadingBar[type];\n\t\tvar size = this._status.loadingSize;\n\n\t\tthis._process(_consts.LOADING_APPEND | _consts.LOADING_PREPEND, false);\n\t\tthis._status.loadingSize = 0;\n\t\tthis._status.loadingStyle = {};\n\t\tif (!el) {\n\t\t\treturn this;\n\t\t}\n\t\tvar style = _extends((_extends3 = {}, _extends3[this._isVertical ? \"top\" : \"left\"] = -size + \"px\", _extends3), userStyle);\n\n\t\tfor (var property in style) {\n\t\t\tel.style[property] = style[property];\n\t\t}\n\t\tif (!isAppend) {\n\t\t\tthis._renderer.scrollBy(-size);\n\t\t\tthis._watcher.setScrollPos();\n\t\t\tthis._items.fit(size, this._isVertical);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\"));\n\t\t}\n\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\"));\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._postLayout = function _postLayout(fromCache, items, isAppend, isTrusted) {\n\t\tvar _this3 = this;\n\n\t\tvar outline = this._items.getOutline(isAppend ? this._status.endCursor : this._status.startCursor, isAppend ? \"end\" : \"start\");\n\n\t\tvar fromRelayout = false;\n\n\t\tif (fromCache) {\n\t\t\tvar cacheOutline = this._items.getOutline(isAppend ? this._status.endCursor + 1 : this._status.startCursor - 1, isAppend ? \"start\" : \"end\");\n\n\t\t\tfromRelayout = outline.length === cacheOutline.length ? !outline.every(function (v, index) {\n\t\t\t\treturn v === cacheOutline[index];\n\t\t\t}) : true;\n\n\t\t\tif (!fromRelayout) {\n\t\t\t\tthis._renderer.createAndInsert(items, isAppend);\n\t\t\t\tthis._updateCursor(isAppend);\n\t\t\t\tthis._onLayoutComplete(items, isAppend, isTrusted);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\t\tthis._process(_consts.PROCESSING);\n\t\tvar method = isAppend ? \"append\" : \"prepend\";\n\n\t\tfromCache && _DOMRenderer2[\"default\"].createElements(items);\n\t\tthis._renderer[method](items);\n\t\t// check image sizes after elements are attated on DOM\n\t\t_ImageLoaded2[\"default\"].check(items.map(function (item) {\n\t\t\treturn item.el;\n\t\t}), function () {\n\t\t\tvar layouted = _this3._layout[method](_this3._renderer.updateSize(items), outline);\n\n\t\t\tif (fromCache) {\n\t\t\t\t_this3._setItems(layouted);\n\t\t\t} else {\n\t\t\t\t_this3._insertItems(layouted, isAppend);\n\t\t\t}\n\t\t\t_this3._updateCursor(isAppend);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(layouted.items);\n\t\t\t_this3._onLayoutComplete(layouted.items, isAppend, isTrusted);\n\t\t});\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._isVisible = function _isVisible(index) {\n\t\tvar min = Math.min.apply(Math, this._items.getOutline(index, \"start\"));\n\t\tvar max = Math.max.apply(Math, this._items.getOutline(index, \"end\"));\n\t\tvar pos = this._watcher.getScrollPos();\n\t\tvar viewSize = this._renderer.getViewSize();\n\n\t\tif (pos + viewSize + this.options.threshold < min) {\n\t\t\treturn -1;\n\t\t} else if (pos - this.options.threshold > max) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t};\n\n\tInfiniteGrid.prototype._updateCursor = function _updateCursor(isAppend) {\n\t\tif (this.options.useRecycle) {\n\t\t\tif (isAppend) {\n\t\t\t\tthis._status.endCursor++;\n\t\t\t} else if (this._status.startCursor > 0) {\n\t\t\t\tthis._status.startCursor--;\n\t\t\t} else {\n\t\t\t\tthis._status.endCursor++; // outside prepend\n\t\t\t}\n\t\t\tif (this._status.startCursor < 0) {\n\t\t\t\tthis._status.startCursor = 0;\n\t\t\t}\n\t\t} else {\n\t\t\tthis._status.startCursor = 0;\n\t\t\tthis._status.endCursor = this._items.size() - 1;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._setItems = function _setItems(layouted) {\n\t\tvar groupKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : layouted.items && layouted.items[0].groupKey || 0;\n\n\t\tlayouted.groupKey = groupKey;\n\t\tthis._items.set(layouted, groupKey);\n\t};\n\n\tInfiniteGrid.prototype._insertItems = function _insertItems(layouted, isAppend) {\n\t\tlayouted.groupKey = layouted.items[0].groupKey;\n\t\tthis._items[isAppend ? \"append\" : \"prepend\"](layouted);\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._requestAppend = function _requestAppend() {\n\t\tvar items = this._getNextItems(_consts.APPEND);\n\n\t\tif (this._isProcessing()) {\n\t\t\treturn;\n\t\t}\n\t\tif (items.length) {\n\t\t\tthis._postLayout(_consts.CACHE, items, _consts.APPEND, _consts.TRUSTED);\n\t\t} else {\n\t\t\t/**\n * This event is fired when a card element must be added at the bottom or right of a layout because there is no card to be displayed on screen when a user scrolls near bottom or right.\n * @ko 카드 엘리먼트가 레이아웃의 아래나 오른쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 아래나 오른쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다\n * @event eg.InfiniteGrid#append\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 마지막 그룹의 그룹키\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\t\tthis.trigger(\"append\", {\n\t\t\t\tisTrusted: true,\n\t\t\t\tgroupKey: this.getGroupKeys().pop()\n\t\t\t});\n\t\t}\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._requestPrepend = function _requestPrepend() {\n\t\tvar items = this._getNextItems(_consts.PREPEND);\n\n\t\tif (this._isProcessing()) {\n\t\t\treturn;\n\t\t}\n\t\tif (items.length) {\n\t\t\tthis._postLayout(_consts.CACHE, items, _consts.PREPEND, _consts.TRUSTED);\n\t\t} else {\n\t\t\t/**\n * This event is fired when a card element must be added at the top or left of a layout because there is no card to be displayed on screen when a user scrolls near top or left.\n * @ko 카드가 레이아웃의 위나 왼쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 위나 왼쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다.\n * @event eg.InfiniteGrid#prepend\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 첫번째 그룹의 그룹키\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\t\tthis.trigger(\"prepend\", {\n\t\t\t\tisTrusted: true,\n\t\t\t\tgroupKey: this.getGroupKeys().shift()\n\t\t\t});\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._onCheck = function _onCheck(_ref) {\n\t\tvar isForward = _ref.isForward,\n\t\t scrollPos = _ref.scrollPos,\n\t\t horizontal = _ref.horizontal,\n\t\t orgScrollPos = _ref.orgScrollPos;\n\n\t\t/**\n * This event is fired when the user scrolls.\n * @ko 사용자가 스크롤 할 경우 발생하는 이벤트.\n * @event eg.InfiniteGrid#change\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {Boolean} param.isForward Indicates whether the scroll progression direction is forward or backword. 스크롤 진행방향이 앞쪽으로 진행하는 지, 뒤쪽으로 진행하는지를 나타낸다.\n * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값\n * @param {Boolean} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n * @param {Boolean} options.horizontal Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향\n */\n\t\tthis.trigger(\"change\", {\n\t\t\tisForward: isForward,\n\t\t\thorizontal: horizontal,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: orgScrollPos\n\t\t});\n\t\tvar rect = this._getEdgeOffset(isForward ? \"end\" : \"start\");\n\t\tvar isProcessing = this.isProcessing();\n\n\t\tif (!rect) {\n\t\t\treturn;\n\t\t}\n\t\tvar targetPos = isForward ? rect[horizontal ? \"left\" : \"top\"] - this._renderer.getViewSize() : rect[horizontal ? \"right\" : \"bottom\"];\n\n\t\tif (!isProcessing && isForward) {\n\t\t\tif (scrollPos >= targetPos) {\n\t\t\t\tthis._requestAppend();\n\t\t\t}\n\t\t} else if (scrollPos <= targetPos) {\n\t\t\tthis._fit(\"before\");\n\t\t\tthis._requestPrepend();\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._onLayoutComplete = function _onLayoutComplete(items, isAppend) {\n\t\tvar isTrusted = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\t\tvar useRecycle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.options.useRecycle;\n\n\t\tthis._isLoading() && this._renderLoading();\n\t\t!isAppend && this._fit(\"after\");\n\t\tuseRecycle && this._recycle(isAppend);\n\n\t\tvar size = this._getEdgeValue(\"end\");\n\n\t\t// recycle after _fit beacause prepend and append are occured simultaneously by scroll.\n\t\tthis._updateEdge();\n\n\t\tisAppend && this._renderer.setContainerSize(size + this._status.loadingSize || 0);\n\t\tthis._process(_consts.PROCESSING, false);\n\n\t\tvar scrollPos = this._watcher.getScrollPos();\n\n\t\t/**\n * This event is fired when layout is successfully arranged through a call to the append(), prepend(), or layout() method.\n * @ko 레이아웃 배치가 완료됐을 때 발생하는 이벤트. append() 메서드나 prepend() 메서드, layout() 메서드 호출 후 카드의 배치가 완료됐을 때 발생한다\n * @event eg.InfiniteGrid#layoutComplete\n *\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {Array} param.target Rearranged card elements재배치된 카드 엘리먼트들\n * @param {Boolean} param.isAppend Checks whether the append() method is used to add a card element. It returns true even though the layoutComplete event is fired after the layout() method is called. 카드 엘리먼트가 append() 메서드로 추가됐는지 확인한다. layout() 메서드가 호출된 후 layoutComplete 이벤트가 발생해도 'true'를 반환한다.\n * @param {Boolean} param.isScroll Checks whether scrolling has occurred after the append(), prepend(), ..., etc method is called\n * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값\n * @param {Number} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값\n * @param {Number} param.size The size of container element 컨테이너 엘리먼트의 크기\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\tthis.trigger(\"layoutComplete\", {\n\t\t\ttarget: items.concat(),\n\t\t\tisAppend: isAppend,\n\t\t\tisTrusted: isTrusted,\n\t\t\tisScroll: this._renderer.getViewSize() < this._renderer.getContainerOffset() + size,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: this._watcher.getOrgScrollPos(),\n\t\t\tsize: size\n\t\t});\n\n\t\tif (isAppend && scrollPos >= size) {\n\t\t\tthis._requestAppend();\n\t\t} else if (!isAppend && scrollPos <= this._getEdgeValue(\"start\")) {\n\t\t\tthis._fit(\"before\");\n\t\t\tthis._requestPrepend();\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._reset = function _reset() {\n\t\tthis._status = {\n\t\t\tprocessingStatus: _consts.IDLE,\n\t\t\tloadingSize: 0,\n\t\t\tstartCursor: -1,\n\t\t\tendCursor: -1,\n\t\t\tstart: null,\n\t\t\tend: null\n\t\t};\n\t};\n\t/**\n * Destroys elements, properties, and events used on a grid layout.\n * @ko 그리드 레이아웃에 사용한 엘리먼트와 속성, 이벤트를 해제한다\n */\n\n\n\tInfiniteGrid.prototype.destroy = function destroy() {\n\t\tthis.off();\n\t\tthis._watcher.destroy();\n\t\tthis._reset();\n\t\tthis._items.clear();\n\t\tthis._renderer.destroy();\n\t};\n\n\treturn InfiniteGrid;\n}(_component2[\"default\"]);\n\nInfiniteGrid.VERSION = \"3.0.0-rc\";\n\nexports[\"default\"] = InfiniteGrid;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/InfiniteGrid.js\n// module id = 6\n// module chunks = 0 1","module.exports = __WEBPACK_EXTERNAL_MODULE_7__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"commonjs\":\"@egjs/component\",\"commonjs2\":\"@egjs/component\",\"amd\":\"@egjs/component\",\"root\":[\"eg\",\"Component\"]}\n// module id = 7\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"./consts\");\n\nvar _DOMRenderer = require(\"./DOMRenderer\");\n\nvar _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ItemManager = function () {\n\tItemManager.from = function from(elements, selector, _ref) {\n\t\tvar groupKey = _ref.groupKey,\n\t\t isAppend = _ref.isAppend;\n\n\t\tvar filted = ItemManager.selectItems((0, _utils.$)(elements, _consts.MULTI), selector);\n\n\t\t// Item Structure\n\t\treturn (0, _utils.toArray)(filted).map(function (el) {\n\t\t\treturn {\n\t\t\t\tel: el,\n\t\t\t\tgroupKey: groupKey,\n\t\t\t\tcontent: el.outerHTML\n\t\t\t};\n\t\t});\n\t};\n\n\tItemManager.selectItems = function selectItems(elements, selector) {\n\t\treturn elements.filter(function (v) {\n\t\t\tvar classNames = v.className.split(\" \");\n\n\t\t\tif (classNames.some(function (c) {\n\t\t\t\treturn c === _consts.IGNORE_CLASSNAME;\n\t\t\t})) {\n\t\t\t\treturn false;\n\t\t\t} else if (selector === \"*\") {\n\t\t\t\treturn v;\n\t\t\t} else {\n\t\t\t\treturn classNames.some(function (c) {\n\t\t\t\t\treturn c === selector;\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\tItemManager.pluck = function pluck(data, property) {\n\t\treturn data.reduce(function (acc, v) {\n\t\t\treturn acc.concat(v[property]);\n\t\t}, []);\n\t};\n\n\tfunction ItemManager() {\n\t\t_classCallCheck(this, ItemManager);\n\n\t\tthis.clear();\n\t}\n\n\tItemManager.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\t_data: this._data.map(function (data) {\n\t\t\t\tvar items = data.items.map(function (item) {\n\t\t\t\t\tvar item2 = _extends({}, item);\n\n\t\t\t\t\tdelete item2.el;\n\t\t\t\t\treturn item2;\n\t\t\t\t});\n\t\t\t\tvar data2 = _extends({}, data);\n\n\t\t\t\tdata2.items = items;\n\t\t\t\treturn data2;\n\t\t\t})\n\t\t};\n\t};\n\n\tItemManager.prototype.setStatus = function setStatus(status, start, end) {\n\t\tvar data = status._data;\n\n\t\tfor (var i = start; i <= end; i++) {\n\t\t\tdata[i].items = _DOMRenderer2[\"default\"].createElements(data[i].items);\n\t\t}\n\t\tthis.set(data);\n\t};\n\n\tItemManager.prototype.size = function size() {\n\t\treturn this._data.length;\n\t};\n\n\tItemManager.prototype.fit = function fit(base, isVertical) {\n\t\tif (!this._data.length) {\n\t\t\treturn;\n\t\t}\n\t\tvar property = isVertical ? \"top\" : \"left\";\n\n\t\tif (base !== 0) {\n\t\t\tthis._data = this._data.map(function (v) {\n\t\t\t\tv.items = v.items.map(function (item) {\n\t\t\t\t\titem.rect[property] -= base;\n\t\t\t\t\treturn item;\n\t\t\t\t});\n\t\t\t\tv.outlines.start = v.outlines.start.map(function (start) {\n\t\t\t\t\treturn start - base;\n\t\t\t\t});\n\t\t\t\tv.outlines.end = v.outlines.end.map(function (end) {\n\t\t\t\t\treturn end - base;\n\t\t\t\t});\n\t\t\t\treturn v;\n\t\t\t});\n\t\t}\n\t};\n\n\tItemManager.prototype.pluck = function pluck(property, start, end) {\n\t\tif (typeof start !== \"undefined\") {\n\t\t\tif (typeof end !== \"undefined\") {\n\t\t\t\treturn ItemManager.pluck(this._data.slice(start, end + 1), property);\n\t\t\t} else {\n\t\t\t\treturn ItemManager.pluck(this._data.slice(start, start + 1), property);\n\t\t\t}\n\t\t} else {\n\t\t\treturn ItemManager.pluck(this._data, property);\n\t\t}\n\t};\n\n\tItemManager.prototype.getOutline = function getOutline(index, property) {\n\t\tif (this._data.length) {\n\t\t\treturn this._data[index].outlines[property];\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t};\n\n\tItemManager.prototype.getEdgeIndex = function getEdgeIndex(cursor, start, end) {\n\t\tvar prop = cursor === \"start\" ? \"min\" : \"max\";\n\t\tvar index = -1;\n\t\tvar targetValue = cursor === \"start\" ? Infinity : -Infinity;\n\n\t\tfor (var i = start; i <= end; i++) {\n\t\t\tvar value = Math[prop].apply(Math, this.getOutline(i, cursor));\n\n\t\t\tif (cursor === \"start\" && targetValue > value || cursor === \"end\" && targetValue < value) {\n\t\t\t\ttargetValue = value;\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t};\n\n\tItemManager.prototype.getEdge = function getEdge(cursor, start, end) {\n\t\tvar dataIdx = this.getEdgeIndex(cursor, start, end);\n\t\tvar items = this.pluck(\"items\", dataIdx);\n\n\t\tif (items.length) {\n\t\t\tvar itemIdx = this.getOutline(dataIdx, cursor + \"Index\");\n\n\t\t\treturn items.length > itemIdx ? items[itemIdx] : null;\n\t\t}\n\t\treturn null;\n\t};\n\n\tItemManager.prototype.getEdgeValue = function getEdgeValue(cursor, start, end) {\n\t\tvar outlines = this.pluck(\"outlines\", this.getEdgeIndex(cursor, start, end)).reduce(function (acc, v) {\n\t\t\treturn acc.concat(v[cursor]);\n\t\t}, []);\n\n\t\treturn outlines.length ? Math[cursor === \"start\" ? \"min\" : \"max\"].apply(Math, outlines) : 0;\n\t};\n\n\tItemManager.prototype.append = function append(layouted) {\n\t\tthis._data.push(layouted);\n\t\treturn layouted.items;\n\t};\n\n\tItemManager.prototype.prepend = function prepend(layouted) {\n\t\tthis._data.unshift(layouted);\n\t\treturn layouted.items;\n\t};\n\n\tItemManager.prototype.clear = function clear() {\n\t\tthis._data = [];\n\t};\n\n\tItemManager.prototype.remove = function remove(element, start, end) {\n\t\tvar items = null;\n\t\tvar key = element.getAttribute(_consts.GROUPKEY_ATT);\n\t\tvar data = this.get(start, end).filter(function (v) {\n\t\t\treturn String(v.groupKey) === key;\n\t\t});\n\n\t\tif (!data.length) {\n\t\t\treturn items;\n\t\t}\n\t\tdata = data[0];\n\n\t\tvar len = data.items.length;\n\t\tvar idx = -1;\n\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tif (data.items[i].el === element) {\n\t\t\t\tidx = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (~idx) {\n\t\t\t// remove item information\n\t\t\tdata.items.splice(idx, 1);\n\t\t\tthis.set(data, key);\n\t\t\titems = data.items;\n\t\t}\n\t\treturn items;\n\t};\n\n\tItemManager.prototype.get = function get(start, end) {\n\t\tif (typeof start !== \"undefined\") {\n\t\t\tif (typeof end !== \"undefined\") {\n\t\t\t\treturn this._data.slice(start, end + 1);\n\t\t\t} else {\n\t\t\t\treturn this._data.slice(start, start + 1);\n\t\t\t}\n\t\t} else {\n\t\t\treturn this._data.concat();\n\t\t}\n\t};\n\n\tItemManager.prototype.set = function set(data, key) {\n\t\tif (typeof key !== \"undefined\" && !Array.isArray(data)) {\n\t\t\tvar len = this._data.length;\n\t\t\tvar idx = -1;\n\n\t\t\tfor (var i = 0; i < len; i++) {\n\t\t\t\tif (this._data[i].groupKey === key) {\n\t\t\t\t\tidx = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t~idx && (this._data[idx] = data);\n\t\t} else {\n\t\t\tthis._data = data.concat();\n\t\t}\n\t};\n\n\treturn ItemManager;\n}();\n\nexports[\"default\"] = ItemManager;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/ItemManager.js\n// module id = 8\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ImageLoaded = function () {\n\tfunction ImageLoaded() {\n\t\t_classCallCheck(this, ImageLoaded);\n\t}\n\n\tImageLoaded.waitImageLoaded = function waitImageLoaded(needCheck, callback) {\n\t\tvar checkCount = needCheck.length;\n\t\tvar checkImage = function checkImage() {\n\t\t\tcheckCount--;\n\t\t\tcheckCount <= 0 && callback && callback();\n\t\t};\n\t\tvar onCheck = function onCheck(e) {\n\t\t\t(0, _utils.removeEvent)(e.target || e.srcElement, \"load\", onCheck);\n\t\t\t(0, _utils.removeEvent)(e.target || e.srcElement, \"error\", onCheck);\n\t\t\tcheckImage();\n\t\t};\n\n\t\t// workaround for IE\n\t\t_consts.IS_IE && needCheck.forEach(function (v) {\n\t\t\treturn v.setAttribute(\"src\", v.getAttribute(\"src\"));\n\t\t});\n\t\tneedCheck.forEach(function (v) {\n\t\t\tif (v.complete) {\n\t\t\t\tcheckImage();\n\t\t\t} else {\n\t\t\t\t(0, _utils.addEvent)(v, \"load\", onCheck);\n\t\t\t\t(0, _utils.addEvent)(v, \"error\", onCheck);\n\t\t\t}\n\t\t});\n\t};\n\n\tImageLoaded.checkImageLoaded = function checkImageLoaded(el) {\n\t\tif (el.tagName === \"IMG\") {\n\t\t\treturn !el.complete ? [el] : [];\n\t\t} else {\n\t\t\treturn (0, _utils.toArray)(el.querySelectorAll(\"img\")).filter(function (v) {\n\t\t\t\tif (v.nodeType && [1, 9, 11].indexOf(v.nodeType) !== -1) {\n\t\t\t\t\treturn !v.complete;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\tImageLoaded.check = function check(elements, callback) {\n\t\tvar _this = this;\n\n\t\tvar needCheck = elements.reduce(function (acc, v) {\n\t\t\treturn acc.concat(_this.checkImageLoaded(v));\n\t\t}, []);\n\n\t\tif (needCheck.length > 0) {\n\t\t\tImageLoaded.waitImageLoaded(needCheck, callback);\n\t\t} else {\n\t\t\t// convert to async\n\t\t\tsetTimeout(function () {\n\t\t\t\tcallback && callback();\n\t\t\t}, 0);\n\t\t}\n\t};\n\n\treturn ImageLoaded;\n}();\n\nexports[\"default\"] = ImageLoaded;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/ImageLoaded.js\n// module id = 9\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Watcher = function () {\n\tfunction Watcher(renderer, callback) {\n\t\t_classCallCheck(this, Watcher);\n\n\t\t_extends(this._callback = {\n\t\t\tlayout: null,\n\t\t\tcheck: null\n\t\t}, callback);\n\t\tthis._timer = {\n\t\t\tresize: null\n\t\t\t// doubleCheck: null,\n\t\t\t// doubleCheckCount: RETRY,\n\t\t};\n\t\tthis.reset();\n\t\tthis._renderer = renderer;\n\t\tthis._onCheck = this._onCheck.bind(this);\n\t\tthis._onResize = this._onResize.bind(this);\n\t\tthis.attachEvent();\n\t\tthis.setScrollPos();\n\t}\n\n\tWatcher.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\t_prevPos: this._prevPos,\n\t\t\tscrollPos: this.getOrgScrollPos()\n\t\t};\n\t};\n\n\tWatcher.prototype.setStatus = function setStatus(status) {\n\t\tvar applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tthis._prevPos = status._prevPos;\n\t\tapplyScrollPos && this.scrollTo(status.scrollPos);\n\t};\n\n\tWatcher.prototype.scrollTo = function scrollTo(pos) {\n\t\tvar arrPos = this._renderer.options.isVertical ? [0, pos] : [pos, 0];\n\n\t\t_utils.scrollTo.apply(undefined, [this._renderer.view].concat(arrPos));\n\t};\n\n\tWatcher.prototype.getScrollPos = function getScrollPos() {\n\t\treturn this._prevPos;\n\t};\n\n\tWatcher.prototype.setScrollPos = function setScrollPos(pos) {\n\t\tvar rawPos = pos;\n\n\t\tif (typeof pos === \"undefined\") {\n\t\t\trawPos = this.getOrgScrollPos();\n\t\t}\n\t\tthis._prevPos = rawPos - this._renderer.getContainerOffset();\n\t};\n\n\tWatcher.prototype.attachEvent = function attachEvent() {\n\t\t(0, _utils.addEvent)(this._renderer.view, \"scroll\", this._onCheck);\n\t\t(0, _utils.addEvent)(window, \"resize\", this._onResize);\n\t};\n\n\tWatcher.prototype.getOrgScrollPos = function getOrgScrollPos() {\n\t\treturn (0, _utils.scroll)(this._renderer.view, this._renderer.options.isVertical);\n\t};\n\n\tWatcher.prototype.reset = function reset() {\n\t\tthis._prevPos = null;\n\t};\n\n\tWatcher.prototype._onCheck = function _onCheck() {\n\t\tvar prevPos = this.getScrollPos();\n\t\tvar orgScrollPos = this.getOrgScrollPos();\n\n\t\tthis.setScrollPos(orgScrollPos);\n\t\tvar scrollPos = this.getScrollPos();\n\n\t\tif (prevPos === null || _consts.IS_IOS && orgScrollPos === 0 || prevPos === scrollPos) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._callback.check && this._callback.check({\n\t\t\tisForward: prevPos < scrollPos,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: orgScrollPos,\n\t\t\thorizontal: !this._renderer.options.isVertical\n\t\t});\n\t};\n\n\tWatcher.prototype._onResize = function _onResize() {\n\t\tvar _this = this;\n\n\t\tif (this._timer.resize) {\n\t\t\tclearTimeout(this._timer.resize);\n\t\t}\n\t\tthis._timer.resize = setTimeout(function () {\n\t\t\t_this._renderer.isNeededResize() && _this._callback.layout && _this._callback.layout();\n\t\t\t_this._timer.resize = null;\n\t\t\t_this.reset();\n\t\t}, 100);\n\t};\n\n\tWatcher.prototype.detachEvent = function detachEvent() {\n\t\t(0, _utils.removeEvent)(window, \"resize\", this._onResize);\n\t};\n\n\tWatcher.prototype.destroy = function destroy() {\n\t\tthis.detachEvent();\n\t\tthis.reset();\n\t};\n\n\treturn Watcher;\n}();\n\nexports[\"default\"] = Watcher;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Watcher.js\n// module id = 10\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// ALIGN\nvar START = _consts.ALIGN.START,\n CENTER = _consts.ALIGN.CENTER,\n END = _consts.ALIGN.END,\n JUSTIFY = _consts.ALIGN.JUSTIFY;\n\n/**\n * @classdesc The GridLayout is a layout that stacks cards with the same width as a stack of bricks. Adjust the width of all images to the same size, find the lowest height column, and insert a new card.\n * @ko GridLayout는 벽돌을 쌓아 올린 모양처럼 동일한 너비를 가진 카드를 쌓는 레이아웃이다. 모든 이미지의 너비를 동일한 크기로 조정하고, 가장 높이가 낮은 열을 찾아 새로운 이미지를 삽입한다. 따라서 배치된 카드 사이에 빈 공간이 생기지는 않지만 배치된 레이아웃의 아래쪽은 울퉁불퉁해진다.\n * @class eg.InfiniteGrid.GridLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.GridLayout module eg.InfiniteGrid.GridLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.align=START] Align of the position of the items (START, CENTER, END, JUSTIFY) 아이템들의 위치의 정렬 (START, CENTER, END, JUSTIFY)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @example\n```\n\n```\n **/\n\nvar GridLayout = function () {\n\tfunction GridLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, GridLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\talign: START,\n\t\t\titemSize: 0\n\t\t}, options);\n\t\tthis._size = 0;\n\t\tthis._columnSize = 0;\n\t\tthis._columnLength = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tGridLayout.prototype.getPoints = function getPoints(outlines) {\n\t\tvar pos = this.options.horizontal ? \"left\" : \"top\";\n\n\t\treturn outlines.map(function (outline) {\n\t\t\treturn outline[pos];\n\t\t});\n\t};\n\n\tGridLayout.prototype.checkColumn = function checkColumn(item) {\n\t\tvar margin = this.options.margin;\n\t\tvar sizeName = this.options.horizontal ? \"height\" : \"width\";\n\t\tvar columnSize = this.options.itemSize || item && item.size[sizeName] || 0;\n\n\t\tthis._columnSize = columnSize;\n\t\tif (!columnSize) {\n\t\t\tthis._columnLength = 1;\n\t\t\treturn;\n\t\t}\n\t\tthis._columnLength = Math.max(parseInt((this._size + margin) / (columnSize + margin), 10), 1);\n\t};\n\n\tGridLayout.prototype._layout = function _layout(items, outline, isAppend) {\n\t\tvar length = items.length;\n\t\tvar margin = this.options.margin;\n\t\tvar align = this.options.align;\n\t\tvar style = this._style;\n\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar columnSize = this._columnSize;\n\t\tvar columnLength = this._columnLength;\n\n\t\tvar size = this._size;\n\t\tvar viewDist = size - (columnSize + margin) * columnLength + margin;\n\n\t\tvar pointCaculateName = isAppend ? \"min\" : \"max\";\n\t\tvar startOutline = outline.slice();\n\t\tvar endOutline = outline.slice();\n\t\tvar startIndex = 0;\n\t\tvar endIndex = -1;\n\t\tvar endPos = -1;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar _item$rect;\n\n\t\t\tvar point = Math[pointCaculateName].apply(Math, endOutline) || 0;\n\t\t\tvar index = endOutline.indexOf(point);\n\t\t\tvar item = items[isAppend ? i : length - 1 - i];\n\t\t\tvar size1 = item.size[size1Name];\n\t\t\tvar size2 = item.size[size2Name];\n\t\t\tvar pos1 = isAppend ? point : point - margin - size1;\n\t\t\tvar endPos1 = pos1 + size1 + margin;\n\n\t\t\tif (index === -1) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\tvar pos2 = (columnSize + margin) * index;\n\n\t\t\t// ALIGN\n\t\t\tif (align === CENTER) {\n\t\t\t\tpos2 += viewDist / 2;\n\t\t\t} else if (align === END) {\n\t\t\t\tpos2 += viewDist + columnSize - size2;\n\t\t\t} else if (align === JUSTIFY) {\n\t\t\t\tif (columnLength <= 1) {\n\t\t\t\t\tpos2 += viewDist / 2;\n\t\t\t\t} else {\n\t\t\t\t\tpos2 = (size - columnSize) / (columnLength - 1) * index;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// tetris\n\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect);\n\t\t\titem.column = index;\n\t\t\tendOutline[index] = isAppend ? endPos1 : pos1;\n\t\t\tif (endIndex === -1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tendPos = endPos1;\n\t\t\t} else if (endPos < endPos1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tendPos = endPos1;\n\t\t\t}\n\t\t}\n\t\tif (!isAppend) {\n\t\t\titems.sort(function (a, b) {\n\t\t\t\tvar item1pos1 = a.rect[pos1Name];\n\t\t\t\tvar item1pos2 = a.rect[pos2Name];\n\t\t\t\tvar item2pos1 = b.rect[pos1Name];\n\t\t\t\tvar item2pos2 = b.rect[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\tendIndex = length - 1;\n\t\t}\n\t\t// if append items, startOutline is low, endOutline is high\n\t\t// if prepend items, startOutline is high, endOutline is low\n\t\treturn {\n\t\t\tstart: isAppend ? startOutline : endOutline,\n\t\t\tend: isAppend ? endOutline : startOutline,\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tGridLayout.prototype._insert = function _insert() {\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar type = arguments[2];\n\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\tvar startOutline = outline;\n\n\t\tif (!this._columnLength) {\n\t\t\tthis.checkColumn(items[0]);\n\t\t}\n\t\tif (outline.length !== this._columnLength) {\n\t\t\tstartOutline = (0, _utils.fill)(this._columnLength, outline.length === 0 ? 0 : Math[type === _consts.APPEND ? \"min\" : \"max\"].apply(Math, outline) || 0);\n\t\t}\n\n\t\tvar result = this._layout(clone, startOutline, type);\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: result\n\t\t};\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.layout = function layout() {\n\t\tvar _this = this;\n\n\t\tvar groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\tvar firstItem = groups.length && groups[0].items.length && groups[0].items[0] || 0;\n\n\t\tthis.checkColumn(firstItem);\n\n\t\t// if outlines' length and columns' length are now same, re-caculate outlines.\n\t\tvar startOutline = void 0;\n\n\t\tif (outline.length !== this._columnLength) {\n\t\t\tvar pos = outline.length === 0 ? 0 : Math.min.apply(Math, outline);\n\n\t\t\t// re-layout items.\n\t\t\tstartOutline = (0, _utils.fill)(this._columnLength, pos);\n\t\t} else {\n\t\t\tstartOutline = outline.slice();\n\t\t}\n\t\tgroups.forEach(function (group) {\n\t\t\tvar items = group.items;\n\t\t\tvar result = _this._layout(items, startOutline, _consts.APPEND);\n\n\t\t\tgroup.outlines = result;\n\t\t\tstartOutline = result.end;\n\t\t});\n\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.GridLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tGridLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\n\treturn GridLayout;\n}();\n\nexports[\"default\"] = GridLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/GridLayout.js\n// module id = 11\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _FrameLayout2 = require(\"./FrameLayout\");\n\nvar _FrameLayout3 = _interopRequireDefault(_FrameLayout2);\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction makeShapeOutline(outline, itemSize, columnLength, isAppend) {\n\tvar point = Math[isAppend ? \"min\" : \"max\"].apply(Math, outline) || 0;\n\n\tif (outline.length !== columnLength) {\n\t\treturn (0, _utils.fill)(columnLength, 0);\n\t}\n\treturn outline.map(function (l) {\n\t\treturn parseInt((l - point) / itemSize, 10);\n\t});\n}\nfunction getColumn(item) {\n\tif (item.column) {\n\t\treturn item.column;\n\t}\n\tvar column = 0;\n\n\tif (item.el) {\n\t\tvar dataset = item.el.dataset;\n\n\t\tif (dataset) {\n\t\t\tcolumn = dataset.column || 1;\n\t\t} else {\n\t\t\tcolumn = item.el.getAttribute(\"column\") || 1;\n\t\t}\n\t} else {\n\t\tcolumn = 1;\n\t}\n\titem.column = column;\n\treturn column;\n}\n\n/**\n * @classdesc SquareLayout is a layout that places all cards like squares on a checkerboard, and important cards are n times larger. The main card can be enlarged, and then a small card can be placed to naturally show the relationship of the card.\n * @ko SquareLayout은 바둑판처럼 모든 카드를 정사각형으로 배치하고 중요한 카드는 크기를 N배로 키워서 보여주는 레이아웃이다. 주요 카드를 크게 표시하고, 그 다음에 작은 카드를 배치해 자연스럽게 카드의 관계를 나타낼 수 있습니다.\n * @class eg.InfiniteGrid.SquareLayout\n * @extends eg.InfiniteGrid.FrameLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.SquareLayout module eg.InfiniteGrid.SquareLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @example\n```\n\n```\n **/\n\nvar SquareLayout = function (_FrameLayout) {\n\t_inherits(SquareLayout, _FrameLayout);\n\n\tfunction SquareLayout() {\n\t\t_classCallCheck(this, SquareLayout);\n\n\t\treturn _possibleConstructorReturn(this, _FrameLayout.apply(this, arguments));\n\t}\n\n\tSquareLayout.prototype._checkItemSize = function _checkItemSize() {\n\t\tvar column = this.options.column;\n\n\t\tif (!column) {\n\t\t\t_FrameLayout.prototype._checkItemSize.call(this);\n\t\t\treturn;\n\t\t}\n\t\tvar margin = this.options.margin;\n\n\t\t// if itemSize is not in options, caculate itemSize from size.\n\t\tthis._itemSize = (this._size + margin) / column - margin;\n\t};\n\n\tSquareLayout.prototype._layout = function _layout(items) {\n\t\tvar _shapes;\n\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar itemSize = this._getItemSize();\n\t\tvar margin = this.options.margin;\n\t\tvar columnLength = this.options.column || parseInt((this._size + margin) / (itemSize + margin), 10) || 1;\n\t\tvar length = items.length;\n\t\tvar endOutline = makeShapeOutline(outline, itemSize, columnLength, isAppend);\n\t\tvar pointCaculateName = isAppend ? \"min\" : \"max\";\n\t\tvar shapes = [];\n\t\tvar sign = isAppend ? 1 : -1;\n\t\tvar style = this._style;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar _shapes$push;\n\n\t\t\tvar point = Math[pointCaculateName].apply(Math, endOutline);\n\t\t\tvar index = (0, _utils.indexOf)(endOutline, point, !isAppend);\n\t\t\tvar item = items[i];\n\t\t\tvar columnWidth = item.columnWidth;\n\t\t\tvar column = columnWidth && columnWidth[0] === columnLength && columnWidth[1] || getColumn(item);\n\t\t\tvar columnCount = 1;\n\n\t\t\tif (column > 1) {\n\t\t\t\tfor (var j = 1; j < column && (isAppend && index + j < columnLength || !isAppend && index - j >= 0); ++j) {\n\t\t\t\t\tif (isAppend && endOutline[index + sign * j] <= point || !isAppend && endOutline[index + sign * j] >= point) {\n\t\t\t\t\t\t++columnCount;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (!isAppend) {\n\t\t\t\t\tindex -= columnCount - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\titem.columnWidth = [columnLength, columnCount];\n\t\t\tshapes.push((_shapes$push = {\n\t\t\t\twidth: columnCount,\n\t\t\t\theight: columnCount\n\t\t\t}, _shapes$push[pos1Name] = point - (!isAppend ? columnCount : 0), _shapes$push[pos2Name] = index, _shapes$push.index = i, _shapes$push));\n\t\t\tfor (var _j = 0; _j < columnCount; ++_j) {\n\t\t\t\tendOutline[index + _j] = point + sign * columnCount;\n\t\t\t}\n\t\t}\n\t\tthis._shapes = (_shapes = {\n\t\t\tshapes: shapes\n\t\t}, _shapes[style.size2] = columnLength, _shapes);\n\n\t\tvar result = _FrameLayout.prototype._layout.call(this, items, outline, isAppend);\n\n\t\tif (!isAppend) {\n\t\t\tvar lastItem = items[items.length - 1];\n\n\t\t\tshapes.sort(function (shape1, shape2) {\n\t\t\t\tvar item1pos1 = shape1[pos1Name];\n\t\t\t\tvar item1pos2 = shape1[pos2Name];\n\t\t\t\tvar item2pos1 = shape2[pos1Name];\n\t\t\t\tvar item2pos2 = shape2[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\titems.sort(function (a, b) {\n\t\t\t\tvar item1pos1 = a.rect[pos1Name];\n\t\t\t\tvar item1pos2 = a.rect[pos2Name];\n\t\t\t\tvar item2pos1 = b.rect[pos1Name];\n\t\t\t\tvar item2pos2 = b.rect[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\tresult.startIndex = 0;\n\t\t\tresult.endIndex = items.indexOf(lastItem);\n\t\t}\n\t\treturn result;\n\t};\n\n\treturn SquareLayout;\n}(_FrameLayout3[\"default\"]);\n\nexports[\"default\"] = SquareLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/SquareLayout.js\n// module id = 12\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _BoxModel = require(\"./lib/BoxModel.js\");\n\nvar _BoxModel2 = _interopRequireDefault(_BoxModel);\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getCost(originLength, length) {\n\tvar cost = originLength / length;\n\n\tif (cost < 1) {\n\t\tcost = 1 / cost;\n\t}\n\n\treturn cost - 1;\n}\nfunction fitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical) {\n\titem.setHeight(itemFitSize.height);\n\titem.setWidth(itemFitSize.width);\n\tbestFitArea.setHeight(containerFitSize.height);\n\tbestFitArea.setWidth(containerFitSize.width);\n\n\tif (layoutVertical) {\n\t\titem.setTop(bestFitArea.getTop() + bestFitArea.getHeight());\n\t\titem.setLeft(bestFitArea.getLeft());\n\t} else {\n\t\titem.setLeft(bestFitArea.getLeft() + bestFitArea.getWidth());\n\t\titem.setTop(bestFitArea.getTop());\n\t}\n}\n\n/**\n * @classdesc The PackingLayout is a layout that shows the important cards bigger without sacrificing the weight of the cards. Rows and columns are separated so that cards are dynamically placed within the horizontal and vertical space rather than arranged in an orderly fashion.\n * @ko PackingLayout은 카드의 본래 크기에 따른 비중을 해치지 않으면서 중요한 카드는 더 크게 보여 주는 레이아웃이다. 행과 열이 구분돼 이미지를 정돈되게 배치하는 대신 가로세로 일정 공간 내에서 동적으로 카드를 배치한다.\n * @class eg.InfiniteGrid.PackingLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.PackingLayout module eg.InfiniteGrid.PackingLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.aspectRatio=1] The aspect ratio of the group 그룹의 가로 세로 비 \n * @param {Boolean} [options.sizeWeight=1] The size weight when placing an image 이미지를 배치할 때 사이즈 가중치 \n * @param {Boolean} [options.ratioWeight=1] The ratio weight when placing an image 이미지를 배치할 때 비율 가중치 \n * @example\n```\n\n```\n **/\n\nvar PackingLayout = function () {\n\tfunction PackingLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, PackingLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\taspectRatio: 1,\n\t\t\tsizeWeight: 1,\n\t\t\tratioWeight: 1\n\t\t}, options);\n\t\tthis._size = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tPackingLayout.prototype._findBestFitArea = function _findBestFitArea(container, item) {\n\t\tif (container.getRatio() === 0) {\n\t\t\t// 아이템 최초 삽입시 전체영역 지정\n\t\t\tcontainer.setOriginWidth(item.getWidth());\n\t\t\tcontainer.setOriginHeight(item.getHeight());\n\t\t\tcontainer.setWidth(item.getWidth());\n\t\t\tcontainer.setHeight(item.getHeight());\n\t\t\treturn;\n\t\t}\n\n\t\tvar bestFitArea = null;\n\t\tvar minCost = 10000000;\n\t\tvar layoutVertical = false;\n\t\tvar itemFitSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tvar containerFitSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tvar _options = this.options,\n\t\t sizeWeight = _options.sizeWeight,\n\t\t ratioWeight = _options.ratioWeight;\n\n\n\t\tcontainer.innerItem().forEach(function (v) {\n\t\t\tvar containerSizeCost = getCost(v.getOriginSize(), v.getSize()) * sizeWeight;\n\t\t\tvar containerRatioCost = getCost(v.getOriginRatio(), v.getRatio()) * ratioWeight;\n\t\t\tvar cost = void 0;\n\n\t\t\tfor (var i = 0; i < 2; ++i) {\n\t\t\t\tvar itemWidth = void 0;\n\t\t\t\tvar itemHeight = void 0;\n\t\t\t\tvar containerWidth = void 0;\n\t\t\t\tvar containerHeight = void 0;\n\n\t\t\t\tif (i === 0) {\n\t\t\t\t\t// 상하에 아이템 추가\n\t\t\t\t\titemWidth = v.getWidth();\n\t\t\t\t\titemHeight = v.getHeight() * (item.getHeight() / (v.getOriginHeight() + item.getHeight()));\n\t\t\t\t\tcontainerWidth = v.getWidth();\n\t\t\t\t\tcontainerHeight = v.getHeight() - itemHeight;\n\t\t\t\t} else {\n\t\t\t\t\t// 좌우에 아이템 추가\n\t\t\t\t\titemHeight = v.getHeight();\n\t\t\t\t\titemWidth = v.getWidth() * (item.getWidth() / (v.getOriginWidth() + item.getWidth()));\n\t\t\t\t\tcontainerHeight = v.getHeight();\n\t\t\t\t\tcontainerWidth = v.getWidth() - itemWidth;\n\t\t\t\t}\n\n\t\t\t\tvar itemSize = itemWidth * itemHeight;\n\t\t\t\tvar itemRatio = itemWidth / itemHeight;\n\t\t\t\tvar containerSize = containerWidth * containerHeight;\n\t\t\t\tvar containerRatio = containerHeight / containerHeight;\n\n\t\t\t\tcost = getCost(item.getSize(), itemSize) * sizeWeight;\n\t\t\t\tcost += getCost(item.getRatio(), itemRatio) * ratioWeight;\n\t\t\t\tcost += getCost(v.getOriginSize(), containerSize) * sizeWeight - containerSizeCost;\n\t\t\t\tcost += getCost(v.getOriginRatio(), containerRatio) * ratioWeight - containerRatioCost;\n\n\t\t\t\tif (cost === Math.min(cost, minCost)) {\n\t\t\t\t\tminCost = cost;\n\t\t\t\t\tbestFitArea = v;\n\t\t\t\t\tlayoutVertical = i === 0;\n\t\t\t\t\titemFitSize.width = itemWidth;\n\t\t\t\t\titemFitSize.height = itemHeight;\n\t\t\t\t\tcontainerFitSize.width = containerWidth;\n\t\t\t\t\tcontainerFitSize.height = containerHeight;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical);\n\t};\n\n\tPackingLayout.prototype._layout = function _layout(items) {\n\t\tvar _this = this;\n\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar style = this._style;\n\t\tvar isHorizontal = this.options.horizontal;\n\t\tvar aspectRatio = this.options.aspectRatio;\n\t\tvar margin = this.options.margin;\n\t\tvar pos1Name = style.pos1;\n\t\tvar size1Name = style.size1;\n\t\tvar containerWidth = this._size * (isHorizontal ? aspectRatio : 1);\n\t\tvar containerHeight = this._size / (isHorizontal ? 1 : aspectRatio);\n\t\tvar containerSize1 = isHorizontal ? containerWidth : containerHeight;\n\t\tvar prevOutline = (0, _utils.toZeroArray)(outline);\n\t\tvar start = isAppend ? Math.max.apply(Math, prevOutline) : Math.min.apply(Math, prevOutline) - containerSize1 - margin;\n\t\tvar end = start + containerSize1 + margin;\n\t\tvar container = new _BoxModel2[\"default\"]({});\n\n\t\tvar startIndex = -1;\n\t\tvar endIndex = -1;\n\t\tvar startPos = -1;\n\t\tvar endPos = -1;\n\n\t\titems.forEach(function (item) {\n\t\t\tvar model = new _BoxModel2[\"default\"]({\n\t\t\t\toriginWidth: item.orgSize.width,\n\t\t\t\toriginHeight: item.orgSize.height,\n\t\t\t\twidth: item.orgSize.width,\n\t\t\t\theight: item.orgSize.height\n\t\t\t});\n\n\t\t\t_this._findBestFitArea(container, model);\n\t\t\tcontainer.pushItem(model);\n\t\t\tcontainer.scaleTo(containerWidth + margin, containerHeight + margin);\n\t\t});\n\t\titems.forEach(function (item, i) {\n\t\t\tvar boxItem = container.innerItem()[i];\n\t\t\t// console.log(\"boxItem\", boxItem, boxItem instanceof BoxModel);\n\t\t\tvar width = boxItem.getWidth();\n\t\t\tvar height = boxItem.getHeight();\n\t\t\tvar top = boxItem.getTop();\n\t\t\tvar left = boxItem.getLeft();\n\n\t\t\titem.rect = { top: top, left: left, width: width - margin, height: height - margin };\n\t\t\titem.rect[pos1Name] += start;\n\n\t\t\tif (startIndex === -1) {\n\t\t\t\tstartIndex = i;\n\t\t\t\tendIndex = i;\n\t\t\t\tstartPos = item.rect[pos1Name];\n\t\t\t\tendPos = startPos;\n\t\t\t}\n\t\t\tif (startPos > item.rect[pos1Name]) {\n\t\t\t\tstartPos = item.rect[pos1Name];\n\t\t\t\tstartIndex = i;\n\t\t\t}\n\t\t\tif (endPos < item.rect[pos1Name] + item.rect[size1Name] + margin) {\n\t\t\t\tendPos = item.rect[pos1Name] + item.rect[size1Name] + margin;\n\t\t\t\tendIndex = i;\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tstart: [start],\n\t\t\tend: [end],\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tPackingLayout.prototype._insert = function _insert() {\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar type = arguments[2];\n\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tPackingLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tPackingLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tPackingLayout.prototype.layout = function layout() {\n\t\tvar groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\tvar length = groups.length;\n\t\tvar point = outline;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.PackingLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tPackingLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\n\treturn PackingLayout;\n}();\n\nexports[\"default\"] = PackingLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/PackingLayout.js\n// module id = 13\n// module chunks = 0 1","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar BoxModel = function () {\n\tfunction BoxModel(option) {\n\t\t_classCallCheck(this, BoxModel);\n\n\t\tthis._originWidth = option.originWidth || 0;\n\t\tthis._originHeight = option.originHeight || 0;\n\t\tthis._width = option.width || 0;\n\t\tthis._height = option.height || 0;\n\t\tthis._left = option.left || 0;\n\t\tthis._top = option.top || 0;\n\t\tthis._item = option.item;\n\t\tthis._innerItem = option.innerItem || [];\n\t}\n\n\tBoxModel.prototype.getOriginWidth = function getOriginWidth() {\n\t\treturn this._originWidth;\n\t};\n\n\tBoxModel.prototype.setOriginWidth = function setOriginWidth(width) {\n\t\tthis._originWidth = width;\n\t};\n\n\tBoxModel.prototype.getOriginHeight = function getOriginHeight() {\n\t\treturn this._originHeight;\n\t};\n\n\tBoxModel.prototype.setOriginHeight = function setOriginHeight(height) {\n\t\tthis._originHeight = height;\n\t};\n\n\tBoxModel.prototype.getWidth = function getWidth() {\n\t\treturn this._width;\n\t};\n\n\tBoxModel.prototype.setWidth = function setWidth(width) {\n\t\tthis._width = width;\n\t};\n\n\tBoxModel.prototype.getHeight = function getHeight() {\n\t\treturn this._height;\n\t};\n\n\tBoxModel.prototype.setHeight = function setHeight(height) {\n\t\tthis._height = height;\n\t};\n\n\tBoxModel.prototype.getLeft = function getLeft() {\n\t\treturn this._left;\n\t};\n\n\tBoxModel.prototype.setLeft = function setLeft(left) {\n\t\tthis._left = left;\n\t};\n\n\tBoxModel.prototype.getTop = function getTop() {\n\t\treturn this._top;\n\t};\n\n\tBoxModel.prototype.setTop = function setTop(top) {\n\t\tthis._top = top;\n\t};\n\n\tBoxModel.prototype.innerItem = function innerItem() {\n\t\treturn this._innerItem;\n\t};\n\n\tBoxModel.prototype.scaleTo = function scaleTo(width, height) {\n\t\tvar scaleX = this._width === 0 ? 0 : width / this._width;\n\t\tvar scaleY = this._height === 0 ? 0 : height / this._height;\n\n\t\tthis._innerItem.forEach(function (v) {\n\t\t\tif (scaleX !== 0) {\n\t\t\t\tv._left *= scaleX;\n\t\t\t\tv._width *= scaleX;\n\t\t\t}\n\t\t\tif (scaleY !== 0) {\n\t\t\t\tv._top *= scaleY;\n\t\t\t\tv._height *= scaleY;\n\t\t\t}\n\t\t});\n\n\t\tthis._width = width;\n\t\tthis._height = height;\n\t};\n\n\tBoxModel.prototype.pushItem = function pushItem(item) {\n\t\tthis._innerItem.push(item);\n\t};\n\n\tBoxModel.prototype.getOriginSize = function getOriginSize() {\n\t\treturn this._originWidth * this._originHeight;\n\t};\n\n\tBoxModel.prototype.getSize = function getSize() {\n\t\treturn this._width * this._height;\n\t};\n\n\tBoxModel.prototype.getOriginRatio = function getOriginRatio() {\n\t\treturn this._originHeight === 0 ? 0 : this._originWidth / this._originHeight;\n\t};\n\n\tBoxModel.prototype.getRatio = function getRatio() {\n\t\treturn this._height === 0 ? 0 : this._width / this._height;\n\t};\n\n\tBoxModel.prototype.isSmallerThen = function isSmallerThen(box) {\n\t\treturn this._width <= box._width && this._height <= box._height;\n\t};\n\n\tBoxModel.prototype.isEqual = function isEqual(box) {\n\t\treturn this._left === box._left && this._top === box._top && this._width === box._width && this._height === box._height;\n\t};\n\n\treturn BoxModel;\n}();\n\nmodule.exports = BoxModel;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/lib/BoxModel.js\n// module id = 14\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _dijkstra = require(\"./lib/dijkstra\");\n\nvar _dijkstra2 = _interopRequireDefault(_dijkstra);\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * @classdesc 'justified' is a printing term with the meaning that 'it fits in one row wide'. JustifiedLayout is a layout that the card is filled up on the basis of a line given a size.\n * @ko 'justified'는 '1행의 너비에 맞게 꼭 들어찬'이라는 의미를 가진 인쇄 용어다. 용어의 의미대로 너비가 주어진 사이즈를 기준으로 카드가 가득 차도록 배치하는 레이아웃이다.\n * @class eg.InfiniteGrid.JustifiedLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.JustifiedLayout module eg.InfiniteGrid.JustifiedLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.minSize=0] Minimum size of item to be resized 아이템이 조정되는 최소 크기 \n * @param {Boolean} [options.maxSize=0] Maximum size of item to be resized 아이템이 조정되는 최대 크기 \n * @example\n```\n\n```\n **/\nvar JustifiedLayout = function () {\n\tfunction JustifiedLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, JustifiedLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\tminSize: 0,\n\t\t\tmaxSize: 0\n\t\t}, options);\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t\tthis._size = 0;\n\t}\n\n\tJustifiedLayout.prototype._layout = function _layout(items, outline, isAppend) {\n\t\tvar _this = this;\n\n\t\tvar style = this._style;\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar startIndex = 0;\n\t\tvar endIndex = items.length;\n\t\tvar graph = function graph(_start) {\n\t\t\tvar results = {};\n\t\t\tvar start = +_start.replace(/[^0-9]/g, \"\");\n\t\t\tvar length = endIndex + 1;\n\n\t\t\tfor (var i = start + 1; i < length; ++i) {\n\t\t\t\tif (i - start > 8) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tvar cost = _this._getCost(items, start, i, size1Name, size2Name);\n\n\t\t\t\tif (cost < 0 && i === length - 1) {\n\t\t\t\t\tcost = 0;\n\t\t\t\t}\n\t\t\t\tif (cost !== null) {\n\t\t\t\t\tresults[\"node\" + i] = Math.pow(cost, 2);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn results;\n\t\t};\n\t\t// shortest path for items' total height.\n\t\tvar path = _dijkstra2[\"default\"].find_path(graph, \"node\" + startIndex, \"node\" + endIndex);\n\n\t\treturn this._setStyle(items, path, outline, isAppend);\n\t};\n\n\tJustifiedLayout.prototype._getSize = function _getSize(items, size1Name, size2Name) {\n\t\tvar margin = this.options.margin;\n\t\tvar size = items.reduce(function (sum, item) {\n\t\t\treturn sum + item.size[size2Name] / item.size[size1Name];\n\t\t}, 0);\n\n\t\treturn (this._size - margin * (items.length - 1)) / size;\n\t};\n\n\tJustifiedLayout.prototype._getCost = function _getCost(items, i, j, size1Name, size2Name) {\n\t\tvar size = this._getSize(items.slice(i, j), size1Name, size2Name);\n\t\tvar min = this.options.minSize || 0;\n\t\tvar max = this.options.maxSize || Infinity;\n\n\t\tif (isFinite(max)) {\n\t\t\t// if this size is not in range, the cost increases sharply.\n\t\t\tif (size < min) {\n\t\t\t\treturn Math.pow(size - min, 2) + Math.pow(max, 2);\n\t\t\t} else if (size > max) {\n\t\t\t\treturn Math.pow(size - max, 2) + Math.pow(max, 2);\n\t\t\t} else {\n\t\t\t\t// if this size in range, the cost is negative or low.\n\t\t\t\treturn Math.min(size - max, min - size);\n\t\t\t}\n\t\t}\n\t\t// if max is infinite type, caculate cost only with \"min\".\n\t\tif (size < min) {\n\t\t\treturn Math.max(Math.pow(min, 2), Math.pow(size, 2));\n\t\t}\n\t\treturn size - min;\n\t};\n\n\tJustifiedLayout.prototype._setStyle = function _setStyle(items, path) {\n\t\tvar outline = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n\t\tvar isAppend = arguments[3];\n\n\t\tvar style = this._style;\n\t\t// if direction is vertical\n\t\t// pos1 : top, pos11 : bottom\n\t\t// size1 : height\n\t\t// pos2 : left, pos22 : right\n\t\t// size2 : width\n\n\t\t// if direction is horizontal\n\t\t// pos1 : left, pos11 : right\n\t\t// size1 : width\n\t\t// pos2 : top, pos22 : bottom\n\t\t// size2 : height\n\t\tvar pos1Name = style.pos1;\n\t\tvar size1Name = style.size1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar size2Name = style.size2;\n\t\tvar length = path.length;\n\t\tvar margin = this.options.margin;\n\t\tvar startPoint = outline[0] || 0;\n\t\tvar endPoint = startPoint;\n\t\tvar height = 0;\n\n\t\tfor (var i = 0; i < length - 1; ++i) {\n\t\t\tvar path1 = parseInt(path[i].replace(\"node\", \"\"), 10);\n\t\t\tvar path2 = parseInt(path[i + 1].replace(\"node\", \"\"), 10);\n\t\t\t// pathItems(path1 to path2) are in 1 line.\n\t\t\tvar pathItems = items.slice(path1, path2);\n\t\t\tvar pathItemsLength = pathItems.length;\n\t\t\tvar size1 = this._getSize(pathItems, size1Name, size2Name);\n\t\t\tvar pos1 = endPoint;\n\n\t\t\tfor (var j = 0; j < pathItemsLength; ++j) {\n\t\t\t\tvar _item$rect;\n\n\t\t\t\tvar item = pathItems[j];\n\t\t\t\tvar size2 = item.size[size2Name] / item.size[size1Name] * size1;\n\t\t\t\t// item has margin bottom and right.\n\t\t\t\t// first item has not margin.\n\t\t\t\tvar prevItemRect = j === 0 ? 0 : pathItems[j - 1].rect;\n\t\t\t\tvar pos2 = prevItemRect ? prevItemRect[pos2Name] + prevItemRect[size2Name] + margin : 0;\n\n\t\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);\n\t\t\t}\n\t\t\theight += margin + size1;\n\t\t\tendPoint = startPoint + height;\n\t\t}\n\t\tvar itemsLength = items.length;\n\t\tvar startIndex = itemsLength ? 0 : -1;\n\t\tvar endIndex = itemsLength ? itemsLength - 1 : -1;\n\n\t\tif (isAppend) {\n\t\t\t// previous group's end outline is current group's start outline\n\t\t\treturn {\n\t\t\t\tstart: [startPoint],\n\t\t\t\tend: [endPoint],\n\t\t\t\tstartIndex: startIndex,\n\t\t\t\tendIndex: endIndex\n\t\t\t};\n\t\t}\n\t\t// for prepend, only substract height from position.\n\t\t// always start is lower than end.\n\n\t\tfor (var _i = 0; _i < itemsLength; ++_i) {\n\t\t\tvar _item = items[_i];\n\n\t\t\t// move items as long as height for prepend\n\t\t\t_item.rect[pos1Name] -= height;\n\t\t}\n\t\treturn {\n\t\t\tstart: [startPoint - height],\n\t\t\tend: [startPoint], // endPoint - height = startPoint\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tJustifiedLayout.prototype._insert = function _insert(items, outline, type) {\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.JustifiedLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tJustifiedLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tJustifiedLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tJustifiedLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100]);\n */\n\n\n\tJustifiedLayout.prototype.layout = function layout(groups, outlines) {\n\t\tvar length = groups.length;\n\t\tvar point = outlines;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\n\treturn JustifiedLayout;\n}();\n\nexports[\"default\"] = JustifiedLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/JustifiedLayout.js\n// module id = 15\n// module chunks = 0 1","'use strict';\n\n/* eslint-disable */\n/******************************************************************************\n * Created 2008-08-19.\n *\n * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.\n *\n * Copyright (C) 2008\n * Wyatt Baldwin \n * All rights reserved\n *\n * Licensed under the MIT license.\n *\n * http://www.opensource.org/licenses/mit-license.php\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *****************************************************************************/\n(function () {\n var dijkstra = {\n single_source_shortest_paths: function single_source_shortest_paths(graph, s, d) {\n // Predecessor map for each node that has been encountered.\n // node ID => predecessor node ID\n var predecessors = {};\n\n // Costs of shortest paths from s to all nodes encountered.\n // node ID => cost\n var costs = {};\n costs[s] = 0;\n\n // Costs of shortest paths from s to all nodes encountered; differs from\n // `costs` in that it provides easy access to the node that currently has\n // the known shortest path from s.\n // XXX: Do we actually need both `costs` and `open`?\n var open = new BinaryHeap(function (x) {\n return x.cost;\n });\n open.push({ value: s, cost: 0 });\n\n var closest, u, cost_of_s_to_u, adjacent_nodes, cost_of_e, cost_of_s_to_u_plus_cost_of_e, cost_of_s_to_v, first_visit;\n while (open.size()) {\n // In the nodes remaining in graph that have a known cost from s,\n // find the node, u, that currently has the shortest path from s.\n closest = open.pop();\n u = closest.value;\n cost_of_s_to_u = closest.cost;\n\n // Get nodes adjacent to u...\n adjacent_nodes = graph(u) || {};\n\n // ...and explore the edges that connect u to those nodes, updating\n // the cost of the shortest paths to any or all of those nodes as\n // necessary. v is the node across the current edge from u.\n for (var v in adjacent_nodes) {\n // Get the cost of the edge running from u to v.\n cost_of_e = adjacent_nodes[v];\n\n // Cost of s to u plus the cost of u to v across e--this is *a*\n // cost from s to v that may or may not be less than the current\n // known cost to v.\n cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;\n\n // If we haven't visited v yet OR if the current known cost from s to\n // v is greater than the new cost we just found (cost of s to u plus\n // cost of u to v across e), update v's cost in the cost list and\n // update v's predecessor in the predecessor list (it's now u).\n cost_of_s_to_v = costs[v];\n first_visit = typeof costs[v] === 'undefined';\n if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {\n costs[v] = cost_of_s_to_u_plus_cost_of_e;\n open.push({ value: v, cost: cost_of_s_to_u_plus_cost_of_e });\n predecessors[v] = u;\n }\n }\n }\n\n if (typeof costs[d] === 'undefined') {\n var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');\n throw new Error(msg);\n }\n\n return predecessors;\n },\n\n extract_shortest_path_from_predecessor_list: function extract_shortest_path_from_predecessor_list(predecessors, d) {\n var nodes = [];\n var u = d;\n var predecessor;\n while (u) {\n nodes.push(u);\n predecessor = predecessors[u];\n u = predecessors[u];\n }\n nodes.reverse();\n return nodes;\n },\n\n find_path: function find_path(graph, s, d) {\n var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);\n return dijkstra.extract_shortest_path_from_predecessor_list(predecessors, d);\n }\n\n };\n\n function BinaryHeap(scoreFunction) {\n this.content = [];\n this.scoreFunction = scoreFunction;\n }\n\n BinaryHeap.prototype = {\n push: function push(element) {\n // Add the new element to the end of the array.\n this.content.push(element);\n // Allow it to bubble up.\n this.bubbleUp(this.content.length - 1);\n },\n\n pop: function pop() {\n // Store the first element so we can return it later.\n var result = this.content[0];\n // Get the element at the end of the array.\n var end = this.content.pop();\n // If there are any elements left, put the end element at the\n // start, and let it sink down.\n if (this.content.length > 0) {\n this.content[0] = end;\n this.sinkDown(0);\n }\n return result;\n },\n\n remove: function remove(node) {\n var len = this.content.length;\n // To remove a value, we must search through the array to find\n // it.\n for (var i = 0; i < len; i++) {\n if (this.content[i] === node) {\n // When it is found, the process seen in 'pop' is repeated\n // to fill up the hole.\n var end = this.content.pop();\n if (i !== len - 1) {\n this.content[i] = end;\n if (this.scoreFunction(end) < this.scoreFunction(node)) {\n this.bubbleUp(i);\n } else {\n this.sinkDown(i);\n }\n }\n return;\n }\n }\n throw new Error('Node not found.');\n },\n\n size: function size() {\n return this.content.length;\n },\n\n bubbleUp: function bubbleUp(n) {\n // Fetch the element that has to be moved.\n var element = this.content[n];\n // When at 0, an element can not go up any further.\n while (n > 0) {\n // Compute the parent element's index, and fetch it.\n var parentN = Math.floor((n + 1) / 2) - 1,\n parent = this.content[parentN];\n // Swap the elements if the parent is greater.\n if (this.scoreFunction(element) < this.scoreFunction(parent)) {\n this.content[parentN] = element;\n this.content[n] = parent;\n // Update 'n' to continue at the new position.\n n = parentN;\n }\n // Found a parent that is less, no need to move it further.\n else {\n break;\n }\n }\n },\n\n sinkDown: function sinkDown(n) {\n // Look up the target element and its score.\n var length = this.content.length,\n element = this.content[n],\n elemScore = this.scoreFunction(element);\n\n while (true) {\n // Compute the indices of the child elements.\n var child2N = (n + 1) * 2,\n child1N = child2N - 1;\n // This is used to store the new position of the element,\n // if any.\n var swap = null;\n // If the first child exists (is inside the array)...\n if (child1N < length) {\n // Look it up and compute its score.\n var child1 = this.content[child1N],\n child1Score = this.scoreFunction(child1);\n // If the score is less than our element's, we need to swap.\n if (child1Score < elemScore) {\n swap = child1N;\n }\n }\n // Do the same checks for the other child.\n if (child2N < length) {\n var child2 = this.content[child2N],\n child2Score = this.scoreFunction(child2);\n if (child2Score < (swap == null ? elemScore : child1Score)) {\n swap = child2N;\n }\n }\n\n // If the element needs to be moved, swap it, and continue.\n if (swap !== null) {\n this.content[n] = this.content[swap];\n this.content[swap] = element;\n n = swap;\n }\n // Otherwise, we are done.\n else {\n break;\n }\n }\n }\n };\n\n /**\n * Browserify 지원을 위한 모듈화 코드\n */\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = dijkstra;\n } else {\n window.dijkstra = dijkstra;\n }\n})();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/lib/dijkstra.js\n// module id = 16\n// module chunks = 0 1"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACh9BA;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""}
\ No newline at end of file
diff --git a/dist/infinitegrid.pkgd.js b/dist/infinitegrid.pkgd.js
index 177f8ed28..31c56f248 100644
--- a/dist/infinitegrid.pkgd.js
+++ b/dist/infinitegrid.pkgd.js
@@ -784,8 +784,8 @@ function getShapes(frame) {
};
}
/**
- * @classdesc FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.
- * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.
+ * @classdesc FrameLayout is a layout that allows you to place cards in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.
+ * @ko FrameLayout은 주어진 프레임에 맞춰 카드를 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.
* @class eg.InfiniteGrid.FrameLayout
* @param {Object} [options] The option object of eg.InfiniteGrid.FrameLayout module eg.InfiniteGrid.FrameLayout 모듈의 옵션 객체
* @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간
@@ -1247,7 +1247,7 @@ var InfiniteGrid = function (_Component) {
* @param {String} [options.itemSelector] A selector to select card elements that make up the layout레이아웃을 구성하는 카드 엘리먼트를 선택할 선택자(selector)
* @param {Boolean} [options.useRecycle=true] Indicates whether keep the number of DOMs is maintained. If the useRecycle value is 'true', keep the number of DOMs is maintained. If the useRecycle value is 'false', the number of DOMs will increase as card elements are added. DOM의 수를 유지할지 여부를 나타낸다. useRecycle 값이 'true'이면 DOM 개수를 일정하게 유지한다. useRecycle 값이 'false' 이면 카드 엘리먼트가 추가될수록 DOM 개수가 계속 증가한다.
* @param {Boolean} [options.isOverflowScroll=false] Indicates whether overflow:scroll is appliedoverflow:scroll 적용여부를 결정한다.
- * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향
+ * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향)
* @param {Boolean} [options.isEqualSize=false] Indicates whether sizes of all card elements are equal to one another. If sizes of card elements to be arranged are all equal and this option is set to "true", the performance of layout arrangement can be improved. 카드 엘리먼트의 크기가 동일한지 여부. 배치될 카드 엘리먼트의 크기가 모두 동일할 때 이 옵션을 'true'로 설정하면 레이아웃 배치 성능을 높일 수 있다
* @param {Number} [options.threshold=100] The threshold size of an event area where card elements are added to a layout.레이아웃에 카드 엘리먼트를 추가하는 이벤트가 발생하는 기준 영역의 크기.
*/
@@ -2994,8 +2994,8 @@ var START = _consts.ALIGN.START,
JUSTIFY = _consts.ALIGN.JUSTIFY;
/**
- * @classdesc GridLayout is a layout in which images with the same width are arranged in a staggered arrangement, like a stack of bricks. Adjust the width of all images to the same size, find the lowest height column, and insert a new image.
- * @ko GridLayout는 벽돌을 쌓아 올린 모양처럼 동일한 너비를 가진 이미지가 엇갈려 배열되는 레이아웃이다. 모든 이미지의 너비를 동일한 크기로 조정하고, 가장 높이가 낮은 열을 찾아 새로운 이미지를 삽입한다. 따라서 배치된 이미지 사이에 빈 공간이 생기지는 않지만 배치된 레이아웃의 아래쪽은 울퉁불퉁해진다.
+ * @classdesc The GridLayout is a layout that stacks cards with the same width as a stack of bricks. Adjust the width of all images to the same size, find the lowest height column, and insert a new card.
+ * @ko GridLayout는 벽돌을 쌓아 올린 모양처럼 동일한 너비를 가진 카드를 쌓는 레이아웃이다. 모든 이미지의 너비를 동일한 크기로 조정하고, 가장 높이가 낮은 열을 찾아 새로운 이미지를 삽입한다. 따라서 배치된 카드 사이에 빈 공간이 생기지는 않지만 배치된 레이아웃의 아래쪽은 울퉁불퉁해진다.
* @class eg.InfiniteGrid.GridLayout
* @param {Object} [options] The option object of eg.InfiniteGrid.GridLayout module eg.InfiniteGrid.GridLayout 모듈의 옵션 객체
* @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간
@@ -3327,8 +3327,8 @@ function getColumn(item) {
}
/**
- * @classdesc FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.
- * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.
+ * @classdesc SquareLayout is a layout that places all cards like squares on a checkerboard, and important cards are n times larger. The main card can be enlarged, and then a small card can be placed to naturally show the relationship of the card.
+ * @ko SquareLayout은 바둑판처럼 모든 카드를 정사각형으로 배치하고 중요한 카드는 크기를 N배로 키워서 보여주는 레이아웃이다. 주요 카드를 크게 표시하고, 그 다음에 작은 카드를 배치해 자연스럽게 카드의 관계를 나타낼 수 있습니다.
* @class eg.InfiniteGrid.SquareLayout
* @extends eg.InfiniteGrid.FrameLayout
* @param {Object} [options] The option object of eg.InfiniteGrid.SquareLayout module eg.InfiniteGrid.SquareLayout 모듈의 옵션 객체
@@ -3525,8 +3525,8 @@ function fitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertica
}
/**
- * @classdesc PackingLayout show important images bigger without sacrificing the inherent size of the image. Rows and columns are separated so that images are dynamically placed within the horizontal and vertical space rather than arranged in an orderly fashion.
- * @ko PackingLayout은 이미지의 본래 크기에 따른 비중을 해치지 않으면서 중요한 이미지는 더 크게 보여 준다. 행과 열이 구분돼 이미지를 정돈되게 배치하는 대신 가로세로 일정 공간 내에서 동적으로 이미지를 배치한다.
+ * @classdesc The PackingLayout is a layout that shows the important cards bigger without sacrificing the weight of the cards. Rows and columns are separated so that cards are dynamically placed within the horizontal and vertical space rather than arranged in an orderly fashion.
+ * @ko PackingLayout은 카드의 본래 크기에 따른 비중을 해치지 않으면서 중요한 카드는 더 크게 보여 주는 레이아웃이다. 행과 열이 구분돼 이미지를 정돈되게 배치하는 대신 가로세로 일정 공간 내에서 동적으로 카드를 배치한다.
* @class eg.InfiniteGrid.PackingLayout
* @param {Object} [options] The option object of eg.InfiniteGrid.PackingLayout module eg.InfiniteGrid.PackingLayout 모듈의 옵션 객체
* @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간
@@ -3971,8 +3971,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
- * @classdesc 'justified' is a printing term with the meaning that 'it fits in one row wide'. JustifiedLayout is a layout in which the image is filled up on the basis of a line given a width in the meaning of the term.
- * @ko 'justified'는 '1행의 너비에 맞게 꼭 들어찬'이라는 의미를 가진 인쇄 용어다. 용어의 의미대로 너비가 주어진 한 행을 기준으로 이미지가 가득 차도록 배치하는 레이아웃이다.
+ * @classdesc 'justified' is a printing term with the meaning that 'it fits in one row wide'. JustifiedLayout is a layout that the card is filled up on the basis of a line given a size.
+ * @ko 'justified'는 '1행의 너비에 맞게 꼭 들어찬'이라는 의미를 가진 인쇄 용어다. 용어의 의미대로 너비가 주어진 사이즈를 기준으로 카드가 가득 차도록 배치하는 레이아웃이다.
* @class eg.InfiniteGrid.JustifiedLayout
* @param {Object} [options] The option object of eg.InfiniteGrid.JustifiedLayout module eg.InfiniteGrid.JustifiedLayout 모듈의 옵션 객체
* @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간
diff --git a/dist/infinitegrid.pkgd.js.map b/dist/infinitegrid.pkgd.js.map
index ec137f472..3e5cffaee 100644
--- a/dist/infinitegrid.pkgd.js.map
+++ b/dist/infinitegrid.pkgd.js.map
@@ -1 +1 @@
-{"version":3,"file":"infinitegrid.pkgd.js","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap ee28206a035efae24311","webpack:///./src/consts.js","webpack:///./src/utils.js","webpack:///./src/browser.js","webpack:///./src/DOMRenderer.js","webpack:///./src/layouts/FrameLayout.js","webpack:///./src/index.js","webpack:///./src/InfiniteGrid.js","webpack:///./node_modules/@egjs/component/dist/component.js","webpack:///./src/ItemManager.js","webpack:///./src/ImageLoaded.js","webpack:///./src/Watcher.js","webpack:///./src/layouts/GridLayout.js","webpack:///./src/layouts/SquareLayout.js","webpack:///./src/layouts/PackingLayout.js","webpack:///./src/layouts/lib/BoxModel.js","webpack:///./src/layouts/JustifiedLayout.js","webpack:///./src/layouts/lib/dijkstra.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"InfiniteGrid\"] = factory();\n\telse\n\t\troot[\"eg\"] = root[\"eg\"] || {}, root[\"eg\"][\"InfiniteGrid\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap ee28206a035efae24311","\"use strict\";\n\nexports.__esModule = true;\nexports.DEFENSE_BROWSER = exports.WEBKIT_VERSION = exports.PROCESSING = exports.LOADING_PREPEND = exports.LOADING_APPEND = exports.IDLE = exports.ALIGN = exports.isMobile = exports.agent = exports.DEFAULT_OPTIONS = exports.GROUPKEY_ATT = exports.DUMMY_POSITION = exports.SINGLE = exports.MULTI = exports.NO_TRUSTED = exports.TRUSTED = exports.NO_CACHE = exports.CACHE = exports.HORIZONTAL = exports.VERTICAL = exports.PREPEND = exports.APPEND = exports.IGNORE_CLASSNAME = exports.CONTAINER_CLASSNAME = exports.RETRY = exports.IS_ANDROID2 = exports.IS_IOS = exports.IS_IE = exports.SUPPORT_PASSIVE = exports.SUPPORT_ADDEVENTLISTENER = exports.SUPPORT_COMPUTEDSTYLE = undefined;\n\nvar _browser = require(\"./browser\");\n\nvar ua = _browser.window.navigator.userAgent;\n\nvar SUPPORT_COMPUTEDSTYLE = exports.SUPPORT_COMPUTEDSTYLE = !!(\"getComputedStyle\" in _browser.window);\nvar SUPPORT_ADDEVENTLISTENER = exports.SUPPORT_ADDEVENTLISTENER = !!(\"addEventListener\" in document);\nvar SUPPORT_PASSIVE = exports.SUPPORT_PASSIVE = function () {\n\tvar supportsPassiveOption = false;\n\n\ttry {\n\t\tif (SUPPORT_ADDEVENTLISTENER && Object.defineProperty) {\n\t\t\tdocument.addEventListener(\"test\", null, Object.defineProperty({}, \"passive\", {\n\t\t\t\tget: function get() {\n\t\t\t\t\tsupportsPassiveOption = true;\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\t} catch (e) {}\n\treturn supportsPassiveOption;\n}();\n\nvar IS_IE = exports.IS_IE = /MSIE|Trident|Windows Phone|Edge/.test(ua);\nvar IS_IOS = exports.IS_IOS = /iPhone|iPad/.test(ua);\nvar IS_ANDROID2 = exports.IS_ANDROID2 = /Android 2\\./.test(ua);\nvar RETRY = exports.RETRY = 3;\nvar CONTAINER_CLASSNAME = exports.CONTAINER_CLASSNAME = \"_eg-infinitegrid-container_\";\nvar IGNORE_CLASSNAME = exports.IGNORE_CLASSNAME = \"_eg-infinitegrid-ignore_\";\n\nvar APPEND = exports.APPEND = true;\nvar PREPEND = exports.PREPEND = false;\nvar VERTICAL = exports.VERTICAL = \"vertical\";\nvar HORIZONTAL = exports.HORIZONTAL = \"horizontal\";\nvar CACHE = exports.CACHE = true;\nvar NO_CACHE = exports.NO_CACHE = false;\nvar TRUSTED = exports.TRUSTED = true;\nvar NO_TRUSTED = exports.NO_TRUSTED = false;\nvar MULTI = exports.MULTI = true;\nvar SINGLE = exports.SINGLE = false;\nvar DUMMY_POSITION = exports.DUMMY_POSITION = -100000;\nvar GROUPKEY_ATT = exports.GROUPKEY_ATT = \"data-groupkey\";\n\nvar DEFAULT_OPTIONS = exports.DEFAULT_OPTIONS = {\n\thorizontal: false,\n\tmargin: 0\n};\n\nvar agent = exports.agent = ua.toLowerCase();\nvar isMobile = exports.isMobile = /mobi|ios|android/.test(agent);\n\nvar ALIGN = exports.ALIGN = {\n\tSTART: \"start\",\n\tCENTER: \"center\",\n\tEND: \"end\",\n\tJUSTIFY: \"justify\"\n};\n\nvar IDLE = exports.IDLE = 0;\nvar LOADING_APPEND = exports.LOADING_APPEND = 1;\nvar LOADING_PREPEND = exports.LOADING_PREPEND = 2;\nvar PROCESSING = exports.PROCESSING = 4;\n\nvar webkit = /applewebkit\\/([\\d|.]*)/g.exec(agent);\n\nvar WEBKIT_VERSION = exports.WEBKIT_VERSION = webkit && parseInt(webkit[1], 10) || 0;\nvar DEFENSE_BROWSER = exports.DEFENSE_BROWSER = WEBKIT_VERSION && WEBKIT_VERSION < 537;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/consts.js\n// module id = 0\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\nexports.STYLE = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.toArray = toArray;\nexports.fill = fill;\nexports.$ = $;\nexports.addEvent = addEvent;\nexports.removeEvent = removeEvent;\nexports.scroll = scroll;\nexports.scrollTo = scrollTo;\nexports.scrollBy = scrollBy;\nexports.getStyles = getStyles;\nexports.innerWidth = innerWidth;\nexports.innerHeight = innerHeight;\nexports.getStyleNames = getStyleNames;\nexports.assignOptions = assignOptions;\nexports.toZeroArray = toZeroArray;\nexports.isWindow = isWindow;\nexports.indexOf = indexOf;\n\nvar _browser = require(\"./browser\");\n\nvar _consts = require(\"./consts\");\n\nfunction toArray(nodes) {\n\t// SCRIPT5014 in IE8\n\tvar array = [];\n\n\tif (nodes) {\n\t\tfor (var i = 0, len = nodes.length; i < len; i++) {\n\t\t\tarray.push(nodes[i]);\n\t\t}\n\t}\n\treturn array;\n}\nfunction fill(length, value) {\n\tvar array = (typeof length === \"undefined\" ? \"undefined\" : _typeof(length)) === \"object\" ? length : new Array(length);\n\tvar len = array.length;\n\n\tfor (var i = len - 1; i >= 0; --i) {\n\t\tarray[i] = value;\n\t}\n\treturn array;\n}\n/**\n * Select or create element\n * @param {String|HTMLElement|jQuery} param\n * when string given is as HTML tag, then create element\n * otherwise it returns selected elements\n * @param {Boolean} multi\n * @returns {HTMLElement}\n */\nfunction $(param) {\n\tvar multi = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n\tvar el = void 0;\n\n\tif (typeof param === \"string\") {\n\t\t// String (HTML, Selector)\n\t\t// check if string is HTML tag format\n\t\tvar match = param.match(/^<([A-z]+)\\s*([^>]*)>/);\n\n\t\t// creating element\n\t\tif (match) {\n\t\t\t// HTML\n\t\t\tvar dummy = _browser.document.createElement(\"div\");\n\n\t\t\tdummy.innerHTML = param;\n\t\t\tel = dummy.childNodes;\n\t\t} else {\n\t\t\t// Selector\n\t\t\tel = _browser.document.querySelectorAll(param);\n\t\t}\n\t\tif (multi) {\n\t\t\tel = toArray(el);\n\t\t} else {\n\t\t\tel = el && el.length > 0 && el[0] || undefined;\n\t\t}\n\t} else if (param === _browser.window) {\n\t\t// window\n\t\tel = param;\n\t} else if (param.nodeName && (param.nodeType === 1 || param.nodeType === 9)) {\n\t\t// HTMLElement, Document\n\t\tel = param;\n\t} else if (\"jQuery\" in _browser.window && param instanceof _browser.window.jQuery || param.constructor.prototype.jquery) {\n\t\t// jQuery\n\t\tel = multi ? param.toArray() : param.get(0);\n\t} else if (Array.isArray(param)) {\n\t\tel = param.map(function (v) {\n\t\t\treturn $(v);\n\t\t});\n\t\tif (!multi) {\n\t\t\tel = el.length >= 1 ? el[0] : undefined;\n\t\t}\n\t}\n\treturn el;\n}\nfunction addEvent(element, type, handler, eventListenerOptions) {\n\tif (_consts.SUPPORT_ADDEVENTLISTENER) {\n\t\tvar options = eventListenerOptions || false;\n\n\t\tif ((typeof eventListenerOptions === \"undefined\" ? \"undefined\" : _typeof(eventListenerOptions)) === \"object\") {\n\t\t\toptions = _consts.SUPPORT_PASSIVE ? eventListenerOptions : false;\n\t\t}\n\t\telement.addEventListener(type, handler, options);\n\t} else if (element.attachEvent) {\n\t\telement.attachEvent(\"on\" + type, handler);\n\t} else {\n\t\telement[\"on\" + type] = handler;\n\t}\n}\nfunction removeEvent(element, type, handler) {\n\tif (element.removeEventListener) {\n\t\telement.removeEventListener(type, handler, false);\n\t} else if (element.detachEvent) {\n\t\telement.detachEvent(\"on\" + type, handler);\n\t} else {\n\t\telement[\"on\" + type] = null;\n\t}\n}\nfunction scroll(el, isVertical) {\n\tvar prop = \"scroll\" + (isVertical ? \"Top\" : \"Left\");\n\n\tif (el === _browser.window) {\n\t\treturn _browser.window[isVertical ? \"pageYOffset\" : \"pageXOffset\"] || _browser.document.body[prop] || _browser.document.documentElement[prop];\n\t} else {\n\t\treturn el[prop];\n\t}\n}\nfunction scrollTo(el, x, y) {\n\tif (el === _browser.window) {\n\t\tel.scroll(x, y);\n\t} else {\n\t\tel.scrollLeft = x;\n\t\tel.scrollTop = y;\n\t}\n}\nfunction scrollBy(el, x, y) {\n\tif (el === _browser.window) {\n\t\tel.scrollBy(x, y);\n\t} else {\n\t\tel.scrollLeft += x;\n\t\tel.scrollTop += y;\n\t}\n}\nfunction getStyles(el) {\n\treturn _consts.SUPPORT_COMPUTEDSTYLE ? _browser.window.getComputedStyle(el) : el.currentStyle;\n}\nfunction _getSize(el, name) {\n\tif (el === _browser.window) {\n\t\t// WINDOW\n\t\treturn el.document.documentElement[\"client\" + name];\n\t} else if (el.nodeType === 9) {\n\t\t// DOCUMENT_NODE\n\t\tvar doc = el.documentElement;\n\n\t\treturn Math.max(el.body[\"scroll\" + name], doc[\"scroll\" + name], el.body[\"offset\" + name], doc[\"offset\" + name], doc[\"client\" + name]);\n\t} else {\n\t\t// NODE\n\t\tvar style = getStyles(el);\n\t\tvar value = style[name.toLowerCase()];\n\n\t\treturn parseFloat(/auto|%/.test(value) ? el[\"offset\" + name] : style[name.toLowerCase()]);\n\t}\n}\nfunction innerWidth(el) {\n\treturn _getSize(el, \"Width\");\n}\nfunction innerHeight(el) {\n\treturn _getSize(el, \"Height\");\n}\nvar STYLE = exports.STYLE = {\n\tvertical: {\n\t\tpos1: \"top\",\n\t\tendPos1: \"bottom\",\n\t\tsize1: \"height\",\n\t\tpos2: \"left\",\n\t\tendPos2: \"right\",\n\t\tsize2: \"width\"\n\t},\n\thorizontal: {\n\t\tpos1: \"left\",\n\t\tendPos1: \"right\",\n\t\tsize1: \"width\",\n\t\tpos2: \"top\",\n\t\tendPos2: \"bottom\",\n\t\tsize2: \"height\"\n\t}\n};\n\nfunction getStyleNames(isHorizontal) {\n\treturn STYLE[isHorizontal ? _consts.HORIZONTAL : _consts.VERTICAL];\n}\n\nfunction assignOptions(defaultOptions, options) {\n\treturn _extends({}, _consts.DEFAULT_OPTIONS, defaultOptions, options);\n}\n\nfunction toZeroArray(outline) {\n\tif (!outline || !outline.length) {\n\t\treturn [0];\n\t}\n\treturn outline;\n}\n\nfunction isWindow(el) {\n\treturn el === _browser.window;\n}\n\nfunction indexOf(arr, target) {\n\tvar isRight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n\tif (!isRight) {\n\t\treturn arr.indexOf(target);\n\t}\n\tvar length = arr.length;\n\n\tfor (var i = length - 1; i >= 0; --i) {\n\t\tif (arr[i] !== target) {\n\t\t\tcontinue;\n\t\t}\n\t\treturn i;\n\t}\n\treturn -1;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utils.js\n// module id = 1\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n/* eslint-disable no-new-func, no-nested-ternary */\nvar win = window;\n/* eslint-enable no-new-func, no-nested-ternary */\n\nexports.window = window;\nvar document = exports.document = win.document;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser.js\n// module id = 2\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defense(element) {\n\tvar container = document.createElement(\"div\");\n\n\tcontainer.className = _consts.CONTAINER_CLASSNAME;\n\tcontainer.style.position = \"relative\";\n\tcontainer.style.height = \"100%\";\n\n\tvar children = element.children;\n\tvar length = children.length; // for IE8\n\n\tfor (var i = 0; i < length; i++) {\n\t\tcontainer.appendChild(children[0]);\n\t}\n\n\telement.appendChild(container);\n\treturn container;\n}\n\nvar DOMRenderer = function () {\n\tDOMRenderer.renderItem = function renderItem(item, styles) {\n\t\tif (item.el) {\n\t\t\tvar elStyle = item.el.style;\n\n\t\t\t// for debugging\n\t\t\titem.el.setAttribute(_consts.GROUPKEY_ATT, item.groupKey);\n\t\t\telStyle.position = \"absolute\";\n\t\t\t[\"left\", \"top\", \"width\", \"height\"].forEach(function (p) {\n\t\t\t\tp in styles && (elStyle[p] = styles[p] + \"px\");\n\t\t\t});\n\t\t}\n\t};\n\n\tDOMRenderer.renderItems = function renderItems(items) {\n\t\titems.forEach(function (item) {\n\t\t\tDOMRenderer.renderItem(item, item.rect);\n\t\t});\n\t};\n\n\tDOMRenderer.removeItems = function removeItems(items) {\n\t\titems.forEach(function (item) {\n\t\t\tif (item.el) {\n\t\t\t\tDOMRenderer.removeElement(item.el);\n\t\t\t\titem.el = null;\n\t\t\t}\n\t\t});\n\t};\n\n\tDOMRenderer.removeElement = function removeElement(element) {\n\t\telement.parentNode.removeChild(element);\n\t};\n\n\tDOMRenderer.createElements = function createElements(items) {\n\t\tvar elements = (0, _utils.$)(items.reduce(function (acc, v, i) {\n\t\t\tacc.push(v.content.replace(/^[\\s\\uFEFF]+|[\\s\\uFEFF]+$/g, \"\"));\n\t\t\treturn acc;\n\t\t}, []).join(\"\"), _consts.MULTI);\n\n\t\treturn items.map(function (item, index) {\n\t\t\titem.el = elements[index];\n\t\t\treturn item;\n\t\t});\n\t};\n\n\tfunction DOMRenderer(element, options) {\n\t\t_classCallCheck(this, DOMRenderer);\n\n\t\t_extends(this.options = {\n\t\t\tisOverflowScroll: false,\n\t\t\tisEqualSize: false,\n\t\t\tisVertical: true\n\t\t}, options);\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tcontainer: -1,\n\t\t\tview: -1,\n\t\t\titem: null\n\t\t};\n\t\tthis._init(element);\n\t\tthis.resize();\n\t}\n\n\tDOMRenderer.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\tcssText: this.container.style.cssText,\n\t\t\toptions: _extends({}, this.options),\n\t\t\t_size: _extends({}, this._size)\n\t\t};\n\t};\n\n\tDOMRenderer.prototype.setStatus = function setStatus(status, items) {\n\t\tthis.container.style.cssText = status.cssText;\n\t\t_extends(this.options, status.options);\n\t\t_extends(this._size, status._size);\n\n\t\tDOMRenderer.renderItems(items);\n\t\tthis._insert(items, _consts.APPEND);\n\t};\n\n\tDOMRenderer.prototype.updateSize = function updateSize(items) {\n\t\tvar _this = this;\n\n\t\treturn items.map(function (item) {\n\t\t\tif (item.el) {\n\t\t\t\tif (_this.options.isEqualSize) {\n\t\t\t\t\t_this._size.item = _this._size.item || {\n\t\t\t\t\t\twidth: (0, _utils.innerWidth)(item.el),\n\t\t\t\t\t\theight: (0, _utils.innerHeight)(item.el)\n\t\t\t\t\t};\n\t\t\t\t\titem.size = _extends({}, _this._size.item);\n\t\t\t\t} else {\n\t\t\t\t\titem.size = {\n\t\t\t\t\t\twidth: (0, _utils.innerWidth)(item.el),\n\t\t\t\t\t\theight: (0, _utils.innerHeight)(item.el)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif (!item.orgSize) {\n\t\t\t\t\titem.orgSize = _extends({}, item.size);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t};\n\n\tDOMRenderer.prototype._init = function _init(el) {\n\t\tvar element = (0, _utils.$)(el);\n\t\tvar style = (0, _utils.getStyles)(element);\n\n\t\tthis._orgStyle = {};\n\n\t\tif (style.position === \"static\") {\n\t\t\tthis._orgStyle.position = element.style.position;\n\t\t\telement.style.position = \"relative\";\n\t\t}\n\t\tif (this.options.isOverflowScroll) {\n\t\t\tvar target = this.options.isVertical ? [\"Y\", \"X\"] : [\"X\", \"Y\"];\n\n\t\t\tthis._orgStyle.overflowX = element.style.overflowX;\n\t\t\tthis._orgStyle.overflowY = element.style.overflowY;\n\t\t\telement.style[\"overflow\" + target[0]] = \"scroll\";\n\t\t\telement.style[\"overflow\" + target[1]] = \"hidden\";\n\t\t\tthis.view = element;\n\t\t\t// defense code for android < 4.4 or webkit < 537\n\t\t\tthis.container = !this.options.isVertical && _consts.DEFENSE_BROWSER ? _defense(element) : element;\n\t\t} else {\n\t\t\tthis.view = window;\n\t\t\tthis.container = element;\n\t\t}\n\t};\n\n\tDOMRenderer.prototype.append = function append(items) {\n\t\tthis._insert(items, _consts.APPEND, {\n\t\t\ttop: _consts.DUMMY_POSITION,\n\t\t\tleft: _consts.DUMMY_POSITION\n\t\t});\n\t};\n\n\tDOMRenderer.prototype.prepend = function prepend(items) {\n\t\tthis._insert(items, _consts.PREPEND, {\n\t\t\ttop: _consts.DUMMY_POSITION,\n\t\t\tleft: _consts.DUMMY_POSITION\n\t\t});\n\t};\n\n\tDOMRenderer.prototype.clear = function clear() {\n\t\tthis.container.innerHTML = \"\";\n\t\tif (!this.options.isOverflowScroll) {\n\t\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = \"\";\n\t\t}\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tviewport: -1,\n\t\t\tcontainer: -1,\n\t\t\tview: -1\n\t\t};\n\t};\n\n\tDOMRenderer.prototype.createAndInsert = function createAndInsert(items, isAppend) {\n\t\tvar itemsWithElement = DOMRenderer.createElements(items);\n\n\t\tDOMRenderer.renderItems(itemsWithElement);\n\t\tthis._insert(itemsWithElement, isAppend);\n\t};\n\n\tDOMRenderer.prototype._insert = function _insert(items, isAppend, styles) {\n\t\tvar df = document.createDocumentFragment();\n\n\t\titems.forEach(function (item) {\n\t\t\tstyles && DOMRenderer.renderItem(item, styles);\n\t\t\tisAppend ? df.appendChild(item.el) : df.insertBefore(item.el, df.firstChild);\n\t\t});\n\t\tisAppend ? this.container.appendChild(df) : this.container.insertBefore(df, this.container.firstChild);\n\t};\n\n\tDOMRenderer.prototype._calcSize = function _calcSize() {\n\t\treturn this.options.isVertical ? (0, _utils.innerWidth)(this.container) : (0, _utils.innerHeight)(this.container);\n\t};\n\n\tDOMRenderer.prototype.getViewSize = function getViewSize() {\n\t\treturn this._size.view;\n\t};\n\n\tDOMRenderer.prototype.scrollBy = function scrollBy(point) {\n\t\tvar pos = this.options.isVertical ? [0, point] : [point, 0];\n\n\t\t_utils.scrollBy.apply(undefined, [this.view].concat(pos));\n\t};\n\n\tDOMRenderer.prototype.getContainerOffset = function getContainerOffset() {\n\t\treturn this._size.containerOffset;\n\t};\n\n\tDOMRenderer.prototype.getViewportSize = function getViewportSize() {\n\t\tthis.resize();\n\t\treturn this._size.viewport;\n\t};\n\n\tDOMRenderer.prototype.setContainerSize = function setContainerSize(size) {\n\t\tif (!this.options.isOverflowScroll || !this.options.isVertical && _consts.DEFENSE_BROWSER) {\n\t\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = size + \"px\";\n\t\t}\n\t};\n\n\tDOMRenderer.prototype.resize = function resize() {\n\t\tvar isVertical = this.options.isVertical;\n\n\t\tif (this.isNeededResize()) {\n\t\t\tthis._size = {\n\t\t\t\tcontainerOffset: this.options.isOverflowScroll ? 0 : this.container[\"offset\" + (isVertical ? \"Top\" : \"Left\")],\n\t\t\t\tviewport: this._calcSize(),\n\t\t\t\tview: isVertical ? (0, _utils.innerHeight)(this.view) : (0, _utils.innerWidth)(this.view),\n\t\t\t\titem: null\n\t\t\t};\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis._size.view = isVertical ? (0, _utils.innerHeight)(this.view) : (0, _utils.innerWidth)(this.view);\n\t\t}\n\t\treturn false;\n\t};\n\n\tDOMRenderer.prototype.isNeededResize = function isNeededResize() {\n\t\treturn this._calcSize() !== this._size.viewport;\n\t};\n\n\tDOMRenderer.prototype.destroy = function destroy() {\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tviewport: -1,\n\t\t\tview: -1,\n\t\t\titem: null\n\t\t};\n\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = \"\";\n\t\tfor (var p in this._orgStyle) {\n\t\t\tthis[this.options.isOverflowScroll ? \"view\" : \"container\"].style[p] = this._orgStyle[p];\n\t\t}\n\t};\n\n\treturn DOMRenderer;\n}();\n\nexports[\"default\"] = DOMRenderer;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/DOMRenderer.js\n// module id = 3\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/*\nFrame\n[\n[1, 1, 1, 1, 1],\n[0, 0, 2, 2, 2],\n[0, 0, 2, 2, 2],\n[3, 4, 5, 5, 5],\n]\n*/\nfunction disableFrame(frame, type, x, y, width, height) {\n\tfor (var i = y; i < y + height; ++i) {\n\t\tfor (var j = x; j < x + width; ++j) {\n\t\t\tif (type !== frame[i][j]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tframe[i][j] = 0;\n\t\t}\n\t}\n}\nfunction searchShapeInFrame(frame, type, top, left, width, height) {\n\tvar size = {\n\t\tleft: left,\n\t\ttop: top,\n\t\ttype: type,\n\t\twidth: 1,\n\t\theight: 1\n\t};\n\n\tfor (var i = left; i < width; ++i) {\n\t\tif (frame[top][i] === type) {\n\t\t\tsize.width = i - left + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\tfor (var _i = top; _i < height; ++_i) {\n\t\tif (frame[_i][left] === type) {\n\t\t\tsize.height = _i - top + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\t// After finding the shape, it will not find again.\n\tdisableFrame(frame, type, left, top, size.width, size.height);\n\treturn size;\n}\nfunction getShapes(frame) {\n\tvar height = frame.length;\n\tvar width = height ? frame[0].length : 0;\n\tvar shapes = [];\n\n\tfor (var i = 0; i < height; ++i) {\n\t\tfor (var j = 0; j < width; ++j) {\n\t\t\tvar type = frame[i][j];\n\n\t\t\tif (!type) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Separate shapes with other numbers.\n\t\t\tshapes.push(searchShapeInFrame(frame, type, i, j, width, height));\n\t\t}\n\t}\n\tshapes.sort(function (a, b) {\n\t\treturn a.type < b.type ? -1 : 1;\n\t});\n\treturn {\n\t\tshapes: shapes,\n\t\twidth: width,\n\t\theight: height\n\t};\n}\n/**\n * @classdesc FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.\n * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.\n * @class eg.InfiniteGrid.FrameLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.FrameLayout module eg.InfiniteGrid.FrameLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @param {Boolean} [options.frame=[]] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @param {Boolean} [options.frameFill=true] Make sure that the frame can be attached after the previous frame. 다음 프레임이 전 프레임에 이어 붙일 수 있는지 있는지 확인한다. \n * @example\n```\n\n```\n **/\n\nvar FrameLayout = function () {\n\tfunction FrameLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, FrameLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\titemSize: 0,\n\t\t\tframe: [],\n\t\t\tframeFill: true\n\t\t}, options);\n\t\tvar frame = this.options.frame.map(function (row) {\n\t\t\treturn row.slice();\n\t\t});\n\t\t// divide frame into shapes.\n\t\tvar shapes = getShapes(frame);\n\n\t\tthis._itemSize = this.options.itemSize || 0;\n\t\tthis._shapes = shapes;\n\t\tthis._size = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tFrameLayout.prototype._getItemSize = function _getItemSize() {\n\t\tthis._checkItemSize();\n\n\t\treturn this._itemSize;\n\t};\n\n\tFrameLayout.prototype._checkItemSize = function _checkItemSize() {\n\t\tif (this.options.itemSize) {\n\t\t\tthis._itemSize = this.options.itemSize;\n\t\t\treturn;\n\t\t}\n\t\tvar style = this._style;\n\t\tvar size = style.size2;\n\t\tvar margin = this.options.margin;\n\n\t\t// if itemSize is not in options, caculate itemSize from size.\n\t\tthis._itemSize = (this._size + margin) / this._shapes[size] - margin;\n\t};\n\n\tFrameLayout.prototype._layout = function _layout(items) {\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar length = items.length;\n\t\tvar style = this._style;\n\t\tvar _options = this.options,\n\t\t margin = _options.margin,\n\t\t frameFill = _options.frameFill;\n\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar itemSize = this._getItemSize();\n\t\tvar isItemObject = (typeof itemSize === \"undefined\" ? \"undefined\" : _typeof(itemSize)) === \"object\";\n\t\tvar itemSize2 = isItemObject ? itemSize[size2Name] : itemSize;\n\t\tvar itemSize1 = isItemObject ? itemSize[size1Name] : itemSize;\n\t\tvar shapesSize = this._shapes[size2Name];\n\t\tvar shapes = this._shapes.shapes;\n\t\tvar shapesLength = shapes.length;\n\t\tvar startOutline = (0, _utils.fill)(shapesSize, _consts.DUMMY_POSITION);\n\t\tvar endOutline = (0, _utils.fill)(shapesSize, _consts.DUMMY_POSITION);\n\t\tvar dist = 0;\n\t\tvar end = 0;\n\t\tvar startIndex = -1;\n\t\tvar endIndex = -1;\n\t\tvar minPos = -1;\n\t\tvar maxPos = -1;\n\n\t\tif (!shapesLength) {\n\t\t\treturn { start: outline, end: outline, startIndex: startIndex, endIndex: endIndex };\n\t\t}\n\t\tfor (var i = 0; i < length; i += shapesLength) {\n\t\t\tfor (var j = 0; j < shapesLength && i + j < length; ++j) {\n\t\t\t\tvar _item$rect;\n\n\t\t\t\tvar item = items[i + j];\n\t\t\t\tvar shape = shapes[j];\n\t\t\t\tvar shapePos1 = shape[pos1Name];\n\t\t\t\tvar shapePos2 = shape[pos2Name];\n\t\t\t\tvar shapeSize1 = shape[size1Name];\n\t\t\t\tvar shapeSize2 = shape[size2Name];\n\t\t\t\tvar pos1 = end - dist + shapePos1 * (itemSize1 + margin);\n\t\t\t\tvar pos2 = shapePos2 * (itemSize2 + margin);\n\t\t\t\tvar size1 = shapeSize1 * (itemSize1 + margin) - margin;\n\t\t\t\tvar size2 = shapeSize2 * (itemSize2 + margin) - margin;\n\n\t\t\t\tfor (var k = shapePos2; k < shapePos2 + shapeSize2 && k < shapesSize; ++k) {\n\t\t\t\t\tif (startOutline[k] === _consts.DUMMY_POSITION) {\n\t\t\t\t\t\tstartOutline[k] = pos1;\n\t\t\t\t\t}\n\t\t\t\t\tif (startIndex === -1) {\n\t\t\t\t\t\tminPos = pos1;\n\t\t\t\t\t\tstartIndex = i + j;\n\t\t\t\t\t\tmaxPos = pos1 + size1 + margin;\n\t\t\t\t\t\tendIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tif (minPos > pos1) {\n\t\t\t\t\t\tminPos = pos1;\n\t\t\t\t\t\tstartIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tif (maxPos < pos1 + size1 + margin) {\n\t\t\t\t\t\tmaxPos = pos1 + size1 + margin;\n\t\t\t\t\t\tendIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tstartOutline[k] = Math.min(startOutline[k], pos1);\n\t\t\t\t\tendOutline[k] = Math.max(endOutline[k], pos1 + size1 + margin);\n\t\t\t\t}\n\t\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);\n\t\t\t}\n\t\t\tend = Math.max.apply(Math, endOutline);\n\t\t\t// check dist once\n\t\t\tif (i !== 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// find & fill empty block\n\t\t\tif (!frameFill) {\n\t\t\t\tdist = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdist = end;\n\n\t\t\tfor (var _j = 0; _j < shapesSize; ++_j) {\n\t\t\t\tif (startOutline[_j] === _consts.DUMMY_POSITION) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// the dist between frame's end outline and next frame's start outline\n\t\t\t\t// expect that next frame's start outline is startOutline[j] + end\n\t\t\t\tdist = Math.min(startOutline[_j] + end - endOutline[_j], dist);\n\t\t\t}\n\t\t}\n\t\tfor (var _i2 = 0; _i2 < shapesSize; ++_i2) {\n\t\t\tif (startOutline[_i2] !== _consts.DUMMY_POSITION) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tstartOutline[_i2] = Math.max.apply(Math, startOutline);\n\t\t\tendOutline[_i2] = startOutline[_i2];\n\t\t}\n\t\t// The target outline is start outline when type is APPENDING\n\t\tvar targetOutline = isAppend ? startOutline : endOutline;\n\t\tvar prevOutlineEnd = outline.length === 0 ? 0 : Math[isAppend ? \"max\" : \"min\"].apply(Math, outline);\n\t\tvar prevOutlineDist = isAppend ? 0 : end;\n\n\t\tif (frameFill && outline.length === shapesSize) {\n\t\t\tprevOutlineDist = -_consts.DUMMY_POSITION;\n\t\t\tfor (var _i3 = 0; _i3 < shapesSize; ++_i3) {\n\t\t\t\tif (startOutline[_i3] === endOutline[_i3]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// if appending type is PREPEND, subtract dist from appending group's height.\n\n\t\t\t\tprevOutlineDist = Math.min(targetOutline[_i3] + prevOutlineEnd - outline[_i3], prevOutlineDist);\n\t\t\t}\n\t\t}\n\t\tfor (var _i4 = 0; _i4 < shapesSize; ++_i4) {\n\t\t\tstartOutline[_i4] += prevOutlineEnd - prevOutlineDist;\n\t\t\tendOutline[_i4] += prevOutlineEnd - prevOutlineDist;\n\t\t}\n\t\titems.forEach(function (item) {\n\t\t\titem.rect[pos1Name] += prevOutlineEnd - prevOutlineDist;\n\t\t});\n\t\treturn {\n\t\t\tstart: startOutline,\n\t\t\tend: endOutline,\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tFrameLayout.prototype._insert = function _insert(items, outline, type) {\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tFrameLayout.prototype.layout = function layout(groups, outlines) {\n\t\tvar length = groups.length;\n\t\tvar point = outlines;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.FrameLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tFrameLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tFrameLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tFrameLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\n\treturn FrameLayout;\n}();\n\nexports[\"default\"] = FrameLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/FrameLayout.js\n// module id = 4\n// module chunks = 0 1","\"use strict\";\n\nvar _InfiniteGrid = require(\"./InfiniteGrid\");\n\nvar _InfiniteGrid2 = _interopRequireDefault(_InfiniteGrid);\n\nvar _GridLayout = require(\"./layouts/GridLayout\");\n\nvar _GridLayout2 = _interopRequireDefault(_GridLayout);\n\nvar _FrameLayout = require(\"./layouts/FrameLayout\");\n\nvar _FrameLayout2 = _interopRequireDefault(_FrameLayout);\n\nvar _SquareLayout = require(\"./layouts/SquareLayout\");\n\nvar _SquareLayout2 = _interopRequireDefault(_SquareLayout);\n\nvar _PackingLayout = require(\"./layouts/PackingLayout\");\n\nvar _PackingLayout2 = _interopRequireDefault(_PackingLayout);\n\nvar _JustifiedLayout = require(\"./layouts/JustifiedLayout\");\n\nvar _JustifiedLayout2 = _interopRequireDefault(_JustifiedLayout);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n/**\n * Copyright (c) NAVER Corp.\n * egjs-infinitegrid projects are licensed under the MIT license\n */\n_InfiniteGrid2[\"default\"].GridLayout = _GridLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].FrameLayout = _FrameLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].SquareLayout = _SquareLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].PackingLayout = _PackingLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].JustifiedLayout = _JustifiedLayout2[\"default\"];\n\nmodule.exports = _InfiniteGrid2[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/index.js\n// module id = 5\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; /**\n * Copyright (c) 2017 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\n\nvar _component = require(\"@egjs/component\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _ItemManager = require(\"./ItemManager\");\n\nvar _ItemManager2 = _interopRequireDefault(_ItemManager);\n\nvar _DOMRenderer = require(\"./DOMRenderer\");\n\nvar _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);\n\nvar _ImageLoaded = require(\"./ImageLoaded\");\n\nvar _ImageLoaded2 = _interopRequireDefault(_ImageLoaded);\n\nvar _Watcher = require(\"./Watcher\");\n\nvar _Watcher2 = _interopRequireDefault(_Watcher);\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// IE8\n// https://stackoverflow.com/questions/43216659/babel-ie8-inherit-issue-with-object-create\n/* eslint-disable */\nif (typeof Object.create !== \"function\") {\n\tObject.create = function (o, properties) {\n\t\tif ((typeof o === \"undefined\" ? \"undefined\" : _typeof(o)) !== \"object\" && typeof o !== \"function\") {\n\t\t\tthrow new TypeError(\"Object prototype may only be an Object: \" + o);\n\t\t} else if (o === null) {\n\t\t\tthrow new Error(\"This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument.\");\n\t\t}\n\t\tfunction F() {}\n\t\tF.prototype = o;\n\t\treturn new F();\n\t};\n}\n/* eslint-enable */\n\n/**\n * A module used to arrange card elements including content infinitely according to layout type. With this module, you can implement various layouts composed of different card elements whose sizes vary. It guarantees performance by maintaining the number of DOMs the module is handling under any circumstance\n * @ko 콘텐츠가 있는 카드 엘리먼트를 레이아웃 타입에 따라 무한으로 배치하는 모듈. 다양한 크기의 카드 엘리먼트를 다양한 레이아웃으로 배치할 수 있다. 카드 엘리먼트의 개수가 계속 늘어나도 모듈이 처리하는 DOM의 개수를 일정하게 유지해 최적의 성능을 보장한다\n * @alias eg.InfiniteGrid\n * @extends eg.Component\n *\n * @example\n```\n\n\t- \n\t\t
test1
\n\t \n\t- \n\t\t
test2
\n\t \n\t- \n\t\t
test3
\n\t \n\t- \n\t\t
test4
\n\t \n\t- \n\t\t
test5
\n\t \n\t- \n\t\t
test6
\n\t \n
\n\n```\n *\n * @support {\"ie\": \"8+\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"2.1+ (except 3.x)\"}\n **/\n\nvar InfiniteGrid = function (_Component) {\n\t_inherits(InfiniteGrid, _Component);\n\n\t/**\n * @param {HTMLElement|String|jQuery} element A base element for a module 모듈을 적용할 기준 엘리먼트\n * @param {Object} [options] The option object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 옵션 객체\n * @param {String} [options.itemSelector] A selector to select card elements that make up the layout레이아웃을 구성하는 카드 엘리먼트를 선택할 선택자(selector)\n * @param {Boolean} [options.useRecycle=true] Indicates whether keep the number of DOMs is maintained. If the useRecycle value is 'true', keep the number of DOMs is maintained. If the useRecycle value is 'false', the number of DOMs will increase as card elements are added. DOM의 수를 유지할지 여부를 나타낸다. useRecycle 값이 'true'이면 DOM 개수를 일정하게 유지한다. useRecycle 값이 'false' 이면 카드 엘리먼트가 추가될수록 DOM 개수가 계속 증가한다.\n * @param {Boolean} [options.isOverflowScroll=false] Indicates whether overflow:scroll is appliedoverflow:scroll 적용여부를 결정한다.\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향\n * @param {Boolean} [options.isEqualSize=false] Indicates whether sizes of all card elements are equal to one another. If sizes of card elements to be arranged are all equal and this option is set to \"true\", the performance of layout arrangement can be improved. 카드 엘리먼트의 크기가 동일한지 여부. 배치될 카드 엘리먼트의 크기가 모두 동일할 때 이 옵션을 'true'로 설정하면 레이아웃 배치 성능을 높일 수 있다\n * @param {Number} [options.threshold=100] The threshold size of an event area where card elements are added to a layout.레이아웃에 카드 엘리먼트를 추가하는 이벤트가 발생하는 기준 영역의 크기.\n */\n\tfunction InfiniteGrid(element, options) {\n\t\t_classCallCheck(this, InfiniteGrid);\n\n\t\tvar _this = _possibleConstructorReturn(this, _Component.call(this));\n\n\t\t_extends(_this.options = {\n\t\t\titemSelector: \"*\",\n\t\t\tisOverflowScroll: false,\n\t\t\tthreshold: 100,\n\t\t\tisEqualSize: false,\n\t\t\tuseRecycle: true,\n\t\t\thorizontal: false\n\t\t}, options);\n\t\t_consts.IS_ANDROID2 && (_this.options.isOverflowScroll = false);\n\t\t_this._isVertical = !_this.options.horizontal;\n\t\t_this._reset();\n\t\t_this._items = new _ItemManager2[\"default\"]();\n\t\t_this._renderer = new _DOMRenderer2[\"default\"](element, {\n\t\t\tisOverflowScroll: _this.options.isOverflowScroll,\n\t\t\tisEqualSize: _this.options.isEqualSize,\n\t\t\tisVertical: _this._isVertical\n\t\t});\n\t\t_this._watcher = new _Watcher2[\"default\"](_this._renderer, {\n\t\t\tlayout: function layout() {\n\t\t\t\treturn _this.layout();\n\t\t\t},\n\t\t\tcheck: function check(param) {\n\t\t\t\treturn _this._onCheck(param);\n\t\t\t}\n\t\t});\n\t\treturn _this;\n\t}\n\t/**\n * Adds a card element at the bottom of a layout. This method is available only if the isProcessing() method returns false.\n * @ko 카드 엘리먼트를 레이아웃 아래에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다\n * 이 메소드는 isProcessing()의 반환값이 false일 경우에만 사용 가능하다.\n * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트의 배열\n * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.\n * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.append(\"<div class='item'>test1</div><div class='item'>test2</div>\");\n * infinitegrid.append([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]);\n * infinitegrid.append([HTMLElement1, HTMLElement2]);\n * infinitegrid.append(jQuery([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]));\n */\n\n\n\tInfiniteGrid.prototype.append = function append(elements, groupKey) {\n\t\tthis._layout && this._insert(elements, _consts.APPEND, groupKey);\n\t\treturn this;\n\t};\n\t/**\n * Adds a card element at the top of a layout. This method is available only if the isProcessing() method returns false.\n * @ko 카드 엘리먼트를 레이아웃의 위에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다\n * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트 배열\n * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.\n * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.prepend(\"<div class='item'>test1</div><div class='item'>test2</div>\");\n * infinitegrid.prepend([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]);\n * infinitegrid.prepend([HTMLElement1, HTMLElement2]);\n * infinitegrid.prepend(jQuery([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]));\n */\n\n\n\tInfiniteGrid.prototype.prepend = function prepend(elements, groupKey) {\n\t\tthis._layout && this._insert(elements, _consts.PREPEND, groupKey);\n\t\treturn this;\n\t};\n\t/**\n * Specifies the Layout class to use.\n * @ko 사용할 Layout 클래스를 지정한다.\n * @param {Class} LayoutKlass The Layout class to use 사용할 Layout 클래스\n * @param {Object} options Options to apply to the Layout.Layout에 적용할 옵션\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.setLayout(eg.InfiniteGrid.GridLayout, {\n * margin: 10,\n * align: \"start\"\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.JustifiedLayout, {\n * margin: 10,\n * minSize: 100,\n * maxSize: 200\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.SquareLayout, {\n * margin: 10,\n * column: 2\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.FrameLayout, {\n * margin: 10,\n * frame: [\n * [1, 2],\n * [4, 3],\n * ]\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.PackingLayout, {\n * margin: 10,\n * aspectRatio: 1.5\n * });\n */\n\n\n\tInfiniteGrid.prototype.setLayout = function setLayout(LayoutKlass, options) {\n\t\tthis._layout = new LayoutKlass(_extends(options || {}, {\n\t\t\thorizontal: !this._isVertical\n\t\t}));\n\t\tthis._layout.setSize(this._renderer.getViewportSize());\n\t\treturn this;\n\t};\n\t/**\n * Returns the layouted items.\n * @ko 레이아웃된 아이템들을 반환한다.\n * @param {Boolean} includeCached Indicates whether to include the cached items. 캐싱된 아이템을 포함할지 여부를 나타낸다.\n * @returns {Array} List of items 아이템의 목록\n */\n\n\n\tInfiniteGrid.prototype.getItems = function getItems() {\n\t\tvar includeCached = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n\t\treturn this[includeCached ? \"_getItems\" : \"_getVisibleItems\"]();\n\t};\n\n\tInfiniteGrid.prototype._getItems = function _getItems() {\n\t\treturn this._items.pluck(\"items\", 0, this._items.size());\n\t};\n\n\tInfiniteGrid.prototype._getVisibleItems = function _getVisibleItems() {\n\t\treturn this._items.pluck(\"items\", this._status.startCursor, this._status.endCursor);\n\t};\n\n\tInfiniteGrid.prototype._updateEdge = function _updateEdge() {\n\t\tthis._status.start = this._items.getEdge(\"start\", this._status.startCursor, this._status.endCursor);\n\t\tthis._status.end = this._items.getEdge(\"end\", this._status.startCursor, this._status.endCursor);\n\t};\n\n\tInfiniteGrid.prototype._getEdgeOffset = function _getEdgeOffset(cursor) {\n\t\tvar rect = null;\n\n\t\tif (!this._status[cursor]) {\n\t\t\tvar item = this._items.getEdge(cursor);\n\n\t\t\tthis._status[cursor] = item;\n\t\t}\n\n\t\tif (this._status[cursor]) {\n\t\t\trect = this._status[cursor].rect;\n\t\t\tif (cursor === \"start\") {\n\t\t\t\trect.bottom = rect.top + this._status[cursor].size.height;\n\t\t\t\trect.right = rect.left + this._status[cursor].size.width;\n\t\t\t}\n\t\t}\n\t\treturn rect;\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._fit = function _fit() {\n\t\tvar scrollCycle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"after\";\n\n\t\t// for caching\n\t\tif (!this._layout) {\n\t\t\treturn 0;\n\t\t}\n\t\tvar base = this._getEdgeValue(\"start\");\n\t\tvar margin = this._getLoadingStatus() === _consts.LOADING_PREPEND && this._status.loadingSize || 0;\n\n\t\tif (!this.options.useRecycle || _consts.DEFENSE_BROWSER) {\n\t\t\tif (scrollCycle === \"before\" && margin && base < margin) {\n\t\t\t\tthis._renderer.scrollBy(-Math.abs(base) + margin);\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\t} else if (scrollCycle === \"after\" && base < 0) {\n\t\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\t\tthis._renderer.scrollBy(Math.abs(base));\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (base !== 0 || margin) {\n\t\t\tvar isProcessing = this._isProcessing();\n\n\t\t\tthis._process(_consts.PROCESSING);\n\t\t\tif (scrollCycle === \"before\") {\n\t\t\t\tthis._renderer.scrollBy(-Math.abs(base) + margin);\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t}\n\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\tif (scrollCycle === \"after\") {\n\t\t\t\tthis._renderer.scrollBy(Math.abs(base) + margin);\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t}\n\t\t\tif (!isProcessing) {\n\t\t\t\tthis._process(_consts.PROCESSING, false);\n\t\t\t}\n\t\t}\n\t\treturn base;\n\t};\n\n\tInfiniteGrid.prototype._getEdgeValue = function _getEdgeValue(cursor) {\n\t\treturn this._items.getEdgeValue(cursor, this._status.startCursor, this._status.endCursor);\n\t};\n\t/**\n * Rearranges a layout.\n * @ko 레이아웃을 다시 배치한다.\n * @param {Boolean} [isRelayout=true] Indicates whether a card element is being relayouted 카드 엘리먼트 재배치 여부\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.layout = function layout() {\n\t\tvar _this2 = this;\n\n\t\tvar isRelayout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n\t\tif (!this._layout || this._isProcessing()) {\n\t\t\treturn this;\n\t\t}\n\t\t// check childElement\n\t\tif (!this._items.size()) {\n\t\t\tthis._insert((0, _utils.toArray)(this._renderer.container.children), true);\n\t\t\treturn this;\n\t\t}\n\t\tthis._process(_consts.PROCESSING);\n\n\t\tvar data = void 0;\n\t\tvar outline = void 0;\n\n\t\tif (isRelayout) {\n\t\t\t// remove cache\n\t\t\tdata = this._items.get(this._status.startCursor, this._status.endCursor);\n\t\t\tif (this._renderer.resize()) {\n\t\t\t\tthis._layout.setSize(this._renderer.getViewportSize());\n\t\t\t\tdata.forEach(function (v) {\n\t\t\t\t\tdata.items = _this2._renderer.updateSize(v.items);\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tdata = this._items.get(this._status.startCursor, this._items.size());\n\t\t\toutline = this._items.getOutline(this._status.startCursor, \"start\");\n\t\t}\n\t\tif (!data.length) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._layout.layout(data, outline);\n\n\t\tif (isRelayout) {\n\t\t\tthis._items._data.forEach(function (group, cursor) {\n\t\t\t\tif (_this2._status.startCursor <= cursor && cursor <= _this2._status.endCursor) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgroup.outlines.start = [];\n\t\t\t\tgroup.outlines.end = [];\n\t\t\t});\n\t\t} else {\n\t\t\tdata.forEach(function (v) {\n\t\t\t\treturn _this2._items.set(v, v.groupKey);\n\t\t\t});\n\t\t}\n\t\tthis._onLayoutComplete(data, _consts.APPEND, _consts.NO_TRUSTED, false);\n\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\tisRelayout && this._watcher.setScrollPos();\n\n\t\treturn this;\n\t};\n\t/**\n * Removes a item element on a grid layout.\n * @ko 그리드 레이아웃의 카드 엘리먼트를 삭제한다.\n * @param {HTMLElement} item element to be removed 삭제될 아이템 엘리먼트\n * @return {Object} Removed item element 삭제된 아이템 엘리먼트 정보\n */\n\n\n\tInfiniteGrid.prototype.remove = function remove(element) {\n\t\tif (element) {\n\t\t\tvar items = this._items.remove(element, this._status.startCursor, this._status.endCursor);\n\n\t\t\tif (items) {\n\t\t\t\t_DOMRenderer2[\"default\"].removeElement(element);\n\t\t\t\treturn items;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tInfiniteGrid.prototype._getNextItems = function _getNextItems(isAppend) {\n\t\tvar items = [];\n\t\tvar size = this._items.size();\n\n\t\t// from cache\n\t\tif (size > 0 && this._status.startCursor !== -1 && this._status.endCursor !== -1) {\n\t\t\tif (isAppend && size > this._status.endCursor + 1) {\n\t\t\t\titems = this._items.pluck(\"items\", this._status.endCursor + 1);\n\t\t\t} else if (!isAppend && this._status.startCursor > 0) {\n\t\t\t\titems = this._items.pluck(\"items\", this._status.startCursor - 1);\n\t\t\t}\n\t\t}\n\t\treturn items;\n\t};\n\t/**\n * Returns the list of group keys which belongs to card elements currently being maintained. You can use the append() or prepend() method to configure group keys so that multiple card elements can be managed at once. If you do not use these methods to configure group keys, groupkey is automatically generated.\n * @ko 현재 유지하고 있는 카드 엘리먼트의 그룹 키 목록을 반환한다. 여러 개의 카드 엘리먼트를 묶어서 관리할 수 있도록 append() 메서드나 prepend() 메서드에서 그룹 키를 지정할 수 있다. append() 메서드나 prepend() 메서드에서 그룹 키를 지정하지 않았다면 자동으로 그룹키가 생성된다.\n * @param {Boolean} includeCached Indicates whether to include the cached groups. 캐싱된 그룹을 포함할지 여부를 나타낸다.\n * @return {Array} List of group keys 그룹 키의 목록\n */\n\n\n\tInfiniteGrid.prototype.getGroupKeys = function getGroupKeys(includeCached) {\n\t\tvar data = includeCached ? this._items.get() : this._items.get(this._status.startCursor, this._status.endCursor);\n\n\t\treturn data.map(function (v) {\n\t\t\treturn v.groupKey;\n\t\t});\n\t};\n\t/**\n * Returns the current state of a module such as location information. You can use the setStatus() method to restore the information returned through a call to this method.\n * @ko 카드의 위치 정보 등 모듈의 현재 상태 정보를 반환한다. 이 메서드가 반환한 정보를 저장해 두었다가 setStatus() 메서드로 복원할 수 있다\n * @return {Object} State object of the eg.InfiniteGrid moduleeg.InfiniteGrid 모듈의 상태 객체\n */\n\n\n\tInfiniteGrid.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\toptions: _extends({}, this.options),\n\t\t\t_status: _extends({}, this._status),\n\t\t\t_items: this._items.getStatus(),\n\t\t\t_renderer: this._renderer.getStatus(),\n\t\t\t_watcher: this._watcher.getStatus()\n\t\t};\n\t};\n\t/**\n * Sets the state of the eg.InfiniteGrid module with the information returned through a call to the getStatue() method.\n * @ko getStatue() 메서드가 저장한 정보로 eg.InfiniteGrid 모듈의 상태를 설정한다.\n * @param {Object} status State object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 상태 객체\n * @param {boolean} [applyScrollPos=true] Checks whether to scroll스크롤의 위치를 복원할지 결정한다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.setStatus = function setStatus(status) {\n\t\tvar applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tif (!status || !status.options || !status._status || !status._renderer || !status._items || !status._watcher) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._watcher.detachEvent();\n\t\t_extends(this.options, status.options);\n\t\t_extends(this._status, status._status);\n\t\tthis._items.setStatus(status._items, this._status.startCursor, this._status.endCursor);\n\t\tthis._renderer.setStatus(status._renderer, this._getVisibleItems());\n\t\tthis._watcher.setStatus(status._watcher, applyScrollPos);\n\t\tthis._updateEdge();\n\t\tthis._watcher.attachEvent();\n\t\treturn this;\n\t};\n\t/**\n * Clears added card elements and data.\n * @ko 추가된 카드 엘리먼트와 데이터를 모두 지운다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.clear = function clear() {\n\t\tthis._items.clear();\n\t\tthis._renderer.clear();\n\t\tthis._reset();\n\t\tthis._appendLoadingBar();\n\t\treturn this;\n\t};\n\t/**\n * Specifies the Loading Bar to use for append or prepend items.\n * @ko 아이템을 append 또는 prepend 하기 위해 사용할 로딩 바를 지정한다.\n * @param {String|Object} [userLoadingBar={}] The loading bar HTML markup or element or element selector 로딩 바 HTML 또는 element 또는 selector \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.setLoadingBar = function setLoadingBar() {\n\t\tvar userLoadingBar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\tvar loadingBarObj = (typeof userLoadingBar === \"undefined\" ? \"undefined\" : _typeof(userLoadingBar)) === \"object\" ? userLoadingBar : {\n\t\t\t\"append\": userLoadingBar,\n\t\t\t\"prepend\": userLoadingBar\n\t\t};\n\n\t\tthis._status.loadingSize = 0;\n\t\tthis._status.loadingStyle = {};\n\t\tthis._loadingBar = this._loadingBar || {};\n\t\tvar loadingBar = this._loadingBar;\n\n\t\tfor (var type in loadingBarObj) {\n\t\t\tloadingBar[type] = (0, _utils.$)(loadingBarObj[type]);\n\t\t\tloadingBar[type].className += \" \" + _consts.IGNORE_CLASSNAME;\n\t\t}\n\t\tthis._appendLoadingBar();\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._appendLoadingBar = function _appendLoadingBar() {\n\t\tvar loadingBar = this._loadingBar;\n\t\tvar container = this._renderer.container;\n\n\t\tfor (var type in loadingBar) {\n\t\t\tcontainer.appendChild(loadingBar[type]);\n\t\t}\n\t};\n\t/**\n * Checks whether a card element or data is being added.\n * @ko 카드 엘리먼트 추가 또는 데이터 로딩이 진행 중인지 확인한다\n * @return {Boolean} Indicates whether a card element or data is being added 카드 엘리먼트 추가 또는 데이터 로딩 진행 중 여부\n */\n\n\n\tInfiniteGrid.prototype.isProcessing = function isProcessing() {\n\t\treturn this._isProcessing() || this._isLoading();\n\t};\n\n\tInfiniteGrid.prototype._isProcessing = function _isProcessing() {\n\t\treturn (this._status.processingStatus & _consts.PROCESSING) > 0;\n\t};\n\n\tInfiniteGrid.prototype._isLoading = function _isLoading() {\n\t\treturn this._getLoadingStatus() > 0;\n\t};\n\n\tInfiniteGrid.prototype._getLoadingStatus = function _getLoadingStatus() {\n\t\treturn this._status.processingStatus & (_consts.LOADING_APPEND | _consts.LOADING_PREPEND);\n\t};\n\n\tInfiniteGrid.prototype._process = function _process(status) {\n\t\tvar isAdd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tif (isAdd) {\n\t\t\tthis._status.processingStatus |= status;\n\t\t} else {\n\t\t\tthis._status.processingStatus -= this._status.processingStatus & status;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._insert = function _insert(elements, isAppend, groupKey) {\n\t\tif (this._isProcessing() || elements.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tvar key = typeof groupKey === \"undefined\" ? new Date().getTime() + Math.floor(Math.random() * 1000) : groupKey;\n\t\tvar items = _ItemManager2[\"default\"].from((0, _utils.$)(elements, true), this.options.itemSelector, {\n\t\t\tisAppend: isAppend,\n\t\t\tgroupKey: key\n\t\t});\n\n\t\tif (!items.length) {\n\t\t\treturn;\n\t\t}\n\t\tthis._postLayout(_consts.NO_CACHE, items, isAppend, _consts.NO_TRUSTED);\n\t};\n\t// add items, and remove items for recycling\n\n\n\tInfiniteGrid.prototype._recycle = function _recycle(isAppend) {\n\t\tvar remove = [];\n\n\t\tif (this._status.startCursor !== this._status.endCursor) {\n\t\t\tfor (var i = this._status.startCursor; i <= this._status.endCursor; i++) {\n\t\t\t\tremove.push(this._isVisible(i));\n\t\t\t}\n\t\t}\n\t\tvar start = remove.indexOf(isAppend ? 1 : -1);\n\t\tvar end = remove.lastIndexOf(isAppend ? 1 : -1);\n\t\tvar visible = remove.indexOf(0);\n\n\t\tif (visible === -1 || start === -1 || end === -1) {\n\t\t\treturn;\n\t\t}\n\n\t\tstart = this._status.startCursor + (isAppend ? 0 : start);\n\t\tend = isAppend ? this._status.startCursor + end : this._status.endCursor;\n\t\t_DOMRenderer2[\"default\"].removeItems(this._items.pluck(\"items\", start, end));\n\t\tif (isAppend) {\n\t\t\tthis._status.startCursor = end + 1;\n\t\t} else {\n\t\t\tthis._status.endCursor = start - 1;\n\t\t}\n\t};\n\t/**\n * Returns the element of loading bar.\n * @ko 로딩 바의 element를 반환한다.\n * @param {Boolean} [isAppend=currentLoadingBar|true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.\n * @return {Element} The element of loading bar. 로딩 바의 element\n */\n\n\n\tInfiniteGrid.prototype.getLoadingBar = function getLoadingBar() {\n\t\tvar isAppend = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._getLoadingStatus() !== _consts.LOADING_PREPEND;\n\n\t\treturn this._loadingBar[isAppend ? \"append\" : \"prepend\"];\n\t};\n\t/**\n * Start loading for append/prepend during loading data.\n * @ko 데이터가 로딩되는 동안 append/prepend하길 위해 로딩을 시작한다.\n * @param {Boolean} [isAppend=true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.\n * @param {Object} [userStyle = {display: \"block\"}] custom style to apply to this loading bar for start. 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일 \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.startLoading = function startLoading(isAppend) {\n\t\tvar userStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { display: \"block\" };\n\n\t\tif (this._isLoading()) {\n\t\t\treturn this;\n\t\t}\n\t\tvar type = isAppend ? \"append\" : \"prepend\";\n\n\t\tthis._process(isAppend ? _consts.LOADING_APPEND : _consts.LOADING_PREPEND);\n\t\tif (!this._loadingBar[type]) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._renderLoading(userStyle);\n\t\tthis._status.loadingStyle = userStyle;\n\t\tif (!isAppend) {\n\t\t\tthis._fit(\"before\");\n\t\t} else {\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") + this._status.loadingSize);\n\t\t}\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._renderLoading = function _renderLoading() {\n\t\tvar _extends2;\n\n\t\tvar userStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._status.loadingStyle;\n\n\t\tif (!this._isLoading()) {\n\t\t\treturn;\n\t\t}\n\t\tvar isAppend = this._getLoadingStatus() === _consts.LOADING_APPEND;\n\t\tvar el = this._loadingBar[isAppend ? \"append\" : \"prepend\"];\n\n\t\tif (!el) {\n\t\t\treturn;\n\t\t}\n\t\tthis._status.loadingSize = this._isVertical ? (0, _utils.innerHeight)(el) : (0, _utils.innerWidth)(el);\n\t\tvar pos = isAppend ? this._getEdgeValue(\"end\") : this._getEdgeValue(\"start\") - this._status.loadingSize;\n\t\tvar style = _extends((_extends2 = {\n\t\t\tposition: \"absolute\"\n\t\t}, _extends2[this._isVertical ? \"top\" : \"left\"] = pos + \"px\", _extends2), userStyle);\n\n\t\tfor (var property in style) {\n\t\t\tel.style[property] = style[property];\n\t\t}\n\t};\n\t/**\n * End loading after startLoading() for append/prepend\n * @ko append/prepend하길 위해 startLoading() 호출해선 걸었던 로딩을 끝낸다.\n * @param {Object} [userStyle = {display: \"none\"}] custom style to apply to this loading bar for end 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일 \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.endLoading = function endLoading() {\n\t\tvar _extends3;\n\n\t\tvar userStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { display: \"none\" };\n\n\t\tif (!this._isLoading()) {\n\t\t\treturn this;\n\t\t}\n\t\tvar isAppend = this._getLoadingStatus() === _consts.LOADING_APPEND;\n\t\tvar type = isAppend ? \"append\" : \"prepend\";\n\t\tvar el = this._loadingBar[type];\n\t\tvar size = this._status.loadingSize;\n\n\t\tthis._process(_consts.LOADING_APPEND | _consts.LOADING_PREPEND, false);\n\t\tthis._status.loadingSize = 0;\n\t\tthis._status.loadingStyle = {};\n\t\tif (!el) {\n\t\t\treturn this;\n\t\t}\n\t\tvar style = _extends((_extends3 = {}, _extends3[this._isVertical ? \"top\" : \"left\"] = -size + \"px\", _extends3), userStyle);\n\n\t\tfor (var property in style) {\n\t\t\tel.style[property] = style[property];\n\t\t}\n\t\tif (!isAppend) {\n\t\t\tthis._renderer.scrollBy(-size);\n\t\t\tthis._watcher.setScrollPos();\n\t\t\tthis._items.fit(size, this._isVertical);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\"));\n\t\t}\n\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\"));\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._postLayout = function _postLayout(fromCache, items, isAppend, isTrusted) {\n\t\tvar _this3 = this;\n\n\t\tvar outline = this._items.getOutline(isAppend ? this._status.endCursor : this._status.startCursor, isAppend ? \"end\" : \"start\");\n\n\t\tvar fromRelayout = false;\n\n\t\tif (fromCache) {\n\t\t\tvar cacheOutline = this._items.getOutline(isAppend ? this._status.endCursor + 1 : this._status.startCursor - 1, isAppend ? \"start\" : \"end\");\n\n\t\t\tfromRelayout = outline.length === cacheOutline.length ? !outline.every(function (v, index) {\n\t\t\t\treturn v === cacheOutline[index];\n\t\t\t}) : true;\n\n\t\t\tif (!fromRelayout) {\n\t\t\t\tthis._renderer.createAndInsert(items, isAppend);\n\t\t\t\tthis._updateCursor(isAppend);\n\t\t\t\tthis._onLayoutComplete(items, isAppend, isTrusted);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\t\tthis._process(_consts.PROCESSING);\n\t\tvar method = isAppend ? \"append\" : \"prepend\";\n\n\t\tfromCache && _DOMRenderer2[\"default\"].createElements(items);\n\t\tthis._renderer[method](items);\n\t\t// check image sizes after elements are attated on DOM\n\t\t_ImageLoaded2[\"default\"].check(items.map(function (item) {\n\t\t\treturn item.el;\n\t\t}), function () {\n\t\t\tvar layouted = _this3._layout[method](_this3._renderer.updateSize(items), outline);\n\n\t\t\tif (fromCache) {\n\t\t\t\t_this3._setItems(layouted);\n\t\t\t} else {\n\t\t\t\t_this3._insertItems(layouted, isAppend);\n\t\t\t}\n\t\t\t_this3._updateCursor(isAppend);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(layouted.items);\n\t\t\t_this3._onLayoutComplete(layouted.items, isAppend, isTrusted);\n\t\t});\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._isVisible = function _isVisible(index) {\n\t\tvar min = Math.min.apply(Math, this._items.getOutline(index, \"start\"));\n\t\tvar max = Math.max.apply(Math, this._items.getOutline(index, \"end\"));\n\t\tvar pos = this._watcher.getScrollPos();\n\t\tvar viewSize = this._renderer.getViewSize();\n\n\t\tif (pos + viewSize + this.options.threshold < min) {\n\t\t\treturn -1;\n\t\t} else if (pos - this.options.threshold > max) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t};\n\n\tInfiniteGrid.prototype._updateCursor = function _updateCursor(isAppend) {\n\t\tif (this.options.useRecycle) {\n\t\t\tif (isAppend) {\n\t\t\t\tthis._status.endCursor++;\n\t\t\t} else if (this._status.startCursor > 0) {\n\t\t\t\tthis._status.startCursor--;\n\t\t\t} else {\n\t\t\t\tthis._status.endCursor++; // outside prepend\n\t\t\t}\n\t\t\tif (this._status.startCursor < 0) {\n\t\t\t\tthis._status.startCursor = 0;\n\t\t\t}\n\t\t} else {\n\t\t\tthis._status.startCursor = 0;\n\t\t\tthis._status.endCursor = this._items.size() - 1;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._setItems = function _setItems(layouted) {\n\t\tvar groupKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : layouted.items && layouted.items[0].groupKey || 0;\n\n\t\tlayouted.groupKey = groupKey;\n\t\tthis._items.set(layouted, groupKey);\n\t};\n\n\tInfiniteGrid.prototype._insertItems = function _insertItems(layouted, isAppend) {\n\t\tlayouted.groupKey = layouted.items[0].groupKey;\n\t\tthis._items[isAppend ? \"append\" : \"prepend\"](layouted);\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._requestAppend = function _requestAppend() {\n\t\tvar items = this._getNextItems(_consts.APPEND);\n\n\t\tif (this._isProcessing()) {\n\t\t\treturn;\n\t\t}\n\t\tif (items.length) {\n\t\t\tthis._postLayout(_consts.CACHE, items, _consts.APPEND, _consts.TRUSTED);\n\t\t} else {\n\t\t\t/**\n * This event is fired when a card element must be added at the bottom or right of a layout because there is no card to be displayed on screen when a user scrolls near bottom or right.\n * @ko 카드 엘리먼트가 레이아웃의 아래나 오른쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 아래나 오른쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다\n * @event eg.InfiniteGrid#append\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 마지막 그룹의 그룹키\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\t\tthis.trigger(\"append\", {\n\t\t\t\tisTrusted: true,\n\t\t\t\tgroupKey: this.getGroupKeys().pop()\n\t\t\t});\n\t\t}\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._requestPrepend = function _requestPrepend() {\n\t\tvar items = this._getNextItems(_consts.PREPEND);\n\n\t\tif (this._isProcessing()) {\n\t\t\treturn;\n\t\t}\n\t\tif (items.length) {\n\t\t\tthis._postLayout(_consts.CACHE, items, _consts.PREPEND, _consts.TRUSTED);\n\t\t} else {\n\t\t\t/**\n * This event is fired when a card element must be added at the top or left of a layout because there is no card to be displayed on screen when a user scrolls near top or left.\n * @ko 카드가 레이아웃의 위나 왼쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 위나 왼쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다.\n * @event eg.InfiniteGrid#prepend\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 첫번째 그룹의 그룹키\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\t\tthis.trigger(\"prepend\", {\n\t\t\t\tisTrusted: true,\n\t\t\t\tgroupKey: this.getGroupKeys().shift()\n\t\t\t});\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._onCheck = function _onCheck(_ref) {\n\t\tvar isForward = _ref.isForward,\n\t\t scrollPos = _ref.scrollPos,\n\t\t horizontal = _ref.horizontal,\n\t\t orgScrollPos = _ref.orgScrollPos;\n\n\t\t/**\n * This event is fired when the user scrolls.\n * @ko 사용자가 스크롤 할 경우 발생하는 이벤트.\n * @event eg.InfiniteGrid#change\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {Boolean} param.isForward Indicates whether the scroll progression direction is forward or backword. 스크롤 진행방향이 앞쪽으로 진행하는 지, 뒤쪽으로 진행하는지를 나타낸다.\n * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값\n * @param {Boolean} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n * @param {Boolean} options.horizontal Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향\n */\n\t\tthis.trigger(\"change\", {\n\t\t\tisForward: isForward,\n\t\t\thorizontal: horizontal,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: orgScrollPos\n\t\t});\n\t\tvar rect = this._getEdgeOffset(isForward ? \"end\" : \"start\");\n\t\tvar isProcessing = this.isProcessing();\n\n\t\tif (!rect) {\n\t\t\treturn;\n\t\t}\n\t\tvar targetPos = isForward ? rect[horizontal ? \"left\" : \"top\"] - this._renderer.getViewSize() : rect[horizontal ? \"right\" : \"bottom\"];\n\n\t\tif (!isProcessing && isForward) {\n\t\t\tif (scrollPos >= targetPos) {\n\t\t\t\tthis._requestAppend();\n\t\t\t}\n\t\t} else if (scrollPos <= targetPos) {\n\t\t\tthis._fit(\"before\");\n\t\t\tthis._requestPrepend();\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._onLayoutComplete = function _onLayoutComplete(items, isAppend) {\n\t\tvar isTrusted = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\t\tvar useRecycle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.options.useRecycle;\n\n\t\tthis._isLoading() && this._renderLoading();\n\t\t!isAppend && this._fit(\"after\");\n\t\tuseRecycle && this._recycle(isAppend);\n\n\t\tvar size = this._getEdgeValue(\"end\");\n\n\t\t// recycle after _fit beacause prepend and append are occured simultaneously by scroll.\n\t\tthis._updateEdge();\n\n\t\tisAppend && this._renderer.setContainerSize(size + this._status.loadingSize || 0);\n\t\tthis._process(_consts.PROCESSING, false);\n\n\t\tvar scrollPos = this._watcher.getScrollPos();\n\n\t\t/**\n * This event is fired when layout is successfully arranged through a call to the append(), prepend(), or layout() method.\n * @ko 레이아웃 배치가 완료됐을 때 발생하는 이벤트. append() 메서드나 prepend() 메서드, layout() 메서드 호출 후 카드의 배치가 완료됐을 때 발생한다\n * @event eg.InfiniteGrid#layoutComplete\n *\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {Array} param.target Rearranged card elements재배치된 카드 엘리먼트들\n * @param {Boolean} param.isAppend Checks whether the append() method is used to add a card element. It returns true even though the layoutComplete event is fired after the layout() method is called. 카드 엘리먼트가 append() 메서드로 추가됐는지 확인한다. layout() 메서드가 호출된 후 layoutComplete 이벤트가 발생해도 'true'를 반환한다.\n * @param {Boolean} param.isScroll Checks whether scrolling has occurred after the append(), prepend(), ..., etc method is called\n * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값\n * @param {Number} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값\n * @param {Number} param.size The size of container element 컨테이너 엘리먼트의 크기\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\tthis.trigger(\"layoutComplete\", {\n\t\t\ttarget: items.concat(),\n\t\t\tisAppend: isAppend,\n\t\t\tisTrusted: isTrusted,\n\t\t\tisScroll: this._renderer.getViewSize() < this._renderer.getContainerOffset() + size,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: this._watcher.getOrgScrollPos(),\n\t\t\tsize: size\n\t\t});\n\n\t\tif (isAppend && scrollPos >= size) {\n\t\t\tthis._requestAppend();\n\t\t} else if (!isAppend && scrollPos <= this._getEdgeValue(\"start\")) {\n\t\t\tthis._fit(\"before\");\n\t\t\tthis._requestPrepend();\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._reset = function _reset() {\n\t\tthis._status = {\n\t\t\tprocessingStatus: _consts.IDLE,\n\t\t\tloadingSize: 0,\n\t\t\tstartCursor: -1,\n\t\t\tendCursor: -1,\n\t\t\tstart: null,\n\t\t\tend: null\n\t\t};\n\t};\n\t/**\n * Destroys elements, properties, and events used on a grid layout.\n * @ko 그리드 레이아웃에 사용한 엘리먼트와 속성, 이벤트를 해제한다\n */\n\n\n\tInfiniteGrid.prototype.destroy = function destroy() {\n\t\tthis.off();\n\t\tthis._watcher.destroy();\n\t\tthis._reset();\n\t\tthis._items.clear();\n\t\tthis._renderer.destroy();\n\t};\n\n\treturn InfiniteGrid;\n}(_component2[\"default\"]);\n\nInfiniteGrid.VERSION = \"3.0.0-rc\";\n\nexports[\"default\"] = InfiniteGrid;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/InfiniteGrid.js\n// module id = 6\n// module chunks = 0 1","/*!\n * Copyright (c) 2017 NAVER Corp.\r\n * @egjs/component project is licensed under the MIT license\r\n * \r\n * @egjs/component JavaScript library\r\n * http://naver.github.io/egjs/component\r\n * \r\n * @version 2.1.0\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Component\"] = factory();\n\telse\n\t\troot[\"eg\"] = root[\"eg\"] || {}, root[\"eg\"][\"Component\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _Component = __webpack_require__(1);\n\nvar _Component2 = _interopRequireDefault(_Component);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n_Component2[\"default\"].VERSION = \"2.1.0\";\nmodule.exports = _Component2[\"default\"];\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\n/**\n * A class used to manage events and options in a component\n * @ko 컴포넌트의 이벤트와 옵션을 관리할 수 있게 하는 클래스\n * @alias eg.Component\n */\nvar Component = function () {\n\t/**\n * @support {\"ie\": \"7+\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"2.1+ (except 3.x)\"}\n */\n\tfunction Component() {\n\t\t_classCallCheck(this, Component);\n\n\t\tthis._eventHandler = {};\n\t\tthis.options = {};\n\t}\n\t/**\n * Triggers a custom event.\n * @ko 커스텀 이벤트를 발생시킨다\n * @param {String} eventName The name of the custom event to be triggered 발생할 커스텀 이벤트의 이름\n * @param {Object} customEvent Event data to be sent when triggering a custom event 커스텀 이벤트가 발생할 때 전달할 데이터\n * @return {Boolean} Indicates whether the event has occurred. If the stop() method is called by a custom event handler, it will return false and prevent the event from occurring. Ref 이벤트 발생 여부. 커스텀 이벤트 핸들러에서 stop() 메서드를 호출하면 'false'를 반환하고 이벤트 발생을 중단한다. 참고\n * @example\n class Some extends eg.Component {\n some(){\n \tif(this.trigger(\"beforeHi\")){ // When event call to stop return false.\n \tthis.trigger(\"hi\");// fire hi event.\n \t}\n }\n }\n const some = new Some();\n some.on(\"beforeHi\", (e) => {\n if(condition){\n \te.stop(); // When event call to stop, `hi` event not call.\n }\n });\n some.on(\"hi\", (e) => {\n // `currentTarget` is component instance.\n console.log(some === e.currentTarget); // true\n });\n // If you want to more know event design. You can see article.\n // https://github.com/naver/egjs-component/wiki/How-to-make-Component-event-design%3F\n */\n\n\n\tComponent.prototype.trigger = function trigger(eventName) {\n\t\tvar customEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tvar handlerList = this._eventHandler[eventName] || [];\n\t\tvar hasHandlerList = handlerList.length > 0;\n\n\t\tif (!hasHandlerList) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If detach method call in handler in first time then handeler list calls.\n\t\thandlerList = handlerList.concat();\n\n\t\tcustomEvent.eventType = eventName;\n\n\t\tvar isCanceled = false;\n\t\tvar arg = [customEvent];\n\t\tvar i = 0;\n\n\t\tcustomEvent.stop = function () {\n\t\t\tisCanceled = true;\n\t\t};\n\t\tcustomEvent.currentTarget = this;\n\n\t\tfor (var _len = arguments.length, restParam = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n\t\t\trestParam[_key - 2] = arguments[_key];\n\t\t}\n\n\t\tif (restParam.length >= 1) {\n\t\t\targ = arg.concat(restParam);\n\t\t}\n\n\t\tfor (i = 0; handlerList[i]; i++) {\n\t\t\thandlerList[i].apply(this, arg);\n\t\t}\n\n\t\treturn !isCanceled;\n\t};\n\t/**\n * Executed event just one time.\n * @ko 이벤트가 한번만 실행된다.\n * @param {eventName} eventName The name of the event to be attached 등록할 이벤트의 이름\n * @param {Function} handlerToAttach The handler function of the event to be attached 등록할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n alert(\"hi\");\n }\n thing() {\n this.once(\"hi\", this.hi);\n }\n }\n var some = new Some();\n some.thing();\n some.trigger(\"hi\");\n // fire alert(\"hi\");\n some.trigger(\"hi\");\n // Nothing happens\n */\n\n\n\tComponent.prototype.once = function once(eventName, handlerToAttach) {\n\t\tif ((typeof eventName === \"undefined\" ? \"undefined\" : _typeof(eventName)) === \"object\" && typeof handlerToAttach === \"undefined\") {\n\t\t\tvar eventHash = eventName;\n\t\t\tvar i = void 0;\n\n\t\t\tfor (i in eventHash) {\n\t\t\t\tthis.once(i, eventHash[i]);\n\t\t\t}\n\t\t\treturn this;\n\t\t} else if (typeof eventName === \"string\" && typeof handlerToAttach === \"function\") {\n\t\t\tvar self = this;\n\n\t\t\tthis.on(eventName, function listener() {\n\t\t\t\tfor (var _len2 = arguments.length, arg = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t\t\t\t\targ[_key2] = arguments[_key2];\n\t\t\t\t}\n\n\t\t\t\thandlerToAttach.apply(self, arg);\n\t\t\t\tself.off(eventName, listener);\n\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t};\n\n\t/**\n * Checks whether an event has been attached to a component.\n * @ko 컴포넌트에 이벤트가 등록됐는지 확인한다.\n * @param {String} eventName The name of the event to be attached 등록 여부를 확인할 이벤트의 이름\n * @return {Boolean} Indicates whether the event is attached. 이벤트 등록 여부\n * @example\n class Some extends eg.Component {\n some() {\n this.hasOn(\"hi\");// check hi event.\n }\n }\n */\n\n\n\tComponent.prototype.hasOn = function hasOn(eventName) {\n\t\treturn !!this._eventHandler[eventName];\n\t};\n\n\t/**\n * Attaches an event to a component.\n * @ko 컴포넌트에 이벤트를 등록한다.\n * @param {eventName} eventName The name of the event to be attached 등록할 이벤트의 이름\n * @param {Function} handlerToAttach The handler function of the event to be attached 등록할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n console.log(\"hi\");\n }\n some() {\n this.on(\"hi\",this.hi); //attach event\n }\n }\n */\n\n\n\tComponent.prototype.on = function on(eventName, handlerToAttach) {\n\t\tif ((typeof eventName === \"undefined\" ? \"undefined\" : _typeof(eventName)) === \"object\" && typeof handlerToAttach === \"undefined\") {\n\t\t\tvar eventHash = eventName;\n\t\t\tvar name = void 0;\n\n\t\t\tfor (name in eventHash) {\n\t\t\t\tthis.on(name, eventHash[name]);\n\t\t\t}\n\t\t\treturn this;\n\t\t} else if (typeof eventName === \"string\" && typeof handlerToAttach === \"function\") {\n\t\t\tvar handlerList = this._eventHandler[eventName];\n\n\t\t\tif (typeof handlerList === \"undefined\") {\n\t\t\t\tthis._eventHandler[eventName] = [];\n\t\t\t\thandlerList = this._eventHandler[eventName];\n\t\t\t}\n\n\t\t\thandlerList.push(handlerToAttach);\n\t\t}\n\n\t\treturn this;\n\t};\n\t/**\n * Detaches an event from the component.\n * @ko 컴포넌트에 등록된 이벤트를 해제한다\n * @param {eventName} eventName The name of the event to be detached 해제할 이벤트의 이름\n * @param {Function} handlerToDetach The handler function of the event to be detached 해제할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself 컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n console.log(\"hi\");\n }\n some() {\n this.off(\"hi\",this.hi); //detach event\n }\n }\n */\n\n\n\tComponent.prototype.off = function off(eventName, handlerToDetach) {\n\t\t// All event detach.\n\t\tif (typeof eventName === \"undefined\") {\n\t\t\tthis._eventHandler = {};\n\t\t\treturn this;\n\t\t}\n\n\t\t// All handler of specific event detach.\n\t\tif (typeof handlerToDetach === \"undefined\") {\n\t\t\tif (typeof eventName === \"string\") {\n\t\t\t\tthis._eventHandler[eventName] = undefined;\n\t\t\t\treturn this;\n\t\t\t} else {\n\t\t\t\tvar eventHash = eventName;\n\t\t\t\tvar name = void 0;\n\n\t\t\t\tfor (name in eventHash) {\n\t\t\t\t\tthis.off(name, eventHash[name]);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\n\t\t// The handler of specific event detach.\n\t\tvar handlerList = this._eventHandler[eventName];\n\n\t\tif (handlerList) {\n\t\t\tvar k = void 0;\n\t\t\tvar handlerFunction = void 0;\n\n\t\t\tfor (k = 0; (handlerFunction = handlerList[k]) !== undefined; k++) {\n\t\t\t\tif (handlerFunction === handlerToDetach) {\n\t\t\t\t\thandlerList = handlerList.splice(k, 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t};\n\n\treturn Component;\n}();\n\nexports[\"default\"] = Component;\nmodule.exports = exports[\"default\"];\n\n/***/ })\n/******/ ]);\n});\n//# sourceMappingURL=component.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@egjs/component/dist/component.js\n// module id = 7\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"./consts\");\n\nvar _DOMRenderer = require(\"./DOMRenderer\");\n\nvar _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ItemManager = function () {\n\tItemManager.from = function from(elements, selector, _ref) {\n\t\tvar groupKey = _ref.groupKey,\n\t\t isAppend = _ref.isAppend;\n\n\t\tvar filted = ItemManager.selectItems((0, _utils.$)(elements, _consts.MULTI), selector);\n\n\t\t// Item Structure\n\t\treturn (0, _utils.toArray)(filted).map(function (el) {\n\t\t\treturn {\n\t\t\t\tel: el,\n\t\t\t\tgroupKey: groupKey,\n\t\t\t\tcontent: el.outerHTML\n\t\t\t};\n\t\t});\n\t};\n\n\tItemManager.selectItems = function selectItems(elements, selector) {\n\t\treturn elements.filter(function (v) {\n\t\t\tvar classNames = v.className.split(\" \");\n\n\t\t\tif (classNames.some(function (c) {\n\t\t\t\treturn c === _consts.IGNORE_CLASSNAME;\n\t\t\t})) {\n\t\t\t\treturn false;\n\t\t\t} else if (selector === \"*\") {\n\t\t\t\treturn v;\n\t\t\t} else {\n\t\t\t\treturn classNames.some(function (c) {\n\t\t\t\t\treturn c === selector;\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\tItemManager.pluck = function pluck(data, property) {\n\t\treturn data.reduce(function (acc, v) {\n\t\t\treturn acc.concat(v[property]);\n\t\t}, []);\n\t};\n\n\tfunction ItemManager() {\n\t\t_classCallCheck(this, ItemManager);\n\n\t\tthis.clear();\n\t}\n\n\tItemManager.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\t_data: this._data.map(function (data) {\n\t\t\t\tvar items = data.items.map(function (item) {\n\t\t\t\t\tvar item2 = _extends({}, item);\n\n\t\t\t\t\tdelete item2.el;\n\t\t\t\t\treturn item2;\n\t\t\t\t});\n\t\t\t\tvar data2 = _extends({}, data);\n\n\t\t\t\tdata2.items = items;\n\t\t\t\treturn data2;\n\t\t\t})\n\t\t};\n\t};\n\n\tItemManager.prototype.setStatus = function setStatus(status, start, end) {\n\t\tvar data = status._data;\n\n\t\tfor (var i = start; i <= end; i++) {\n\t\t\tdata[i].items = _DOMRenderer2[\"default\"].createElements(data[i].items);\n\t\t}\n\t\tthis.set(data);\n\t};\n\n\tItemManager.prototype.size = function size() {\n\t\treturn this._data.length;\n\t};\n\n\tItemManager.prototype.fit = function fit(base, isVertical) {\n\t\tif (!this._data.length) {\n\t\t\treturn;\n\t\t}\n\t\tvar property = isVertical ? \"top\" : \"left\";\n\n\t\tif (base !== 0) {\n\t\t\tthis._data = this._data.map(function (v) {\n\t\t\t\tv.items = v.items.map(function (item) {\n\t\t\t\t\titem.rect[property] -= base;\n\t\t\t\t\treturn item;\n\t\t\t\t});\n\t\t\t\tv.outlines.start = v.outlines.start.map(function (start) {\n\t\t\t\t\treturn start - base;\n\t\t\t\t});\n\t\t\t\tv.outlines.end = v.outlines.end.map(function (end) {\n\t\t\t\t\treturn end - base;\n\t\t\t\t});\n\t\t\t\treturn v;\n\t\t\t});\n\t\t}\n\t};\n\n\tItemManager.prototype.pluck = function pluck(property, start, end) {\n\t\tif (typeof start !== \"undefined\") {\n\t\t\tif (typeof end !== \"undefined\") {\n\t\t\t\treturn ItemManager.pluck(this._data.slice(start, end + 1), property);\n\t\t\t} else {\n\t\t\t\treturn ItemManager.pluck(this._data.slice(start, start + 1), property);\n\t\t\t}\n\t\t} else {\n\t\t\treturn ItemManager.pluck(this._data, property);\n\t\t}\n\t};\n\n\tItemManager.prototype.getOutline = function getOutline(index, property) {\n\t\tif (this._data.length) {\n\t\t\treturn this._data[index].outlines[property];\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t};\n\n\tItemManager.prototype.getEdgeIndex = function getEdgeIndex(cursor, start, end) {\n\t\tvar prop = cursor === \"start\" ? \"min\" : \"max\";\n\t\tvar index = -1;\n\t\tvar targetValue = cursor === \"start\" ? Infinity : -Infinity;\n\n\t\tfor (var i = start; i <= end; i++) {\n\t\t\tvar value = Math[prop].apply(Math, this.getOutline(i, cursor));\n\n\t\t\tif (cursor === \"start\" && targetValue > value || cursor === \"end\" && targetValue < value) {\n\t\t\t\ttargetValue = value;\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t};\n\n\tItemManager.prototype.getEdge = function getEdge(cursor, start, end) {\n\t\tvar dataIdx = this.getEdgeIndex(cursor, start, end);\n\t\tvar items = this.pluck(\"items\", dataIdx);\n\n\t\tif (items.length) {\n\t\t\tvar itemIdx = this.getOutline(dataIdx, cursor + \"Index\");\n\n\t\t\treturn items.length > itemIdx ? items[itemIdx] : null;\n\t\t}\n\t\treturn null;\n\t};\n\n\tItemManager.prototype.getEdgeValue = function getEdgeValue(cursor, start, end) {\n\t\tvar outlines = this.pluck(\"outlines\", this.getEdgeIndex(cursor, start, end)).reduce(function (acc, v) {\n\t\t\treturn acc.concat(v[cursor]);\n\t\t}, []);\n\n\t\treturn outlines.length ? Math[cursor === \"start\" ? \"min\" : \"max\"].apply(Math, outlines) : 0;\n\t};\n\n\tItemManager.prototype.append = function append(layouted) {\n\t\tthis._data.push(layouted);\n\t\treturn layouted.items;\n\t};\n\n\tItemManager.prototype.prepend = function prepend(layouted) {\n\t\tthis._data.unshift(layouted);\n\t\treturn layouted.items;\n\t};\n\n\tItemManager.prototype.clear = function clear() {\n\t\tthis._data = [];\n\t};\n\n\tItemManager.prototype.remove = function remove(element, start, end) {\n\t\tvar items = null;\n\t\tvar key = element.getAttribute(_consts.GROUPKEY_ATT);\n\t\tvar data = this.get(start, end).filter(function (v) {\n\t\t\treturn String(v.groupKey) === key;\n\t\t});\n\n\t\tif (!data.length) {\n\t\t\treturn items;\n\t\t}\n\t\tdata = data[0];\n\n\t\tvar len = data.items.length;\n\t\tvar idx = -1;\n\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tif (data.items[i].el === element) {\n\t\t\t\tidx = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (~idx) {\n\t\t\t// remove item information\n\t\t\tdata.items.splice(idx, 1);\n\t\t\tthis.set(data, key);\n\t\t\titems = data.items;\n\t\t}\n\t\treturn items;\n\t};\n\n\tItemManager.prototype.get = function get(start, end) {\n\t\tif (typeof start !== \"undefined\") {\n\t\t\tif (typeof end !== \"undefined\") {\n\t\t\t\treturn this._data.slice(start, end + 1);\n\t\t\t} else {\n\t\t\t\treturn this._data.slice(start, start + 1);\n\t\t\t}\n\t\t} else {\n\t\t\treturn this._data.concat();\n\t\t}\n\t};\n\n\tItemManager.prototype.set = function set(data, key) {\n\t\tif (typeof key !== \"undefined\" && !Array.isArray(data)) {\n\t\t\tvar len = this._data.length;\n\t\t\tvar idx = -1;\n\n\t\t\tfor (var i = 0; i < len; i++) {\n\t\t\t\tif (this._data[i].groupKey === key) {\n\t\t\t\t\tidx = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t~idx && (this._data[idx] = data);\n\t\t} else {\n\t\t\tthis._data = data.concat();\n\t\t}\n\t};\n\n\treturn ItemManager;\n}();\n\nexports[\"default\"] = ItemManager;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/ItemManager.js\n// module id = 8\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ImageLoaded = function () {\n\tfunction ImageLoaded() {\n\t\t_classCallCheck(this, ImageLoaded);\n\t}\n\n\tImageLoaded.waitImageLoaded = function waitImageLoaded(needCheck, callback) {\n\t\tvar checkCount = needCheck.length;\n\t\tvar checkImage = function checkImage() {\n\t\t\tcheckCount--;\n\t\t\tcheckCount <= 0 && callback && callback();\n\t\t};\n\t\tvar onCheck = function onCheck(e) {\n\t\t\t(0, _utils.removeEvent)(e.target || e.srcElement, \"load\", onCheck);\n\t\t\t(0, _utils.removeEvent)(e.target || e.srcElement, \"error\", onCheck);\n\t\t\tcheckImage();\n\t\t};\n\n\t\t// workaround for IE\n\t\t_consts.IS_IE && needCheck.forEach(function (v) {\n\t\t\treturn v.setAttribute(\"src\", v.getAttribute(\"src\"));\n\t\t});\n\t\tneedCheck.forEach(function (v) {\n\t\t\tif (v.complete) {\n\t\t\t\tcheckImage();\n\t\t\t} else {\n\t\t\t\t(0, _utils.addEvent)(v, \"load\", onCheck);\n\t\t\t\t(0, _utils.addEvent)(v, \"error\", onCheck);\n\t\t\t}\n\t\t});\n\t};\n\n\tImageLoaded.checkImageLoaded = function checkImageLoaded(el) {\n\t\tif (el.tagName === \"IMG\") {\n\t\t\treturn !el.complete ? [el] : [];\n\t\t} else {\n\t\t\treturn (0, _utils.toArray)(el.querySelectorAll(\"img\")).filter(function (v) {\n\t\t\t\tif (v.nodeType && [1, 9, 11].indexOf(v.nodeType) !== -1) {\n\t\t\t\t\treturn !v.complete;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\tImageLoaded.check = function check(elements, callback) {\n\t\tvar _this = this;\n\n\t\tvar needCheck = elements.reduce(function (acc, v) {\n\t\t\treturn acc.concat(_this.checkImageLoaded(v));\n\t\t}, []);\n\n\t\tif (needCheck.length > 0) {\n\t\t\tImageLoaded.waitImageLoaded(needCheck, callback);\n\t\t} else {\n\t\t\t// convert to async\n\t\t\tsetTimeout(function () {\n\t\t\t\tcallback && callback();\n\t\t\t}, 0);\n\t\t}\n\t};\n\n\treturn ImageLoaded;\n}();\n\nexports[\"default\"] = ImageLoaded;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/ImageLoaded.js\n// module id = 9\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Watcher = function () {\n\tfunction Watcher(renderer, callback) {\n\t\t_classCallCheck(this, Watcher);\n\n\t\t_extends(this._callback = {\n\t\t\tlayout: null,\n\t\t\tcheck: null\n\t\t}, callback);\n\t\tthis._timer = {\n\t\t\tresize: null\n\t\t\t// doubleCheck: null,\n\t\t\t// doubleCheckCount: RETRY,\n\t\t};\n\t\tthis.reset();\n\t\tthis._renderer = renderer;\n\t\tthis._onCheck = this._onCheck.bind(this);\n\t\tthis._onResize = this._onResize.bind(this);\n\t\tthis.attachEvent();\n\t\tthis.setScrollPos();\n\t}\n\n\tWatcher.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\t_prevPos: this._prevPos,\n\t\t\tscrollPos: this.getOrgScrollPos()\n\t\t};\n\t};\n\n\tWatcher.prototype.setStatus = function setStatus(status) {\n\t\tvar applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tthis._prevPos = status._prevPos;\n\t\tapplyScrollPos && this.scrollTo(status.scrollPos);\n\t};\n\n\tWatcher.prototype.scrollTo = function scrollTo(pos) {\n\t\tvar arrPos = this._renderer.options.isVertical ? [0, pos] : [pos, 0];\n\n\t\t_utils.scrollTo.apply(undefined, [this._renderer.view].concat(arrPos));\n\t};\n\n\tWatcher.prototype.getScrollPos = function getScrollPos() {\n\t\treturn this._prevPos;\n\t};\n\n\tWatcher.prototype.setScrollPos = function setScrollPos(pos) {\n\t\tvar rawPos = pos;\n\n\t\tif (typeof pos === \"undefined\") {\n\t\t\trawPos = this.getOrgScrollPos();\n\t\t}\n\t\tthis._prevPos = rawPos - this._renderer.getContainerOffset();\n\t};\n\n\tWatcher.prototype.attachEvent = function attachEvent() {\n\t\t(0, _utils.addEvent)(this._renderer.view, \"scroll\", this._onCheck);\n\t\t(0, _utils.addEvent)(window, \"resize\", this._onResize);\n\t};\n\n\tWatcher.prototype.getOrgScrollPos = function getOrgScrollPos() {\n\t\treturn (0, _utils.scroll)(this._renderer.view, this._renderer.options.isVertical);\n\t};\n\n\tWatcher.prototype.reset = function reset() {\n\t\tthis._prevPos = null;\n\t};\n\n\tWatcher.prototype._onCheck = function _onCheck() {\n\t\tvar prevPos = this.getScrollPos();\n\t\tvar orgScrollPos = this.getOrgScrollPos();\n\n\t\tthis.setScrollPos(orgScrollPos);\n\t\tvar scrollPos = this.getScrollPos();\n\n\t\tif (prevPos === null || _consts.IS_IOS && orgScrollPos === 0 || prevPos === scrollPos) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._callback.check && this._callback.check({\n\t\t\tisForward: prevPos < scrollPos,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: orgScrollPos,\n\t\t\thorizontal: !this._renderer.options.isVertical\n\t\t});\n\t};\n\n\tWatcher.prototype._onResize = function _onResize() {\n\t\tvar _this = this;\n\n\t\tif (this._timer.resize) {\n\t\t\tclearTimeout(this._timer.resize);\n\t\t}\n\t\tthis._timer.resize = setTimeout(function () {\n\t\t\t_this._renderer.isNeededResize() && _this._callback.layout && _this._callback.layout();\n\t\t\t_this._timer.resize = null;\n\t\t\t_this.reset();\n\t\t}, 100);\n\t};\n\n\tWatcher.prototype.detachEvent = function detachEvent() {\n\t\t(0, _utils.removeEvent)(window, \"resize\", this._onResize);\n\t};\n\n\tWatcher.prototype.destroy = function destroy() {\n\t\tthis.detachEvent();\n\t\tthis.reset();\n\t};\n\n\treturn Watcher;\n}();\n\nexports[\"default\"] = Watcher;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Watcher.js\n// module id = 10\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// ALIGN\nvar START = _consts.ALIGN.START,\n CENTER = _consts.ALIGN.CENTER,\n END = _consts.ALIGN.END,\n JUSTIFY = _consts.ALIGN.JUSTIFY;\n\n/**\n * @classdesc GridLayout is a layout in which images with the same width are arranged in a staggered arrangement, like a stack of bricks. Adjust the width of all images to the same size, find the lowest height column, and insert a new image.\n * @ko GridLayout는 벽돌을 쌓아 올린 모양처럼 동일한 너비를 가진 이미지가 엇갈려 배열되는 레이아웃이다. 모든 이미지의 너비를 동일한 크기로 조정하고, 가장 높이가 낮은 열을 찾아 새로운 이미지를 삽입한다. 따라서 배치된 이미지 사이에 빈 공간이 생기지는 않지만 배치된 레이아웃의 아래쪽은 울퉁불퉁해진다.\n * @class eg.InfiniteGrid.GridLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.GridLayout module eg.InfiniteGrid.GridLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.align=START] Align of the position of the items (START, CENTER, END, JUSTIFY) 아이템들의 위치의 정렬 (START, CENTER, END, JUSTIFY)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @example\n```\n\n```\n **/\n\nvar GridLayout = function () {\n\tfunction GridLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, GridLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\talign: START,\n\t\t\titemSize: 0\n\t\t}, options);\n\t\tthis._size = 0;\n\t\tthis._columnSize = 0;\n\t\tthis._columnLength = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tGridLayout.prototype.getPoints = function getPoints(outlines) {\n\t\tvar pos = this.options.horizontal ? \"left\" : \"top\";\n\n\t\treturn outlines.map(function (outline) {\n\t\t\treturn outline[pos];\n\t\t});\n\t};\n\n\tGridLayout.prototype.checkColumn = function checkColumn(item) {\n\t\tvar margin = this.options.margin;\n\t\tvar sizeName = this.options.horizontal ? \"height\" : \"width\";\n\t\tvar columnSize = this.options.itemSize || item && item.size[sizeName] || 0;\n\n\t\tthis._columnSize = columnSize;\n\t\tif (!columnSize) {\n\t\t\tthis._columnLength = 1;\n\t\t\treturn;\n\t\t}\n\t\tthis._columnLength = Math.max(parseInt((this._size + margin) / (columnSize + margin), 10), 1);\n\t};\n\n\tGridLayout.prototype._layout = function _layout(items, outline, isAppend) {\n\t\tvar length = items.length;\n\t\tvar margin = this.options.margin;\n\t\tvar align = this.options.align;\n\t\tvar style = this._style;\n\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar columnSize = this._columnSize;\n\t\tvar columnLength = this._columnLength;\n\n\t\tvar size = this._size;\n\t\tvar viewDist = size - (columnSize + margin) * columnLength + margin;\n\n\t\tvar pointCaculateName = isAppend ? \"min\" : \"max\";\n\t\tvar startOutline = outline.slice();\n\t\tvar endOutline = outline.slice();\n\t\tvar startIndex = 0;\n\t\tvar endIndex = -1;\n\t\tvar endPos = -1;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar _item$rect;\n\n\t\t\tvar point = Math[pointCaculateName].apply(Math, endOutline) || 0;\n\t\t\tvar index = endOutline.indexOf(point);\n\t\t\tvar item = items[isAppend ? i : length - 1 - i];\n\t\t\tvar size1 = item.size[size1Name];\n\t\t\tvar size2 = item.size[size2Name];\n\t\t\tvar pos1 = isAppend ? point : point - margin - size1;\n\t\t\tvar endPos1 = pos1 + size1 + margin;\n\n\t\t\tif (index === -1) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\tvar pos2 = (columnSize + margin) * index;\n\n\t\t\t// ALIGN\n\t\t\tif (align === CENTER) {\n\t\t\t\tpos2 += viewDist / 2;\n\t\t\t} else if (align === END) {\n\t\t\t\tpos2 += viewDist + columnSize - size2;\n\t\t\t} else if (align === JUSTIFY) {\n\t\t\t\tif (columnLength <= 1) {\n\t\t\t\t\tpos2 += viewDist / 2;\n\t\t\t\t} else {\n\t\t\t\t\tpos2 = (size - columnSize) / (columnLength - 1) * index;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// tetris\n\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect);\n\t\t\titem.column = index;\n\t\t\tendOutline[index] = isAppend ? endPos1 : pos1;\n\t\t\tif (endIndex === -1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tendPos = endPos1;\n\t\t\t} else if (endPos < endPos1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tendPos = endPos1;\n\t\t\t}\n\t\t}\n\t\tif (!isAppend) {\n\t\t\titems.sort(function (a, b) {\n\t\t\t\tvar item1pos1 = a.rect[pos1Name];\n\t\t\t\tvar item1pos2 = a.rect[pos2Name];\n\t\t\t\tvar item2pos1 = b.rect[pos1Name];\n\t\t\t\tvar item2pos2 = b.rect[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\tendIndex = length - 1;\n\t\t}\n\t\t// if append items, startOutline is low, endOutline is high\n\t\t// if prepend items, startOutline is high, endOutline is low\n\t\treturn {\n\t\t\tstart: isAppend ? startOutline : endOutline,\n\t\t\tend: isAppend ? endOutline : startOutline,\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tGridLayout.prototype._insert = function _insert() {\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar type = arguments[2];\n\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\tvar startOutline = outline;\n\n\t\tif (!this._columnLength) {\n\t\t\tthis.checkColumn(items[0]);\n\t\t}\n\t\tif (outline.length !== this._columnLength) {\n\t\t\tstartOutline = (0, _utils.fill)(this._columnLength, outline.length === 0 ? 0 : Math[type === _consts.APPEND ? \"min\" : \"max\"].apply(Math, outline) || 0);\n\t\t}\n\n\t\tvar result = this._layout(clone, startOutline, type);\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: result\n\t\t};\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.layout = function layout() {\n\t\tvar _this = this;\n\n\t\tvar groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\tvar firstItem = groups.length && groups[0].items.length && groups[0].items[0] || 0;\n\n\t\tthis.checkColumn(firstItem);\n\n\t\t// if outlines' length and columns' length are now same, re-caculate outlines.\n\t\tvar startOutline = void 0;\n\n\t\tif (outline.length !== this._columnLength) {\n\t\t\tvar pos = outline.length === 0 ? 0 : Math.min.apply(Math, outline);\n\n\t\t\t// re-layout items.\n\t\t\tstartOutline = (0, _utils.fill)(this._columnLength, pos);\n\t\t} else {\n\t\t\tstartOutline = outline.slice();\n\t\t}\n\t\tgroups.forEach(function (group) {\n\t\t\tvar items = group.items;\n\t\t\tvar result = _this._layout(items, startOutline, _consts.APPEND);\n\n\t\t\tgroup.outlines = result;\n\t\t\tstartOutline = result.end;\n\t\t});\n\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.GridLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tGridLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\n\treturn GridLayout;\n}();\n\nexports[\"default\"] = GridLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/GridLayout.js\n// module id = 11\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _FrameLayout2 = require(\"./FrameLayout\");\n\nvar _FrameLayout3 = _interopRequireDefault(_FrameLayout2);\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction makeShapeOutline(outline, itemSize, columnLength, isAppend) {\n\tvar point = Math[isAppend ? \"min\" : \"max\"].apply(Math, outline) || 0;\n\n\tif (outline.length !== columnLength) {\n\t\treturn (0, _utils.fill)(columnLength, 0);\n\t}\n\treturn outline.map(function (l) {\n\t\treturn parseInt((l - point) / itemSize, 10);\n\t});\n}\nfunction getColumn(item) {\n\tif (item.column) {\n\t\treturn item.column;\n\t}\n\tvar column = 0;\n\n\tif (item.el) {\n\t\tvar dataset = item.el.dataset;\n\n\t\tif (dataset) {\n\t\t\tcolumn = dataset.column || 1;\n\t\t} else {\n\t\t\tcolumn = item.el.getAttribute(\"column\") || 1;\n\t\t}\n\t} else {\n\t\tcolumn = 1;\n\t}\n\titem.column = column;\n\treturn column;\n}\n\n/**\n * @classdesc FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.\n * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.\n * @class eg.InfiniteGrid.SquareLayout\n * @extends eg.InfiniteGrid.FrameLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.SquareLayout module eg.InfiniteGrid.SquareLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @example\n```\n\n```\n **/\n\nvar SquareLayout = function (_FrameLayout) {\n\t_inherits(SquareLayout, _FrameLayout);\n\n\tfunction SquareLayout() {\n\t\t_classCallCheck(this, SquareLayout);\n\n\t\treturn _possibleConstructorReturn(this, _FrameLayout.apply(this, arguments));\n\t}\n\n\tSquareLayout.prototype._checkItemSize = function _checkItemSize() {\n\t\tvar column = this.options.column;\n\n\t\tif (!column) {\n\t\t\t_FrameLayout.prototype._checkItemSize.call(this);\n\t\t\treturn;\n\t\t}\n\t\tvar margin = this.options.margin;\n\n\t\t// if itemSize is not in options, caculate itemSize from size.\n\t\tthis._itemSize = (this._size + margin) / column - margin;\n\t};\n\n\tSquareLayout.prototype._layout = function _layout(items) {\n\t\tvar _shapes;\n\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar itemSize = this._getItemSize();\n\t\tvar margin = this.options.margin;\n\t\tvar columnLength = this.options.column || parseInt((this._size + margin) / (itemSize + margin), 10) || 1;\n\t\tvar length = items.length;\n\t\tvar endOutline = makeShapeOutline(outline, itemSize, columnLength, isAppend);\n\t\tvar pointCaculateName = isAppend ? \"min\" : \"max\";\n\t\tvar shapes = [];\n\t\tvar sign = isAppend ? 1 : -1;\n\t\tvar style = this._style;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar _shapes$push;\n\n\t\t\tvar point = Math[pointCaculateName].apply(Math, endOutline);\n\t\t\tvar index = (0, _utils.indexOf)(endOutline, point, !isAppend);\n\t\t\tvar item = items[i];\n\t\t\tvar columnWidth = item.columnWidth;\n\t\t\tvar column = columnWidth && columnWidth[0] === columnLength && columnWidth[1] || getColumn(item);\n\t\t\tvar columnCount = 1;\n\n\t\t\tif (column > 1) {\n\t\t\t\tfor (var j = 1; j < column && (isAppend && index + j < columnLength || !isAppend && index - j >= 0); ++j) {\n\t\t\t\t\tif (isAppend && endOutline[index + sign * j] <= point || !isAppend && endOutline[index + sign * j] >= point) {\n\t\t\t\t\t\t++columnCount;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (!isAppend) {\n\t\t\t\t\tindex -= columnCount - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\titem.columnWidth = [columnLength, columnCount];\n\t\t\tshapes.push((_shapes$push = {\n\t\t\t\twidth: columnCount,\n\t\t\t\theight: columnCount\n\t\t\t}, _shapes$push[pos1Name] = point - (!isAppend ? columnCount : 0), _shapes$push[pos2Name] = index, _shapes$push.index = i, _shapes$push));\n\t\t\tfor (var _j = 0; _j < columnCount; ++_j) {\n\t\t\t\tendOutline[index + _j] = point + sign * columnCount;\n\t\t\t}\n\t\t}\n\t\tthis._shapes = (_shapes = {\n\t\t\tshapes: shapes\n\t\t}, _shapes[style.size2] = columnLength, _shapes);\n\n\t\tvar result = _FrameLayout.prototype._layout.call(this, items, outline, isAppend);\n\n\t\tif (!isAppend) {\n\t\t\tvar lastItem = items[items.length - 1];\n\n\t\t\tshapes.sort(function (shape1, shape2) {\n\t\t\t\tvar item1pos1 = shape1[pos1Name];\n\t\t\t\tvar item1pos2 = shape1[pos2Name];\n\t\t\t\tvar item2pos1 = shape2[pos1Name];\n\t\t\t\tvar item2pos2 = shape2[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\titems.sort(function (a, b) {\n\t\t\t\tvar item1pos1 = a.rect[pos1Name];\n\t\t\t\tvar item1pos2 = a.rect[pos2Name];\n\t\t\t\tvar item2pos1 = b.rect[pos1Name];\n\t\t\t\tvar item2pos2 = b.rect[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\tresult.startIndex = 0;\n\t\t\tresult.endIndex = items.indexOf(lastItem);\n\t\t}\n\t\treturn result;\n\t};\n\n\treturn SquareLayout;\n}(_FrameLayout3[\"default\"]);\n\nexports[\"default\"] = SquareLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/SquareLayout.js\n// module id = 12\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _BoxModel = require(\"./lib/BoxModel.js\");\n\nvar _BoxModel2 = _interopRequireDefault(_BoxModel);\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getCost(originLength, length) {\n\tvar cost = originLength / length;\n\n\tif (cost < 1) {\n\t\tcost = 1 / cost;\n\t}\n\n\treturn cost - 1;\n}\nfunction fitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical) {\n\titem.setHeight(itemFitSize.height);\n\titem.setWidth(itemFitSize.width);\n\tbestFitArea.setHeight(containerFitSize.height);\n\tbestFitArea.setWidth(containerFitSize.width);\n\n\tif (layoutVertical) {\n\t\titem.setTop(bestFitArea.getTop() + bestFitArea.getHeight());\n\t\titem.setLeft(bestFitArea.getLeft());\n\t} else {\n\t\titem.setLeft(bestFitArea.getLeft() + bestFitArea.getWidth());\n\t\titem.setTop(bestFitArea.getTop());\n\t}\n}\n\n/**\n * @classdesc PackingLayout show important images bigger without sacrificing the inherent size of the image. Rows and columns are separated so that images are dynamically placed within the horizontal and vertical space rather than arranged in an orderly fashion.\n * @ko PackingLayout은 이미지의 본래 크기에 따른 비중을 해치지 않으면서 중요한 이미지는 더 크게 보여 준다. 행과 열이 구분돼 이미지를 정돈되게 배치하는 대신 가로세로 일정 공간 내에서 동적으로 이미지를 배치한다.\n * @class eg.InfiniteGrid.PackingLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.PackingLayout module eg.InfiniteGrid.PackingLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.aspectRatio=1] The aspect ratio of the group 그룹의 가로 세로 비 \n * @param {Boolean} [options.sizeWeight=1] The size weight when placing an image 이미지를 배치할 때 사이즈 가중치 \n * @param {Boolean} [options.ratioWeight=1] The ratio weight when placing an image 이미지를 배치할 때 비율 가중치 \n * @example\n```\n\n```\n **/\n\nvar PackingLayout = function () {\n\tfunction PackingLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, PackingLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\taspectRatio: 1,\n\t\t\tsizeWeight: 1,\n\t\t\tratioWeight: 1\n\t\t}, options);\n\t\tthis._size = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tPackingLayout.prototype._findBestFitArea = function _findBestFitArea(container, item) {\n\t\tif (container.getRatio() === 0) {\n\t\t\t// 아이템 최초 삽입시 전체영역 지정\n\t\t\tcontainer.setOriginWidth(item.getWidth());\n\t\t\tcontainer.setOriginHeight(item.getHeight());\n\t\t\tcontainer.setWidth(item.getWidth());\n\t\t\tcontainer.setHeight(item.getHeight());\n\t\t\treturn;\n\t\t}\n\n\t\tvar bestFitArea = null;\n\t\tvar minCost = 10000000;\n\t\tvar layoutVertical = false;\n\t\tvar itemFitSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tvar containerFitSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tvar _options = this.options,\n\t\t sizeWeight = _options.sizeWeight,\n\t\t ratioWeight = _options.ratioWeight;\n\n\n\t\tcontainer.innerItem().forEach(function (v) {\n\t\t\tvar containerSizeCost = getCost(v.getOriginSize(), v.getSize()) * sizeWeight;\n\t\t\tvar containerRatioCost = getCost(v.getOriginRatio(), v.getRatio()) * ratioWeight;\n\t\t\tvar cost = void 0;\n\n\t\t\tfor (var i = 0; i < 2; ++i) {\n\t\t\t\tvar itemWidth = void 0;\n\t\t\t\tvar itemHeight = void 0;\n\t\t\t\tvar containerWidth = void 0;\n\t\t\t\tvar containerHeight = void 0;\n\n\t\t\t\tif (i === 0) {\n\t\t\t\t\t// 상하에 아이템 추가\n\t\t\t\t\titemWidth = v.getWidth();\n\t\t\t\t\titemHeight = v.getHeight() * (item.getHeight() / (v.getOriginHeight() + item.getHeight()));\n\t\t\t\t\tcontainerWidth = v.getWidth();\n\t\t\t\t\tcontainerHeight = v.getHeight() - itemHeight;\n\t\t\t\t} else {\n\t\t\t\t\t// 좌우에 아이템 추가\n\t\t\t\t\titemHeight = v.getHeight();\n\t\t\t\t\titemWidth = v.getWidth() * (item.getWidth() / (v.getOriginWidth() + item.getWidth()));\n\t\t\t\t\tcontainerHeight = v.getHeight();\n\t\t\t\t\tcontainerWidth = v.getWidth() - itemWidth;\n\t\t\t\t}\n\n\t\t\t\tvar itemSize = itemWidth * itemHeight;\n\t\t\t\tvar itemRatio = itemWidth / itemHeight;\n\t\t\t\tvar containerSize = containerWidth * containerHeight;\n\t\t\t\tvar containerRatio = containerHeight / containerHeight;\n\n\t\t\t\tcost = getCost(item.getSize(), itemSize) * sizeWeight;\n\t\t\t\tcost += getCost(item.getRatio(), itemRatio) * ratioWeight;\n\t\t\t\tcost += getCost(v.getOriginSize(), containerSize) * sizeWeight - containerSizeCost;\n\t\t\t\tcost += getCost(v.getOriginRatio(), containerRatio) * ratioWeight - containerRatioCost;\n\n\t\t\t\tif (cost === Math.min(cost, minCost)) {\n\t\t\t\t\tminCost = cost;\n\t\t\t\t\tbestFitArea = v;\n\t\t\t\t\tlayoutVertical = i === 0;\n\t\t\t\t\titemFitSize.width = itemWidth;\n\t\t\t\t\titemFitSize.height = itemHeight;\n\t\t\t\t\tcontainerFitSize.width = containerWidth;\n\t\t\t\t\tcontainerFitSize.height = containerHeight;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical);\n\t};\n\n\tPackingLayout.prototype._layout = function _layout(items) {\n\t\tvar _this = this;\n\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar style = this._style;\n\t\tvar isHorizontal = this.options.horizontal;\n\t\tvar aspectRatio = this.options.aspectRatio;\n\t\tvar margin = this.options.margin;\n\t\tvar pos1Name = style.pos1;\n\t\tvar size1Name = style.size1;\n\t\tvar containerWidth = this._size * (isHorizontal ? aspectRatio : 1);\n\t\tvar containerHeight = this._size / (isHorizontal ? 1 : aspectRatio);\n\t\tvar containerSize1 = isHorizontal ? containerWidth : containerHeight;\n\t\tvar prevOutline = (0, _utils.toZeroArray)(outline);\n\t\tvar start = isAppend ? Math.max.apply(Math, prevOutline) : Math.min.apply(Math, prevOutline) - containerSize1 - margin;\n\t\tvar end = start + containerSize1 + margin;\n\t\tvar container = new _BoxModel2[\"default\"]({});\n\n\t\tvar startIndex = -1;\n\t\tvar endIndex = -1;\n\t\tvar startPos = -1;\n\t\tvar endPos = -1;\n\n\t\titems.forEach(function (item) {\n\t\t\tvar model = new _BoxModel2[\"default\"]({\n\t\t\t\toriginWidth: item.orgSize.width,\n\t\t\t\toriginHeight: item.orgSize.height,\n\t\t\t\twidth: item.orgSize.width,\n\t\t\t\theight: item.orgSize.height\n\t\t\t});\n\n\t\t\t_this._findBestFitArea(container, model);\n\t\t\tcontainer.pushItem(model);\n\t\t\tcontainer.scaleTo(containerWidth + margin, containerHeight + margin);\n\t\t});\n\t\titems.forEach(function (item, i) {\n\t\t\tvar boxItem = container.innerItem()[i];\n\t\t\t// console.log(\"boxItem\", boxItem, boxItem instanceof BoxModel);\n\t\t\tvar width = boxItem.getWidth();\n\t\t\tvar height = boxItem.getHeight();\n\t\t\tvar top = boxItem.getTop();\n\t\t\tvar left = boxItem.getLeft();\n\n\t\t\titem.rect = { top: top, left: left, width: width - margin, height: height - margin };\n\t\t\titem.rect[pos1Name] += start;\n\n\t\t\tif (startIndex === -1) {\n\t\t\t\tstartIndex = i;\n\t\t\t\tendIndex = i;\n\t\t\t\tstartPos = item.rect[pos1Name];\n\t\t\t\tendPos = startPos;\n\t\t\t}\n\t\t\tif (startPos > item.rect[pos1Name]) {\n\t\t\t\tstartPos = item.rect[pos1Name];\n\t\t\t\tstartIndex = i;\n\t\t\t}\n\t\t\tif (endPos < item.rect[pos1Name] + item.rect[size1Name] + margin) {\n\t\t\t\tendPos = item.rect[pos1Name] + item.rect[size1Name] + margin;\n\t\t\t\tendIndex = i;\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tstart: [start],\n\t\t\tend: [end],\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tPackingLayout.prototype._insert = function _insert() {\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar type = arguments[2];\n\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tPackingLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tPackingLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tPackingLayout.prototype.layout = function layout() {\n\t\tvar groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\tvar length = groups.length;\n\t\tvar point = outline;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.PackingLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tPackingLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\n\treturn PackingLayout;\n}();\n\nexports[\"default\"] = PackingLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/PackingLayout.js\n// module id = 13\n// module chunks = 0 1","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar BoxModel = function () {\n\tfunction BoxModel(option) {\n\t\t_classCallCheck(this, BoxModel);\n\n\t\tthis._originWidth = option.originWidth || 0;\n\t\tthis._originHeight = option.originHeight || 0;\n\t\tthis._width = option.width || 0;\n\t\tthis._height = option.height || 0;\n\t\tthis._left = option.left || 0;\n\t\tthis._top = option.top || 0;\n\t\tthis._item = option.item;\n\t\tthis._innerItem = option.innerItem || [];\n\t}\n\n\tBoxModel.prototype.getOriginWidth = function getOriginWidth() {\n\t\treturn this._originWidth;\n\t};\n\n\tBoxModel.prototype.setOriginWidth = function setOriginWidth(width) {\n\t\tthis._originWidth = width;\n\t};\n\n\tBoxModel.prototype.getOriginHeight = function getOriginHeight() {\n\t\treturn this._originHeight;\n\t};\n\n\tBoxModel.prototype.setOriginHeight = function setOriginHeight(height) {\n\t\tthis._originHeight = height;\n\t};\n\n\tBoxModel.prototype.getWidth = function getWidth() {\n\t\treturn this._width;\n\t};\n\n\tBoxModel.prototype.setWidth = function setWidth(width) {\n\t\tthis._width = width;\n\t};\n\n\tBoxModel.prototype.getHeight = function getHeight() {\n\t\treturn this._height;\n\t};\n\n\tBoxModel.prototype.setHeight = function setHeight(height) {\n\t\tthis._height = height;\n\t};\n\n\tBoxModel.prototype.getLeft = function getLeft() {\n\t\treturn this._left;\n\t};\n\n\tBoxModel.prototype.setLeft = function setLeft(left) {\n\t\tthis._left = left;\n\t};\n\n\tBoxModel.prototype.getTop = function getTop() {\n\t\treturn this._top;\n\t};\n\n\tBoxModel.prototype.setTop = function setTop(top) {\n\t\tthis._top = top;\n\t};\n\n\tBoxModel.prototype.innerItem = function innerItem() {\n\t\treturn this._innerItem;\n\t};\n\n\tBoxModel.prototype.scaleTo = function scaleTo(width, height) {\n\t\tvar scaleX = this._width === 0 ? 0 : width / this._width;\n\t\tvar scaleY = this._height === 0 ? 0 : height / this._height;\n\n\t\tthis._innerItem.forEach(function (v) {\n\t\t\tif (scaleX !== 0) {\n\t\t\t\tv._left *= scaleX;\n\t\t\t\tv._width *= scaleX;\n\t\t\t}\n\t\t\tif (scaleY !== 0) {\n\t\t\t\tv._top *= scaleY;\n\t\t\t\tv._height *= scaleY;\n\t\t\t}\n\t\t});\n\n\t\tthis._width = width;\n\t\tthis._height = height;\n\t};\n\n\tBoxModel.prototype.pushItem = function pushItem(item) {\n\t\tthis._innerItem.push(item);\n\t};\n\n\tBoxModel.prototype.getOriginSize = function getOriginSize() {\n\t\treturn this._originWidth * this._originHeight;\n\t};\n\n\tBoxModel.prototype.getSize = function getSize() {\n\t\treturn this._width * this._height;\n\t};\n\n\tBoxModel.prototype.getOriginRatio = function getOriginRatio() {\n\t\treturn this._originHeight === 0 ? 0 : this._originWidth / this._originHeight;\n\t};\n\n\tBoxModel.prototype.getRatio = function getRatio() {\n\t\treturn this._height === 0 ? 0 : this._width / this._height;\n\t};\n\n\tBoxModel.prototype.isSmallerThen = function isSmallerThen(box) {\n\t\treturn this._width <= box._width && this._height <= box._height;\n\t};\n\n\tBoxModel.prototype.isEqual = function isEqual(box) {\n\t\treturn this._left === box._left && this._top === box._top && this._width === box._width && this._height === box._height;\n\t};\n\n\treturn BoxModel;\n}();\n\nmodule.exports = BoxModel;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/lib/BoxModel.js\n// module id = 14\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _dijkstra = require(\"./lib/dijkstra\");\n\nvar _dijkstra2 = _interopRequireDefault(_dijkstra);\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * @classdesc 'justified' is a printing term with the meaning that 'it fits in one row wide'. JustifiedLayout is a layout in which the image is filled up on the basis of a line given a width in the meaning of the term.\n * @ko 'justified'는 '1행의 너비에 맞게 꼭 들어찬'이라는 의미를 가진 인쇄 용어다. 용어의 의미대로 너비가 주어진 한 행을 기준으로 이미지가 가득 차도록 배치하는 레이아웃이다.\n * @class eg.InfiniteGrid.JustifiedLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.JustifiedLayout module eg.InfiniteGrid.JustifiedLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.minSize=0] Minimum size of item to be resized 아이템이 조정되는 최소 크기 \n * @param {Boolean} [options.maxSize=0] Maximum size of item to be resized 아이템이 조정되는 최대 크기 \n * @example\n```\n\n```\n **/\nvar JustifiedLayout = function () {\n\tfunction JustifiedLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, JustifiedLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\tminSize: 0,\n\t\t\tmaxSize: 0\n\t\t}, options);\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t\tthis._size = 0;\n\t}\n\n\tJustifiedLayout.prototype._layout = function _layout(items, outline, isAppend) {\n\t\tvar _this = this;\n\n\t\tvar style = this._style;\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar startIndex = 0;\n\t\tvar endIndex = items.length;\n\t\tvar graph = function graph(_start) {\n\t\t\tvar results = {};\n\t\t\tvar start = +_start.replace(/[^0-9]/g, \"\");\n\t\t\tvar length = endIndex + 1;\n\n\t\t\tfor (var i = start + 1; i < length; ++i) {\n\t\t\t\tif (i - start > 8) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tvar cost = _this._getCost(items, start, i, size1Name, size2Name);\n\n\t\t\t\tif (cost < 0 && i === length - 1) {\n\t\t\t\t\tcost = 0;\n\t\t\t\t}\n\t\t\t\tif (cost !== null) {\n\t\t\t\t\tresults[\"node\" + i] = Math.pow(cost, 2);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn results;\n\t\t};\n\t\t// shortest path for items' total height.\n\t\tvar path = _dijkstra2[\"default\"].find_path(graph, \"node\" + startIndex, \"node\" + endIndex);\n\n\t\treturn this._setStyle(items, path, outline, isAppend);\n\t};\n\n\tJustifiedLayout.prototype._getSize = function _getSize(items, size1Name, size2Name) {\n\t\tvar margin = this.options.margin;\n\t\tvar size = items.reduce(function (sum, item) {\n\t\t\treturn sum + item.size[size2Name] / item.size[size1Name];\n\t\t}, 0);\n\n\t\treturn (this._size - margin * (items.length - 1)) / size;\n\t};\n\n\tJustifiedLayout.prototype._getCost = function _getCost(items, i, j, size1Name, size2Name) {\n\t\tvar size = this._getSize(items.slice(i, j), size1Name, size2Name);\n\t\tvar min = this.options.minSize || 0;\n\t\tvar max = this.options.maxSize || Infinity;\n\n\t\tif (isFinite(max)) {\n\t\t\t// if this size is not in range, the cost increases sharply.\n\t\t\tif (size < min) {\n\t\t\t\treturn Math.pow(size - min, 2) + Math.pow(max, 2);\n\t\t\t} else if (size > max) {\n\t\t\t\treturn Math.pow(size - max, 2) + Math.pow(max, 2);\n\t\t\t} else {\n\t\t\t\t// if this size in range, the cost is negative or low.\n\t\t\t\treturn Math.min(size - max, min - size);\n\t\t\t}\n\t\t}\n\t\t// if max is infinite type, caculate cost only with \"min\".\n\t\tif (size < min) {\n\t\t\treturn Math.max(Math.pow(min, 2), Math.pow(size, 2));\n\t\t}\n\t\treturn size - min;\n\t};\n\n\tJustifiedLayout.prototype._setStyle = function _setStyle(items, path) {\n\t\tvar outline = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n\t\tvar isAppend = arguments[3];\n\n\t\tvar style = this._style;\n\t\t// if direction is vertical\n\t\t// pos1 : top, pos11 : bottom\n\t\t// size1 : height\n\t\t// pos2 : left, pos22 : right\n\t\t// size2 : width\n\n\t\t// if direction is horizontal\n\t\t// pos1 : left, pos11 : right\n\t\t// size1 : width\n\t\t// pos2 : top, pos22 : bottom\n\t\t// size2 : height\n\t\tvar pos1Name = style.pos1;\n\t\tvar size1Name = style.size1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar size2Name = style.size2;\n\t\tvar length = path.length;\n\t\tvar margin = this.options.margin;\n\t\tvar startPoint = outline[0] || 0;\n\t\tvar endPoint = startPoint;\n\t\tvar height = 0;\n\n\t\tfor (var i = 0; i < length - 1; ++i) {\n\t\t\tvar path1 = parseInt(path[i].replace(\"node\", \"\"), 10);\n\t\t\tvar path2 = parseInt(path[i + 1].replace(\"node\", \"\"), 10);\n\t\t\t// pathItems(path1 to path2) are in 1 line.\n\t\t\tvar pathItems = items.slice(path1, path2);\n\t\t\tvar pathItemsLength = pathItems.length;\n\t\t\tvar size1 = this._getSize(pathItems, size1Name, size2Name);\n\t\t\tvar pos1 = endPoint;\n\n\t\t\tfor (var j = 0; j < pathItemsLength; ++j) {\n\t\t\t\tvar _item$rect;\n\n\t\t\t\tvar item = pathItems[j];\n\t\t\t\tvar size2 = item.size[size2Name] / item.size[size1Name] * size1;\n\t\t\t\t// item has margin bottom and right.\n\t\t\t\t// first item has not margin.\n\t\t\t\tvar prevItemRect = j === 0 ? 0 : pathItems[j - 1].rect;\n\t\t\t\tvar pos2 = prevItemRect ? prevItemRect[pos2Name] + prevItemRect[size2Name] + margin : 0;\n\n\t\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);\n\t\t\t}\n\t\t\theight += margin + size1;\n\t\t\tendPoint = startPoint + height;\n\t\t}\n\t\tvar itemsLength = items.length;\n\t\tvar startIndex = itemsLength ? 0 : -1;\n\t\tvar endIndex = itemsLength ? itemsLength - 1 : -1;\n\n\t\tif (isAppend) {\n\t\t\t// previous group's end outline is current group's start outline\n\t\t\treturn {\n\t\t\t\tstart: [startPoint],\n\t\t\t\tend: [endPoint],\n\t\t\t\tstartIndex: startIndex,\n\t\t\t\tendIndex: endIndex\n\t\t\t};\n\t\t}\n\t\t// for prepend, only substract height from position.\n\t\t// always start is lower than end.\n\n\t\tfor (var _i = 0; _i < itemsLength; ++_i) {\n\t\t\tvar _item = items[_i];\n\n\t\t\t// move items as long as height for prepend\n\t\t\t_item.rect[pos1Name] -= height;\n\t\t}\n\t\treturn {\n\t\t\tstart: [startPoint - height],\n\t\t\tend: [startPoint], // endPoint - height = startPoint\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tJustifiedLayout.prototype._insert = function _insert(items, outline, type) {\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.JustifiedLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tJustifiedLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tJustifiedLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tJustifiedLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100]);\n */\n\n\n\tJustifiedLayout.prototype.layout = function layout(groups, outlines) {\n\t\tvar length = groups.length;\n\t\tvar point = outlines;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\n\treturn JustifiedLayout;\n}();\n\nexports[\"default\"] = JustifiedLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/JustifiedLayout.js\n// module id = 15\n// module chunks = 0 1","'use strict';\n\n/* eslint-disable */\n/******************************************************************************\n * Created 2008-08-19.\n *\n * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.\n *\n * Copyright (C) 2008\n * Wyatt Baldwin \n * All rights reserved\n *\n * Licensed under the MIT license.\n *\n * http://www.opensource.org/licenses/mit-license.php\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *****************************************************************************/\n(function () {\n var dijkstra = {\n single_source_shortest_paths: function single_source_shortest_paths(graph, s, d) {\n // Predecessor map for each node that has been encountered.\n // node ID => predecessor node ID\n var predecessors = {};\n\n // Costs of shortest paths from s to all nodes encountered.\n // node ID => cost\n var costs = {};\n costs[s] = 0;\n\n // Costs of shortest paths from s to all nodes encountered; differs from\n // `costs` in that it provides easy access to the node that currently has\n // the known shortest path from s.\n // XXX: Do we actually need both `costs` and `open`?\n var open = new BinaryHeap(function (x) {\n return x.cost;\n });\n open.push({ value: s, cost: 0 });\n\n var closest, u, cost_of_s_to_u, adjacent_nodes, cost_of_e, cost_of_s_to_u_plus_cost_of_e, cost_of_s_to_v, first_visit;\n while (open.size()) {\n // In the nodes remaining in graph that have a known cost from s,\n // find the node, u, that currently has the shortest path from s.\n closest = open.pop();\n u = closest.value;\n cost_of_s_to_u = closest.cost;\n\n // Get nodes adjacent to u...\n adjacent_nodes = graph(u) || {};\n\n // ...and explore the edges that connect u to those nodes, updating\n // the cost of the shortest paths to any or all of those nodes as\n // necessary. v is the node across the current edge from u.\n for (var v in adjacent_nodes) {\n // Get the cost of the edge running from u to v.\n cost_of_e = adjacent_nodes[v];\n\n // Cost of s to u plus the cost of u to v across e--this is *a*\n // cost from s to v that may or may not be less than the current\n // known cost to v.\n cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;\n\n // If we haven't visited v yet OR if the current known cost from s to\n // v is greater than the new cost we just found (cost of s to u plus\n // cost of u to v across e), update v's cost in the cost list and\n // update v's predecessor in the predecessor list (it's now u).\n cost_of_s_to_v = costs[v];\n first_visit = typeof costs[v] === 'undefined';\n if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {\n costs[v] = cost_of_s_to_u_plus_cost_of_e;\n open.push({ value: v, cost: cost_of_s_to_u_plus_cost_of_e });\n predecessors[v] = u;\n }\n }\n }\n\n if (typeof costs[d] === 'undefined') {\n var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');\n throw new Error(msg);\n }\n\n return predecessors;\n },\n\n extract_shortest_path_from_predecessor_list: function extract_shortest_path_from_predecessor_list(predecessors, d) {\n var nodes = [];\n var u = d;\n var predecessor;\n while (u) {\n nodes.push(u);\n predecessor = predecessors[u];\n u = predecessors[u];\n }\n nodes.reverse();\n return nodes;\n },\n\n find_path: function find_path(graph, s, d) {\n var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);\n return dijkstra.extract_shortest_path_from_predecessor_list(predecessors, d);\n }\n\n };\n\n function BinaryHeap(scoreFunction) {\n this.content = [];\n this.scoreFunction = scoreFunction;\n }\n\n BinaryHeap.prototype = {\n push: function push(element) {\n // Add the new element to the end of the array.\n this.content.push(element);\n // Allow it to bubble up.\n this.bubbleUp(this.content.length - 1);\n },\n\n pop: function pop() {\n // Store the first element so we can return it later.\n var result = this.content[0];\n // Get the element at the end of the array.\n var end = this.content.pop();\n // If there are any elements left, put the end element at the\n // start, and let it sink down.\n if (this.content.length > 0) {\n this.content[0] = end;\n this.sinkDown(0);\n }\n return result;\n },\n\n remove: function remove(node) {\n var len = this.content.length;\n // To remove a value, we must search through the array to find\n // it.\n for (var i = 0; i < len; i++) {\n if (this.content[i] === node) {\n // When it is found, the process seen in 'pop' is repeated\n // to fill up the hole.\n var end = this.content.pop();\n if (i !== len - 1) {\n this.content[i] = end;\n if (this.scoreFunction(end) < this.scoreFunction(node)) {\n this.bubbleUp(i);\n } else {\n this.sinkDown(i);\n }\n }\n return;\n }\n }\n throw new Error('Node not found.');\n },\n\n size: function size() {\n return this.content.length;\n },\n\n bubbleUp: function bubbleUp(n) {\n // Fetch the element that has to be moved.\n var element = this.content[n];\n // When at 0, an element can not go up any further.\n while (n > 0) {\n // Compute the parent element's index, and fetch it.\n var parentN = Math.floor((n + 1) / 2) - 1,\n parent = this.content[parentN];\n // Swap the elements if the parent is greater.\n if (this.scoreFunction(element) < this.scoreFunction(parent)) {\n this.content[parentN] = element;\n this.content[n] = parent;\n // Update 'n' to continue at the new position.\n n = parentN;\n }\n // Found a parent that is less, no need to move it further.\n else {\n break;\n }\n }\n },\n\n sinkDown: function sinkDown(n) {\n // Look up the target element and its score.\n var length = this.content.length,\n element = this.content[n],\n elemScore = this.scoreFunction(element);\n\n while (true) {\n // Compute the indices of the child elements.\n var child2N = (n + 1) * 2,\n child1N = child2N - 1;\n // This is used to store the new position of the element,\n // if any.\n var swap = null;\n // If the first child exists (is inside the array)...\n if (child1N < length) {\n // Look it up and compute its score.\n var child1 = this.content[child1N],\n child1Score = this.scoreFunction(child1);\n // If the score is less than our element's, we need to swap.\n if (child1Score < elemScore) {\n swap = child1N;\n }\n }\n // Do the same checks for the other child.\n if (child2N < length) {\n var child2 = this.content[child2N],\n child2Score = this.scoreFunction(child2);\n if (child2Score < (swap == null ? elemScore : child1Score)) {\n swap = child2N;\n }\n }\n\n // If the element needs to be moved, swap it, and continue.\n if (swap !== null) {\n this.content[n] = this.content[swap];\n this.content[swap] = element;\n n = swap;\n }\n // Otherwise, we are done.\n else {\n break;\n }\n }\n }\n };\n\n /**\n * Browserify 지원을 위한 모듈화 코드\n */\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = dijkstra;\n } else {\n window.dijkstra = dijkstra;\n }\n})();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/lib/dijkstra.js\n// module id = 16\n// module chunks = 0 1"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACh9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"infinitegrid.pkgd.js","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap ef6fa86897de510b0330","webpack:///./src/consts.js","webpack:///./src/utils.js","webpack:///./src/browser.js","webpack:///./src/DOMRenderer.js","webpack:///./src/layouts/FrameLayout.js","webpack:///./src/index.js","webpack:///./src/InfiniteGrid.js","webpack:///./node_modules/@egjs/component/dist/component.js","webpack:///./src/ItemManager.js","webpack:///./src/ImageLoaded.js","webpack:///./src/Watcher.js","webpack:///./src/layouts/GridLayout.js","webpack:///./src/layouts/SquareLayout.js","webpack:///./src/layouts/PackingLayout.js","webpack:///./src/layouts/lib/BoxModel.js","webpack:///./src/layouts/JustifiedLayout.js","webpack:///./src/layouts/lib/dijkstra.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"InfiniteGrid\"] = factory();\n\telse\n\t\troot[\"eg\"] = root[\"eg\"] || {}, root[\"eg\"][\"InfiniteGrid\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap ef6fa86897de510b0330","\"use strict\";\n\nexports.__esModule = true;\nexports.DEFENSE_BROWSER = exports.WEBKIT_VERSION = exports.PROCESSING = exports.LOADING_PREPEND = exports.LOADING_APPEND = exports.IDLE = exports.ALIGN = exports.isMobile = exports.agent = exports.DEFAULT_OPTIONS = exports.GROUPKEY_ATT = exports.DUMMY_POSITION = exports.SINGLE = exports.MULTI = exports.NO_TRUSTED = exports.TRUSTED = exports.NO_CACHE = exports.CACHE = exports.HORIZONTAL = exports.VERTICAL = exports.PREPEND = exports.APPEND = exports.IGNORE_CLASSNAME = exports.CONTAINER_CLASSNAME = exports.RETRY = exports.IS_ANDROID2 = exports.IS_IOS = exports.IS_IE = exports.SUPPORT_PASSIVE = exports.SUPPORT_ADDEVENTLISTENER = exports.SUPPORT_COMPUTEDSTYLE = undefined;\n\nvar _browser = require(\"./browser\");\n\nvar ua = _browser.window.navigator.userAgent;\n\nvar SUPPORT_COMPUTEDSTYLE = exports.SUPPORT_COMPUTEDSTYLE = !!(\"getComputedStyle\" in _browser.window);\nvar SUPPORT_ADDEVENTLISTENER = exports.SUPPORT_ADDEVENTLISTENER = !!(\"addEventListener\" in document);\nvar SUPPORT_PASSIVE = exports.SUPPORT_PASSIVE = function () {\n\tvar supportsPassiveOption = false;\n\n\ttry {\n\t\tif (SUPPORT_ADDEVENTLISTENER && Object.defineProperty) {\n\t\t\tdocument.addEventListener(\"test\", null, Object.defineProperty({}, \"passive\", {\n\t\t\t\tget: function get() {\n\t\t\t\t\tsupportsPassiveOption = true;\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\t} catch (e) {}\n\treturn supportsPassiveOption;\n}();\n\nvar IS_IE = exports.IS_IE = /MSIE|Trident|Windows Phone|Edge/.test(ua);\nvar IS_IOS = exports.IS_IOS = /iPhone|iPad/.test(ua);\nvar IS_ANDROID2 = exports.IS_ANDROID2 = /Android 2\\./.test(ua);\nvar RETRY = exports.RETRY = 3;\nvar CONTAINER_CLASSNAME = exports.CONTAINER_CLASSNAME = \"_eg-infinitegrid-container_\";\nvar IGNORE_CLASSNAME = exports.IGNORE_CLASSNAME = \"_eg-infinitegrid-ignore_\";\n\nvar APPEND = exports.APPEND = true;\nvar PREPEND = exports.PREPEND = false;\nvar VERTICAL = exports.VERTICAL = \"vertical\";\nvar HORIZONTAL = exports.HORIZONTAL = \"horizontal\";\nvar CACHE = exports.CACHE = true;\nvar NO_CACHE = exports.NO_CACHE = false;\nvar TRUSTED = exports.TRUSTED = true;\nvar NO_TRUSTED = exports.NO_TRUSTED = false;\nvar MULTI = exports.MULTI = true;\nvar SINGLE = exports.SINGLE = false;\nvar DUMMY_POSITION = exports.DUMMY_POSITION = -100000;\nvar GROUPKEY_ATT = exports.GROUPKEY_ATT = \"data-groupkey\";\n\nvar DEFAULT_OPTIONS = exports.DEFAULT_OPTIONS = {\n\thorizontal: false,\n\tmargin: 0\n};\n\nvar agent = exports.agent = ua.toLowerCase();\nvar isMobile = exports.isMobile = /mobi|ios|android/.test(agent);\n\nvar ALIGN = exports.ALIGN = {\n\tSTART: \"start\",\n\tCENTER: \"center\",\n\tEND: \"end\",\n\tJUSTIFY: \"justify\"\n};\n\nvar IDLE = exports.IDLE = 0;\nvar LOADING_APPEND = exports.LOADING_APPEND = 1;\nvar LOADING_PREPEND = exports.LOADING_PREPEND = 2;\nvar PROCESSING = exports.PROCESSING = 4;\n\nvar webkit = /applewebkit\\/([\\d|.]*)/g.exec(agent);\n\nvar WEBKIT_VERSION = exports.WEBKIT_VERSION = webkit && parseInt(webkit[1], 10) || 0;\nvar DEFENSE_BROWSER = exports.DEFENSE_BROWSER = WEBKIT_VERSION && WEBKIT_VERSION < 537;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/consts.js\n// module id = 0\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\nexports.STYLE = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.toArray = toArray;\nexports.fill = fill;\nexports.$ = $;\nexports.addEvent = addEvent;\nexports.removeEvent = removeEvent;\nexports.scroll = scroll;\nexports.scrollTo = scrollTo;\nexports.scrollBy = scrollBy;\nexports.getStyles = getStyles;\nexports.innerWidth = innerWidth;\nexports.innerHeight = innerHeight;\nexports.getStyleNames = getStyleNames;\nexports.assignOptions = assignOptions;\nexports.toZeroArray = toZeroArray;\nexports.isWindow = isWindow;\nexports.indexOf = indexOf;\n\nvar _browser = require(\"./browser\");\n\nvar _consts = require(\"./consts\");\n\nfunction toArray(nodes) {\n\t// SCRIPT5014 in IE8\n\tvar array = [];\n\n\tif (nodes) {\n\t\tfor (var i = 0, len = nodes.length; i < len; i++) {\n\t\t\tarray.push(nodes[i]);\n\t\t}\n\t}\n\treturn array;\n}\nfunction fill(length, value) {\n\tvar array = (typeof length === \"undefined\" ? \"undefined\" : _typeof(length)) === \"object\" ? length : new Array(length);\n\tvar len = array.length;\n\n\tfor (var i = len - 1; i >= 0; --i) {\n\t\tarray[i] = value;\n\t}\n\treturn array;\n}\n/**\n * Select or create element\n * @param {String|HTMLElement|jQuery} param\n * when string given is as HTML tag, then create element\n * otherwise it returns selected elements\n * @param {Boolean} multi\n * @returns {HTMLElement}\n */\nfunction $(param) {\n\tvar multi = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n\tvar el = void 0;\n\n\tif (typeof param === \"string\") {\n\t\t// String (HTML, Selector)\n\t\t// check if string is HTML tag format\n\t\tvar match = param.match(/^<([A-z]+)\\s*([^>]*)>/);\n\n\t\t// creating element\n\t\tif (match) {\n\t\t\t// HTML\n\t\t\tvar dummy = _browser.document.createElement(\"div\");\n\n\t\t\tdummy.innerHTML = param;\n\t\t\tel = dummy.childNodes;\n\t\t} else {\n\t\t\t// Selector\n\t\t\tel = _browser.document.querySelectorAll(param);\n\t\t}\n\t\tif (multi) {\n\t\t\tel = toArray(el);\n\t\t} else {\n\t\t\tel = el && el.length > 0 && el[0] || undefined;\n\t\t}\n\t} else if (param === _browser.window) {\n\t\t// window\n\t\tel = param;\n\t} else if (param.nodeName && (param.nodeType === 1 || param.nodeType === 9)) {\n\t\t// HTMLElement, Document\n\t\tel = param;\n\t} else if (\"jQuery\" in _browser.window && param instanceof _browser.window.jQuery || param.constructor.prototype.jquery) {\n\t\t// jQuery\n\t\tel = multi ? param.toArray() : param.get(0);\n\t} else if (Array.isArray(param)) {\n\t\tel = param.map(function (v) {\n\t\t\treturn $(v);\n\t\t});\n\t\tif (!multi) {\n\t\t\tel = el.length >= 1 ? el[0] : undefined;\n\t\t}\n\t}\n\treturn el;\n}\nfunction addEvent(element, type, handler, eventListenerOptions) {\n\tif (_consts.SUPPORT_ADDEVENTLISTENER) {\n\t\tvar options = eventListenerOptions || false;\n\n\t\tif ((typeof eventListenerOptions === \"undefined\" ? \"undefined\" : _typeof(eventListenerOptions)) === \"object\") {\n\t\t\toptions = _consts.SUPPORT_PASSIVE ? eventListenerOptions : false;\n\t\t}\n\t\telement.addEventListener(type, handler, options);\n\t} else if (element.attachEvent) {\n\t\telement.attachEvent(\"on\" + type, handler);\n\t} else {\n\t\telement[\"on\" + type] = handler;\n\t}\n}\nfunction removeEvent(element, type, handler) {\n\tif (element.removeEventListener) {\n\t\telement.removeEventListener(type, handler, false);\n\t} else if (element.detachEvent) {\n\t\telement.detachEvent(\"on\" + type, handler);\n\t} else {\n\t\telement[\"on\" + type] = null;\n\t}\n}\nfunction scroll(el, isVertical) {\n\tvar prop = \"scroll\" + (isVertical ? \"Top\" : \"Left\");\n\n\tif (el === _browser.window) {\n\t\treturn _browser.window[isVertical ? \"pageYOffset\" : \"pageXOffset\"] || _browser.document.body[prop] || _browser.document.documentElement[prop];\n\t} else {\n\t\treturn el[prop];\n\t}\n}\nfunction scrollTo(el, x, y) {\n\tif (el === _browser.window) {\n\t\tel.scroll(x, y);\n\t} else {\n\t\tel.scrollLeft = x;\n\t\tel.scrollTop = y;\n\t}\n}\nfunction scrollBy(el, x, y) {\n\tif (el === _browser.window) {\n\t\tel.scrollBy(x, y);\n\t} else {\n\t\tel.scrollLeft += x;\n\t\tel.scrollTop += y;\n\t}\n}\nfunction getStyles(el) {\n\treturn _consts.SUPPORT_COMPUTEDSTYLE ? _browser.window.getComputedStyle(el) : el.currentStyle;\n}\nfunction _getSize(el, name) {\n\tif (el === _browser.window) {\n\t\t// WINDOW\n\t\treturn el.document.documentElement[\"client\" + name];\n\t} else if (el.nodeType === 9) {\n\t\t// DOCUMENT_NODE\n\t\tvar doc = el.documentElement;\n\n\t\treturn Math.max(el.body[\"scroll\" + name], doc[\"scroll\" + name], el.body[\"offset\" + name], doc[\"offset\" + name], doc[\"client\" + name]);\n\t} else {\n\t\t// NODE\n\t\tvar style = getStyles(el);\n\t\tvar value = style[name.toLowerCase()];\n\n\t\treturn parseFloat(/auto|%/.test(value) ? el[\"offset\" + name] : style[name.toLowerCase()]);\n\t}\n}\nfunction innerWidth(el) {\n\treturn _getSize(el, \"Width\");\n}\nfunction innerHeight(el) {\n\treturn _getSize(el, \"Height\");\n}\nvar STYLE = exports.STYLE = {\n\tvertical: {\n\t\tpos1: \"top\",\n\t\tendPos1: \"bottom\",\n\t\tsize1: \"height\",\n\t\tpos2: \"left\",\n\t\tendPos2: \"right\",\n\t\tsize2: \"width\"\n\t},\n\thorizontal: {\n\t\tpos1: \"left\",\n\t\tendPos1: \"right\",\n\t\tsize1: \"width\",\n\t\tpos2: \"top\",\n\t\tendPos2: \"bottom\",\n\t\tsize2: \"height\"\n\t}\n};\n\nfunction getStyleNames(isHorizontal) {\n\treturn STYLE[isHorizontal ? _consts.HORIZONTAL : _consts.VERTICAL];\n}\n\nfunction assignOptions(defaultOptions, options) {\n\treturn _extends({}, _consts.DEFAULT_OPTIONS, defaultOptions, options);\n}\n\nfunction toZeroArray(outline) {\n\tif (!outline || !outline.length) {\n\t\treturn [0];\n\t}\n\treturn outline;\n}\n\nfunction isWindow(el) {\n\treturn el === _browser.window;\n}\n\nfunction indexOf(arr, target) {\n\tvar isRight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n\tif (!isRight) {\n\t\treturn arr.indexOf(target);\n\t}\n\tvar length = arr.length;\n\n\tfor (var i = length - 1; i >= 0; --i) {\n\t\tif (arr[i] !== target) {\n\t\t\tcontinue;\n\t\t}\n\t\treturn i;\n\t}\n\treturn -1;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utils.js\n// module id = 1\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n/* eslint-disable no-new-func, no-nested-ternary */\nvar win = window;\n/* eslint-enable no-new-func, no-nested-ternary */\n\nexports.window = window;\nvar document = exports.document = win.document;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser.js\n// module id = 2\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defense(element) {\n\tvar container = document.createElement(\"div\");\n\n\tcontainer.className = _consts.CONTAINER_CLASSNAME;\n\tcontainer.style.position = \"relative\";\n\tcontainer.style.height = \"100%\";\n\n\tvar children = element.children;\n\tvar length = children.length; // for IE8\n\n\tfor (var i = 0; i < length; i++) {\n\t\tcontainer.appendChild(children[0]);\n\t}\n\n\telement.appendChild(container);\n\treturn container;\n}\n\nvar DOMRenderer = function () {\n\tDOMRenderer.renderItem = function renderItem(item, styles) {\n\t\tif (item.el) {\n\t\t\tvar elStyle = item.el.style;\n\n\t\t\t// for debugging\n\t\t\titem.el.setAttribute(_consts.GROUPKEY_ATT, item.groupKey);\n\t\t\telStyle.position = \"absolute\";\n\t\t\t[\"left\", \"top\", \"width\", \"height\"].forEach(function (p) {\n\t\t\t\tp in styles && (elStyle[p] = styles[p] + \"px\");\n\t\t\t});\n\t\t}\n\t};\n\n\tDOMRenderer.renderItems = function renderItems(items) {\n\t\titems.forEach(function (item) {\n\t\t\tDOMRenderer.renderItem(item, item.rect);\n\t\t});\n\t};\n\n\tDOMRenderer.removeItems = function removeItems(items) {\n\t\titems.forEach(function (item) {\n\t\t\tif (item.el) {\n\t\t\t\tDOMRenderer.removeElement(item.el);\n\t\t\t\titem.el = null;\n\t\t\t}\n\t\t});\n\t};\n\n\tDOMRenderer.removeElement = function removeElement(element) {\n\t\telement.parentNode.removeChild(element);\n\t};\n\n\tDOMRenderer.createElements = function createElements(items) {\n\t\tvar elements = (0, _utils.$)(items.reduce(function (acc, v, i) {\n\t\t\tacc.push(v.content.replace(/^[\\s\\uFEFF]+|[\\s\\uFEFF]+$/g, \"\"));\n\t\t\treturn acc;\n\t\t}, []).join(\"\"), _consts.MULTI);\n\n\t\treturn items.map(function (item, index) {\n\t\t\titem.el = elements[index];\n\t\t\treturn item;\n\t\t});\n\t};\n\n\tfunction DOMRenderer(element, options) {\n\t\t_classCallCheck(this, DOMRenderer);\n\n\t\t_extends(this.options = {\n\t\t\tisOverflowScroll: false,\n\t\t\tisEqualSize: false,\n\t\t\tisVertical: true\n\t\t}, options);\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tcontainer: -1,\n\t\t\tview: -1,\n\t\t\titem: null\n\t\t};\n\t\tthis._init(element);\n\t\tthis.resize();\n\t}\n\n\tDOMRenderer.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\tcssText: this.container.style.cssText,\n\t\t\toptions: _extends({}, this.options),\n\t\t\t_size: _extends({}, this._size)\n\t\t};\n\t};\n\n\tDOMRenderer.prototype.setStatus = function setStatus(status, items) {\n\t\tthis.container.style.cssText = status.cssText;\n\t\t_extends(this.options, status.options);\n\t\t_extends(this._size, status._size);\n\n\t\tDOMRenderer.renderItems(items);\n\t\tthis._insert(items, _consts.APPEND);\n\t};\n\n\tDOMRenderer.prototype.updateSize = function updateSize(items) {\n\t\tvar _this = this;\n\n\t\treturn items.map(function (item) {\n\t\t\tif (item.el) {\n\t\t\t\tif (_this.options.isEqualSize) {\n\t\t\t\t\t_this._size.item = _this._size.item || {\n\t\t\t\t\t\twidth: (0, _utils.innerWidth)(item.el),\n\t\t\t\t\t\theight: (0, _utils.innerHeight)(item.el)\n\t\t\t\t\t};\n\t\t\t\t\titem.size = _extends({}, _this._size.item);\n\t\t\t\t} else {\n\t\t\t\t\titem.size = {\n\t\t\t\t\t\twidth: (0, _utils.innerWidth)(item.el),\n\t\t\t\t\t\theight: (0, _utils.innerHeight)(item.el)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif (!item.orgSize) {\n\t\t\t\t\titem.orgSize = _extends({}, item.size);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t};\n\n\tDOMRenderer.prototype._init = function _init(el) {\n\t\tvar element = (0, _utils.$)(el);\n\t\tvar style = (0, _utils.getStyles)(element);\n\n\t\tthis._orgStyle = {};\n\n\t\tif (style.position === \"static\") {\n\t\t\tthis._orgStyle.position = element.style.position;\n\t\t\telement.style.position = \"relative\";\n\t\t}\n\t\tif (this.options.isOverflowScroll) {\n\t\t\tvar target = this.options.isVertical ? [\"Y\", \"X\"] : [\"X\", \"Y\"];\n\n\t\t\tthis._orgStyle.overflowX = element.style.overflowX;\n\t\t\tthis._orgStyle.overflowY = element.style.overflowY;\n\t\t\telement.style[\"overflow\" + target[0]] = \"scroll\";\n\t\t\telement.style[\"overflow\" + target[1]] = \"hidden\";\n\t\t\tthis.view = element;\n\t\t\t// defense code for android < 4.4 or webkit < 537\n\t\t\tthis.container = !this.options.isVertical && _consts.DEFENSE_BROWSER ? _defense(element) : element;\n\t\t} else {\n\t\t\tthis.view = window;\n\t\t\tthis.container = element;\n\t\t}\n\t};\n\n\tDOMRenderer.prototype.append = function append(items) {\n\t\tthis._insert(items, _consts.APPEND, {\n\t\t\ttop: _consts.DUMMY_POSITION,\n\t\t\tleft: _consts.DUMMY_POSITION\n\t\t});\n\t};\n\n\tDOMRenderer.prototype.prepend = function prepend(items) {\n\t\tthis._insert(items, _consts.PREPEND, {\n\t\t\ttop: _consts.DUMMY_POSITION,\n\t\t\tleft: _consts.DUMMY_POSITION\n\t\t});\n\t};\n\n\tDOMRenderer.prototype.clear = function clear() {\n\t\tthis.container.innerHTML = \"\";\n\t\tif (!this.options.isOverflowScroll) {\n\t\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = \"\";\n\t\t}\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tviewport: -1,\n\t\t\tcontainer: -1,\n\t\t\tview: -1\n\t\t};\n\t};\n\n\tDOMRenderer.prototype.createAndInsert = function createAndInsert(items, isAppend) {\n\t\tvar itemsWithElement = DOMRenderer.createElements(items);\n\n\t\tDOMRenderer.renderItems(itemsWithElement);\n\t\tthis._insert(itemsWithElement, isAppend);\n\t};\n\n\tDOMRenderer.prototype._insert = function _insert(items, isAppend, styles) {\n\t\tvar df = document.createDocumentFragment();\n\n\t\titems.forEach(function (item) {\n\t\t\tstyles && DOMRenderer.renderItem(item, styles);\n\t\t\tisAppend ? df.appendChild(item.el) : df.insertBefore(item.el, df.firstChild);\n\t\t});\n\t\tisAppend ? this.container.appendChild(df) : this.container.insertBefore(df, this.container.firstChild);\n\t};\n\n\tDOMRenderer.prototype._calcSize = function _calcSize() {\n\t\treturn this.options.isVertical ? (0, _utils.innerWidth)(this.container) : (0, _utils.innerHeight)(this.container);\n\t};\n\n\tDOMRenderer.prototype.getViewSize = function getViewSize() {\n\t\treturn this._size.view;\n\t};\n\n\tDOMRenderer.prototype.scrollBy = function scrollBy(point) {\n\t\tvar pos = this.options.isVertical ? [0, point] : [point, 0];\n\n\t\t_utils.scrollBy.apply(undefined, [this.view].concat(pos));\n\t};\n\n\tDOMRenderer.prototype.getContainerOffset = function getContainerOffset() {\n\t\treturn this._size.containerOffset;\n\t};\n\n\tDOMRenderer.prototype.getViewportSize = function getViewportSize() {\n\t\tthis.resize();\n\t\treturn this._size.viewport;\n\t};\n\n\tDOMRenderer.prototype.setContainerSize = function setContainerSize(size) {\n\t\tif (!this.options.isOverflowScroll || !this.options.isVertical && _consts.DEFENSE_BROWSER) {\n\t\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = size + \"px\";\n\t\t}\n\t};\n\n\tDOMRenderer.prototype.resize = function resize() {\n\t\tvar isVertical = this.options.isVertical;\n\n\t\tif (this.isNeededResize()) {\n\t\t\tthis._size = {\n\t\t\t\tcontainerOffset: this.options.isOverflowScroll ? 0 : this.container[\"offset\" + (isVertical ? \"Top\" : \"Left\")],\n\t\t\t\tviewport: this._calcSize(),\n\t\t\t\tview: isVertical ? (0, _utils.innerHeight)(this.view) : (0, _utils.innerWidth)(this.view),\n\t\t\t\titem: null\n\t\t\t};\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis._size.view = isVertical ? (0, _utils.innerHeight)(this.view) : (0, _utils.innerWidth)(this.view);\n\t\t}\n\t\treturn false;\n\t};\n\n\tDOMRenderer.prototype.isNeededResize = function isNeededResize() {\n\t\treturn this._calcSize() !== this._size.viewport;\n\t};\n\n\tDOMRenderer.prototype.destroy = function destroy() {\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tviewport: -1,\n\t\t\tview: -1,\n\t\t\titem: null\n\t\t};\n\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = \"\";\n\t\tfor (var p in this._orgStyle) {\n\t\t\tthis[this.options.isOverflowScroll ? \"view\" : \"container\"].style[p] = this._orgStyle[p];\n\t\t}\n\t};\n\n\treturn DOMRenderer;\n}();\n\nexports[\"default\"] = DOMRenderer;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/DOMRenderer.js\n// module id = 3\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/*\nFrame\n[\n[1, 1, 1, 1, 1],\n[0, 0, 2, 2, 2],\n[0, 0, 2, 2, 2],\n[3, 4, 5, 5, 5],\n]\n*/\nfunction disableFrame(frame, type, x, y, width, height) {\n\tfor (var i = y; i < y + height; ++i) {\n\t\tfor (var j = x; j < x + width; ++j) {\n\t\t\tif (type !== frame[i][j]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tframe[i][j] = 0;\n\t\t}\n\t}\n}\nfunction searchShapeInFrame(frame, type, top, left, width, height) {\n\tvar size = {\n\t\tleft: left,\n\t\ttop: top,\n\t\ttype: type,\n\t\twidth: 1,\n\t\theight: 1\n\t};\n\n\tfor (var i = left; i < width; ++i) {\n\t\tif (frame[top][i] === type) {\n\t\t\tsize.width = i - left + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\tfor (var _i = top; _i < height; ++_i) {\n\t\tif (frame[_i][left] === type) {\n\t\t\tsize.height = _i - top + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\t// After finding the shape, it will not find again.\n\tdisableFrame(frame, type, left, top, size.width, size.height);\n\treturn size;\n}\nfunction getShapes(frame) {\n\tvar height = frame.length;\n\tvar width = height ? frame[0].length : 0;\n\tvar shapes = [];\n\n\tfor (var i = 0; i < height; ++i) {\n\t\tfor (var j = 0; j < width; ++j) {\n\t\t\tvar type = frame[i][j];\n\n\t\t\tif (!type) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Separate shapes with other numbers.\n\t\t\tshapes.push(searchShapeInFrame(frame, type, i, j, width, height));\n\t\t}\n\t}\n\tshapes.sort(function (a, b) {\n\t\treturn a.type < b.type ? -1 : 1;\n\t});\n\treturn {\n\t\tshapes: shapes,\n\t\twidth: width,\n\t\theight: height\n\t};\n}\n/**\n * @classdesc FrameLayout is a layout that allows you to place cards in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.\n * @ko FrameLayout은 주어진 프레임에 맞춰 카드를 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.\n * @class eg.InfiniteGrid.FrameLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.FrameLayout module eg.InfiniteGrid.FrameLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @param {Boolean} [options.frame=[]] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @param {Boolean} [options.frameFill=true] Make sure that the frame can be attached after the previous frame. 다음 프레임이 전 프레임에 이어 붙일 수 있는지 있는지 확인한다. \n * @example\n```\n\n```\n **/\n\nvar FrameLayout = function () {\n\tfunction FrameLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, FrameLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\titemSize: 0,\n\t\t\tframe: [],\n\t\t\tframeFill: true\n\t\t}, options);\n\t\tvar frame = this.options.frame.map(function (row) {\n\t\t\treturn row.slice();\n\t\t});\n\t\t// divide frame into shapes.\n\t\tvar shapes = getShapes(frame);\n\n\t\tthis._itemSize = this.options.itemSize || 0;\n\t\tthis._shapes = shapes;\n\t\tthis._size = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tFrameLayout.prototype._getItemSize = function _getItemSize() {\n\t\tthis._checkItemSize();\n\n\t\treturn this._itemSize;\n\t};\n\n\tFrameLayout.prototype._checkItemSize = function _checkItemSize() {\n\t\tif (this.options.itemSize) {\n\t\t\tthis._itemSize = this.options.itemSize;\n\t\t\treturn;\n\t\t}\n\t\tvar style = this._style;\n\t\tvar size = style.size2;\n\t\tvar margin = this.options.margin;\n\n\t\t// if itemSize is not in options, caculate itemSize from size.\n\t\tthis._itemSize = (this._size + margin) / this._shapes[size] - margin;\n\t};\n\n\tFrameLayout.prototype._layout = function _layout(items) {\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar length = items.length;\n\t\tvar style = this._style;\n\t\tvar _options = this.options,\n\t\t margin = _options.margin,\n\t\t frameFill = _options.frameFill;\n\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar itemSize = this._getItemSize();\n\t\tvar isItemObject = (typeof itemSize === \"undefined\" ? \"undefined\" : _typeof(itemSize)) === \"object\";\n\t\tvar itemSize2 = isItemObject ? itemSize[size2Name] : itemSize;\n\t\tvar itemSize1 = isItemObject ? itemSize[size1Name] : itemSize;\n\t\tvar shapesSize = this._shapes[size2Name];\n\t\tvar shapes = this._shapes.shapes;\n\t\tvar shapesLength = shapes.length;\n\t\tvar startOutline = (0, _utils.fill)(shapesSize, _consts.DUMMY_POSITION);\n\t\tvar endOutline = (0, _utils.fill)(shapesSize, _consts.DUMMY_POSITION);\n\t\tvar dist = 0;\n\t\tvar end = 0;\n\t\tvar startIndex = -1;\n\t\tvar endIndex = -1;\n\t\tvar minPos = -1;\n\t\tvar maxPos = -1;\n\n\t\tif (!shapesLength) {\n\t\t\treturn { start: outline, end: outline, startIndex: startIndex, endIndex: endIndex };\n\t\t}\n\t\tfor (var i = 0; i < length; i += shapesLength) {\n\t\t\tfor (var j = 0; j < shapesLength && i + j < length; ++j) {\n\t\t\t\tvar _item$rect;\n\n\t\t\t\tvar item = items[i + j];\n\t\t\t\tvar shape = shapes[j];\n\t\t\t\tvar shapePos1 = shape[pos1Name];\n\t\t\t\tvar shapePos2 = shape[pos2Name];\n\t\t\t\tvar shapeSize1 = shape[size1Name];\n\t\t\t\tvar shapeSize2 = shape[size2Name];\n\t\t\t\tvar pos1 = end - dist + shapePos1 * (itemSize1 + margin);\n\t\t\t\tvar pos2 = shapePos2 * (itemSize2 + margin);\n\t\t\t\tvar size1 = shapeSize1 * (itemSize1 + margin) - margin;\n\t\t\t\tvar size2 = shapeSize2 * (itemSize2 + margin) - margin;\n\n\t\t\t\tfor (var k = shapePos2; k < shapePos2 + shapeSize2 && k < shapesSize; ++k) {\n\t\t\t\t\tif (startOutline[k] === _consts.DUMMY_POSITION) {\n\t\t\t\t\t\tstartOutline[k] = pos1;\n\t\t\t\t\t}\n\t\t\t\t\tif (startIndex === -1) {\n\t\t\t\t\t\tminPos = pos1;\n\t\t\t\t\t\tstartIndex = i + j;\n\t\t\t\t\t\tmaxPos = pos1 + size1 + margin;\n\t\t\t\t\t\tendIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tif (minPos > pos1) {\n\t\t\t\t\t\tminPos = pos1;\n\t\t\t\t\t\tstartIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tif (maxPos < pos1 + size1 + margin) {\n\t\t\t\t\t\tmaxPos = pos1 + size1 + margin;\n\t\t\t\t\t\tendIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tstartOutline[k] = Math.min(startOutline[k], pos1);\n\t\t\t\t\tendOutline[k] = Math.max(endOutline[k], pos1 + size1 + margin);\n\t\t\t\t}\n\t\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);\n\t\t\t}\n\t\t\tend = Math.max.apply(Math, endOutline);\n\t\t\t// check dist once\n\t\t\tif (i !== 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// find & fill empty block\n\t\t\tif (!frameFill) {\n\t\t\t\tdist = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdist = end;\n\n\t\t\tfor (var _j = 0; _j < shapesSize; ++_j) {\n\t\t\t\tif (startOutline[_j] === _consts.DUMMY_POSITION) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// the dist between frame's end outline and next frame's start outline\n\t\t\t\t// expect that next frame's start outline is startOutline[j] + end\n\t\t\t\tdist = Math.min(startOutline[_j] + end - endOutline[_j], dist);\n\t\t\t}\n\t\t}\n\t\tfor (var _i2 = 0; _i2 < shapesSize; ++_i2) {\n\t\t\tif (startOutline[_i2] !== _consts.DUMMY_POSITION) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tstartOutline[_i2] = Math.max.apply(Math, startOutline);\n\t\t\tendOutline[_i2] = startOutline[_i2];\n\t\t}\n\t\t// The target outline is start outline when type is APPENDING\n\t\tvar targetOutline = isAppend ? startOutline : endOutline;\n\t\tvar prevOutlineEnd = outline.length === 0 ? 0 : Math[isAppend ? \"max\" : \"min\"].apply(Math, outline);\n\t\tvar prevOutlineDist = isAppend ? 0 : end;\n\n\t\tif (frameFill && outline.length === shapesSize) {\n\t\t\tprevOutlineDist = -_consts.DUMMY_POSITION;\n\t\t\tfor (var _i3 = 0; _i3 < shapesSize; ++_i3) {\n\t\t\t\tif (startOutline[_i3] === endOutline[_i3]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// if appending type is PREPEND, subtract dist from appending group's height.\n\n\t\t\t\tprevOutlineDist = Math.min(targetOutline[_i3] + prevOutlineEnd - outline[_i3], prevOutlineDist);\n\t\t\t}\n\t\t}\n\t\tfor (var _i4 = 0; _i4 < shapesSize; ++_i4) {\n\t\t\tstartOutline[_i4] += prevOutlineEnd - prevOutlineDist;\n\t\t\tendOutline[_i4] += prevOutlineEnd - prevOutlineDist;\n\t\t}\n\t\titems.forEach(function (item) {\n\t\t\titem.rect[pos1Name] += prevOutlineEnd - prevOutlineDist;\n\t\t});\n\t\treturn {\n\t\t\tstart: startOutline,\n\t\t\tend: endOutline,\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tFrameLayout.prototype._insert = function _insert(items, outline, type) {\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tFrameLayout.prototype.layout = function layout(groups, outlines) {\n\t\tvar length = groups.length;\n\t\tvar point = outlines;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.FrameLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tFrameLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tFrameLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tFrameLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\n\treturn FrameLayout;\n}();\n\nexports[\"default\"] = FrameLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/FrameLayout.js\n// module id = 4\n// module chunks = 0 1","\"use strict\";\n\nvar _InfiniteGrid = require(\"./InfiniteGrid\");\n\nvar _InfiniteGrid2 = _interopRequireDefault(_InfiniteGrid);\n\nvar _GridLayout = require(\"./layouts/GridLayout\");\n\nvar _GridLayout2 = _interopRequireDefault(_GridLayout);\n\nvar _FrameLayout = require(\"./layouts/FrameLayout\");\n\nvar _FrameLayout2 = _interopRequireDefault(_FrameLayout);\n\nvar _SquareLayout = require(\"./layouts/SquareLayout\");\n\nvar _SquareLayout2 = _interopRequireDefault(_SquareLayout);\n\nvar _PackingLayout = require(\"./layouts/PackingLayout\");\n\nvar _PackingLayout2 = _interopRequireDefault(_PackingLayout);\n\nvar _JustifiedLayout = require(\"./layouts/JustifiedLayout\");\n\nvar _JustifiedLayout2 = _interopRequireDefault(_JustifiedLayout);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n/**\n * Copyright (c) NAVER Corp.\n * egjs-infinitegrid projects are licensed under the MIT license\n */\n_InfiniteGrid2[\"default\"].GridLayout = _GridLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].FrameLayout = _FrameLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].SquareLayout = _SquareLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].PackingLayout = _PackingLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].JustifiedLayout = _JustifiedLayout2[\"default\"];\n\nmodule.exports = _InfiniteGrid2[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/index.js\n// module id = 5\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; /**\n * Copyright (c) 2017 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\n\nvar _component = require(\"@egjs/component\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _ItemManager = require(\"./ItemManager\");\n\nvar _ItemManager2 = _interopRequireDefault(_ItemManager);\n\nvar _DOMRenderer = require(\"./DOMRenderer\");\n\nvar _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);\n\nvar _ImageLoaded = require(\"./ImageLoaded\");\n\nvar _ImageLoaded2 = _interopRequireDefault(_ImageLoaded);\n\nvar _Watcher = require(\"./Watcher\");\n\nvar _Watcher2 = _interopRequireDefault(_Watcher);\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// IE8\n// https://stackoverflow.com/questions/43216659/babel-ie8-inherit-issue-with-object-create\n/* eslint-disable */\nif (typeof Object.create !== \"function\") {\n\tObject.create = function (o, properties) {\n\t\tif ((typeof o === \"undefined\" ? \"undefined\" : _typeof(o)) !== \"object\" && typeof o !== \"function\") {\n\t\t\tthrow new TypeError(\"Object prototype may only be an Object: \" + o);\n\t\t} else if (o === null) {\n\t\t\tthrow new Error(\"This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument.\");\n\t\t}\n\t\tfunction F() {}\n\t\tF.prototype = o;\n\t\treturn new F();\n\t};\n}\n/* eslint-enable */\n\n/**\n * A module used to arrange card elements including content infinitely according to layout type. With this module, you can implement various layouts composed of different card elements whose sizes vary. It guarantees performance by maintaining the number of DOMs the module is handling under any circumstance\n * @ko 콘텐츠가 있는 카드 엘리먼트를 레이아웃 타입에 따라 무한으로 배치하는 모듈. 다양한 크기의 카드 엘리먼트를 다양한 레이아웃으로 배치할 수 있다. 카드 엘리먼트의 개수가 계속 늘어나도 모듈이 처리하는 DOM의 개수를 일정하게 유지해 최적의 성능을 보장한다\n * @alias eg.InfiniteGrid\n * @extends eg.Component\n *\n * @example\n```\n\n\t- \n\t\t
test1
\n\t \n\t- \n\t\t
test2
\n\t \n\t- \n\t\t
test3
\n\t \n\t- \n\t\t
test4
\n\t \n\t- \n\t\t
test5
\n\t \n\t- \n\t\t
test6
\n\t \n
\n\n```\n *\n * @support {\"ie\": \"8+\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"2.1+ (except 3.x)\"}\n **/\n\nvar InfiniteGrid = function (_Component) {\n\t_inherits(InfiniteGrid, _Component);\n\n\t/**\n * @param {HTMLElement|String|jQuery} element A base element for a module 모듈을 적용할 기준 엘리먼트\n * @param {Object} [options] The option object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 옵션 객체\n * @param {String} [options.itemSelector] A selector to select card elements that make up the layout레이아웃을 구성하는 카드 엘리먼트를 선택할 선택자(selector)\n * @param {Boolean} [options.useRecycle=true] Indicates whether keep the number of DOMs is maintained. If the useRecycle value is 'true', keep the number of DOMs is maintained. If the useRecycle value is 'false', the number of DOMs will increase as card elements are added. DOM의 수를 유지할지 여부를 나타낸다. useRecycle 값이 'true'이면 DOM 개수를 일정하게 유지한다. useRecycle 값이 'false' 이면 카드 엘리먼트가 추가될수록 DOM 개수가 계속 증가한다.\n * @param {Boolean} [options.isOverflowScroll=false] Indicates whether overflow:scroll is appliedoverflow:scroll 적용여부를 결정한다.\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향)\n * @param {Boolean} [options.isEqualSize=false] Indicates whether sizes of all card elements are equal to one another. If sizes of card elements to be arranged are all equal and this option is set to \"true\", the performance of layout arrangement can be improved. 카드 엘리먼트의 크기가 동일한지 여부. 배치될 카드 엘리먼트의 크기가 모두 동일할 때 이 옵션을 'true'로 설정하면 레이아웃 배치 성능을 높일 수 있다\n * @param {Number} [options.threshold=100] The threshold size of an event area where card elements are added to a layout.레이아웃에 카드 엘리먼트를 추가하는 이벤트가 발생하는 기준 영역의 크기.\n */\n\tfunction InfiniteGrid(element, options) {\n\t\t_classCallCheck(this, InfiniteGrid);\n\n\t\tvar _this = _possibleConstructorReturn(this, _Component.call(this));\n\n\t\t_extends(_this.options = {\n\t\t\titemSelector: \"*\",\n\t\t\tisOverflowScroll: false,\n\t\t\tthreshold: 100,\n\t\t\tisEqualSize: false,\n\t\t\tuseRecycle: true,\n\t\t\thorizontal: false\n\t\t}, options);\n\t\t_consts.IS_ANDROID2 && (_this.options.isOverflowScroll = false);\n\t\t_this._isVertical = !_this.options.horizontal;\n\t\t_this._reset();\n\t\t_this._items = new _ItemManager2[\"default\"]();\n\t\t_this._renderer = new _DOMRenderer2[\"default\"](element, {\n\t\t\tisOverflowScroll: _this.options.isOverflowScroll,\n\t\t\tisEqualSize: _this.options.isEqualSize,\n\t\t\tisVertical: _this._isVertical\n\t\t});\n\t\t_this._watcher = new _Watcher2[\"default\"](_this._renderer, {\n\t\t\tlayout: function layout() {\n\t\t\t\treturn _this.layout();\n\t\t\t},\n\t\t\tcheck: function check(param) {\n\t\t\t\treturn _this._onCheck(param);\n\t\t\t}\n\t\t});\n\t\treturn _this;\n\t}\n\t/**\n * Adds a card element at the bottom of a layout. This method is available only if the isProcessing() method returns false.\n * @ko 카드 엘리먼트를 레이아웃 아래에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다\n * 이 메소드는 isProcessing()의 반환값이 false일 경우에만 사용 가능하다.\n * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트의 배열\n * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.\n * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.append(\"<div class='item'>test1</div><div class='item'>test2</div>\");\n * infinitegrid.append([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]);\n * infinitegrid.append([HTMLElement1, HTMLElement2]);\n * infinitegrid.append(jQuery([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]));\n */\n\n\n\tInfiniteGrid.prototype.append = function append(elements, groupKey) {\n\t\tthis._layout && this._insert(elements, _consts.APPEND, groupKey);\n\t\treturn this;\n\t};\n\t/**\n * Adds a card element at the top of a layout. This method is available only if the isProcessing() method returns false.\n * @ko 카드 엘리먼트를 레이아웃의 위에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다\n * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트 배열\n * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.\n * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.prepend(\"<div class='item'>test1</div><div class='item'>test2</div>\");\n * infinitegrid.prepend([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]);\n * infinitegrid.prepend([HTMLElement1, HTMLElement2]);\n * infinitegrid.prepend(jQuery([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]));\n */\n\n\n\tInfiniteGrid.prototype.prepend = function prepend(elements, groupKey) {\n\t\tthis._layout && this._insert(elements, _consts.PREPEND, groupKey);\n\t\treturn this;\n\t};\n\t/**\n * Specifies the Layout class to use.\n * @ko 사용할 Layout 클래스를 지정한다.\n * @param {Class} LayoutKlass The Layout class to use 사용할 Layout 클래스\n * @param {Object} options Options to apply to the Layout.Layout에 적용할 옵션\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.setLayout(eg.InfiniteGrid.GridLayout, {\n * margin: 10,\n * align: \"start\"\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.JustifiedLayout, {\n * margin: 10,\n * minSize: 100,\n * maxSize: 200\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.SquareLayout, {\n * margin: 10,\n * column: 2\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.FrameLayout, {\n * margin: 10,\n * frame: [\n * [1, 2],\n * [4, 3],\n * ]\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.PackingLayout, {\n * margin: 10,\n * aspectRatio: 1.5\n * });\n */\n\n\n\tInfiniteGrid.prototype.setLayout = function setLayout(LayoutKlass, options) {\n\t\tthis._layout = new LayoutKlass(_extends(options || {}, {\n\t\t\thorizontal: !this._isVertical\n\t\t}));\n\t\tthis._layout.setSize(this._renderer.getViewportSize());\n\t\treturn this;\n\t};\n\t/**\n * Returns the layouted items.\n * @ko 레이아웃된 아이템들을 반환한다.\n * @param {Boolean} includeCached Indicates whether to include the cached items. 캐싱된 아이템을 포함할지 여부를 나타낸다.\n * @returns {Array} List of items 아이템의 목록\n */\n\n\n\tInfiniteGrid.prototype.getItems = function getItems() {\n\t\tvar includeCached = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n\t\treturn this[includeCached ? \"_getItems\" : \"_getVisibleItems\"]();\n\t};\n\n\tInfiniteGrid.prototype._getItems = function _getItems() {\n\t\treturn this._items.pluck(\"items\", 0, this._items.size());\n\t};\n\n\tInfiniteGrid.prototype._getVisibleItems = function _getVisibleItems() {\n\t\treturn this._items.pluck(\"items\", this._status.startCursor, this._status.endCursor);\n\t};\n\n\tInfiniteGrid.prototype._updateEdge = function _updateEdge() {\n\t\tthis._status.start = this._items.getEdge(\"start\", this._status.startCursor, this._status.endCursor);\n\t\tthis._status.end = this._items.getEdge(\"end\", this._status.startCursor, this._status.endCursor);\n\t};\n\n\tInfiniteGrid.prototype._getEdgeOffset = function _getEdgeOffset(cursor) {\n\t\tvar rect = null;\n\n\t\tif (!this._status[cursor]) {\n\t\t\tvar item = this._items.getEdge(cursor);\n\n\t\t\tthis._status[cursor] = item;\n\t\t}\n\n\t\tif (this._status[cursor]) {\n\t\t\trect = this._status[cursor].rect;\n\t\t\tif (cursor === \"start\") {\n\t\t\t\trect.bottom = rect.top + this._status[cursor].size.height;\n\t\t\t\trect.right = rect.left + this._status[cursor].size.width;\n\t\t\t}\n\t\t}\n\t\treturn rect;\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._fit = function _fit() {\n\t\tvar scrollCycle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"after\";\n\n\t\t// for caching\n\t\tif (!this._layout) {\n\t\t\treturn 0;\n\t\t}\n\t\tvar base = this._getEdgeValue(\"start\");\n\t\tvar margin = this._getLoadingStatus() === _consts.LOADING_PREPEND && this._status.loadingSize || 0;\n\n\t\tif (!this.options.useRecycle || _consts.DEFENSE_BROWSER) {\n\t\t\tif (scrollCycle === \"before\" && margin && base < margin) {\n\t\t\t\tthis._renderer.scrollBy(-Math.abs(base) + margin);\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\t} else if (scrollCycle === \"after\" && base < 0) {\n\t\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\t\tthis._renderer.scrollBy(Math.abs(base));\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (base !== 0 || margin) {\n\t\t\tvar isProcessing = this._isProcessing();\n\n\t\t\tthis._process(_consts.PROCESSING);\n\t\t\tif (scrollCycle === \"before\") {\n\t\t\t\tthis._renderer.scrollBy(-Math.abs(base) + margin);\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t}\n\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\tif (scrollCycle === \"after\") {\n\t\t\t\tthis._renderer.scrollBy(Math.abs(base) + margin);\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t}\n\t\t\tif (!isProcessing) {\n\t\t\t\tthis._process(_consts.PROCESSING, false);\n\t\t\t}\n\t\t}\n\t\treturn base;\n\t};\n\n\tInfiniteGrid.prototype._getEdgeValue = function _getEdgeValue(cursor) {\n\t\treturn this._items.getEdgeValue(cursor, this._status.startCursor, this._status.endCursor);\n\t};\n\t/**\n * Rearranges a layout.\n * @ko 레이아웃을 다시 배치한다.\n * @param {Boolean} [isRelayout=true] Indicates whether a card element is being relayouted 카드 엘리먼트 재배치 여부\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.layout = function layout() {\n\t\tvar _this2 = this;\n\n\t\tvar isRelayout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n\t\tif (!this._layout || this._isProcessing()) {\n\t\t\treturn this;\n\t\t}\n\t\t// check childElement\n\t\tif (!this._items.size()) {\n\t\t\tthis._insert((0, _utils.toArray)(this._renderer.container.children), true);\n\t\t\treturn this;\n\t\t}\n\t\tthis._process(_consts.PROCESSING);\n\n\t\tvar data = void 0;\n\t\tvar outline = void 0;\n\n\t\tif (isRelayout) {\n\t\t\t// remove cache\n\t\t\tdata = this._items.get(this._status.startCursor, this._status.endCursor);\n\t\t\tif (this._renderer.resize()) {\n\t\t\t\tthis._layout.setSize(this._renderer.getViewportSize());\n\t\t\t\tdata.forEach(function (v) {\n\t\t\t\t\tdata.items = _this2._renderer.updateSize(v.items);\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tdata = this._items.get(this._status.startCursor, this._items.size());\n\t\t\toutline = this._items.getOutline(this._status.startCursor, \"start\");\n\t\t}\n\t\tif (!data.length) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._layout.layout(data, outline);\n\n\t\tif (isRelayout) {\n\t\t\tthis._items._data.forEach(function (group, cursor) {\n\t\t\t\tif (_this2._status.startCursor <= cursor && cursor <= _this2._status.endCursor) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgroup.outlines.start = [];\n\t\t\t\tgroup.outlines.end = [];\n\t\t\t});\n\t\t} else {\n\t\t\tdata.forEach(function (v) {\n\t\t\t\treturn _this2._items.set(v, v.groupKey);\n\t\t\t});\n\t\t}\n\t\tthis._onLayoutComplete(data, _consts.APPEND, _consts.NO_TRUSTED, false);\n\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\tisRelayout && this._watcher.setScrollPos();\n\n\t\treturn this;\n\t};\n\t/**\n * Removes a item element on a grid layout.\n * @ko 그리드 레이아웃의 카드 엘리먼트를 삭제한다.\n * @param {HTMLElement} item element to be removed 삭제될 아이템 엘리먼트\n * @return {Object} Removed item element 삭제된 아이템 엘리먼트 정보\n */\n\n\n\tInfiniteGrid.prototype.remove = function remove(element) {\n\t\tif (element) {\n\t\t\tvar items = this._items.remove(element, this._status.startCursor, this._status.endCursor);\n\n\t\t\tif (items) {\n\t\t\t\t_DOMRenderer2[\"default\"].removeElement(element);\n\t\t\t\treturn items;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tInfiniteGrid.prototype._getNextItems = function _getNextItems(isAppend) {\n\t\tvar items = [];\n\t\tvar size = this._items.size();\n\n\t\t// from cache\n\t\tif (size > 0 && this._status.startCursor !== -1 && this._status.endCursor !== -1) {\n\t\t\tif (isAppend && size > this._status.endCursor + 1) {\n\t\t\t\titems = this._items.pluck(\"items\", this._status.endCursor + 1);\n\t\t\t} else if (!isAppend && this._status.startCursor > 0) {\n\t\t\t\titems = this._items.pluck(\"items\", this._status.startCursor - 1);\n\t\t\t}\n\t\t}\n\t\treturn items;\n\t};\n\t/**\n * Returns the list of group keys which belongs to card elements currently being maintained. You can use the append() or prepend() method to configure group keys so that multiple card elements can be managed at once. If you do not use these methods to configure group keys, groupkey is automatically generated.\n * @ko 현재 유지하고 있는 카드 엘리먼트의 그룹 키 목록을 반환한다. 여러 개의 카드 엘리먼트를 묶어서 관리할 수 있도록 append() 메서드나 prepend() 메서드에서 그룹 키를 지정할 수 있다. append() 메서드나 prepend() 메서드에서 그룹 키를 지정하지 않았다면 자동으로 그룹키가 생성된다.\n * @param {Boolean} includeCached Indicates whether to include the cached groups. 캐싱된 그룹을 포함할지 여부를 나타낸다.\n * @return {Array} List of group keys 그룹 키의 목록\n */\n\n\n\tInfiniteGrid.prototype.getGroupKeys = function getGroupKeys(includeCached) {\n\t\tvar data = includeCached ? this._items.get() : this._items.get(this._status.startCursor, this._status.endCursor);\n\n\t\treturn data.map(function (v) {\n\t\t\treturn v.groupKey;\n\t\t});\n\t};\n\t/**\n * Returns the current state of a module such as location information. You can use the setStatus() method to restore the information returned through a call to this method.\n * @ko 카드의 위치 정보 등 모듈의 현재 상태 정보를 반환한다. 이 메서드가 반환한 정보를 저장해 두었다가 setStatus() 메서드로 복원할 수 있다\n * @return {Object} State object of the eg.InfiniteGrid moduleeg.InfiniteGrid 모듈의 상태 객체\n */\n\n\n\tInfiniteGrid.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\toptions: _extends({}, this.options),\n\t\t\t_status: _extends({}, this._status),\n\t\t\t_items: this._items.getStatus(),\n\t\t\t_renderer: this._renderer.getStatus(),\n\t\t\t_watcher: this._watcher.getStatus()\n\t\t};\n\t};\n\t/**\n * Sets the state of the eg.InfiniteGrid module with the information returned through a call to the getStatue() method.\n * @ko getStatue() 메서드가 저장한 정보로 eg.InfiniteGrid 모듈의 상태를 설정한다.\n * @param {Object} status State object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 상태 객체\n * @param {boolean} [applyScrollPos=true] Checks whether to scroll스크롤의 위치를 복원할지 결정한다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.setStatus = function setStatus(status) {\n\t\tvar applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tif (!status || !status.options || !status._status || !status._renderer || !status._items || !status._watcher) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._watcher.detachEvent();\n\t\t_extends(this.options, status.options);\n\t\t_extends(this._status, status._status);\n\t\tthis._items.setStatus(status._items, this._status.startCursor, this._status.endCursor);\n\t\tthis._renderer.setStatus(status._renderer, this._getVisibleItems());\n\t\tthis._watcher.setStatus(status._watcher, applyScrollPos);\n\t\tthis._updateEdge();\n\t\tthis._watcher.attachEvent();\n\t\treturn this;\n\t};\n\t/**\n * Clears added card elements and data.\n * @ko 추가된 카드 엘리먼트와 데이터를 모두 지운다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.clear = function clear() {\n\t\tthis._items.clear();\n\t\tthis._renderer.clear();\n\t\tthis._reset();\n\t\tthis._appendLoadingBar();\n\t\treturn this;\n\t};\n\t/**\n * Specifies the Loading Bar to use for append or prepend items.\n * @ko 아이템을 append 또는 prepend 하기 위해 사용할 로딩 바를 지정한다.\n * @param {String|Object} [userLoadingBar={}] The loading bar HTML markup or element or element selector 로딩 바 HTML 또는 element 또는 selector \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.setLoadingBar = function setLoadingBar() {\n\t\tvar userLoadingBar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\tvar loadingBarObj = (typeof userLoadingBar === \"undefined\" ? \"undefined\" : _typeof(userLoadingBar)) === \"object\" ? userLoadingBar : {\n\t\t\t\"append\": userLoadingBar,\n\t\t\t\"prepend\": userLoadingBar\n\t\t};\n\n\t\tthis._status.loadingSize = 0;\n\t\tthis._status.loadingStyle = {};\n\t\tthis._loadingBar = this._loadingBar || {};\n\t\tvar loadingBar = this._loadingBar;\n\n\t\tfor (var type in loadingBarObj) {\n\t\t\tloadingBar[type] = (0, _utils.$)(loadingBarObj[type]);\n\t\t\tloadingBar[type].className += \" \" + _consts.IGNORE_CLASSNAME;\n\t\t}\n\t\tthis._appendLoadingBar();\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._appendLoadingBar = function _appendLoadingBar() {\n\t\tvar loadingBar = this._loadingBar;\n\t\tvar container = this._renderer.container;\n\n\t\tfor (var type in loadingBar) {\n\t\t\tcontainer.appendChild(loadingBar[type]);\n\t\t}\n\t};\n\t/**\n * Checks whether a card element or data is being added.\n * @ko 카드 엘리먼트 추가 또는 데이터 로딩이 진행 중인지 확인한다\n * @return {Boolean} Indicates whether a card element or data is being added 카드 엘리먼트 추가 또는 데이터 로딩 진행 중 여부\n */\n\n\n\tInfiniteGrid.prototype.isProcessing = function isProcessing() {\n\t\treturn this._isProcessing() || this._isLoading();\n\t};\n\n\tInfiniteGrid.prototype._isProcessing = function _isProcessing() {\n\t\treturn (this._status.processingStatus & _consts.PROCESSING) > 0;\n\t};\n\n\tInfiniteGrid.prototype._isLoading = function _isLoading() {\n\t\treturn this._getLoadingStatus() > 0;\n\t};\n\n\tInfiniteGrid.prototype._getLoadingStatus = function _getLoadingStatus() {\n\t\treturn this._status.processingStatus & (_consts.LOADING_APPEND | _consts.LOADING_PREPEND);\n\t};\n\n\tInfiniteGrid.prototype._process = function _process(status) {\n\t\tvar isAdd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tif (isAdd) {\n\t\t\tthis._status.processingStatus |= status;\n\t\t} else {\n\t\t\tthis._status.processingStatus -= this._status.processingStatus & status;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._insert = function _insert(elements, isAppend, groupKey) {\n\t\tif (this._isProcessing() || elements.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tvar key = typeof groupKey === \"undefined\" ? new Date().getTime() + Math.floor(Math.random() * 1000) : groupKey;\n\t\tvar items = _ItemManager2[\"default\"].from((0, _utils.$)(elements, true), this.options.itemSelector, {\n\t\t\tisAppend: isAppend,\n\t\t\tgroupKey: key\n\t\t});\n\n\t\tif (!items.length) {\n\t\t\treturn;\n\t\t}\n\t\tthis._postLayout(_consts.NO_CACHE, items, isAppend, _consts.NO_TRUSTED);\n\t};\n\t// add items, and remove items for recycling\n\n\n\tInfiniteGrid.prototype._recycle = function _recycle(isAppend) {\n\t\tvar remove = [];\n\n\t\tif (this._status.startCursor !== this._status.endCursor) {\n\t\t\tfor (var i = this._status.startCursor; i <= this._status.endCursor; i++) {\n\t\t\t\tremove.push(this._isVisible(i));\n\t\t\t}\n\t\t}\n\t\tvar start = remove.indexOf(isAppend ? 1 : -1);\n\t\tvar end = remove.lastIndexOf(isAppend ? 1 : -1);\n\t\tvar visible = remove.indexOf(0);\n\n\t\tif (visible === -1 || start === -1 || end === -1) {\n\t\t\treturn;\n\t\t}\n\n\t\tstart = this._status.startCursor + (isAppend ? 0 : start);\n\t\tend = isAppend ? this._status.startCursor + end : this._status.endCursor;\n\t\t_DOMRenderer2[\"default\"].removeItems(this._items.pluck(\"items\", start, end));\n\t\tif (isAppend) {\n\t\t\tthis._status.startCursor = end + 1;\n\t\t} else {\n\t\t\tthis._status.endCursor = start - 1;\n\t\t}\n\t};\n\t/**\n * Returns the element of loading bar.\n * @ko 로딩 바의 element를 반환한다.\n * @param {Boolean} [isAppend=currentLoadingBar|true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.\n * @return {Element} The element of loading bar. 로딩 바의 element\n */\n\n\n\tInfiniteGrid.prototype.getLoadingBar = function getLoadingBar() {\n\t\tvar isAppend = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._getLoadingStatus() !== _consts.LOADING_PREPEND;\n\n\t\treturn this._loadingBar[isAppend ? \"append\" : \"prepend\"];\n\t};\n\t/**\n * Start loading for append/prepend during loading data.\n * @ko 데이터가 로딩되는 동안 append/prepend하길 위해 로딩을 시작한다.\n * @param {Boolean} [isAppend=true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.\n * @param {Object} [userStyle = {display: \"block\"}] custom style to apply to this loading bar for start. 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일 \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.startLoading = function startLoading(isAppend) {\n\t\tvar userStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { display: \"block\" };\n\n\t\tif (this._isLoading()) {\n\t\t\treturn this;\n\t\t}\n\t\tvar type = isAppend ? \"append\" : \"prepend\";\n\n\t\tthis._process(isAppend ? _consts.LOADING_APPEND : _consts.LOADING_PREPEND);\n\t\tif (!this._loadingBar[type]) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._renderLoading(userStyle);\n\t\tthis._status.loadingStyle = userStyle;\n\t\tif (!isAppend) {\n\t\t\tthis._fit(\"before\");\n\t\t} else {\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") + this._status.loadingSize);\n\t\t}\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._renderLoading = function _renderLoading() {\n\t\tvar _extends2;\n\n\t\tvar userStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._status.loadingStyle;\n\n\t\tif (!this._isLoading()) {\n\t\t\treturn;\n\t\t}\n\t\tvar isAppend = this._getLoadingStatus() === _consts.LOADING_APPEND;\n\t\tvar el = this._loadingBar[isAppend ? \"append\" : \"prepend\"];\n\n\t\tif (!el) {\n\t\t\treturn;\n\t\t}\n\t\tthis._status.loadingSize = this._isVertical ? (0, _utils.innerHeight)(el) : (0, _utils.innerWidth)(el);\n\t\tvar pos = isAppend ? this._getEdgeValue(\"end\") : this._getEdgeValue(\"start\") - this._status.loadingSize;\n\t\tvar style = _extends((_extends2 = {\n\t\t\tposition: \"absolute\"\n\t\t}, _extends2[this._isVertical ? \"top\" : \"left\"] = pos + \"px\", _extends2), userStyle);\n\n\t\tfor (var property in style) {\n\t\t\tel.style[property] = style[property];\n\t\t}\n\t};\n\t/**\n * End loading after startLoading() for append/prepend\n * @ko append/prepend하길 위해 startLoading() 호출해선 걸었던 로딩을 끝낸다.\n * @param {Object} [userStyle = {display: \"none\"}] custom style to apply to this loading bar for end 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일 \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.endLoading = function endLoading() {\n\t\tvar _extends3;\n\n\t\tvar userStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { display: \"none\" };\n\n\t\tif (!this._isLoading()) {\n\t\t\treturn this;\n\t\t}\n\t\tvar isAppend = this._getLoadingStatus() === _consts.LOADING_APPEND;\n\t\tvar type = isAppend ? \"append\" : \"prepend\";\n\t\tvar el = this._loadingBar[type];\n\t\tvar size = this._status.loadingSize;\n\n\t\tthis._process(_consts.LOADING_APPEND | _consts.LOADING_PREPEND, false);\n\t\tthis._status.loadingSize = 0;\n\t\tthis._status.loadingStyle = {};\n\t\tif (!el) {\n\t\t\treturn this;\n\t\t}\n\t\tvar style = _extends((_extends3 = {}, _extends3[this._isVertical ? \"top\" : \"left\"] = -size + \"px\", _extends3), userStyle);\n\n\t\tfor (var property in style) {\n\t\t\tel.style[property] = style[property];\n\t\t}\n\t\tif (!isAppend) {\n\t\t\tthis._renderer.scrollBy(-size);\n\t\t\tthis._watcher.setScrollPos();\n\t\t\tthis._items.fit(size, this._isVertical);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\"));\n\t\t}\n\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\"));\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._postLayout = function _postLayout(fromCache, items, isAppend, isTrusted) {\n\t\tvar _this3 = this;\n\n\t\tvar outline = this._items.getOutline(isAppend ? this._status.endCursor : this._status.startCursor, isAppend ? \"end\" : \"start\");\n\n\t\tvar fromRelayout = false;\n\n\t\tif (fromCache) {\n\t\t\tvar cacheOutline = this._items.getOutline(isAppend ? this._status.endCursor + 1 : this._status.startCursor - 1, isAppend ? \"start\" : \"end\");\n\n\t\t\tfromRelayout = outline.length === cacheOutline.length ? !outline.every(function (v, index) {\n\t\t\t\treturn v === cacheOutline[index];\n\t\t\t}) : true;\n\n\t\t\tif (!fromRelayout) {\n\t\t\t\tthis._renderer.createAndInsert(items, isAppend);\n\t\t\t\tthis._updateCursor(isAppend);\n\t\t\t\tthis._onLayoutComplete(items, isAppend, isTrusted);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\t\tthis._process(_consts.PROCESSING);\n\t\tvar method = isAppend ? \"append\" : \"prepend\";\n\n\t\tfromCache && _DOMRenderer2[\"default\"].createElements(items);\n\t\tthis._renderer[method](items);\n\t\t// check image sizes after elements are attated on DOM\n\t\t_ImageLoaded2[\"default\"].check(items.map(function (item) {\n\t\t\treturn item.el;\n\t\t}), function () {\n\t\t\tvar layouted = _this3._layout[method](_this3._renderer.updateSize(items), outline);\n\n\t\t\tif (fromCache) {\n\t\t\t\t_this3._setItems(layouted);\n\t\t\t} else {\n\t\t\t\t_this3._insertItems(layouted, isAppend);\n\t\t\t}\n\t\t\t_this3._updateCursor(isAppend);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(layouted.items);\n\t\t\t_this3._onLayoutComplete(layouted.items, isAppend, isTrusted);\n\t\t});\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._isVisible = function _isVisible(index) {\n\t\tvar min = Math.min.apply(Math, this._items.getOutline(index, \"start\"));\n\t\tvar max = Math.max.apply(Math, this._items.getOutline(index, \"end\"));\n\t\tvar pos = this._watcher.getScrollPos();\n\t\tvar viewSize = this._renderer.getViewSize();\n\n\t\tif (pos + viewSize + this.options.threshold < min) {\n\t\t\treturn -1;\n\t\t} else if (pos - this.options.threshold > max) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t};\n\n\tInfiniteGrid.prototype._updateCursor = function _updateCursor(isAppend) {\n\t\tif (this.options.useRecycle) {\n\t\t\tif (isAppend) {\n\t\t\t\tthis._status.endCursor++;\n\t\t\t} else if (this._status.startCursor > 0) {\n\t\t\t\tthis._status.startCursor--;\n\t\t\t} else {\n\t\t\t\tthis._status.endCursor++; // outside prepend\n\t\t\t}\n\t\t\tif (this._status.startCursor < 0) {\n\t\t\t\tthis._status.startCursor = 0;\n\t\t\t}\n\t\t} else {\n\t\t\tthis._status.startCursor = 0;\n\t\t\tthis._status.endCursor = this._items.size() - 1;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._setItems = function _setItems(layouted) {\n\t\tvar groupKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : layouted.items && layouted.items[0].groupKey || 0;\n\n\t\tlayouted.groupKey = groupKey;\n\t\tthis._items.set(layouted, groupKey);\n\t};\n\n\tInfiniteGrid.prototype._insertItems = function _insertItems(layouted, isAppend) {\n\t\tlayouted.groupKey = layouted.items[0].groupKey;\n\t\tthis._items[isAppend ? \"append\" : \"prepend\"](layouted);\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._requestAppend = function _requestAppend() {\n\t\tvar items = this._getNextItems(_consts.APPEND);\n\n\t\tif (this._isProcessing()) {\n\t\t\treturn;\n\t\t}\n\t\tif (items.length) {\n\t\t\tthis._postLayout(_consts.CACHE, items, _consts.APPEND, _consts.TRUSTED);\n\t\t} else {\n\t\t\t/**\n * This event is fired when a card element must be added at the bottom or right of a layout because there is no card to be displayed on screen when a user scrolls near bottom or right.\n * @ko 카드 엘리먼트가 레이아웃의 아래나 오른쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 아래나 오른쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다\n * @event eg.InfiniteGrid#append\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 마지막 그룹의 그룹키\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\t\tthis.trigger(\"append\", {\n\t\t\t\tisTrusted: true,\n\t\t\t\tgroupKey: this.getGroupKeys().pop()\n\t\t\t});\n\t\t}\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._requestPrepend = function _requestPrepend() {\n\t\tvar items = this._getNextItems(_consts.PREPEND);\n\n\t\tif (this._isProcessing()) {\n\t\t\treturn;\n\t\t}\n\t\tif (items.length) {\n\t\t\tthis._postLayout(_consts.CACHE, items, _consts.PREPEND, _consts.TRUSTED);\n\t\t} else {\n\t\t\t/**\n * This event is fired when a card element must be added at the top or left of a layout because there is no card to be displayed on screen when a user scrolls near top or left.\n * @ko 카드가 레이아웃의 위나 왼쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 위나 왼쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다.\n * @event eg.InfiniteGrid#prepend\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 첫번째 그룹의 그룹키\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\t\tthis.trigger(\"prepend\", {\n\t\t\t\tisTrusted: true,\n\t\t\t\tgroupKey: this.getGroupKeys().shift()\n\t\t\t});\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._onCheck = function _onCheck(_ref) {\n\t\tvar isForward = _ref.isForward,\n\t\t scrollPos = _ref.scrollPos,\n\t\t horizontal = _ref.horizontal,\n\t\t orgScrollPos = _ref.orgScrollPos;\n\n\t\t/**\n * This event is fired when the user scrolls.\n * @ko 사용자가 스크롤 할 경우 발생하는 이벤트.\n * @event eg.InfiniteGrid#change\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {Boolean} param.isForward Indicates whether the scroll progression direction is forward or backword. 스크롤 진행방향이 앞쪽으로 진행하는 지, 뒤쪽으로 진행하는지를 나타낸다.\n * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값\n * @param {Boolean} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n * @param {Boolean} options.horizontal Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향\n */\n\t\tthis.trigger(\"change\", {\n\t\t\tisForward: isForward,\n\t\t\thorizontal: horizontal,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: orgScrollPos\n\t\t});\n\t\tvar rect = this._getEdgeOffset(isForward ? \"end\" : \"start\");\n\t\tvar isProcessing = this.isProcessing();\n\n\t\tif (!rect) {\n\t\t\treturn;\n\t\t}\n\t\tvar targetPos = isForward ? rect[horizontal ? \"left\" : \"top\"] - this._renderer.getViewSize() : rect[horizontal ? \"right\" : \"bottom\"];\n\n\t\tif (!isProcessing && isForward) {\n\t\t\tif (scrollPos >= targetPos) {\n\t\t\t\tthis._requestAppend();\n\t\t\t}\n\t\t} else if (scrollPos <= targetPos) {\n\t\t\tthis._fit(\"before\");\n\t\t\tthis._requestPrepend();\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._onLayoutComplete = function _onLayoutComplete(items, isAppend) {\n\t\tvar isTrusted = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\t\tvar useRecycle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.options.useRecycle;\n\n\t\tthis._isLoading() && this._renderLoading();\n\t\t!isAppend && this._fit(\"after\");\n\t\tuseRecycle && this._recycle(isAppend);\n\n\t\tvar size = this._getEdgeValue(\"end\");\n\n\t\t// recycle after _fit beacause prepend and append are occured simultaneously by scroll.\n\t\tthis._updateEdge();\n\n\t\tisAppend && this._renderer.setContainerSize(size + this._status.loadingSize || 0);\n\t\tthis._process(_consts.PROCESSING, false);\n\n\t\tvar scrollPos = this._watcher.getScrollPos();\n\n\t\t/**\n * This event is fired when layout is successfully arranged through a call to the append(), prepend(), or layout() method.\n * @ko 레이아웃 배치가 완료됐을 때 발생하는 이벤트. append() 메서드나 prepend() 메서드, layout() 메서드 호출 후 카드의 배치가 완료됐을 때 발생한다\n * @event eg.InfiniteGrid#layoutComplete\n *\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {Array} param.target Rearranged card elements재배치된 카드 엘리먼트들\n * @param {Boolean} param.isAppend Checks whether the append() method is used to add a card element. It returns true even though the layoutComplete event is fired after the layout() method is called. 카드 엘리먼트가 append() 메서드로 추가됐는지 확인한다. layout() 메서드가 호출된 후 layoutComplete 이벤트가 발생해도 'true'를 반환한다.\n * @param {Boolean} param.isScroll Checks whether scrolling has occurred after the append(), prepend(), ..., etc method is called\n * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값\n * @param {Number} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값\n * @param {Number} param.size The size of container element 컨테이너 엘리먼트의 크기\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\tthis.trigger(\"layoutComplete\", {\n\t\t\ttarget: items.concat(),\n\t\t\tisAppend: isAppend,\n\t\t\tisTrusted: isTrusted,\n\t\t\tisScroll: this._renderer.getViewSize() < this._renderer.getContainerOffset() + size,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: this._watcher.getOrgScrollPos(),\n\t\t\tsize: size\n\t\t});\n\n\t\tif (isAppend && scrollPos >= size) {\n\t\t\tthis._requestAppend();\n\t\t} else if (!isAppend && scrollPos <= this._getEdgeValue(\"start\")) {\n\t\t\tthis._fit(\"before\");\n\t\t\tthis._requestPrepend();\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._reset = function _reset() {\n\t\tthis._status = {\n\t\t\tprocessingStatus: _consts.IDLE,\n\t\t\tloadingSize: 0,\n\t\t\tstartCursor: -1,\n\t\t\tendCursor: -1,\n\t\t\tstart: null,\n\t\t\tend: null\n\t\t};\n\t};\n\t/**\n * Destroys elements, properties, and events used on a grid layout.\n * @ko 그리드 레이아웃에 사용한 엘리먼트와 속성, 이벤트를 해제한다\n */\n\n\n\tInfiniteGrid.prototype.destroy = function destroy() {\n\t\tthis.off();\n\t\tthis._watcher.destroy();\n\t\tthis._reset();\n\t\tthis._items.clear();\n\t\tthis._renderer.destroy();\n\t};\n\n\treturn InfiniteGrid;\n}(_component2[\"default\"]);\n\nInfiniteGrid.VERSION = \"3.0.0-rc\";\n\nexports[\"default\"] = InfiniteGrid;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/InfiniteGrid.js\n// module id = 6\n// module chunks = 0 1","/*!\n * Copyright (c) 2017 NAVER Corp.\r\n * @egjs/component project is licensed under the MIT license\r\n * \r\n * @egjs/component JavaScript library\r\n * http://naver.github.io/egjs/component\r\n * \r\n * @version 2.1.0\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Component\"] = factory();\n\telse\n\t\troot[\"eg\"] = root[\"eg\"] || {}, root[\"eg\"][\"Component\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _Component = __webpack_require__(1);\n\nvar _Component2 = _interopRequireDefault(_Component);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n_Component2[\"default\"].VERSION = \"2.1.0\";\nmodule.exports = _Component2[\"default\"];\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\n/**\n * A class used to manage events and options in a component\n * @ko 컴포넌트의 이벤트와 옵션을 관리할 수 있게 하는 클래스\n * @alias eg.Component\n */\nvar Component = function () {\n\t/**\n * @support {\"ie\": \"7+\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"2.1+ (except 3.x)\"}\n */\n\tfunction Component() {\n\t\t_classCallCheck(this, Component);\n\n\t\tthis._eventHandler = {};\n\t\tthis.options = {};\n\t}\n\t/**\n * Triggers a custom event.\n * @ko 커스텀 이벤트를 발생시킨다\n * @param {String} eventName The name of the custom event to be triggered 발생할 커스텀 이벤트의 이름\n * @param {Object} customEvent Event data to be sent when triggering a custom event 커스텀 이벤트가 발생할 때 전달할 데이터\n * @return {Boolean} Indicates whether the event has occurred. If the stop() method is called by a custom event handler, it will return false and prevent the event from occurring. Ref 이벤트 발생 여부. 커스텀 이벤트 핸들러에서 stop() 메서드를 호출하면 'false'를 반환하고 이벤트 발생을 중단한다. 참고\n * @example\n class Some extends eg.Component {\n some(){\n \tif(this.trigger(\"beforeHi\")){ // When event call to stop return false.\n \tthis.trigger(\"hi\");// fire hi event.\n \t}\n }\n }\n const some = new Some();\n some.on(\"beforeHi\", (e) => {\n if(condition){\n \te.stop(); // When event call to stop, `hi` event not call.\n }\n });\n some.on(\"hi\", (e) => {\n // `currentTarget` is component instance.\n console.log(some === e.currentTarget); // true\n });\n // If you want to more know event design. You can see article.\n // https://github.com/naver/egjs-component/wiki/How-to-make-Component-event-design%3F\n */\n\n\n\tComponent.prototype.trigger = function trigger(eventName) {\n\t\tvar customEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tvar handlerList = this._eventHandler[eventName] || [];\n\t\tvar hasHandlerList = handlerList.length > 0;\n\n\t\tif (!hasHandlerList) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If detach method call in handler in first time then handeler list calls.\n\t\thandlerList = handlerList.concat();\n\n\t\tcustomEvent.eventType = eventName;\n\n\t\tvar isCanceled = false;\n\t\tvar arg = [customEvent];\n\t\tvar i = 0;\n\n\t\tcustomEvent.stop = function () {\n\t\t\tisCanceled = true;\n\t\t};\n\t\tcustomEvent.currentTarget = this;\n\n\t\tfor (var _len = arguments.length, restParam = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n\t\t\trestParam[_key - 2] = arguments[_key];\n\t\t}\n\n\t\tif (restParam.length >= 1) {\n\t\t\targ = arg.concat(restParam);\n\t\t}\n\n\t\tfor (i = 0; handlerList[i]; i++) {\n\t\t\thandlerList[i].apply(this, arg);\n\t\t}\n\n\t\treturn !isCanceled;\n\t};\n\t/**\n * Executed event just one time.\n * @ko 이벤트가 한번만 실행된다.\n * @param {eventName} eventName The name of the event to be attached 등록할 이벤트의 이름\n * @param {Function} handlerToAttach The handler function of the event to be attached 등록할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n alert(\"hi\");\n }\n thing() {\n this.once(\"hi\", this.hi);\n }\n }\n var some = new Some();\n some.thing();\n some.trigger(\"hi\");\n // fire alert(\"hi\");\n some.trigger(\"hi\");\n // Nothing happens\n */\n\n\n\tComponent.prototype.once = function once(eventName, handlerToAttach) {\n\t\tif ((typeof eventName === \"undefined\" ? \"undefined\" : _typeof(eventName)) === \"object\" && typeof handlerToAttach === \"undefined\") {\n\t\t\tvar eventHash = eventName;\n\t\t\tvar i = void 0;\n\n\t\t\tfor (i in eventHash) {\n\t\t\t\tthis.once(i, eventHash[i]);\n\t\t\t}\n\t\t\treturn this;\n\t\t} else if (typeof eventName === \"string\" && typeof handlerToAttach === \"function\") {\n\t\t\tvar self = this;\n\n\t\t\tthis.on(eventName, function listener() {\n\t\t\t\tfor (var _len2 = arguments.length, arg = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t\t\t\t\targ[_key2] = arguments[_key2];\n\t\t\t\t}\n\n\t\t\t\thandlerToAttach.apply(self, arg);\n\t\t\t\tself.off(eventName, listener);\n\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t};\n\n\t/**\n * Checks whether an event has been attached to a component.\n * @ko 컴포넌트에 이벤트가 등록됐는지 확인한다.\n * @param {String} eventName The name of the event to be attached 등록 여부를 확인할 이벤트의 이름\n * @return {Boolean} Indicates whether the event is attached. 이벤트 등록 여부\n * @example\n class Some extends eg.Component {\n some() {\n this.hasOn(\"hi\");// check hi event.\n }\n }\n */\n\n\n\tComponent.prototype.hasOn = function hasOn(eventName) {\n\t\treturn !!this._eventHandler[eventName];\n\t};\n\n\t/**\n * Attaches an event to a component.\n * @ko 컴포넌트에 이벤트를 등록한다.\n * @param {eventName} eventName The name of the event to be attached 등록할 이벤트의 이름\n * @param {Function} handlerToAttach The handler function of the event to be attached 등록할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n console.log(\"hi\");\n }\n some() {\n this.on(\"hi\",this.hi); //attach event\n }\n }\n */\n\n\n\tComponent.prototype.on = function on(eventName, handlerToAttach) {\n\t\tif ((typeof eventName === \"undefined\" ? \"undefined\" : _typeof(eventName)) === \"object\" && typeof handlerToAttach === \"undefined\") {\n\t\t\tvar eventHash = eventName;\n\t\t\tvar name = void 0;\n\n\t\t\tfor (name in eventHash) {\n\t\t\t\tthis.on(name, eventHash[name]);\n\t\t\t}\n\t\t\treturn this;\n\t\t} else if (typeof eventName === \"string\" && typeof handlerToAttach === \"function\") {\n\t\t\tvar handlerList = this._eventHandler[eventName];\n\n\t\t\tif (typeof handlerList === \"undefined\") {\n\t\t\t\tthis._eventHandler[eventName] = [];\n\t\t\t\thandlerList = this._eventHandler[eventName];\n\t\t\t}\n\n\t\t\thandlerList.push(handlerToAttach);\n\t\t}\n\n\t\treturn this;\n\t};\n\t/**\n * Detaches an event from the component.\n * @ko 컴포넌트에 등록된 이벤트를 해제한다\n * @param {eventName} eventName The name of the event to be detached 해제할 이벤트의 이름\n * @param {Function} handlerToDetach The handler function of the event to be detached 해제할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself 컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n console.log(\"hi\");\n }\n some() {\n this.off(\"hi\",this.hi); //detach event\n }\n }\n */\n\n\n\tComponent.prototype.off = function off(eventName, handlerToDetach) {\n\t\t// All event detach.\n\t\tif (typeof eventName === \"undefined\") {\n\t\t\tthis._eventHandler = {};\n\t\t\treturn this;\n\t\t}\n\n\t\t// All handler of specific event detach.\n\t\tif (typeof handlerToDetach === \"undefined\") {\n\t\t\tif (typeof eventName === \"string\") {\n\t\t\t\tthis._eventHandler[eventName] = undefined;\n\t\t\t\treturn this;\n\t\t\t} else {\n\t\t\t\tvar eventHash = eventName;\n\t\t\t\tvar name = void 0;\n\n\t\t\t\tfor (name in eventHash) {\n\t\t\t\t\tthis.off(name, eventHash[name]);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\n\t\t// The handler of specific event detach.\n\t\tvar handlerList = this._eventHandler[eventName];\n\n\t\tif (handlerList) {\n\t\t\tvar k = void 0;\n\t\t\tvar handlerFunction = void 0;\n\n\t\t\tfor (k = 0; (handlerFunction = handlerList[k]) !== undefined; k++) {\n\t\t\t\tif (handlerFunction === handlerToDetach) {\n\t\t\t\t\thandlerList = handlerList.splice(k, 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t};\n\n\treturn Component;\n}();\n\nexports[\"default\"] = Component;\nmodule.exports = exports[\"default\"];\n\n/***/ })\n/******/ ]);\n});\n//# sourceMappingURL=component.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@egjs/component/dist/component.js\n// module id = 7\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"./consts\");\n\nvar _DOMRenderer = require(\"./DOMRenderer\");\n\nvar _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ItemManager = function () {\n\tItemManager.from = function from(elements, selector, _ref) {\n\t\tvar groupKey = _ref.groupKey,\n\t\t isAppend = _ref.isAppend;\n\n\t\tvar filted = ItemManager.selectItems((0, _utils.$)(elements, _consts.MULTI), selector);\n\n\t\t// Item Structure\n\t\treturn (0, _utils.toArray)(filted).map(function (el) {\n\t\t\treturn {\n\t\t\t\tel: el,\n\t\t\t\tgroupKey: groupKey,\n\t\t\t\tcontent: el.outerHTML\n\t\t\t};\n\t\t});\n\t};\n\n\tItemManager.selectItems = function selectItems(elements, selector) {\n\t\treturn elements.filter(function (v) {\n\t\t\tvar classNames = v.className.split(\" \");\n\n\t\t\tif (classNames.some(function (c) {\n\t\t\t\treturn c === _consts.IGNORE_CLASSNAME;\n\t\t\t})) {\n\t\t\t\treturn false;\n\t\t\t} else if (selector === \"*\") {\n\t\t\t\treturn v;\n\t\t\t} else {\n\t\t\t\treturn classNames.some(function (c) {\n\t\t\t\t\treturn c === selector;\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\tItemManager.pluck = function pluck(data, property) {\n\t\treturn data.reduce(function (acc, v) {\n\t\t\treturn acc.concat(v[property]);\n\t\t}, []);\n\t};\n\n\tfunction ItemManager() {\n\t\t_classCallCheck(this, ItemManager);\n\n\t\tthis.clear();\n\t}\n\n\tItemManager.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\t_data: this._data.map(function (data) {\n\t\t\t\tvar items = data.items.map(function (item) {\n\t\t\t\t\tvar item2 = _extends({}, item);\n\n\t\t\t\t\tdelete item2.el;\n\t\t\t\t\treturn item2;\n\t\t\t\t});\n\t\t\t\tvar data2 = _extends({}, data);\n\n\t\t\t\tdata2.items = items;\n\t\t\t\treturn data2;\n\t\t\t})\n\t\t};\n\t};\n\n\tItemManager.prototype.setStatus = function setStatus(status, start, end) {\n\t\tvar data = status._data;\n\n\t\tfor (var i = start; i <= end; i++) {\n\t\t\tdata[i].items = _DOMRenderer2[\"default\"].createElements(data[i].items);\n\t\t}\n\t\tthis.set(data);\n\t};\n\n\tItemManager.prototype.size = function size() {\n\t\treturn this._data.length;\n\t};\n\n\tItemManager.prototype.fit = function fit(base, isVertical) {\n\t\tif (!this._data.length) {\n\t\t\treturn;\n\t\t}\n\t\tvar property = isVertical ? \"top\" : \"left\";\n\n\t\tif (base !== 0) {\n\t\t\tthis._data = this._data.map(function (v) {\n\t\t\t\tv.items = v.items.map(function (item) {\n\t\t\t\t\titem.rect[property] -= base;\n\t\t\t\t\treturn item;\n\t\t\t\t});\n\t\t\t\tv.outlines.start = v.outlines.start.map(function (start) {\n\t\t\t\t\treturn start - base;\n\t\t\t\t});\n\t\t\t\tv.outlines.end = v.outlines.end.map(function (end) {\n\t\t\t\t\treturn end - base;\n\t\t\t\t});\n\t\t\t\treturn v;\n\t\t\t});\n\t\t}\n\t};\n\n\tItemManager.prototype.pluck = function pluck(property, start, end) {\n\t\tif (typeof start !== \"undefined\") {\n\t\t\tif (typeof end !== \"undefined\") {\n\t\t\t\treturn ItemManager.pluck(this._data.slice(start, end + 1), property);\n\t\t\t} else {\n\t\t\t\treturn ItemManager.pluck(this._data.slice(start, start + 1), property);\n\t\t\t}\n\t\t} else {\n\t\t\treturn ItemManager.pluck(this._data, property);\n\t\t}\n\t};\n\n\tItemManager.prototype.getOutline = function getOutline(index, property) {\n\t\tif (this._data.length) {\n\t\t\treturn this._data[index].outlines[property];\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t};\n\n\tItemManager.prototype.getEdgeIndex = function getEdgeIndex(cursor, start, end) {\n\t\tvar prop = cursor === \"start\" ? \"min\" : \"max\";\n\t\tvar index = -1;\n\t\tvar targetValue = cursor === \"start\" ? Infinity : -Infinity;\n\n\t\tfor (var i = start; i <= end; i++) {\n\t\t\tvar value = Math[prop].apply(Math, this.getOutline(i, cursor));\n\n\t\t\tif (cursor === \"start\" && targetValue > value || cursor === \"end\" && targetValue < value) {\n\t\t\t\ttargetValue = value;\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t};\n\n\tItemManager.prototype.getEdge = function getEdge(cursor, start, end) {\n\t\tvar dataIdx = this.getEdgeIndex(cursor, start, end);\n\t\tvar items = this.pluck(\"items\", dataIdx);\n\n\t\tif (items.length) {\n\t\t\tvar itemIdx = this.getOutline(dataIdx, cursor + \"Index\");\n\n\t\t\treturn items.length > itemIdx ? items[itemIdx] : null;\n\t\t}\n\t\treturn null;\n\t};\n\n\tItemManager.prototype.getEdgeValue = function getEdgeValue(cursor, start, end) {\n\t\tvar outlines = this.pluck(\"outlines\", this.getEdgeIndex(cursor, start, end)).reduce(function (acc, v) {\n\t\t\treturn acc.concat(v[cursor]);\n\t\t}, []);\n\n\t\treturn outlines.length ? Math[cursor === \"start\" ? \"min\" : \"max\"].apply(Math, outlines) : 0;\n\t};\n\n\tItemManager.prototype.append = function append(layouted) {\n\t\tthis._data.push(layouted);\n\t\treturn layouted.items;\n\t};\n\n\tItemManager.prototype.prepend = function prepend(layouted) {\n\t\tthis._data.unshift(layouted);\n\t\treturn layouted.items;\n\t};\n\n\tItemManager.prototype.clear = function clear() {\n\t\tthis._data = [];\n\t};\n\n\tItemManager.prototype.remove = function remove(element, start, end) {\n\t\tvar items = null;\n\t\tvar key = element.getAttribute(_consts.GROUPKEY_ATT);\n\t\tvar data = this.get(start, end).filter(function (v) {\n\t\t\treturn String(v.groupKey) === key;\n\t\t});\n\n\t\tif (!data.length) {\n\t\t\treturn items;\n\t\t}\n\t\tdata = data[0];\n\n\t\tvar len = data.items.length;\n\t\tvar idx = -1;\n\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tif (data.items[i].el === element) {\n\t\t\t\tidx = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (~idx) {\n\t\t\t// remove item information\n\t\t\tdata.items.splice(idx, 1);\n\t\t\tthis.set(data, key);\n\t\t\titems = data.items;\n\t\t}\n\t\treturn items;\n\t};\n\n\tItemManager.prototype.get = function get(start, end) {\n\t\tif (typeof start !== \"undefined\") {\n\t\t\tif (typeof end !== \"undefined\") {\n\t\t\t\treturn this._data.slice(start, end + 1);\n\t\t\t} else {\n\t\t\t\treturn this._data.slice(start, start + 1);\n\t\t\t}\n\t\t} else {\n\t\t\treturn this._data.concat();\n\t\t}\n\t};\n\n\tItemManager.prototype.set = function set(data, key) {\n\t\tif (typeof key !== \"undefined\" && !Array.isArray(data)) {\n\t\t\tvar len = this._data.length;\n\t\t\tvar idx = -1;\n\n\t\t\tfor (var i = 0; i < len; i++) {\n\t\t\t\tif (this._data[i].groupKey === key) {\n\t\t\t\t\tidx = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t~idx && (this._data[idx] = data);\n\t\t} else {\n\t\t\tthis._data = data.concat();\n\t\t}\n\t};\n\n\treturn ItemManager;\n}();\n\nexports[\"default\"] = ItemManager;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/ItemManager.js\n// module id = 8\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ImageLoaded = function () {\n\tfunction ImageLoaded() {\n\t\t_classCallCheck(this, ImageLoaded);\n\t}\n\n\tImageLoaded.waitImageLoaded = function waitImageLoaded(needCheck, callback) {\n\t\tvar checkCount = needCheck.length;\n\t\tvar checkImage = function checkImage() {\n\t\t\tcheckCount--;\n\t\t\tcheckCount <= 0 && callback && callback();\n\t\t};\n\t\tvar onCheck = function onCheck(e) {\n\t\t\t(0, _utils.removeEvent)(e.target || e.srcElement, \"load\", onCheck);\n\t\t\t(0, _utils.removeEvent)(e.target || e.srcElement, \"error\", onCheck);\n\t\t\tcheckImage();\n\t\t};\n\n\t\t// workaround for IE\n\t\t_consts.IS_IE && needCheck.forEach(function (v) {\n\t\t\treturn v.setAttribute(\"src\", v.getAttribute(\"src\"));\n\t\t});\n\t\tneedCheck.forEach(function (v) {\n\t\t\tif (v.complete) {\n\t\t\t\tcheckImage();\n\t\t\t} else {\n\t\t\t\t(0, _utils.addEvent)(v, \"load\", onCheck);\n\t\t\t\t(0, _utils.addEvent)(v, \"error\", onCheck);\n\t\t\t}\n\t\t});\n\t};\n\n\tImageLoaded.checkImageLoaded = function checkImageLoaded(el) {\n\t\tif (el.tagName === \"IMG\") {\n\t\t\treturn !el.complete ? [el] : [];\n\t\t} else {\n\t\t\treturn (0, _utils.toArray)(el.querySelectorAll(\"img\")).filter(function (v) {\n\t\t\t\tif (v.nodeType && [1, 9, 11].indexOf(v.nodeType) !== -1) {\n\t\t\t\t\treturn !v.complete;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\tImageLoaded.check = function check(elements, callback) {\n\t\tvar _this = this;\n\n\t\tvar needCheck = elements.reduce(function (acc, v) {\n\t\t\treturn acc.concat(_this.checkImageLoaded(v));\n\t\t}, []);\n\n\t\tif (needCheck.length > 0) {\n\t\t\tImageLoaded.waitImageLoaded(needCheck, callback);\n\t\t} else {\n\t\t\t// convert to async\n\t\t\tsetTimeout(function () {\n\t\t\t\tcallback && callback();\n\t\t\t}, 0);\n\t\t}\n\t};\n\n\treturn ImageLoaded;\n}();\n\nexports[\"default\"] = ImageLoaded;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/ImageLoaded.js\n// module id = 9\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Watcher = function () {\n\tfunction Watcher(renderer, callback) {\n\t\t_classCallCheck(this, Watcher);\n\n\t\t_extends(this._callback = {\n\t\t\tlayout: null,\n\t\t\tcheck: null\n\t\t}, callback);\n\t\tthis._timer = {\n\t\t\tresize: null\n\t\t\t// doubleCheck: null,\n\t\t\t// doubleCheckCount: RETRY,\n\t\t};\n\t\tthis.reset();\n\t\tthis._renderer = renderer;\n\t\tthis._onCheck = this._onCheck.bind(this);\n\t\tthis._onResize = this._onResize.bind(this);\n\t\tthis.attachEvent();\n\t\tthis.setScrollPos();\n\t}\n\n\tWatcher.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\t_prevPos: this._prevPos,\n\t\t\tscrollPos: this.getOrgScrollPos()\n\t\t};\n\t};\n\n\tWatcher.prototype.setStatus = function setStatus(status) {\n\t\tvar applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tthis._prevPos = status._prevPos;\n\t\tapplyScrollPos && this.scrollTo(status.scrollPos);\n\t};\n\n\tWatcher.prototype.scrollTo = function scrollTo(pos) {\n\t\tvar arrPos = this._renderer.options.isVertical ? [0, pos] : [pos, 0];\n\n\t\t_utils.scrollTo.apply(undefined, [this._renderer.view].concat(arrPos));\n\t};\n\n\tWatcher.prototype.getScrollPos = function getScrollPos() {\n\t\treturn this._prevPos;\n\t};\n\n\tWatcher.prototype.setScrollPos = function setScrollPos(pos) {\n\t\tvar rawPos = pos;\n\n\t\tif (typeof pos === \"undefined\") {\n\t\t\trawPos = this.getOrgScrollPos();\n\t\t}\n\t\tthis._prevPos = rawPos - this._renderer.getContainerOffset();\n\t};\n\n\tWatcher.prototype.attachEvent = function attachEvent() {\n\t\t(0, _utils.addEvent)(this._renderer.view, \"scroll\", this._onCheck);\n\t\t(0, _utils.addEvent)(window, \"resize\", this._onResize);\n\t};\n\n\tWatcher.prototype.getOrgScrollPos = function getOrgScrollPos() {\n\t\treturn (0, _utils.scroll)(this._renderer.view, this._renderer.options.isVertical);\n\t};\n\n\tWatcher.prototype.reset = function reset() {\n\t\tthis._prevPos = null;\n\t};\n\n\tWatcher.prototype._onCheck = function _onCheck() {\n\t\tvar prevPos = this.getScrollPos();\n\t\tvar orgScrollPos = this.getOrgScrollPos();\n\n\t\tthis.setScrollPos(orgScrollPos);\n\t\tvar scrollPos = this.getScrollPos();\n\n\t\tif (prevPos === null || _consts.IS_IOS && orgScrollPos === 0 || prevPos === scrollPos) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._callback.check && this._callback.check({\n\t\t\tisForward: prevPos < scrollPos,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: orgScrollPos,\n\t\t\thorizontal: !this._renderer.options.isVertical\n\t\t});\n\t};\n\n\tWatcher.prototype._onResize = function _onResize() {\n\t\tvar _this = this;\n\n\t\tif (this._timer.resize) {\n\t\t\tclearTimeout(this._timer.resize);\n\t\t}\n\t\tthis._timer.resize = setTimeout(function () {\n\t\t\t_this._renderer.isNeededResize() && _this._callback.layout && _this._callback.layout();\n\t\t\t_this._timer.resize = null;\n\t\t\t_this.reset();\n\t\t}, 100);\n\t};\n\n\tWatcher.prototype.detachEvent = function detachEvent() {\n\t\t(0, _utils.removeEvent)(window, \"resize\", this._onResize);\n\t};\n\n\tWatcher.prototype.destroy = function destroy() {\n\t\tthis.detachEvent();\n\t\tthis.reset();\n\t};\n\n\treturn Watcher;\n}();\n\nexports[\"default\"] = Watcher;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Watcher.js\n// module id = 10\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// ALIGN\nvar START = _consts.ALIGN.START,\n CENTER = _consts.ALIGN.CENTER,\n END = _consts.ALIGN.END,\n JUSTIFY = _consts.ALIGN.JUSTIFY;\n\n/**\n * @classdesc The GridLayout is a layout that stacks cards with the same width as a stack of bricks. Adjust the width of all images to the same size, find the lowest height column, and insert a new card.\n * @ko GridLayout는 벽돌을 쌓아 올린 모양처럼 동일한 너비를 가진 카드를 쌓는 레이아웃이다. 모든 이미지의 너비를 동일한 크기로 조정하고, 가장 높이가 낮은 열을 찾아 새로운 이미지를 삽입한다. 따라서 배치된 카드 사이에 빈 공간이 생기지는 않지만 배치된 레이아웃의 아래쪽은 울퉁불퉁해진다.\n * @class eg.InfiniteGrid.GridLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.GridLayout module eg.InfiniteGrid.GridLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.align=START] Align of the position of the items (START, CENTER, END, JUSTIFY) 아이템들의 위치의 정렬 (START, CENTER, END, JUSTIFY)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @example\n```\n\n```\n **/\n\nvar GridLayout = function () {\n\tfunction GridLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, GridLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\talign: START,\n\t\t\titemSize: 0\n\t\t}, options);\n\t\tthis._size = 0;\n\t\tthis._columnSize = 0;\n\t\tthis._columnLength = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tGridLayout.prototype.getPoints = function getPoints(outlines) {\n\t\tvar pos = this.options.horizontal ? \"left\" : \"top\";\n\n\t\treturn outlines.map(function (outline) {\n\t\t\treturn outline[pos];\n\t\t});\n\t};\n\n\tGridLayout.prototype.checkColumn = function checkColumn(item) {\n\t\tvar margin = this.options.margin;\n\t\tvar sizeName = this.options.horizontal ? \"height\" : \"width\";\n\t\tvar columnSize = this.options.itemSize || item && item.size[sizeName] || 0;\n\n\t\tthis._columnSize = columnSize;\n\t\tif (!columnSize) {\n\t\t\tthis._columnLength = 1;\n\t\t\treturn;\n\t\t}\n\t\tthis._columnLength = Math.max(parseInt((this._size + margin) / (columnSize + margin), 10), 1);\n\t};\n\n\tGridLayout.prototype._layout = function _layout(items, outline, isAppend) {\n\t\tvar length = items.length;\n\t\tvar margin = this.options.margin;\n\t\tvar align = this.options.align;\n\t\tvar style = this._style;\n\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar columnSize = this._columnSize;\n\t\tvar columnLength = this._columnLength;\n\n\t\tvar size = this._size;\n\t\tvar viewDist = size - (columnSize + margin) * columnLength + margin;\n\n\t\tvar pointCaculateName = isAppend ? \"min\" : \"max\";\n\t\tvar startOutline = outline.slice();\n\t\tvar endOutline = outline.slice();\n\t\tvar startIndex = 0;\n\t\tvar endIndex = -1;\n\t\tvar endPos = -1;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar _item$rect;\n\n\t\t\tvar point = Math[pointCaculateName].apply(Math, endOutline) || 0;\n\t\t\tvar index = endOutline.indexOf(point);\n\t\t\tvar item = items[isAppend ? i : length - 1 - i];\n\t\t\tvar size1 = item.size[size1Name];\n\t\t\tvar size2 = item.size[size2Name];\n\t\t\tvar pos1 = isAppend ? point : point - margin - size1;\n\t\t\tvar endPos1 = pos1 + size1 + margin;\n\n\t\t\tif (index === -1) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\tvar pos2 = (columnSize + margin) * index;\n\n\t\t\t// ALIGN\n\t\t\tif (align === CENTER) {\n\t\t\t\tpos2 += viewDist / 2;\n\t\t\t} else if (align === END) {\n\t\t\t\tpos2 += viewDist + columnSize - size2;\n\t\t\t} else if (align === JUSTIFY) {\n\t\t\t\tif (columnLength <= 1) {\n\t\t\t\t\tpos2 += viewDist / 2;\n\t\t\t\t} else {\n\t\t\t\t\tpos2 = (size - columnSize) / (columnLength - 1) * index;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// tetris\n\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect);\n\t\t\titem.column = index;\n\t\t\tendOutline[index] = isAppend ? endPos1 : pos1;\n\t\t\tif (endIndex === -1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tendPos = endPos1;\n\t\t\t} else if (endPos < endPos1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tendPos = endPos1;\n\t\t\t}\n\t\t}\n\t\tif (!isAppend) {\n\t\t\titems.sort(function (a, b) {\n\t\t\t\tvar item1pos1 = a.rect[pos1Name];\n\t\t\t\tvar item1pos2 = a.rect[pos2Name];\n\t\t\t\tvar item2pos1 = b.rect[pos1Name];\n\t\t\t\tvar item2pos2 = b.rect[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\tendIndex = length - 1;\n\t\t}\n\t\t// if append items, startOutline is low, endOutline is high\n\t\t// if prepend items, startOutline is high, endOutline is low\n\t\treturn {\n\t\t\tstart: isAppend ? startOutline : endOutline,\n\t\t\tend: isAppend ? endOutline : startOutline,\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tGridLayout.prototype._insert = function _insert() {\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar type = arguments[2];\n\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\tvar startOutline = outline;\n\n\t\tif (!this._columnLength) {\n\t\t\tthis.checkColumn(items[0]);\n\t\t}\n\t\tif (outline.length !== this._columnLength) {\n\t\t\tstartOutline = (0, _utils.fill)(this._columnLength, outline.length === 0 ? 0 : Math[type === _consts.APPEND ? \"min\" : \"max\"].apply(Math, outline) || 0);\n\t\t}\n\n\t\tvar result = this._layout(clone, startOutline, type);\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: result\n\t\t};\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.layout = function layout() {\n\t\tvar _this = this;\n\n\t\tvar groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\tvar firstItem = groups.length && groups[0].items.length && groups[0].items[0] || 0;\n\n\t\tthis.checkColumn(firstItem);\n\n\t\t// if outlines' length and columns' length are now same, re-caculate outlines.\n\t\tvar startOutline = void 0;\n\n\t\tif (outline.length !== this._columnLength) {\n\t\t\tvar pos = outline.length === 0 ? 0 : Math.min.apply(Math, outline);\n\n\t\t\t// re-layout items.\n\t\t\tstartOutline = (0, _utils.fill)(this._columnLength, pos);\n\t\t} else {\n\t\t\tstartOutline = outline.slice();\n\t\t}\n\t\tgroups.forEach(function (group) {\n\t\t\tvar items = group.items;\n\t\t\tvar result = _this._layout(items, startOutline, _consts.APPEND);\n\n\t\t\tgroup.outlines = result;\n\t\t\tstartOutline = result.end;\n\t\t});\n\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.GridLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tGridLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\n\treturn GridLayout;\n}();\n\nexports[\"default\"] = GridLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/GridLayout.js\n// module id = 11\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _FrameLayout2 = require(\"./FrameLayout\");\n\nvar _FrameLayout3 = _interopRequireDefault(_FrameLayout2);\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction makeShapeOutline(outline, itemSize, columnLength, isAppend) {\n\tvar point = Math[isAppend ? \"min\" : \"max\"].apply(Math, outline) || 0;\n\n\tif (outline.length !== columnLength) {\n\t\treturn (0, _utils.fill)(columnLength, 0);\n\t}\n\treturn outline.map(function (l) {\n\t\treturn parseInt((l - point) / itemSize, 10);\n\t});\n}\nfunction getColumn(item) {\n\tif (item.column) {\n\t\treturn item.column;\n\t}\n\tvar column = 0;\n\n\tif (item.el) {\n\t\tvar dataset = item.el.dataset;\n\n\t\tif (dataset) {\n\t\t\tcolumn = dataset.column || 1;\n\t\t} else {\n\t\t\tcolumn = item.el.getAttribute(\"column\") || 1;\n\t\t}\n\t} else {\n\t\tcolumn = 1;\n\t}\n\titem.column = column;\n\treturn column;\n}\n\n/**\n * @classdesc SquareLayout is a layout that places all cards like squares on a checkerboard, and important cards are n times larger. The main card can be enlarged, and then a small card can be placed to naturally show the relationship of the card.\n * @ko SquareLayout은 바둑판처럼 모든 카드를 정사각형으로 배치하고 중요한 카드는 크기를 N배로 키워서 보여주는 레이아웃이다. 주요 카드를 크게 표시하고, 그 다음에 작은 카드를 배치해 자연스럽게 카드의 관계를 나타낼 수 있습니다.\n * @class eg.InfiniteGrid.SquareLayout\n * @extends eg.InfiniteGrid.FrameLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.SquareLayout module eg.InfiniteGrid.SquareLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @example\n```\n\n```\n **/\n\nvar SquareLayout = function (_FrameLayout) {\n\t_inherits(SquareLayout, _FrameLayout);\n\n\tfunction SquareLayout() {\n\t\t_classCallCheck(this, SquareLayout);\n\n\t\treturn _possibleConstructorReturn(this, _FrameLayout.apply(this, arguments));\n\t}\n\n\tSquareLayout.prototype._checkItemSize = function _checkItemSize() {\n\t\tvar column = this.options.column;\n\n\t\tif (!column) {\n\t\t\t_FrameLayout.prototype._checkItemSize.call(this);\n\t\t\treturn;\n\t\t}\n\t\tvar margin = this.options.margin;\n\n\t\t// if itemSize is not in options, caculate itemSize from size.\n\t\tthis._itemSize = (this._size + margin) / column - margin;\n\t};\n\n\tSquareLayout.prototype._layout = function _layout(items) {\n\t\tvar _shapes;\n\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar itemSize = this._getItemSize();\n\t\tvar margin = this.options.margin;\n\t\tvar columnLength = this.options.column || parseInt((this._size + margin) / (itemSize + margin), 10) || 1;\n\t\tvar length = items.length;\n\t\tvar endOutline = makeShapeOutline(outline, itemSize, columnLength, isAppend);\n\t\tvar pointCaculateName = isAppend ? \"min\" : \"max\";\n\t\tvar shapes = [];\n\t\tvar sign = isAppend ? 1 : -1;\n\t\tvar style = this._style;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar _shapes$push;\n\n\t\t\tvar point = Math[pointCaculateName].apply(Math, endOutline);\n\t\t\tvar index = (0, _utils.indexOf)(endOutline, point, !isAppend);\n\t\t\tvar item = items[i];\n\t\t\tvar columnWidth = item.columnWidth;\n\t\t\tvar column = columnWidth && columnWidth[0] === columnLength && columnWidth[1] || getColumn(item);\n\t\t\tvar columnCount = 1;\n\n\t\t\tif (column > 1) {\n\t\t\t\tfor (var j = 1; j < column && (isAppend && index + j < columnLength || !isAppend && index - j >= 0); ++j) {\n\t\t\t\t\tif (isAppend && endOutline[index + sign * j] <= point || !isAppend && endOutline[index + sign * j] >= point) {\n\t\t\t\t\t\t++columnCount;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (!isAppend) {\n\t\t\t\t\tindex -= columnCount - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\titem.columnWidth = [columnLength, columnCount];\n\t\t\tshapes.push((_shapes$push = {\n\t\t\t\twidth: columnCount,\n\t\t\t\theight: columnCount\n\t\t\t}, _shapes$push[pos1Name] = point - (!isAppend ? columnCount : 0), _shapes$push[pos2Name] = index, _shapes$push.index = i, _shapes$push));\n\t\t\tfor (var _j = 0; _j < columnCount; ++_j) {\n\t\t\t\tendOutline[index + _j] = point + sign * columnCount;\n\t\t\t}\n\t\t}\n\t\tthis._shapes = (_shapes = {\n\t\t\tshapes: shapes\n\t\t}, _shapes[style.size2] = columnLength, _shapes);\n\n\t\tvar result = _FrameLayout.prototype._layout.call(this, items, outline, isAppend);\n\n\t\tif (!isAppend) {\n\t\t\tvar lastItem = items[items.length - 1];\n\n\t\t\tshapes.sort(function (shape1, shape2) {\n\t\t\t\tvar item1pos1 = shape1[pos1Name];\n\t\t\t\tvar item1pos2 = shape1[pos2Name];\n\t\t\t\tvar item2pos1 = shape2[pos1Name];\n\t\t\t\tvar item2pos2 = shape2[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\titems.sort(function (a, b) {\n\t\t\t\tvar item1pos1 = a.rect[pos1Name];\n\t\t\t\tvar item1pos2 = a.rect[pos2Name];\n\t\t\t\tvar item2pos1 = b.rect[pos1Name];\n\t\t\t\tvar item2pos2 = b.rect[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\tresult.startIndex = 0;\n\t\t\tresult.endIndex = items.indexOf(lastItem);\n\t\t}\n\t\treturn result;\n\t};\n\n\treturn SquareLayout;\n}(_FrameLayout3[\"default\"]);\n\nexports[\"default\"] = SquareLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/SquareLayout.js\n// module id = 12\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _BoxModel = require(\"./lib/BoxModel.js\");\n\nvar _BoxModel2 = _interopRequireDefault(_BoxModel);\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getCost(originLength, length) {\n\tvar cost = originLength / length;\n\n\tif (cost < 1) {\n\t\tcost = 1 / cost;\n\t}\n\n\treturn cost - 1;\n}\nfunction fitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical) {\n\titem.setHeight(itemFitSize.height);\n\titem.setWidth(itemFitSize.width);\n\tbestFitArea.setHeight(containerFitSize.height);\n\tbestFitArea.setWidth(containerFitSize.width);\n\n\tif (layoutVertical) {\n\t\titem.setTop(bestFitArea.getTop() + bestFitArea.getHeight());\n\t\titem.setLeft(bestFitArea.getLeft());\n\t} else {\n\t\titem.setLeft(bestFitArea.getLeft() + bestFitArea.getWidth());\n\t\titem.setTop(bestFitArea.getTop());\n\t}\n}\n\n/**\n * @classdesc The PackingLayout is a layout that shows the important cards bigger without sacrificing the weight of the cards. Rows and columns are separated so that cards are dynamically placed within the horizontal and vertical space rather than arranged in an orderly fashion.\n * @ko PackingLayout은 카드의 본래 크기에 따른 비중을 해치지 않으면서 중요한 카드는 더 크게 보여 주는 레이아웃이다. 행과 열이 구분돼 이미지를 정돈되게 배치하는 대신 가로세로 일정 공간 내에서 동적으로 카드를 배치한다.\n * @class eg.InfiniteGrid.PackingLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.PackingLayout module eg.InfiniteGrid.PackingLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.aspectRatio=1] The aspect ratio of the group 그룹의 가로 세로 비 \n * @param {Boolean} [options.sizeWeight=1] The size weight when placing an image 이미지를 배치할 때 사이즈 가중치 \n * @param {Boolean} [options.ratioWeight=1] The ratio weight when placing an image 이미지를 배치할 때 비율 가중치 \n * @example\n```\n\n```\n **/\n\nvar PackingLayout = function () {\n\tfunction PackingLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, PackingLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\taspectRatio: 1,\n\t\t\tsizeWeight: 1,\n\t\t\tratioWeight: 1\n\t\t}, options);\n\t\tthis._size = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tPackingLayout.prototype._findBestFitArea = function _findBestFitArea(container, item) {\n\t\tif (container.getRatio() === 0) {\n\t\t\t// 아이템 최초 삽입시 전체영역 지정\n\t\t\tcontainer.setOriginWidth(item.getWidth());\n\t\t\tcontainer.setOriginHeight(item.getHeight());\n\t\t\tcontainer.setWidth(item.getWidth());\n\t\t\tcontainer.setHeight(item.getHeight());\n\t\t\treturn;\n\t\t}\n\n\t\tvar bestFitArea = null;\n\t\tvar minCost = 10000000;\n\t\tvar layoutVertical = false;\n\t\tvar itemFitSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tvar containerFitSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tvar _options = this.options,\n\t\t sizeWeight = _options.sizeWeight,\n\t\t ratioWeight = _options.ratioWeight;\n\n\n\t\tcontainer.innerItem().forEach(function (v) {\n\t\t\tvar containerSizeCost = getCost(v.getOriginSize(), v.getSize()) * sizeWeight;\n\t\t\tvar containerRatioCost = getCost(v.getOriginRatio(), v.getRatio()) * ratioWeight;\n\t\t\tvar cost = void 0;\n\n\t\t\tfor (var i = 0; i < 2; ++i) {\n\t\t\t\tvar itemWidth = void 0;\n\t\t\t\tvar itemHeight = void 0;\n\t\t\t\tvar containerWidth = void 0;\n\t\t\t\tvar containerHeight = void 0;\n\n\t\t\t\tif (i === 0) {\n\t\t\t\t\t// 상하에 아이템 추가\n\t\t\t\t\titemWidth = v.getWidth();\n\t\t\t\t\titemHeight = v.getHeight() * (item.getHeight() / (v.getOriginHeight() + item.getHeight()));\n\t\t\t\t\tcontainerWidth = v.getWidth();\n\t\t\t\t\tcontainerHeight = v.getHeight() - itemHeight;\n\t\t\t\t} else {\n\t\t\t\t\t// 좌우에 아이템 추가\n\t\t\t\t\titemHeight = v.getHeight();\n\t\t\t\t\titemWidth = v.getWidth() * (item.getWidth() / (v.getOriginWidth() + item.getWidth()));\n\t\t\t\t\tcontainerHeight = v.getHeight();\n\t\t\t\t\tcontainerWidth = v.getWidth() - itemWidth;\n\t\t\t\t}\n\n\t\t\t\tvar itemSize = itemWidth * itemHeight;\n\t\t\t\tvar itemRatio = itemWidth / itemHeight;\n\t\t\t\tvar containerSize = containerWidth * containerHeight;\n\t\t\t\tvar containerRatio = containerHeight / containerHeight;\n\n\t\t\t\tcost = getCost(item.getSize(), itemSize) * sizeWeight;\n\t\t\t\tcost += getCost(item.getRatio(), itemRatio) * ratioWeight;\n\t\t\t\tcost += getCost(v.getOriginSize(), containerSize) * sizeWeight - containerSizeCost;\n\t\t\t\tcost += getCost(v.getOriginRatio(), containerRatio) * ratioWeight - containerRatioCost;\n\n\t\t\t\tif (cost === Math.min(cost, minCost)) {\n\t\t\t\t\tminCost = cost;\n\t\t\t\t\tbestFitArea = v;\n\t\t\t\t\tlayoutVertical = i === 0;\n\t\t\t\t\titemFitSize.width = itemWidth;\n\t\t\t\t\titemFitSize.height = itemHeight;\n\t\t\t\t\tcontainerFitSize.width = containerWidth;\n\t\t\t\t\tcontainerFitSize.height = containerHeight;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical);\n\t};\n\n\tPackingLayout.prototype._layout = function _layout(items) {\n\t\tvar _this = this;\n\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar style = this._style;\n\t\tvar isHorizontal = this.options.horizontal;\n\t\tvar aspectRatio = this.options.aspectRatio;\n\t\tvar margin = this.options.margin;\n\t\tvar pos1Name = style.pos1;\n\t\tvar size1Name = style.size1;\n\t\tvar containerWidth = this._size * (isHorizontal ? aspectRatio : 1);\n\t\tvar containerHeight = this._size / (isHorizontal ? 1 : aspectRatio);\n\t\tvar containerSize1 = isHorizontal ? containerWidth : containerHeight;\n\t\tvar prevOutline = (0, _utils.toZeroArray)(outline);\n\t\tvar start = isAppend ? Math.max.apply(Math, prevOutline) : Math.min.apply(Math, prevOutline) - containerSize1 - margin;\n\t\tvar end = start + containerSize1 + margin;\n\t\tvar container = new _BoxModel2[\"default\"]({});\n\n\t\tvar startIndex = -1;\n\t\tvar endIndex = -1;\n\t\tvar startPos = -1;\n\t\tvar endPos = -1;\n\n\t\titems.forEach(function (item) {\n\t\t\tvar model = new _BoxModel2[\"default\"]({\n\t\t\t\toriginWidth: item.orgSize.width,\n\t\t\t\toriginHeight: item.orgSize.height,\n\t\t\t\twidth: item.orgSize.width,\n\t\t\t\theight: item.orgSize.height\n\t\t\t});\n\n\t\t\t_this._findBestFitArea(container, model);\n\t\t\tcontainer.pushItem(model);\n\t\t\tcontainer.scaleTo(containerWidth + margin, containerHeight + margin);\n\t\t});\n\t\titems.forEach(function (item, i) {\n\t\t\tvar boxItem = container.innerItem()[i];\n\t\t\t// console.log(\"boxItem\", boxItem, boxItem instanceof BoxModel);\n\t\t\tvar width = boxItem.getWidth();\n\t\t\tvar height = boxItem.getHeight();\n\t\t\tvar top = boxItem.getTop();\n\t\t\tvar left = boxItem.getLeft();\n\n\t\t\titem.rect = { top: top, left: left, width: width - margin, height: height - margin };\n\t\t\titem.rect[pos1Name] += start;\n\n\t\t\tif (startIndex === -1) {\n\t\t\t\tstartIndex = i;\n\t\t\t\tendIndex = i;\n\t\t\t\tstartPos = item.rect[pos1Name];\n\t\t\t\tendPos = startPos;\n\t\t\t}\n\t\t\tif (startPos > item.rect[pos1Name]) {\n\t\t\t\tstartPos = item.rect[pos1Name];\n\t\t\t\tstartIndex = i;\n\t\t\t}\n\t\t\tif (endPos < item.rect[pos1Name] + item.rect[size1Name] + margin) {\n\t\t\t\tendPos = item.rect[pos1Name] + item.rect[size1Name] + margin;\n\t\t\t\tendIndex = i;\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tstart: [start],\n\t\t\tend: [end],\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tPackingLayout.prototype._insert = function _insert() {\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar type = arguments[2];\n\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tPackingLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tPackingLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tPackingLayout.prototype.layout = function layout() {\n\t\tvar groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\tvar length = groups.length;\n\t\tvar point = outline;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.PackingLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tPackingLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\n\treturn PackingLayout;\n}();\n\nexports[\"default\"] = PackingLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/PackingLayout.js\n// module id = 13\n// module chunks = 0 1","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar BoxModel = function () {\n\tfunction BoxModel(option) {\n\t\t_classCallCheck(this, BoxModel);\n\n\t\tthis._originWidth = option.originWidth || 0;\n\t\tthis._originHeight = option.originHeight || 0;\n\t\tthis._width = option.width || 0;\n\t\tthis._height = option.height || 0;\n\t\tthis._left = option.left || 0;\n\t\tthis._top = option.top || 0;\n\t\tthis._item = option.item;\n\t\tthis._innerItem = option.innerItem || [];\n\t}\n\n\tBoxModel.prototype.getOriginWidth = function getOriginWidth() {\n\t\treturn this._originWidth;\n\t};\n\n\tBoxModel.prototype.setOriginWidth = function setOriginWidth(width) {\n\t\tthis._originWidth = width;\n\t};\n\n\tBoxModel.prototype.getOriginHeight = function getOriginHeight() {\n\t\treturn this._originHeight;\n\t};\n\n\tBoxModel.prototype.setOriginHeight = function setOriginHeight(height) {\n\t\tthis._originHeight = height;\n\t};\n\n\tBoxModel.prototype.getWidth = function getWidth() {\n\t\treturn this._width;\n\t};\n\n\tBoxModel.prototype.setWidth = function setWidth(width) {\n\t\tthis._width = width;\n\t};\n\n\tBoxModel.prototype.getHeight = function getHeight() {\n\t\treturn this._height;\n\t};\n\n\tBoxModel.prototype.setHeight = function setHeight(height) {\n\t\tthis._height = height;\n\t};\n\n\tBoxModel.prototype.getLeft = function getLeft() {\n\t\treturn this._left;\n\t};\n\n\tBoxModel.prototype.setLeft = function setLeft(left) {\n\t\tthis._left = left;\n\t};\n\n\tBoxModel.prototype.getTop = function getTop() {\n\t\treturn this._top;\n\t};\n\n\tBoxModel.prototype.setTop = function setTop(top) {\n\t\tthis._top = top;\n\t};\n\n\tBoxModel.prototype.innerItem = function innerItem() {\n\t\treturn this._innerItem;\n\t};\n\n\tBoxModel.prototype.scaleTo = function scaleTo(width, height) {\n\t\tvar scaleX = this._width === 0 ? 0 : width / this._width;\n\t\tvar scaleY = this._height === 0 ? 0 : height / this._height;\n\n\t\tthis._innerItem.forEach(function (v) {\n\t\t\tif (scaleX !== 0) {\n\t\t\t\tv._left *= scaleX;\n\t\t\t\tv._width *= scaleX;\n\t\t\t}\n\t\t\tif (scaleY !== 0) {\n\t\t\t\tv._top *= scaleY;\n\t\t\t\tv._height *= scaleY;\n\t\t\t}\n\t\t});\n\n\t\tthis._width = width;\n\t\tthis._height = height;\n\t};\n\n\tBoxModel.prototype.pushItem = function pushItem(item) {\n\t\tthis._innerItem.push(item);\n\t};\n\n\tBoxModel.prototype.getOriginSize = function getOriginSize() {\n\t\treturn this._originWidth * this._originHeight;\n\t};\n\n\tBoxModel.prototype.getSize = function getSize() {\n\t\treturn this._width * this._height;\n\t};\n\n\tBoxModel.prototype.getOriginRatio = function getOriginRatio() {\n\t\treturn this._originHeight === 0 ? 0 : this._originWidth / this._originHeight;\n\t};\n\n\tBoxModel.prototype.getRatio = function getRatio() {\n\t\treturn this._height === 0 ? 0 : this._width / this._height;\n\t};\n\n\tBoxModel.prototype.isSmallerThen = function isSmallerThen(box) {\n\t\treturn this._width <= box._width && this._height <= box._height;\n\t};\n\n\tBoxModel.prototype.isEqual = function isEqual(box) {\n\t\treturn this._left === box._left && this._top === box._top && this._width === box._width && this._height === box._height;\n\t};\n\n\treturn BoxModel;\n}();\n\nmodule.exports = BoxModel;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/lib/BoxModel.js\n// module id = 14\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _dijkstra = require(\"./lib/dijkstra\");\n\nvar _dijkstra2 = _interopRequireDefault(_dijkstra);\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * @classdesc 'justified' is a printing term with the meaning that 'it fits in one row wide'. JustifiedLayout is a layout that the card is filled up on the basis of a line given a size.\n * @ko 'justified'는 '1행의 너비에 맞게 꼭 들어찬'이라는 의미를 가진 인쇄 용어다. 용어의 의미대로 너비가 주어진 사이즈를 기준으로 카드가 가득 차도록 배치하는 레이아웃이다.\n * @class eg.InfiniteGrid.JustifiedLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.JustifiedLayout module eg.InfiniteGrid.JustifiedLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.minSize=0] Minimum size of item to be resized 아이템이 조정되는 최소 크기 \n * @param {Boolean} [options.maxSize=0] Maximum size of item to be resized 아이템이 조정되는 최대 크기 \n * @example\n```\n\n```\n **/\nvar JustifiedLayout = function () {\n\tfunction JustifiedLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, JustifiedLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\tminSize: 0,\n\t\t\tmaxSize: 0\n\t\t}, options);\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t\tthis._size = 0;\n\t}\n\n\tJustifiedLayout.prototype._layout = function _layout(items, outline, isAppend) {\n\t\tvar _this = this;\n\n\t\tvar style = this._style;\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar startIndex = 0;\n\t\tvar endIndex = items.length;\n\t\tvar graph = function graph(_start) {\n\t\t\tvar results = {};\n\t\t\tvar start = +_start.replace(/[^0-9]/g, \"\");\n\t\t\tvar length = endIndex + 1;\n\n\t\t\tfor (var i = start + 1; i < length; ++i) {\n\t\t\t\tif (i - start > 8) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tvar cost = _this._getCost(items, start, i, size1Name, size2Name);\n\n\t\t\t\tif (cost < 0 && i === length - 1) {\n\t\t\t\t\tcost = 0;\n\t\t\t\t}\n\t\t\t\tif (cost !== null) {\n\t\t\t\t\tresults[\"node\" + i] = Math.pow(cost, 2);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn results;\n\t\t};\n\t\t// shortest path for items' total height.\n\t\tvar path = _dijkstra2[\"default\"].find_path(graph, \"node\" + startIndex, \"node\" + endIndex);\n\n\t\treturn this._setStyle(items, path, outline, isAppend);\n\t};\n\n\tJustifiedLayout.prototype._getSize = function _getSize(items, size1Name, size2Name) {\n\t\tvar margin = this.options.margin;\n\t\tvar size = items.reduce(function (sum, item) {\n\t\t\treturn sum + item.size[size2Name] / item.size[size1Name];\n\t\t}, 0);\n\n\t\treturn (this._size - margin * (items.length - 1)) / size;\n\t};\n\n\tJustifiedLayout.prototype._getCost = function _getCost(items, i, j, size1Name, size2Name) {\n\t\tvar size = this._getSize(items.slice(i, j), size1Name, size2Name);\n\t\tvar min = this.options.minSize || 0;\n\t\tvar max = this.options.maxSize || Infinity;\n\n\t\tif (isFinite(max)) {\n\t\t\t// if this size is not in range, the cost increases sharply.\n\t\t\tif (size < min) {\n\t\t\t\treturn Math.pow(size - min, 2) + Math.pow(max, 2);\n\t\t\t} else if (size > max) {\n\t\t\t\treturn Math.pow(size - max, 2) + Math.pow(max, 2);\n\t\t\t} else {\n\t\t\t\t// if this size in range, the cost is negative or low.\n\t\t\t\treturn Math.min(size - max, min - size);\n\t\t\t}\n\t\t}\n\t\t// if max is infinite type, caculate cost only with \"min\".\n\t\tif (size < min) {\n\t\t\treturn Math.max(Math.pow(min, 2), Math.pow(size, 2));\n\t\t}\n\t\treturn size - min;\n\t};\n\n\tJustifiedLayout.prototype._setStyle = function _setStyle(items, path) {\n\t\tvar outline = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n\t\tvar isAppend = arguments[3];\n\n\t\tvar style = this._style;\n\t\t// if direction is vertical\n\t\t// pos1 : top, pos11 : bottom\n\t\t// size1 : height\n\t\t// pos2 : left, pos22 : right\n\t\t// size2 : width\n\n\t\t// if direction is horizontal\n\t\t// pos1 : left, pos11 : right\n\t\t// size1 : width\n\t\t// pos2 : top, pos22 : bottom\n\t\t// size2 : height\n\t\tvar pos1Name = style.pos1;\n\t\tvar size1Name = style.size1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar size2Name = style.size2;\n\t\tvar length = path.length;\n\t\tvar margin = this.options.margin;\n\t\tvar startPoint = outline[0] || 0;\n\t\tvar endPoint = startPoint;\n\t\tvar height = 0;\n\n\t\tfor (var i = 0; i < length - 1; ++i) {\n\t\t\tvar path1 = parseInt(path[i].replace(\"node\", \"\"), 10);\n\t\t\tvar path2 = parseInt(path[i + 1].replace(\"node\", \"\"), 10);\n\t\t\t// pathItems(path1 to path2) are in 1 line.\n\t\t\tvar pathItems = items.slice(path1, path2);\n\t\t\tvar pathItemsLength = pathItems.length;\n\t\t\tvar size1 = this._getSize(pathItems, size1Name, size2Name);\n\t\t\tvar pos1 = endPoint;\n\n\t\t\tfor (var j = 0; j < pathItemsLength; ++j) {\n\t\t\t\tvar _item$rect;\n\n\t\t\t\tvar item = pathItems[j];\n\t\t\t\tvar size2 = item.size[size2Name] / item.size[size1Name] * size1;\n\t\t\t\t// item has margin bottom and right.\n\t\t\t\t// first item has not margin.\n\t\t\t\tvar prevItemRect = j === 0 ? 0 : pathItems[j - 1].rect;\n\t\t\t\tvar pos2 = prevItemRect ? prevItemRect[pos2Name] + prevItemRect[size2Name] + margin : 0;\n\n\t\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);\n\t\t\t}\n\t\t\theight += margin + size1;\n\t\t\tendPoint = startPoint + height;\n\t\t}\n\t\tvar itemsLength = items.length;\n\t\tvar startIndex = itemsLength ? 0 : -1;\n\t\tvar endIndex = itemsLength ? itemsLength - 1 : -1;\n\n\t\tif (isAppend) {\n\t\t\t// previous group's end outline is current group's start outline\n\t\t\treturn {\n\t\t\t\tstart: [startPoint],\n\t\t\t\tend: [endPoint],\n\t\t\t\tstartIndex: startIndex,\n\t\t\t\tendIndex: endIndex\n\t\t\t};\n\t\t}\n\t\t// for prepend, only substract height from position.\n\t\t// always start is lower than end.\n\n\t\tfor (var _i = 0; _i < itemsLength; ++_i) {\n\t\t\tvar _item = items[_i];\n\n\t\t\t// move items as long as height for prepend\n\t\t\t_item.rect[pos1Name] -= height;\n\t\t}\n\t\treturn {\n\t\t\tstart: [startPoint - height],\n\t\t\tend: [startPoint], // endPoint - height = startPoint\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tJustifiedLayout.prototype._insert = function _insert(items, outline, type) {\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.JustifiedLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tJustifiedLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tJustifiedLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tJustifiedLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100]);\n */\n\n\n\tJustifiedLayout.prototype.layout = function layout(groups, outlines) {\n\t\tvar length = groups.length;\n\t\tvar point = outlines;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\n\treturn JustifiedLayout;\n}();\n\nexports[\"default\"] = JustifiedLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/JustifiedLayout.js\n// module id = 15\n// module chunks = 0 1","'use strict';\n\n/* eslint-disable */\n/******************************************************************************\n * Created 2008-08-19.\n *\n * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.\n *\n * Copyright (C) 2008\n * Wyatt Baldwin \n * All rights reserved\n *\n * Licensed under the MIT license.\n *\n * http://www.opensource.org/licenses/mit-license.php\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *****************************************************************************/\n(function () {\n var dijkstra = {\n single_source_shortest_paths: function single_source_shortest_paths(graph, s, d) {\n // Predecessor map for each node that has been encountered.\n // node ID => predecessor node ID\n var predecessors = {};\n\n // Costs of shortest paths from s to all nodes encountered.\n // node ID => cost\n var costs = {};\n costs[s] = 0;\n\n // Costs of shortest paths from s to all nodes encountered; differs from\n // `costs` in that it provides easy access to the node that currently has\n // the known shortest path from s.\n // XXX: Do we actually need both `costs` and `open`?\n var open = new BinaryHeap(function (x) {\n return x.cost;\n });\n open.push({ value: s, cost: 0 });\n\n var closest, u, cost_of_s_to_u, adjacent_nodes, cost_of_e, cost_of_s_to_u_plus_cost_of_e, cost_of_s_to_v, first_visit;\n while (open.size()) {\n // In the nodes remaining in graph that have a known cost from s,\n // find the node, u, that currently has the shortest path from s.\n closest = open.pop();\n u = closest.value;\n cost_of_s_to_u = closest.cost;\n\n // Get nodes adjacent to u...\n adjacent_nodes = graph(u) || {};\n\n // ...and explore the edges that connect u to those nodes, updating\n // the cost of the shortest paths to any or all of those nodes as\n // necessary. v is the node across the current edge from u.\n for (var v in adjacent_nodes) {\n // Get the cost of the edge running from u to v.\n cost_of_e = adjacent_nodes[v];\n\n // Cost of s to u plus the cost of u to v across e--this is *a*\n // cost from s to v that may or may not be less than the current\n // known cost to v.\n cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;\n\n // If we haven't visited v yet OR if the current known cost from s to\n // v is greater than the new cost we just found (cost of s to u plus\n // cost of u to v across e), update v's cost in the cost list and\n // update v's predecessor in the predecessor list (it's now u).\n cost_of_s_to_v = costs[v];\n first_visit = typeof costs[v] === 'undefined';\n if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {\n costs[v] = cost_of_s_to_u_plus_cost_of_e;\n open.push({ value: v, cost: cost_of_s_to_u_plus_cost_of_e });\n predecessors[v] = u;\n }\n }\n }\n\n if (typeof costs[d] === 'undefined') {\n var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');\n throw new Error(msg);\n }\n\n return predecessors;\n },\n\n extract_shortest_path_from_predecessor_list: function extract_shortest_path_from_predecessor_list(predecessors, d) {\n var nodes = [];\n var u = d;\n var predecessor;\n while (u) {\n nodes.push(u);\n predecessor = predecessors[u];\n u = predecessors[u];\n }\n nodes.reverse();\n return nodes;\n },\n\n find_path: function find_path(graph, s, d) {\n var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);\n return dijkstra.extract_shortest_path_from_predecessor_list(predecessors, d);\n }\n\n };\n\n function BinaryHeap(scoreFunction) {\n this.content = [];\n this.scoreFunction = scoreFunction;\n }\n\n BinaryHeap.prototype = {\n push: function push(element) {\n // Add the new element to the end of the array.\n this.content.push(element);\n // Allow it to bubble up.\n this.bubbleUp(this.content.length - 1);\n },\n\n pop: function pop() {\n // Store the first element so we can return it later.\n var result = this.content[0];\n // Get the element at the end of the array.\n var end = this.content.pop();\n // If there are any elements left, put the end element at the\n // start, and let it sink down.\n if (this.content.length > 0) {\n this.content[0] = end;\n this.sinkDown(0);\n }\n return result;\n },\n\n remove: function remove(node) {\n var len = this.content.length;\n // To remove a value, we must search through the array to find\n // it.\n for (var i = 0; i < len; i++) {\n if (this.content[i] === node) {\n // When it is found, the process seen in 'pop' is repeated\n // to fill up the hole.\n var end = this.content.pop();\n if (i !== len - 1) {\n this.content[i] = end;\n if (this.scoreFunction(end) < this.scoreFunction(node)) {\n this.bubbleUp(i);\n } else {\n this.sinkDown(i);\n }\n }\n return;\n }\n }\n throw new Error('Node not found.');\n },\n\n size: function size() {\n return this.content.length;\n },\n\n bubbleUp: function bubbleUp(n) {\n // Fetch the element that has to be moved.\n var element = this.content[n];\n // When at 0, an element can not go up any further.\n while (n > 0) {\n // Compute the parent element's index, and fetch it.\n var parentN = Math.floor((n + 1) / 2) - 1,\n parent = this.content[parentN];\n // Swap the elements if the parent is greater.\n if (this.scoreFunction(element) < this.scoreFunction(parent)) {\n this.content[parentN] = element;\n this.content[n] = parent;\n // Update 'n' to continue at the new position.\n n = parentN;\n }\n // Found a parent that is less, no need to move it further.\n else {\n break;\n }\n }\n },\n\n sinkDown: function sinkDown(n) {\n // Look up the target element and its score.\n var length = this.content.length,\n element = this.content[n],\n elemScore = this.scoreFunction(element);\n\n while (true) {\n // Compute the indices of the child elements.\n var child2N = (n + 1) * 2,\n child1N = child2N - 1;\n // This is used to store the new position of the element,\n // if any.\n var swap = null;\n // If the first child exists (is inside the array)...\n if (child1N < length) {\n // Look it up and compute its score.\n var child1 = this.content[child1N],\n child1Score = this.scoreFunction(child1);\n // If the score is less than our element's, we need to swap.\n if (child1Score < elemScore) {\n swap = child1N;\n }\n }\n // Do the same checks for the other child.\n if (child2N < length) {\n var child2 = this.content[child2N],\n child2Score = this.scoreFunction(child2);\n if (child2Score < (swap == null ? elemScore : child1Score)) {\n swap = child2N;\n }\n }\n\n // If the element needs to be moved, swap it, and continue.\n if (swap !== null) {\n this.content[n] = this.content[swap];\n this.content[swap] = element;\n n = swap;\n }\n // Otherwise, we are done.\n else {\n break;\n }\n }\n }\n };\n\n /**\n * Browserify 지원을 위한 모듈화 코드\n */\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = dijkstra;\n } else {\n window.dijkstra = dijkstra;\n }\n})();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/lib/dijkstra.js\n// module id = 16\n// module chunks = 0 1"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACh9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""}
\ No newline at end of file
diff --git a/dist/infinitegrid.pkgd.min.js b/dist/infinitegrid.pkgd.min.js
index fe9a4ed20..92748d75b 100644
--- a/dist/infinitegrid.pkgd.min.js
+++ b/dist/infinitegrid.pkgd.min.js
@@ -11,4496 +11,5 @@
* NOTE: This is not an official distribution file and is only for user convenience.
*
*/
-(function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory();
- else if(typeof define === 'function' && define.amd)
- define([], factory);
- else if(typeof exports === 'object')
- exports["InfiniteGrid"] = factory();
- else
- root["eg"] = root["eg"] || {}, root["eg"]["InfiniteGrid"] = factory();
-})(typeof self !== 'undefined' ? self : this, function() {
-return /******/ (function(modules) { // webpackBootstrap
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {}
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, {
-/******/ configurable: false,
-/******/ enumerable: true,
-/******/ get: getter
-/******/ });
-/******/ }
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 5);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.__esModule = true;
-exports.DEFENSE_BROWSER = exports.WEBKIT_VERSION = exports.PROCESSING = exports.LOADING_PREPEND = exports.LOADING_APPEND = exports.IDLE = exports.ALIGN = exports.isMobile = exports.agent = exports.DEFAULT_OPTIONS = exports.GROUPKEY_ATT = exports.DUMMY_POSITION = exports.SINGLE = exports.MULTI = exports.NO_TRUSTED = exports.TRUSTED = exports.NO_CACHE = exports.CACHE = exports.HORIZONTAL = exports.VERTICAL = exports.PREPEND = exports.APPEND = exports.IGNORE_CLASSNAME = exports.CONTAINER_CLASSNAME = exports.RETRY = exports.IS_ANDROID2 = exports.IS_IOS = exports.IS_IE = exports.SUPPORT_PASSIVE = exports.SUPPORT_ADDEVENTLISTENER = exports.SUPPORT_COMPUTEDSTYLE = undefined;
-
-var _browser = __webpack_require__(2);
-
-var ua = _browser.window.navigator.userAgent;
-
-var SUPPORT_COMPUTEDSTYLE = exports.SUPPORT_COMPUTEDSTYLE = !!("getComputedStyle" in _browser.window);
-var SUPPORT_ADDEVENTLISTENER = exports.SUPPORT_ADDEVENTLISTENER = !!("addEventListener" in document);
-var SUPPORT_PASSIVE = exports.SUPPORT_PASSIVE = function () {
- var supportsPassiveOption = false;
-
- try {
- if (SUPPORT_ADDEVENTLISTENER && Object.defineProperty) {
- document.addEventListener("test", null, Object.defineProperty({}, "passive", {
- get: function get() {
- supportsPassiveOption = true;
- }
- }));
- }
- } catch (e) {}
- return supportsPassiveOption;
-}();
-
-var IS_IE = exports.IS_IE = /MSIE|Trident|Windows Phone|Edge/.test(ua);
-var IS_IOS = exports.IS_IOS = /iPhone|iPad/.test(ua);
-var IS_ANDROID2 = exports.IS_ANDROID2 = /Android 2\./.test(ua);
-var RETRY = exports.RETRY = 3;
-var CONTAINER_CLASSNAME = exports.CONTAINER_CLASSNAME = "_eg-infinitegrid-container_";
-var IGNORE_CLASSNAME = exports.IGNORE_CLASSNAME = "_eg-infinitegrid-ignore_";
-
-var APPEND = exports.APPEND = true;
-var PREPEND = exports.PREPEND = false;
-var VERTICAL = exports.VERTICAL = "vertical";
-var HORIZONTAL = exports.HORIZONTAL = "horizontal";
-var CACHE = exports.CACHE = true;
-var NO_CACHE = exports.NO_CACHE = false;
-var TRUSTED = exports.TRUSTED = true;
-var NO_TRUSTED = exports.NO_TRUSTED = false;
-var MULTI = exports.MULTI = true;
-var SINGLE = exports.SINGLE = false;
-var DUMMY_POSITION = exports.DUMMY_POSITION = -100000;
-var GROUPKEY_ATT = exports.GROUPKEY_ATT = "data-groupkey";
-
-var DEFAULT_OPTIONS = exports.DEFAULT_OPTIONS = {
- horizontal: false,
- margin: 0
-};
-
-var agent = exports.agent = ua.toLowerCase();
-var isMobile = exports.isMobile = /mobi|ios|android/.test(agent);
-
-var ALIGN = exports.ALIGN = {
- START: "start",
- CENTER: "center",
- END: "end",
- JUSTIFY: "justify"
-};
-
-var IDLE = exports.IDLE = 0;
-var LOADING_APPEND = exports.LOADING_APPEND = 1;
-var LOADING_PREPEND = exports.LOADING_PREPEND = 2;
-var PROCESSING = exports.PROCESSING = 4;
-
-var webkit = /applewebkit\/([\d|.]*)/g.exec(agent);
-
-var WEBKIT_VERSION = exports.WEBKIT_VERSION = webkit && parseInt(webkit[1], 10) || 0;
-var DEFENSE_BROWSER = exports.DEFENSE_BROWSER = WEBKIT_VERSION && WEBKIT_VERSION < 537;
-
-/***/ }),
-/* 1 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.__esModule = true;
-exports.STYLE = undefined;
-
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-exports.toArray = toArray;
-exports.fill = fill;
-exports.$ = $;
-exports.addEvent = addEvent;
-exports.removeEvent = removeEvent;
-exports.scroll = scroll;
-exports.scrollTo = scrollTo;
-exports.scrollBy = scrollBy;
-exports.getStyles = getStyles;
-exports.innerWidth = innerWidth;
-exports.innerHeight = innerHeight;
-exports.getStyleNames = getStyleNames;
-exports.assignOptions = assignOptions;
-exports.toZeroArray = toZeroArray;
-exports.isWindow = isWindow;
-exports.indexOf = indexOf;
-
-var _browser = __webpack_require__(2);
-
-var _consts = __webpack_require__(0);
-
-function toArray(nodes) {
- // SCRIPT5014 in IE8
- var array = [];
-
- if (nodes) {
- for (var i = 0, len = nodes.length; i < len; i++) {
- array.push(nodes[i]);
- }
- }
- return array;
-}
-function fill(length, value) {
- var array = (typeof length === "undefined" ? "undefined" : _typeof(length)) === "object" ? length : new Array(length);
- var len = array.length;
-
- for (var i = len - 1; i >= 0; --i) {
- array[i] = value;
- }
- return array;
-}
-/**
- * Select or create element
- * @param {String|HTMLElement|jQuery} param
- * when string given is as HTML tag, then create element
- * otherwise it returns selected elements
- * @param {Boolean} multi
- * @returns {HTMLElement}
- */
-function $(param) {
- var multi = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
-
- var el = void 0;
-
- if (typeof param === "string") {
- // String (HTML, Selector)
- // check if string is HTML tag format
- var match = param.match(/^<([A-z]+)\s*([^>]*)>/);
-
- // creating element
- if (match) {
- // HTML
- var dummy = _browser.document.createElement("div");
-
- dummy.innerHTML = param;
- el = dummy.childNodes;
- } else {
- // Selector
- el = _browser.document.querySelectorAll(param);
- }
- if (multi) {
- el = toArray(el);
- } else {
- el = el && el.length > 0 && el[0] || undefined;
- }
- } else if (param === _browser.window) {
- // window
- el = param;
- } else if (param.nodeName && (param.nodeType === 1 || param.nodeType === 9)) {
- // HTMLElement, Document
- el = param;
- } else if ("jQuery" in _browser.window && param instanceof _browser.window.jQuery || param.constructor.prototype.jquery) {
- // jQuery
- el = multi ? param.toArray() : param.get(0);
- } else if (Array.isArray(param)) {
- el = param.map(function (v) {
- return $(v);
- });
- if (!multi) {
- el = el.length >= 1 ? el[0] : undefined;
- }
- }
- return el;
-}
-function addEvent(element, type, handler, eventListenerOptions) {
- if (_consts.SUPPORT_ADDEVENTLISTENER) {
- var options = eventListenerOptions || false;
-
- if ((typeof eventListenerOptions === "undefined" ? "undefined" : _typeof(eventListenerOptions)) === "object") {
- options = _consts.SUPPORT_PASSIVE ? eventListenerOptions : false;
- }
- element.addEventListener(type, handler, options);
- } else if (element.attachEvent) {
- element.attachEvent("on" + type, handler);
- } else {
- element["on" + type] = handler;
- }
-}
-function removeEvent(element, type, handler) {
- if (element.removeEventListener) {
- element.removeEventListener(type, handler, false);
- } else if (element.detachEvent) {
- element.detachEvent("on" + type, handler);
- } else {
- element["on" + type] = null;
- }
-}
-function scroll(el, isVertical) {
- var prop = "scroll" + (isVertical ? "Top" : "Left");
-
- if (el === _browser.window) {
- return _browser.window[isVertical ? "pageYOffset" : "pageXOffset"] || _browser.document.body[prop] || _browser.document.documentElement[prop];
- } else {
- return el[prop];
- }
-}
-function scrollTo(el, x, y) {
- if (el === _browser.window) {
- el.scroll(x, y);
- } else {
- el.scrollLeft = x;
- el.scrollTop = y;
- }
-}
-function scrollBy(el, x, y) {
- if (el === _browser.window) {
- el.scrollBy(x, y);
- } else {
- el.scrollLeft += x;
- el.scrollTop += y;
- }
-}
-function getStyles(el) {
- return _consts.SUPPORT_COMPUTEDSTYLE ? _browser.window.getComputedStyle(el) : el.currentStyle;
-}
-function _getSize(el, name) {
- if (el === _browser.window) {
- // WINDOW
- return el.document.documentElement["client" + name];
- } else if (el.nodeType === 9) {
- // DOCUMENT_NODE
- var doc = el.documentElement;
-
- return Math.max(el.body["scroll" + name], doc["scroll" + name], el.body["offset" + name], doc["offset" + name], doc["client" + name]);
- } else {
- // NODE
- var style = getStyles(el);
- var value = style[name.toLowerCase()];
-
- return parseFloat(/auto|%/.test(value) ? el["offset" + name] : style[name.toLowerCase()]);
- }
-}
-function innerWidth(el) {
- return _getSize(el, "Width");
-}
-function innerHeight(el) {
- return _getSize(el, "Height");
-}
-var STYLE = exports.STYLE = {
- vertical: {
- pos1: "top",
- endPos1: "bottom",
- size1: "height",
- pos2: "left",
- endPos2: "right",
- size2: "width"
- },
- horizontal: {
- pos1: "left",
- endPos1: "right",
- size1: "width",
- pos2: "top",
- endPos2: "bottom",
- size2: "height"
- }
-};
-
-function getStyleNames(isHorizontal) {
- return STYLE[isHorizontal ? _consts.HORIZONTAL : _consts.VERTICAL];
-}
-
-function assignOptions(defaultOptions, options) {
- return _extends({}, _consts.DEFAULT_OPTIONS, defaultOptions, options);
-}
-
-function toZeroArray(outline) {
- if (!outline || !outline.length) {
- return [0];
- }
- return outline;
-}
-
-function isWindow(el) {
- return el === _browser.window;
-}
-
-function indexOf(arr, target) {
- var isRight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
-
- if (!isRight) {
- return arr.indexOf(target);
- }
- var length = arr.length;
-
- for (var i = length - 1; i >= 0; --i) {
- if (arr[i] !== target) {
- continue;
- }
- return i;
- }
- return -1;
-}
-
-/***/ }),
-/* 2 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.__esModule = true;
-/* eslint-disable no-new-func, no-nested-ternary */
-var win = window;
-/* eslint-enable no-new-func, no-nested-ternary */
-
-exports.window = window;
-var document = exports.document = win.document;
-
-/***/ }),
-/* 3 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.__esModule = true;
-
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var _consts = __webpack_require__(0);
-
-var _utils = __webpack_require__(1);
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _defense(element) {
- var container = document.createElement("div");
-
- container.className = _consts.CONTAINER_CLASSNAME;
- container.style.position = "relative";
- container.style.height = "100%";
-
- var children = element.children;
- var length = children.length; // for IE8
-
- for (var i = 0; i < length; i++) {
- container.appendChild(children[0]);
- }
-
- element.appendChild(container);
- return container;
-}
-
-var DOMRenderer = function () {
- DOMRenderer.renderItem = function renderItem(item, styles) {
- if (item.el) {
- var elStyle = item.el.style;
-
- // for debugging
- item.el.setAttribute(_consts.GROUPKEY_ATT, item.groupKey);
- elStyle.position = "absolute";
- ["left", "top", "width", "height"].forEach(function (p) {
- p in styles && (elStyle[p] = styles[p] + "px");
- });
- }
- };
-
- DOMRenderer.renderItems = function renderItems(items) {
- items.forEach(function (item) {
- DOMRenderer.renderItem(item, item.rect);
- });
- };
-
- DOMRenderer.removeItems = function removeItems(items) {
- items.forEach(function (item) {
- if (item.el) {
- DOMRenderer.removeElement(item.el);
- item.el = null;
- }
- });
- };
-
- DOMRenderer.removeElement = function removeElement(element) {
- element.parentNode.removeChild(element);
- };
-
- DOMRenderer.createElements = function createElements(items) {
- var elements = (0, _utils.$)(items.reduce(function (acc, v, i) {
- acc.push(v.content.replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, ""));
- return acc;
- }, []).join(""), _consts.MULTI);
-
- return items.map(function (item, index) {
- item.el = elements[index];
- return item;
- });
- };
-
- function DOMRenderer(element, options) {
- _classCallCheck(this, DOMRenderer);
-
- _extends(this.options = {
- isOverflowScroll: false,
- isEqualSize: false,
- isVertical: true
- }, options);
- this._size = {
- containerOffset: 0,
- container: -1,
- view: -1,
- item: null
- };
- this._init(element);
- this.resize();
- }
-
- DOMRenderer.prototype.getStatus = function getStatus() {
- return {
- cssText: this.container.style.cssText,
- options: _extends({}, this.options),
- _size: _extends({}, this._size)
- };
- };
-
- DOMRenderer.prototype.setStatus = function setStatus(status, items) {
- this.container.style.cssText = status.cssText;
- _extends(this.options, status.options);
- _extends(this._size, status._size);
-
- DOMRenderer.renderItems(items);
- this._insert(items, _consts.APPEND);
- };
-
- DOMRenderer.prototype.updateSize = function updateSize(items) {
- var _this = this;
-
- return items.map(function (item) {
- if (item.el) {
- if (_this.options.isEqualSize) {
- _this._size.item = _this._size.item || {
- width: (0, _utils.innerWidth)(item.el),
- height: (0, _utils.innerHeight)(item.el)
- };
- item.size = _extends({}, _this._size.item);
- } else {
- item.size = {
- width: (0, _utils.innerWidth)(item.el),
- height: (0, _utils.innerHeight)(item.el)
- };
- }
- if (!item.orgSize) {
- item.orgSize = _extends({}, item.size);
- }
- }
- return item;
- });
- };
-
- DOMRenderer.prototype._init = function _init(el) {
- var element = (0, _utils.$)(el);
- var style = (0, _utils.getStyles)(element);
-
- this._orgStyle = {};
-
- if (style.position === "static") {
- this._orgStyle.position = element.style.position;
- element.style.position = "relative";
- }
- if (this.options.isOverflowScroll) {
- var target = this.options.isVertical ? ["Y", "X"] : ["X", "Y"];
-
- this._orgStyle.overflowX = element.style.overflowX;
- this._orgStyle.overflowY = element.style.overflowY;
- element.style["overflow" + target[0]] = "scroll";
- element.style["overflow" + target[1]] = "hidden";
- this.view = element;
- // defense code for android < 4.4 or webkit < 537
- this.container = !this.options.isVertical && _consts.DEFENSE_BROWSER ? _defense(element) : element;
- } else {
- this.view = window;
- this.container = element;
- }
- };
-
- DOMRenderer.prototype.append = function append(items) {
- this._insert(items, _consts.APPEND, {
- top: _consts.DUMMY_POSITION,
- left: _consts.DUMMY_POSITION
- });
- };
-
- DOMRenderer.prototype.prepend = function prepend(items) {
- this._insert(items, _consts.PREPEND, {
- top: _consts.DUMMY_POSITION,
- left: _consts.DUMMY_POSITION
- });
- };
-
- DOMRenderer.prototype.clear = function clear() {
- this.container.innerHTML = "";
- if (!this.options.isOverflowScroll) {
- this.container.style[this.options.isVertical ? "height" : "width"] = "";
- }
- this._size = {
- containerOffset: 0,
- viewport: -1,
- container: -1,
- view: -1
- };
- };
-
- DOMRenderer.prototype.createAndInsert = function createAndInsert(items, isAppend) {
- var itemsWithElement = DOMRenderer.createElements(items);
-
- DOMRenderer.renderItems(itemsWithElement);
- this._insert(itemsWithElement, isAppend);
- };
-
- DOMRenderer.prototype._insert = function _insert(items, isAppend, styles) {
- var df = document.createDocumentFragment();
-
- items.forEach(function (item) {
- styles && DOMRenderer.renderItem(item, styles);
- isAppend ? df.appendChild(item.el) : df.insertBefore(item.el, df.firstChild);
- });
- isAppend ? this.container.appendChild(df) : this.container.insertBefore(df, this.container.firstChild);
- };
-
- DOMRenderer.prototype._calcSize = function _calcSize() {
- return this.options.isVertical ? (0, _utils.innerWidth)(this.container) : (0, _utils.innerHeight)(this.container);
- };
-
- DOMRenderer.prototype.getViewSize = function getViewSize() {
- return this._size.view;
- };
-
- DOMRenderer.prototype.scrollBy = function scrollBy(point) {
- var pos = this.options.isVertical ? [0, point] : [point, 0];
-
- _utils.scrollBy.apply(undefined, [this.view].concat(pos));
- };
-
- DOMRenderer.prototype.getContainerOffset = function getContainerOffset() {
- return this._size.containerOffset;
- };
-
- DOMRenderer.prototype.getViewportSize = function getViewportSize() {
- this.resize();
- return this._size.viewport;
- };
-
- DOMRenderer.prototype.setContainerSize = function setContainerSize(size) {
- if (!this.options.isOverflowScroll || !this.options.isVertical && _consts.DEFENSE_BROWSER) {
- this.container.style[this.options.isVertical ? "height" : "width"] = size + "px";
- }
- };
-
- DOMRenderer.prototype.resize = function resize() {
- var isVertical = this.options.isVertical;
-
- if (this.isNeededResize()) {
- this._size = {
- containerOffset: this.options.isOverflowScroll ? 0 : this.container["offset" + (isVertical ? "Top" : "Left")],
- viewport: this._calcSize(),
- view: isVertical ? (0, _utils.innerHeight)(this.view) : (0, _utils.innerWidth)(this.view),
- item: null
- };
- return true;
- } else {
- this._size.view = isVertical ? (0, _utils.innerHeight)(this.view) : (0, _utils.innerWidth)(this.view);
- }
- return false;
- };
-
- DOMRenderer.prototype.isNeededResize = function isNeededResize() {
- return this._calcSize() !== this._size.viewport;
- };
-
- DOMRenderer.prototype.destroy = function destroy() {
- this._size = {
- containerOffset: 0,
- viewport: -1,
- view: -1,
- item: null
- };
- this.container.style[this.options.isVertical ? "height" : "width"] = "";
- for (var p in this._orgStyle) {
- this[this.options.isOverflowScroll ? "view" : "container"].style[p] = this._orgStyle[p];
- }
- };
-
- return DOMRenderer;
-}();
-
-exports["default"] = DOMRenderer;
-module.exports = exports["default"];
-
-/***/ }),
-/* 4 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.__esModule = true;
-
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-var _consts = __webpack_require__(0);
-
-var _utils = __webpack_require__(1);
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/*
-Frame
-[
-[1, 1, 1, 1, 1],
-[0, 0, 2, 2, 2],
-[0, 0, 2, 2, 2],
-[3, 4, 5, 5, 5],
-]
-*/
-function disableFrame(frame, type, x, y, width, height) {
- for (var i = y; i < y + height; ++i) {
- for (var j = x; j < x + width; ++j) {
- if (type !== frame[i][j]) {
- continue;
- }
- frame[i][j] = 0;
- }
- }
-}
-function searchShapeInFrame(frame, type, top, left, width, height) {
- var size = {
- left: left,
- top: top,
- type: type,
- width: 1,
- height: 1
- };
-
- for (var i = left; i < width; ++i) {
- if (frame[top][i] === type) {
- size.width = i - left + 1;
- continue;
- }
- break;
- }
- for (var _i = top; _i < height; ++_i) {
- if (frame[_i][left] === type) {
- size.height = _i - top + 1;
- continue;
- }
- break;
- }
- // After finding the shape, it will not find again.
- disableFrame(frame, type, left, top, size.width, size.height);
- return size;
-}
-function getShapes(frame) {
- var height = frame.length;
- var width = height ? frame[0].length : 0;
- var shapes = [];
-
- for (var i = 0; i < height; ++i) {
- for (var j = 0; j < width; ++j) {
- var type = frame[i][j];
-
- if (!type) {
- continue;
- }
- // Separate shapes with other numbers.
- shapes.push(searchShapeInFrame(frame, type, i, j, width, height));
- }
- }
- shapes.sort(function (a, b) {
- return a.type < b.type ? -1 : 1;
- });
- return {
- shapes: shapes,
- width: width,
- height: height
- };
-}
-/**
- * @classdesc FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.
- * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.
- * @class eg.InfiniteGrid.FrameLayout
- * @param {Object} [options] The option object of eg.InfiniteGrid.FrameLayout module eg.InfiniteGrid.FrameLayout 모듈의 옵션 객체
- * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간
- * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)
- * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다.
- * @param {Boolean} [options.frame=[]] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다.
- * @param {Boolean} [options.frameFill=true] Make sure that the frame can be attached after the previous frame. 다음 프레임이 전 프레임에 이어 붙일 수 있는지 있는지 확인한다.
- * @example
-```
-
-```
- **/
-
-var FrameLayout = function () {
- function FrameLayout() {
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-
- _classCallCheck(this, FrameLayout);
-
- this.options = (0, _utils.assignOptions)({
- itemSize: 0,
- frame: [],
- frameFill: true
- }, options);
- var frame = this.options.frame.map(function (row) {
- return row.slice();
- });
- // divide frame into shapes.
- var shapes = getShapes(frame);
-
- this._itemSize = this.options.itemSize || 0;
- this._shapes = shapes;
- this._size = 0;
- this._style = (0, _utils.getStyleNames)(this.options.horizontal);
- }
-
- FrameLayout.prototype._getItemSize = function _getItemSize() {
- this._checkItemSize();
-
- return this._itemSize;
- };
-
- FrameLayout.prototype._checkItemSize = function _checkItemSize() {
- if (this.options.itemSize) {
- this._itemSize = this.options.itemSize;
- return;
- }
- var style = this._style;
- var size = style.size2;
- var margin = this.options.margin;
-
- // if itemSize is not in options, caculate itemSize from size.
- this._itemSize = (this._size + margin) / this._shapes[size] - margin;
- };
-
- FrameLayout.prototype._layout = function _layout(items) {
- var outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
- var isAppend = arguments[2];
-
- var length = items.length;
- var style = this._style;
- var _options = this.options,
- margin = _options.margin,
- frameFill = _options.frameFill;
-
- var size1Name = style.size1;
- var size2Name = style.size2;
- var pos1Name = style.pos1;
- var pos2Name = style.pos2;
- var itemSize = this._getItemSize();
- var isItemObject = (typeof itemSize === "undefined" ? "undefined" : _typeof(itemSize)) === "object";
- var itemSize2 = isItemObject ? itemSize[size2Name] : itemSize;
- var itemSize1 = isItemObject ? itemSize[size1Name] : itemSize;
- var shapesSize = this._shapes[size2Name];
- var shapes = this._shapes.shapes;
- var shapesLength = shapes.length;
- var startOutline = (0, _utils.fill)(shapesSize, _consts.DUMMY_POSITION);
- var endOutline = (0, _utils.fill)(shapesSize, _consts.DUMMY_POSITION);
- var dist = 0;
- var end = 0;
- var startIndex = -1;
- var endIndex = -1;
- var minPos = -1;
- var maxPos = -1;
-
- if (!shapesLength) {
- return { start: outline, end: outline, startIndex: startIndex, endIndex: endIndex };
- }
- for (var i = 0; i < length; i += shapesLength) {
- for (var j = 0; j < shapesLength && i + j < length; ++j) {
- var _item$rect;
-
- var item = items[i + j];
- var shape = shapes[j];
- var shapePos1 = shape[pos1Name];
- var shapePos2 = shape[pos2Name];
- var shapeSize1 = shape[size1Name];
- var shapeSize2 = shape[size2Name];
- var pos1 = end - dist + shapePos1 * (itemSize1 + margin);
- var pos2 = shapePos2 * (itemSize2 + margin);
- var size1 = shapeSize1 * (itemSize1 + margin) - margin;
- var size2 = shapeSize2 * (itemSize2 + margin) - margin;
-
- for (var k = shapePos2; k < shapePos2 + shapeSize2 && k < shapesSize; ++k) {
- if (startOutline[k] === _consts.DUMMY_POSITION) {
- startOutline[k] = pos1;
- }
- if (startIndex === -1) {
- minPos = pos1;
- startIndex = i + j;
- maxPos = pos1 + size1 + margin;
- endIndex = i + j;
- }
- if (minPos > pos1) {
- minPos = pos1;
- startIndex = i + j;
- }
- if (maxPos < pos1 + size1 + margin) {
- maxPos = pos1 + size1 + margin;
- endIndex = i + j;
- }
- startOutline[k] = Math.min(startOutline[k], pos1);
- endOutline[k] = Math.max(endOutline[k], pos1 + size1 + margin);
- }
- item.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);
- }
- end = Math.max.apply(Math, endOutline);
- // check dist once
- if (i !== 0) {
- continue;
- }
- // find & fill empty block
- if (!frameFill) {
- dist = 0;
- continue;
- }
- dist = end;
-
- for (var _j = 0; _j < shapesSize; ++_j) {
- if (startOutline[_j] === _consts.DUMMY_POSITION) {
- continue;
- }
- // the dist between frame's end outline and next frame's start outline
- // expect that next frame's start outline is startOutline[j] + end
- dist = Math.min(startOutline[_j] + end - endOutline[_j], dist);
- }
- }
- for (var _i2 = 0; _i2 < shapesSize; ++_i2) {
- if (startOutline[_i2] !== _consts.DUMMY_POSITION) {
- continue;
- }
- startOutline[_i2] = Math.max.apply(Math, startOutline);
- endOutline[_i2] = startOutline[_i2];
- }
- // The target outline is start outline when type is APPENDING
- var targetOutline = isAppend ? startOutline : endOutline;
- var prevOutlineEnd = outline.length === 0 ? 0 : Math[isAppend ? "max" : "min"].apply(Math, outline);
- var prevOutlineDist = isAppend ? 0 : end;
-
- if (frameFill && outline.length === shapesSize) {
- prevOutlineDist = -_consts.DUMMY_POSITION;
- for (var _i3 = 0; _i3 < shapesSize; ++_i3) {
- if (startOutline[_i3] === endOutline[_i3]) {
- continue;
- }
- // if appending type is PREPEND, subtract dist from appending group's height.
-
- prevOutlineDist = Math.min(targetOutline[_i3] + prevOutlineEnd - outline[_i3], prevOutlineDist);
- }
- }
- for (var _i4 = 0; _i4 < shapesSize; ++_i4) {
- startOutline[_i4] += prevOutlineEnd - prevOutlineDist;
- endOutline[_i4] += prevOutlineEnd - prevOutlineDist;
- }
- items.forEach(function (item) {
- item.rect[pos1Name] += prevOutlineEnd - prevOutlineDist;
- });
- return {
- start: startOutline,
- end: endOutline,
- startIndex: startIndex,
- endIndex: endIndex
- };
- };
-
- FrameLayout.prototype._insert = function _insert(items, outline, type) {
- // this only needs the size of the item.
- var clone = items.map(function (item) {
- return _extends({}, item);
- });
-
- return {
- items: clone,
- outlines: this._layout(clone, outline, type)
- };
- };
- /**
- * Adds items of groups at the bottom of a outline.
- * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.
- * @method eg.InfiniteGrid.FrameLayout#layout
- * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열
- * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열
- * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스
- * @example
- * layout.layout(groups, [100, 200, 300, 400]);
- */
-
-
- FrameLayout.prototype.layout = function layout(groups, outlines) {
- var length = groups.length;
- var point = outlines;
-
- for (var i = 0; i < length; ++i) {
- var group = groups[i];
-
- point = this._layout(group.items, point, _consts.APPEND);
- group.outlines = point;
- point = point.end;
- }
- return this;
- };
- /**
- * Set the viewport size of the layout.
- * @ko 레이아웃의 가시 사이즈를 설정한다.
- * @method eg.InfiniteGrid.FrameLayout#setSize
- * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈
- * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스
- * @example
- * layout.setSize(800);
- */
-
-
- FrameLayout.prototype.setSize = function setSize(size) {
- this._size = size;
- return this;
- };
- /**
- * Adds items at the bottom of a outline.
- * @ko 아이템들을 아웃라인 아래에 추가한다.
- * @method eg.InfiniteGrid.FrameLayout#append
- * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열
- * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열
- * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보
- * @example
- * layout.prepend(items, [100]);
- */
-
-
- FrameLayout.prototype.append = function append(items, outline) {
- return this._insert(items, outline, _consts.APPEND);
- };
- /**
- * Adds items at the top of a outline.
- * @ko 아이템을 아웃라인 위에 추가한다.
- * @method eg.InfiniteGrid.FrameLayout#prepend
- * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열
- * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열
- * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보
- * @example
- * layout.prepend(items, [100]);
- */
-
-
- FrameLayout.prototype.prepend = function prepend(items, outline) {
- return this._insert(items, outline, _consts.PREPEND);
- };
-
- return FrameLayout;
-}();
-
-exports["default"] = FrameLayout;
-module.exports = exports["default"];
-
-/***/ }),
-/* 5 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var _InfiniteGrid = __webpack_require__(6);
-
-var _InfiniteGrid2 = _interopRequireDefault(_InfiniteGrid);
-
-var _GridLayout = __webpack_require__(11);
-
-var _GridLayout2 = _interopRequireDefault(_GridLayout);
-
-var _FrameLayout = __webpack_require__(4);
-
-var _FrameLayout2 = _interopRequireDefault(_FrameLayout);
-
-var _SquareLayout = __webpack_require__(12);
-
-var _SquareLayout2 = _interopRequireDefault(_SquareLayout);
-
-var _PackingLayout = __webpack_require__(13);
-
-var _PackingLayout2 = _interopRequireDefault(_PackingLayout);
-
-var _JustifiedLayout = __webpack_require__(15);
-
-var _JustifiedLayout2 = _interopRequireDefault(_JustifiedLayout);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
-/**
- * Copyright (c) NAVER Corp.
- * egjs-infinitegrid projects are licensed under the MIT license
- */
-_InfiniteGrid2["default"].GridLayout = _GridLayout2["default"];
-_InfiniteGrid2["default"].FrameLayout = _FrameLayout2["default"];
-_InfiniteGrid2["default"].SquareLayout = _SquareLayout2["default"];
-_InfiniteGrid2["default"].PackingLayout = _PackingLayout2["default"];
-_InfiniteGrid2["default"].JustifiedLayout = _JustifiedLayout2["default"];
-
-module.exports = _InfiniteGrid2["default"];
-
-/***/ }),
-/* 6 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.__esModule = true;
-
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /**
- * Copyright (c) 2017 NAVER Corp.
- * egjs projects are licensed under the MIT license
- */
-
-
-var _component = __webpack_require__(7);
-
-var _component2 = _interopRequireDefault(_component);
-
-var _ItemManager = __webpack_require__(8);
-
-var _ItemManager2 = _interopRequireDefault(_ItemManager);
-
-var _DOMRenderer = __webpack_require__(3);
-
-var _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);
-
-var _ImageLoaded = __webpack_require__(9);
-
-var _ImageLoaded2 = _interopRequireDefault(_ImageLoaded);
-
-var _Watcher = __webpack_require__(10);
-
-var _Watcher2 = _interopRequireDefault(_Watcher);
-
-var _consts = __webpack_require__(0);
-
-var _utils = __webpack_require__(1);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-// IE8
-// https://stackoverflow.com/questions/43216659/babel-ie8-inherit-issue-with-object-create
-/* eslint-disable */
-if (typeof Object.create !== "function") {
- Object.create = function (o, properties) {
- if ((typeof o === "undefined" ? "undefined" : _typeof(o)) !== "object" && typeof o !== "function") {
- throw new TypeError("Object prototype may only be an Object: " + o);
- } else if (o === null) {
- throw new Error("This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument.");
- }
- function F() {}
- F.prototype = o;
- return new F();
- };
-}
-/* eslint-enable */
-
-/**
- * A module used to arrange card elements including content infinitely according to layout type. With this module, you can implement various layouts composed of different card elements whose sizes vary. It guarantees performance by maintaining the number of DOMs the module is handling under any circumstance
- * @ko 콘텐츠가 있는 카드 엘리먼트를 레이아웃 타입에 따라 무한으로 배치하는 모듈. 다양한 크기의 카드 엘리먼트를 다양한 레이아웃으로 배치할 수 있다. 카드 엘리먼트의 개수가 계속 늘어나도 모듈이 처리하는 DOM의 개수를 일정하게 유지해 최적의 성능을 보장한다
- * @alias eg.InfiniteGrid
- * @extends eg.Component
- *
- * @example
-```
-
- -
-
test1
-
- -
-
test2
-
- -
-
test3
-
- -
-
test4
-
- -
-
test5
-
- -
-
test6
-
-
-
-```
- *
- * @support {"ie": "8+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.1+ (except 3.x)"}
- **/
-
-var InfiniteGrid = function (_Component) {
- _inherits(InfiniteGrid, _Component);
-
- /**
- * @param {HTMLElement|String|jQuery} element A base element for a module 모듈을 적용할 기준 엘리먼트
- * @param {Object} [options] The option object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 옵션 객체
- * @param {String} [options.itemSelector] A selector to select card elements that make up the layout레이아웃을 구성하는 카드 엘리먼트를 선택할 선택자(selector)
- * @param {Boolean} [options.useRecycle=true] Indicates whether keep the number of DOMs is maintained. If the useRecycle value is 'true', keep the number of DOMs is maintained. If the useRecycle value is 'false', the number of DOMs will increase as card elements are added. DOM의 수를 유지할지 여부를 나타낸다. useRecycle 값이 'true'이면 DOM 개수를 일정하게 유지한다. useRecycle 값이 'false' 이면 카드 엘리먼트가 추가될수록 DOM 개수가 계속 증가한다.
- * @param {Boolean} [options.isOverflowScroll=false] Indicates whether overflow:scroll is appliedoverflow:scroll 적용여부를 결정한다.
- * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향
- * @param {Boolean} [options.isEqualSize=false] Indicates whether sizes of all card elements are equal to one another. If sizes of card elements to be arranged are all equal and this option is set to "true", the performance of layout arrangement can be improved. 카드 엘리먼트의 크기가 동일한지 여부. 배치될 카드 엘리먼트의 크기가 모두 동일할 때 이 옵션을 'true'로 설정하면 레이아웃 배치 성능을 높일 수 있다
- * @param {Number} [options.threshold=100] The threshold size of an event area where card elements are added to a layout.레이아웃에 카드 엘리먼트를 추가하는 이벤트가 발생하는 기준 영역의 크기.
- */
- function InfiniteGrid(element, options) {
- _classCallCheck(this, InfiniteGrid);
-
- var _this = _possibleConstructorReturn(this, _Component.call(this));
-
- _extends(_this.options = {
- itemSelector: "*",
- isOverflowScroll: false,
- threshold: 100,
- isEqualSize: false,
- useRecycle: true,
- horizontal: false
- }, options);
- _consts.IS_ANDROID2 && (_this.options.isOverflowScroll = false);
- _this._isVertical = !_this.options.horizontal;
- _this._reset();
- _this._items = new _ItemManager2["default"]();
- _this._renderer = new _DOMRenderer2["default"](element, {
- isOverflowScroll: _this.options.isOverflowScroll,
- isEqualSize: _this.options.isEqualSize,
- isVertical: _this._isVertical
- });
- _this._watcher = new _Watcher2["default"](_this._renderer, {
- layout: function layout() {
- return _this.layout();
- },
- check: function check(param) {
- return _this._onCheck(param);
- }
- });
- return _this;
- }
- /**
- * Adds a card element at the bottom of a layout. This method is available only if the isProcessing() method returns false.
- * @ko 카드 엘리먼트를 레이아웃 아래에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다
- * 이 메소드는 isProcessing()의 반환값이 false일 경우에만 사용 가능하다.
- * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트의 배열
- * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.
- * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.
- * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스
- * @example
- * infinitegrid.append("<div class='item'>test1</div><div class='item'>test2</div>");
- * infinitegrid.append(["<div class='item'>test1</div>", "<div class='item'>test2</div>"]);
- * infinitegrid.append([HTMLElement1, HTMLElement2]);
- * infinitegrid.append(jQuery(["<div class='item'>test1</div>", "<div class='item'>test2</div>"]));
- */
-
-
- InfiniteGrid.prototype.append = function append(elements, groupKey) {
- this._layout && this._insert(elements, _consts.APPEND, groupKey);
- return this;
- };
- /**
- * Adds a card element at the top of a layout. This method is available only if the isProcessing() method returns false.
- * @ko 카드 엘리먼트를 레이아웃의 위에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다
- * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트 배열
- * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.
- * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.
- * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스
- * @example
- * infinitegrid.prepend("<div class='item'>test1</div><div class='item'>test2</div>");
- * infinitegrid.prepend(["<div class='item'>test1</div>", "<div class='item'>test2</div>"]);
- * infinitegrid.prepend([HTMLElement1, HTMLElement2]);
- * infinitegrid.prepend(jQuery(["<div class='item'>test1</div>", "<div class='item'>test2</div>"]));
- */
-
-
- InfiniteGrid.prototype.prepend = function prepend(elements, groupKey) {
- this._layout && this._insert(elements, _consts.PREPEND, groupKey);
- return this;
- };
- /**
- * Specifies the Layout class to use.
- * @ko 사용할 Layout 클래스를 지정한다.
- * @param {Class} LayoutKlass The Layout class to use 사용할 Layout 클래스
- * @param {Object} options Options to apply to the Layout.Layout에 적용할 옵션
- * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스
- * @example
- * infinitegrid.setLayout(eg.InfiniteGrid.GridLayout, {
- * margin: 10,
- * align: "start"
- * });
- * infinitegrid.setLayout(eg.InfiniteGrid.JustifiedLayout, {
- * margin: 10,
- * minSize: 100,
- * maxSize: 200
- * });
- * infinitegrid.setLayout(eg.InfiniteGrid.SquareLayout, {
- * margin: 10,
- * column: 2
- * });
- * infinitegrid.setLayout(eg.InfiniteGrid.FrameLayout, {
- * margin: 10,
- * frame: [
- * [1, 2],
- * [4, 3],
- * ]
- * });
- * infinitegrid.setLayout(eg.InfiniteGrid.PackingLayout, {
- * margin: 10,
- * aspectRatio: 1.5
- * });
- */
-
-
- InfiniteGrid.prototype.setLayout = function setLayout(LayoutKlass, options) {
- this._layout = new LayoutKlass(_extends(options || {}, {
- horizontal: !this._isVertical
- }));
- this._layout.setSize(this._renderer.getViewportSize());
- return this;
- };
- /**
- * Returns the layouted items.
- * @ko 레이아웃된 아이템들을 반환한다.
- * @param {Boolean} includeCached Indicates whether to include the cached items. 캐싱된 아이템을 포함할지 여부를 나타낸다.
- * @returns {Array} List of items 아이템의 목록
- */
-
-
- InfiniteGrid.prototype.getItems = function getItems() {
- var includeCached = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
-
- return this[includeCached ? "_getItems" : "_getVisibleItems"]();
- };
-
- InfiniteGrid.prototype._getItems = function _getItems() {
- return this._items.pluck("items", 0, this._items.size());
- };
-
- InfiniteGrid.prototype._getVisibleItems = function _getVisibleItems() {
- return this._items.pluck("items", this._status.startCursor, this._status.endCursor);
- };
-
- InfiniteGrid.prototype._updateEdge = function _updateEdge() {
- this._status.start = this._items.getEdge("start", this._status.startCursor, this._status.endCursor);
- this._status.end = this._items.getEdge("end", this._status.startCursor, this._status.endCursor);
- };
-
- InfiniteGrid.prototype._getEdgeOffset = function _getEdgeOffset(cursor) {
- var rect = null;
-
- if (!this._status[cursor]) {
- var item = this._items.getEdge(cursor);
-
- this._status[cursor] = item;
- }
-
- if (this._status[cursor]) {
- rect = this._status[cursor].rect;
- if (cursor === "start") {
- rect.bottom = rect.top + this._status[cursor].size.height;
- rect.right = rect.left + this._status[cursor].size.width;
- }
- }
- return rect;
- };
- // called by visible
-
-
- InfiniteGrid.prototype._fit = function _fit() {
- var scrollCycle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "after";
-
- // for caching
- if (!this._layout) {
- return 0;
- }
- var base = this._getEdgeValue("start");
- var margin = this._getLoadingStatus() === _consts.LOADING_PREPEND && this._status.loadingSize || 0;
-
- if (!this.options.useRecycle || _consts.DEFENSE_BROWSER) {
- if (scrollCycle === "before" && margin && base < margin) {
- this._renderer.scrollBy(-Math.abs(base) + margin);
- this._watcher.setScrollPos();
- this._items.fit(base - margin, this._isVertical);
- _DOMRenderer2["default"].renderItems(this._getVisibleItems());
- this._renderer.setContainerSize(this._getEdgeValue("end") || margin);
- } else if (scrollCycle === "after" && base < 0) {
- this._items.fit(base - margin, this._isVertical);
- this._renderer.setContainerSize(this._getEdgeValue("end") || margin);
- _DOMRenderer2["default"].renderItems(this._getVisibleItems());
- this._renderer.scrollBy(Math.abs(base));
- this._watcher.setScrollPos();
- }
- return 0;
- }
-
- if (base !== 0 || margin) {
- var isProcessing = this._isProcessing();
-
- this._process(_consts.PROCESSING);
- if (scrollCycle === "before") {
- this._renderer.scrollBy(-Math.abs(base) + margin);
- this._watcher.setScrollPos();
- }
- this._items.fit(base - margin, this._isVertical);
- _DOMRenderer2["default"].renderItems(this._getVisibleItems());
- this._renderer.setContainerSize(this._getEdgeValue("end") || margin);
- if (scrollCycle === "after") {
- this._renderer.scrollBy(Math.abs(base) + margin);
- this._watcher.setScrollPos();
- }
- if (!isProcessing) {
- this._process(_consts.PROCESSING, false);
- }
- }
- return base;
- };
-
- InfiniteGrid.prototype._getEdgeValue = function _getEdgeValue(cursor) {
- return this._items.getEdgeValue(cursor, this._status.startCursor, this._status.endCursor);
- };
- /**
- * Rearranges a layout.
- * @ko 레이아웃을 다시 배치한다.
- * @param {Boolean} [isRelayout=true] Indicates whether a card element is being relayouted 카드 엘리먼트 재배치 여부
- * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스
- */
-
-
- InfiniteGrid.prototype.layout = function layout() {
- var _this2 = this;
-
- var isRelayout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
-
- if (!this._layout || this._isProcessing()) {
- return this;
- }
- // check childElement
- if (!this._items.size()) {
- this._insert((0, _utils.toArray)(this._renderer.container.children), true);
- return this;
- }
- this._process(_consts.PROCESSING);
-
- var data = void 0;
- var outline = void 0;
-
- if (isRelayout) {
- // remove cache
- data = this._items.get(this._status.startCursor, this._status.endCursor);
- if (this._renderer.resize()) {
- this._layout.setSize(this._renderer.getViewportSize());
- data.forEach(function (v) {
- data.items = _this2._renderer.updateSize(v.items);
- });
- }
- } else {
- data = this._items.get(this._status.startCursor, this._items.size());
- outline = this._items.getOutline(this._status.startCursor, "start");
- }
- if (!data.length) {
- return this;
- }
- this._layout.layout(data, outline);
-
- if (isRelayout) {
- this._items._data.forEach(function (group, cursor) {
- if (_this2._status.startCursor <= cursor && cursor <= _this2._status.endCursor) {
- return;
- }
- group.outlines.start = [];
- group.outlines.end = [];
- });
- } else {
- data.forEach(function (v) {
- return _this2._items.set(v, v.groupKey);
- });
- }
- this._onLayoutComplete(data, _consts.APPEND, _consts.NO_TRUSTED, false);
- _DOMRenderer2["default"].renderItems(this._getVisibleItems());
- isRelayout && this._watcher.setScrollPos();
-
- return this;
- };
- /**
- * Removes a item element on a grid layout.
- * @ko 그리드 레이아웃의 카드 엘리먼트를 삭제한다.
- * @param {HTMLElement} item element to be removed 삭제될 아이템 엘리먼트
- * @return {Object} Removed item element 삭제된 아이템 엘리먼트 정보
- */
-
-
- InfiniteGrid.prototype.remove = function remove(element) {
- if (element) {
- var items = this._items.remove(element, this._status.startCursor, this._status.endCursor);
-
- if (items) {
- _DOMRenderer2["default"].removeElement(element);
- return items;
- }
- }
- return null;
- };
-
- InfiniteGrid.prototype._getNextItems = function _getNextItems(isAppend) {
- var items = [];
- var size = this._items.size();
-
- // from cache
- if (size > 0 && this._status.startCursor !== -1 && this._status.endCursor !== -1) {
- if (isAppend && size > this._status.endCursor + 1) {
- items = this._items.pluck("items", this._status.endCursor + 1);
- } else if (!isAppend && this._status.startCursor > 0) {
- items = this._items.pluck("items", this._status.startCursor - 1);
- }
- }
- return items;
- };
- /**
- * Returns the list of group keys which belongs to card elements currently being maintained. You can use the append() or prepend() method to configure group keys so that multiple card elements can be managed at once. If you do not use these methods to configure group keys, groupkey is automatically generated.
- * @ko 현재 유지하고 있는 카드 엘리먼트의 그룹 키 목록을 반환한다. 여러 개의 카드 엘리먼트를 묶어서 관리할 수 있도록 append() 메서드나 prepend() 메서드에서 그룹 키를 지정할 수 있다. append() 메서드나 prepend() 메서드에서 그룹 키를 지정하지 않았다면 자동으로 그룹키가 생성된다.
- * @param {Boolean} includeCached Indicates whether to include the cached groups. 캐싱된 그룹을 포함할지 여부를 나타낸다.
- * @return {Array} List of group keys 그룹 키의 목록
- */
-
-
- InfiniteGrid.prototype.getGroupKeys = function getGroupKeys(includeCached) {
- var data = includeCached ? this._items.get() : this._items.get(this._status.startCursor, this._status.endCursor);
-
- return data.map(function (v) {
- return v.groupKey;
- });
- };
- /**
- * Returns the current state of a module such as location information. You can use the setStatus() method to restore the information returned through a call to this method.
- * @ko 카드의 위치 정보 등 모듈의 현재 상태 정보를 반환한다. 이 메서드가 반환한 정보를 저장해 두었다가 setStatus() 메서드로 복원할 수 있다
- * @return {Object} State object of the eg.InfiniteGrid moduleeg.InfiniteGrid 모듈의 상태 객체
- */
-
-
- InfiniteGrid.prototype.getStatus = function getStatus() {
- return {
- options: _extends({}, this.options),
- _status: _extends({}, this._status),
- _items: this._items.getStatus(),
- _renderer: this._renderer.getStatus(),
- _watcher: this._watcher.getStatus()
- };
- };
- /**
- * Sets the state of the eg.InfiniteGrid module with the information returned through a call to the getStatue() method.
- * @ko getStatue() 메서드가 저장한 정보로 eg.InfiniteGrid 모듈의 상태를 설정한다.
- * @param {Object} status State object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 상태 객체
- * @param {boolean} [applyScrollPos=true] Checks whether to scroll스크롤의 위치를 복원할지 결정한다.
- * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스
- */
-
-
- InfiniteGrid.prototype.setStatus = function setStatus(status) {
- var applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
-
- if (!status || !status.options || !status._status || !status._renderer || !status._items || !status._watcher) {
- return this;
- }
- this._watcher.detachEvent();
- _extends(this.options, status.options);
- _extends(this._status, status._status);
- this._items.setStatus(status._items, this._status.startCursor, this._status.endCursor);
- this._renderer.setStatus(status._renderer, this._getVisibleItems());
- this._watcher.setStatus(status._watcher, applyScrollPos);
- this._updateEdge();
- this._watcher.attachEvent();
- return this;
- };
- /**
- * Clears added card elements and data.
- * @ko 추가된 카드 엘리먼트와 데이터를 모두 지운다.
- * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스
- */
-
-
- InfiniteGrid.prototype.clear = function clear() {
- this._items.clear();
- this._renderer.clear();
- this._reset();
- this._appendLoadingBar();
- return this;
- };
- /**
- * Specifies the Loading Bar to use for append or prepend items.
- * @ko 아이템을 append 또는 prepend 하기 위해 사용할 로딩 바를 지정한다.
- * @param {String|Object} [userLoadingBar={}] The loading bar HTML markup or element or element selector 로딩 바 HTML 또는 element 또는 selector
- * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스
- */
-
-
- InfiniteGrid.prototype.setLoadingBar = function setLoadingBar() {
- var userLoadingBar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-
- var loadingBarObj = (typeof userLoadingBar === "undefined" ? "undefined" : _typeof(userLoadingBar)) === "object" ? userLoadingBar : {
- "append": userLoadingBar,
- "prepend": userLoadingBar
- };
-
- this._status.loadingSize = 0;
- this._status.loadingStyle = {};
- this._loadingBar = this._loadingBar || {};
- var loadingBar = this._loadingBar;
-
- for (var type in loadingBarObj) {
- loadingBar[type] = (0, _utils.$)(loadingBarObj[type]);
- loadingBar[type].className += " " + _consts.IGNORE_CLASSNAME;
- }
- this._appendLoadingBar();
- return this;
- };
-
- InfiniteGrid.prototype._appendLoadingBar = function _appendLoadingBar() {
- var loadingBar = this._loadingBar;
- var container = this._renderer.container;
-
- for (var type in loadingBar) {
- container.appendChild(loadingBar[type]);
- }
- };
- /**
- * Checks whether a card element or data is being added.
- * @ko 카드 엘리먼트 추가 또는 데이터 로딩이 진행 중인지 확인한다
- * @return {Boolean} Indicates whether a card element or data is being added 카드 엘리먼트 추가 또는 데이터 로딩 진행 중 여부
- */
-
-
- InfiniteGrid.prototype.isProcessing = function isProcessing() {
- return this._isProcessing() || this._isLoading();
- };
-
- InfiniteGrid.prototype._isProcessing = function _isProcessing() {
- return (this._status.processingStatus & _consts.PROCESSING) > 0;
- };
-
- InfiniteGrid.prototype._isLoading = function _isLoading() {
- return this._getLoadingStatus() > 0;
- };
-
- InfiniteGrid.prototype._getLoadingStatus = function _getLoadingStatus() {
- return this._status.processingStatus & (_consts.LOADING_APPEND | _consts.LOADING_PREPEND);
- };
-
- InfiniteGrid.prototype._process = function _process(status) {
- var isAdd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
-
- if (isAdd) {
- this._status.processingStatus |= status;
- } else {
- this._status.processingStatus -= this._status.processingStatus & status;
- }
- };
-
- InfiniteGrid.prototype._insert = function _insert(elements, isAppend, groupKey) {
- if (this._isProcessing() || elements.length === 0) {
- return;
- }
- var key = typeof groupKey === "undefined" ? new Date().getTime() + Math.floor(Math.random() * 1000) : groupKey;
- var items = _ItemManager2["default"].from((0, _utils.$)(elements, true), this.options.itemSelector, {
- isAppend: isAppend,
- groupKey: key
- });
-
- if (!items.length) {
- return;
- }
- this._postLayout(_consts.NO_CACHE, items, isAppend, _consts.NO_TRUSTED);
- };
- // add items, and remove items for recycling
-
-
- InfiniteGrid.prototype._recycle = function _recycle(isAppend) {
- var remove = [];
-
- if (this._status.startCursor !== this._status.endCursor) {
- for (var i = this._status.startCursor; i <= this._status.endCursor; i++) {
- remove.push(this._isVisible(i));
- }
- }
- var start = remove.indexOf(isAppend ? 1 : -1);
- var end = remove.lastIndexOf(isAppend ? 1 : -1);
- var visible = remove.indexOf(0);
-
- if (visible === -1 || start === -1 || end === -1) {
- return;
- }
-
- start = this._status.startCursor + (isAppend ? 0 : start);
- end = isAppend ? this._status.startCursor + end : this._status.endCursor;
- _DOMRenderer2["default"].removeItems(this._items.pluck("items", start, end));
- if (isAppend) {
- this._status.startCursor = end + 1;
- } else {
- this._status.endCursor = start - 1;
- }
- };
- /**
- * Returns the element of loading bar.
- * @ko 로딩 바의 element를 반환한다.
- * @param {Boolean} [isAppend=currentLoadingBar|true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.
- * @return {Element} The element of loading bar. 로딩 바의 element
- */
-
-
- InfiniteGrid.prototype.getLoadingBar = function getLoadingBar() {
- var isAppend = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._getLoadingStatus() !== _consts.LOADING_PREPEND;
-
- return this._loadingBar[isAppend ? "append" : "prepend"];
- };
- /**
- * Start loading for append/prepend during loading data.
- * @ko 데이터가 로딩되는 동안 append/prepend하길 위해 로딩을 시작한다.
- * @param {Boolean} [isAppend=true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.
- * @param {Object} [userStyle = {display: "block"}] custom style to apply to this loading bar for start. 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일
- * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스
- */
-
-
- InfiniteGrid.prototype.startLoading = function startLoading(isAppend) {
- var userStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { display: "block" };
-
- if (this._isLoading()) {
- return this;
- }
- var type = isAppend ? "append" : "prepend";
-
- this._process(isAppend ? _consts.LOADING_APPEND : _consts.LOADING_PREPEND);
- if (!this._loadingBar[type]) {
- return this;
- }
- this._renderLoading(userStyle);
- this._status.loadingStyle = userStyle;
- if (!isAppend) {
- this._fit("before");
- } else {
- this._renderer.setContainerSize(this._getEdgeValue("end") + this._status.loadingSize);
- }
- return this;
- };
-
- InfiniteGrid.prototype._renderLoading = function _renderLoading() {
- var _extends2;
-
- var userStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._status.loadingStyle;
-
- if (!this._isLoading()) {
- return;
- }
- var isAppend = this._getLoadingStatus() === _consts.LOADING_APPEND;
- var el = this._loadingBar[isAppend ? "append" : "prepend"];
-
- if (!el) {
- return;
- }
- this._status.loadingSize = this._isVertical ? (0, _utils.innerHeight)(el) : (0, _utils.innerWidth)(el);
- var pos = isAppend ? this._getEdgeValue("end") : this._getEdgeValue("start") - this._status.loadingSize;
- var style = _extends((_extends2 = {
- position: "absolute"
- }, _extends2[this._isVertical ? "top" : "left"] = pos + "px", _extends2), userStyle);
-
- for (var property in style) {
- el.style[property] = style[property];
- }
- };
- /**
- * End loading after startLoading() for append/prepend
- * @ko append/prepend하길 위해 startLoading() 호출해선 걸었던 로딩을 끝낸다.
- * @param {Object} [userStyle = {display: "none"}] custom style to apply to this loading bar for end 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일
- * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스
- */
-
-
- InfiniteGrid.prototype.endLoading = function endLoading() {
- var _extends3;
-
- var userStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { display: "none" };
-
- if (!this._isLoading()) {
- return this;
- }
- var isAppend = this._getLoadingStatus() === _consts.LOADING_APPEND;
- var type = isAppend ? "append" : "prepend";
- var el = this._loadingBar[type];
- var size = this._status.loadingSize;
-
- this._process(_consts.LOADING_APPEND | _consts.LOADING_PREPEND, false);
- this._status.loadingSize = 0;
- this._status.loadingStyle = {};
- if (!el) {
- return this;
- }
- var style = _extends((_extends3 = {}, _extends3[this._isVertical ? "top" : "left"] = -size + "px", _extends3), userStyle);
-
- for (var property in style) {
- el.style[property] = style[property];
- }
- if (!isAppend) {
- this._renderer.scrollBy(-size);
- this._watcher.setScrollPos();
- this._items.fit(size, this._isVertical);
- _DOMRenderer2["default"].renderItems(this._getVisibleItems());
- this._renderer.setContainerSize(this._getEdgeValue("end"));
- }
- this._renderer.setContainerSize(this._getEdgeValue("end"));
- return this;
- };
-
- InfiniteGrid.prototype._postLayout = function _postLayout(fromCache, items, isAppend, isTrusted) {
- var _this3 = this;
-
- var outline = this._items.getOutline(isAppend ? this._status.endCursor : this._status.startCursor, isAppend ? "end" : "start");
-
- var fromRelayout = false;
-
- if (fromCache) {
- var cacheOutline = this._items.getOutline(isAppend ? this._status.endCursor + 1 : this._status.startCursor - 1, isAppend ? "start" : "end");
-
- fromRelayout = outline.length === cacheOutline.length ? !outline.every(function (v, index) {
- return v === cacheOutline[index];
- }) : true;
-
- if (!fromRelayout) {
- this._renderer.createAndInsert(items, isAppend);
- this._updateCursor(isAppend);
- this._onLayoutComplete(items, isAppend, isTrusted);
- return this;
- }
- }
- this._process(_consts.PROCESSING);
- var method = isAppend ? "append" : "prepend";
-
- fromCache && _DOMRenderer2["default"].createElements(items);
- this._renderer[method](items);
- // check image sizes after elements are attated on DOM
- _ImageLoaded2["default"].check(items.map(function (item) {
- return item.el;
- }), function () {
- var layouted = _this3._layout[method](_this3._renderer.updateSize(items), outline);
-
- if (fromCache) {
- _this3._setItems(layouted);
- } else {
- _this3._insertItems(layouted, isAppend);
- }
- _this3._updateCursor(isAppend);
- _DOMRenderer2["default"].renderItems(layouted.items);
- _this3._onLayoutComplete(layouted.items, isAppend, isTrusted);
- });
- return this;
- };
-
- InfiniteGrid.prototype._isVisible = function _isVisible(index) {
- var min = Math.min.apply(Math, this._items.getOutline(index, "start"));
- var max = Math.max.apply(Math, this._items.getOutline(index, "end"));
- var pos = this._watcher.getScrollPos();
- var viewSize = this._renderer.getViewSize();
-
- if (pos + viewSize + this.options.threshold < min) {
- return -1;
- } else if (pos - this.options.threshold > max) {
- return 1;
- }
- return 0;
- };
-
- InfiniteGrid.prototype._updateCursor = function _updateCursor(isAppend) {
- if (this.options.useRecycle) {
- if (isAppend) {
- this._status.endCursor++;
- } else if (this._status.startCursor > 0) {
- this._status.startCursor--;
- } else {
- this._status.endCursor++; // outside prepend
- }
- if (this._status.startCursor < 0) {
- this._status.startCursor = 0;
- }
- } else {
- this._status.startCursor = 0;
- this._status.endCursor = this._items.size() - 1;
- }
- };
-
- InfiniteGrid.prototype._setItems = function _setItems(layouted) {
- var groupKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : layouted.items && layouted.items[0].groupKey || 0;
-
- layouted.groupKey = groupKey;
- this._items.set(layouted, groupKey);
- };
-
- InfiniteGrid.prototype._insertItems = function _insertItems(layouted, isAppend) {
- layouted.groupKey = layouted.items[0].groupKey;
- this._items[isAppend ? "append" : "prepend"](layouted);
- };
- // called by visible
-
-
- InfiniteGrid.prototype._requestAppend = function _requestAppend() {
- var items = this._getNextItems(_consts.APPEND);
-
- if (this._isProcessing()) {
- return;
- }
- if (items.length) {
- this._postLayout(_consts.CACHE, items, _consts.APPEND, _consts.TRUSTED);
- } else {
- /**
- * This event is fired when a card element must be added at the bottom or right of a layout because there is no card to be displayed on screen when a user scrolls near bottom or right.
- * @ko 카드 엘리먼트가 레이아웃의 아래나 오른쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 아래나 오른쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다
- * @event eg.InfiniteGrid#append
- * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체
- * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 마지막 그룹의 그룹키
- * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.
- */
- this.trigger("append", {
- isTrusted: true,
- groupKey: this.getGroupKeys().pop()
- });
- }
- };
- // called by visible
-
-
- InfiniteGrid.prototype._requestPrepend = function _requestPrepend() {
- var items = this._getNextItems(_consts.PREPEND);
-
- if (this._isProcessing()) {
- return;
- }
- if (items.length) {
- this._postLayout(_consts.CACHE, items, _consts.PREPEND, _consts.TRUSTED);
- } else {
- /**
- * This event is fired when a card element must be added at the top or left of a layout because there is no card to be displayed on screen when a user scrolls near top or left.
- * @ko 카드가 레이아웃의 위나 왼쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 위나 왼쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다.
- * @event eg.InfiniteGrid#prepend
- * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체
- * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 첫번째 그룹의 그룹키
- * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.
- */
- this.trigger("prepend", {
- isTrusted: true,
- groupKey: this.getGroupKeys().shift()
- });
- }
- };
-
- InfiniteGrid.prototype._onCheck = function _onCheck(_ref) {
- var isForward = _ref.isForward,
- scrollPos = _ref.scrollPos,
- horizontal = _ref.horizontal,
- orgScrollPos = _ref.orgScrollPos;
-
- /**
- * This event is fired when the user scrolls.
- * @ko 사용자가 스크롤 할 경우 발생하는 이벤트.
- * @event eg.InfiniteGrid#change
- * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체
- * @param {Boolean} param.isForward Indicates whether the scroll progression direction is forward or backword. 스크롤 진행방향이 앞쪽으로 진행하는 지, 뒤쪽으로 진행하는지를 나타낸다.
- * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값
- * @param {Boolean} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값
- * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.
- * @param {Boolean} options.horizontal Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향
- */
- this.trigger("change", {
- isForward: isForward,
- horizontal: horizontal,
- scrollPos: scrollPos,
- orgScrollPos: orgScrollPos
- });
- var rect = this._getEdgeOffset(isForward ? "end" : "start");
- var isProcessing = this.isProcessing();
-
- if (!rect) {
- return;
- }
- var targetPos = isForward ? rect[horizontal ? "left" : "top"] - this._renderer.getViewSize() : rect[horizontal ? "right" : "bottom"];
-
- if (!isProcessing && isForward) {
- if (scrollPos >= targetPos) {
- this._requestAppend();
- }
- } else if (scrollPos <= targetPos) {
- this._fit("before");
- this._requestPrepend();
- }
- };
-
- InfiniteGrid.prototype._onLayoutComplete = function _onLayoutComplete(items, isAppend) {
- var isTrusted = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
- var useRecycle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.options.useRecycle;
-
- this._isLoading() && this._renderLoading();
- !isAppend && this._fit("after");
- useRecycle && this._recycle(isAppend);
-
- var size = this._getEdgeValue("end");
-
- // recycle after _fit beacause prepend and append are occured simultaneously by scroll.
- this._updateEdge();
-
- isAppend && this._renderer.setContainerSize(size + this._status.loadingSize || 0);
- this._process(_consts.PROCESSING, false);
-
- var scrollPos = this._watcher.getScrollPos();
-
- /**
- * This event is fired when layout is successfully arranged through a call to the append(), prepend(), or layout() method.
- * @ko 레이아웃 배치가 완료됐을 때 발생하는 이벤트. append() 메서드나 prepend() 메서드, layout() 메서드 호출 후 카드의 배치가 완료됐을 때 발생한다
- * @event eg.InfiniteGrid#layoutComplete
- *
- * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체
- * @param {Array} param.target Rearranged card elements재배치된 카드 엘리먼트들
- * @param {Boolean} param.isAppend Checks whether the append() method is used to add a card element. It returns true even though the layoutComplete event is fired after the layout() method is called. 카드 엘리먼트가 append() 메서드로 추가됐는지 확인한다. layout() 메서드가 호출된 후 layoutComplete 이벤트가 발생해도 'true'를 반환한다.
- * @param {Boolean} param.isScroll Checks whether scrolling has occurred after the append(), prepend(), ..., etc method is called
- * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값
- * @param {Number} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값
- * @param {Number} param.size The size of container element 컨테이너 엘리먼트의 크기
- * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.
- */
- this.trigger("layoutComplete", {
- target: items.concat(),
- isAppend: isAppend,
- isTrusted: isTrusted,
- isScroll: this._renderer.getViewSize() < this._renderer.getContainerOffset() + size,
- scrollPos: scrollPos,
- orgScrollPos: this._watcher.getOrgScrollPos(),
- size: size
- });
-
- if (isAppend && scrollPos >= size) {
- this._requestAppend();
- } else if (!isAppend && scrollPos <= this._getEdgeValue("start")) {
- this._fit("before");
- this._requestPrepend();
- }
- };
-
- InfiniteGrid.prototype._reset = function _reset() {
- this._status = {
- processingStatus: _consts.IDLE,
- loadingSize: 0,
- startCursor: -1,
- endCursor: -1,
- start: null,
- end: null
- };
- };
- /**
- * Destroys elements, properties, and events used on a grid layout.
- * @ko 그리드 레이아웃에 사용한 엘리먼트와 속성, 이벤트를 해제한다
- */
-
-
- InfiniteGrid.prototype.destroy = function destroy() {
- this.off();
- this._watcher.destroy();
- this._reset();
- this._items.clear();
- this._renderer.destroy();
- };
-
- return InfiniteGrid;
-}(_component2["default"]);
-
-InfiniteGrid.VERSION = "3.0.0-rc";
-
-exports["default"] = InfiniteGrid;
-module.exports = exports["default"];
-
-/***/ }),
-/* 7 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/*!
- * Copyright (c) 2017 NAVER Corp.
- * @egjs/component project is licensed under the MIT license
- *
- * @egjs/component JavaScript library
- * http://naver.github.io/egjs/component
- *
- * @version 2.1.0
- */
-(function webpackUniversalModuleDefinition(root, factory) {
- if(true)
- module.exports = factory();
- else if(typeof define === 'function' && define.amd)
- define([], factory);
- else if(typeof exports === 'object')
- exports["Component"] = factory();
- else
- root["eg"] = root["eg"] || {}, root["eg"]["Component"] = factory();
-})(this, function() {
-return /******/ (function(modules) { // webpackBootstrap
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {}
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, {
-/******/ configurable: false,
-/******/ enumerable: true,
-/******/ get: getter
-/******/ });
-/******/ }
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 0);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var _Component = __webpack_require__(1);
-
-var _Component2 = _interopRequireDefault(_Component);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
-_Component2["default"].VERSION = "2.1.0";
-module.exports = _Component2["default"];
-
-/***/ }),
-/* 1 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.__esModule = true;
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * Copyright (c) 2015 NAVER Corp.
- * egjs projects are licensed under the MIT license
- */
-
-/**
- * A class used to manage events and options in a component
- * @ko 컴포넌트의 이벤트와 옵션을 관리할 수 있게 하는 클래스
- * @alias eg.Component
- */
-var Component = function () {
- /**
- * @support {"ie": "7+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.1+ (except 3.x)"}
- */
- function Component() {
- _classCallCheck(this, Component);
-
- this._eventHandler = {};
- this.options = {};
- }
- /**
- * Triggers a custom event.
- * @ko 커스텀 이벤트를 발생시킨다
- * @param {String} eventName The name of the custom event to be triggered 발생할 커스텀 이벤트의 이름
- * @param {Object} customEvent Event data to be sent when triggering a custom event 커스텀 이벤트가 발생할 때 전달할 데이터
- * @return {Boolean} Indicates whether the event has occurred. If the stop() method is called by a custom event handler, it will return false and prevent the event from occurring. Ref 이벤트 발생 여부. 커스텀 이벤트 핸들러에서 stop() 메서드를 호출하면 'false'를 반환하고 이벤트 발생을 중단한다. 참고
- * @example
- class Some extends eg.Component {
- some(){
- if(this.trigger("beforeHi")){ // When event call to stop return false.
- this.trigger("hi");// fire hi event.
- }
- }
- }
- const some = new Some();
- some.on("beforeHi", (e) => {
- if(condition){
- e.stop(); // When event call to stop, `hi` event not call.
- }
- });
- some.on("hi", (e) => {
- // `currentTarget` is component instance.
- console.log(some === e.currentTarget); // true
- });
- // If you want to more know event design. You can see article.
- // https://github.com/naver/egjs-component/wiki/How-to-make-Component-event-design%3F
- */
-
-
- Component.prototype.trigger = function trigger(eventName) {
- var customEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
- var handlerList = this._eventHandler[eventName] || [];
- var hasHandlerList = handlerList.length > 0;
-
- if (!hasHandlerList) {
- return true;
- }
-
- // If detach method call in handler in first time then handeler list calls.
- handlerList = handlerList.concat();
-
- customEvent.eventType = eventName;
-
- var isCanceled = false;
- var arg = [customEvent];
- var i = 0;
-
- customEvent.stop = function () {
- isCanceled = true;
- };
- customEvent.currentTarget = this;
-
- for (var _len = arguments.length, restParam = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
- restParam[_key - 2] = arguments[_key];
- }
-
- if (restParam.length >= 1) {
- arg = arg.concat(restParam);
- }
-
- for (i = 0; handlerList[i]; i++) {
- handlerList[i].apply(this, arg);
- }
-
- return !isCanceled;
- };
- /**
- * Executed event just one time.
- * @ko 이벤트가 한번만 실행된다.
- * @param {eventName} eventName The name of the event to be attached 등록할 이벤트의 이름
- * @param {Function} handlerToAttach The handler function of the event to be attached 등록할 이벤트의 핸들러 함수
- * @return {eg.Component} An instance of a component itself컴포넌트 자신의 인스턴스
- * @example
- class Some extends eg.Component {
- hi() {
- alert("hi");
- }
- thing() {
- this.once("hi", this.hi);
- }
- }
- var some = new Some();
- some.thing();
- some.trigger("hi");
- // fire alert("hi");
- some.trigger("hi");
- // Nothing happens
- */
-
-
- Component.prototype.once = function once(eventName, handlerToAttach) {
- if ((typeof eventName === "undefined" ? "undefined" : _typeof(eventName)) === "object" && typeof handlerToAttach === "undefined") {
- var eventHash = eventName;
- var i = void 0;
-
- for (i in eventHash) {
- this.once(i, eventHash[i]);
- }
- return this;
- } else if (typeof eventName === "string" && typeof handlerToAttach === "function") {
- var self = this;
-
- this.on(eventName, function listener() {
- for (var _len2 = arguments.length, arg = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
- arg[_key2] = arguments[_key2];
- }
-
- handlerToAttach.apply(self, arg);
- self.off(eventName, listener);
- });
- }
-
- return this;
- };
-
- /**
- * Checks whether an event has been attached to a component.
- * @ko 컴포넌트에 이벤트가 등록됐는지 확인한다.
- * @param {String} eventName The name of the event to be attached 등록 여부를 확인할 이벤트의 이름
- * @return {Boolean} Indicates whether the event is attached. 이벤트 등록 여부
- * @example
- class Some extends eg.Component {
- some() {
- this.hasOn("hi");// check hi event.
- }
- }
- */
-
-
- Component.prototype.hasOn = function hasOn(eventName) {
- return !!this._eventHandler[eventName];
- };
-
- /**
- * Attaches an event to a component.
- * @ko 컴포넌트에 이벤트를 등록한다.
- * @param {eventName} eventName The name of the event to be attached 등록할 이벤트의 이름
- * @param {Function} handlerToAttach The handler function of the event to be attached 등록할 이벤트의 핸들러 함수
- * @return {eg.Component} An instance of a component itself컴포넌트 자신의 인스턴스
- * @example
- class Some extends eg.Component {
- hi() {
- console.log("hi");
- }
- some() {
- this.on("hi",this.hi); //attach event
- }
- }
- */
-
-
- Component.prototype.on = function on(eventName, handlerToAttach) {
- if ((typeof eventName === "undefined" ? "undefined" : _typeof(eventName)) === "object" && typeof handlerToAttach === "undefined") {
- var eventHash = eventName;
- var name = void 0;
-
- for (name in eventHash) {
- this.on(name, eventHash[name]);
- }
- return this;
- } else if (typeof eventName === "string" && typeof handlerToAttach === "function") {
- var handlerList = this._eventHandler[eventName];
-
- if (typeof handlerList === "undefined") {
- this._eventHandler[eventName] = [];
- handlerList = this._eventHandler[eventName];
- }
-
- handlerList.push(handlerToAttach);
- }
-
- return this;
- };
- /**
- * Detaches an event from the component.
- * @ko 컴포넌트에 등록된 이벤트를 해제한다
- * @param {eventName} eventName The name of the event to be detached 해제할 이벤트의 이름
- * @param {Function} handlerToDetach The handler function of the event to be detached 해제할 이벤트의 핸들러 함수
- * @return {eg.Component} An instance of a component itself 컴포넌트 자신의 인스턴스
- * @example
- class Some extends eg.Component {
- hi() {
- console.log("hi");
- }
- some() {
- this.off("hi",this.hi); //detach event
- }
- }
- */
-
-
- Component.prototype.off = function off(eventName, handlerToDetach) {
- // All event detach.
- if (typeof eventName === "undefined") {
- this._eventHandler = {};
- return this;
- }
-
- // All handler of specific event detach.
- if (typeof handlerToDetach === "undefined") {
- if (typeof eventName === "string") {
- this._eventHandler[eventName] = undefined;
- return this;
- } else {
- var eventHash = eventName;
- var name = void 0;
-
- for (name in eventHash) {
- this.off(name, eventHash[name]);
- }
- return this;
- }
- }
-
- // The handler of specific event detach.
- var handlerList = this._eventHandler[eventName];
-
- if (handlerList) {
- var k = void 0;
- var handlerFunction = void 0;
-
- for (k = 0; (handlerFunction = handlerList[k]) !== undefined; k++) {
- if (handlerFunction === handlerToDetach) {
- handlerList = handlerList.splice(k, 1);
- break;
- }
- }
- }
-
- return this;
- };
-
- return Component;
-}();
-
-exports["default"] = Component;
-module.exports = exports["default"];
-
-/***/ })
-/******/ ]);
-});
-//# sourceMappingURL=component.js.map
-
-/***/ }),
-/* 8 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.__esModule = true;
-
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var _consts = __webpack_require__(0);
-
-var _DOMRenderer = __webpack_require__(3);
-
-var _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);
-
-var _utils = __webpack_require__(1);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-var ItemManager = function () {
- ItemManager.from = function from(elements, selector, _ref) {
- var groupKey = _ref.groupKey,
- isAppend = _ref.isAppend;
-
- var filted = ItemManager.selectItems((0, _utils.$)(elements, _consts.MULTI), selector);
-
- // Item Structure
- return (0, _utils.toArray)(filted).map(function (el) {
- return {
- el: el,
- groupKey: groupKey,
- content: el.outerHTML
- };
- });
- };
-
- ItemManager.selectItems = function selectItems(elements, selector) {
- return elements.filter(function (v) {
- var classNames = v.className.split(" ");
-
- if (classNames.some(function (c) {
- return c === _consts.IGNORE_CLASSNAME;
- })) {
- return false;
- } else if (selector === "*") {
- return v;
- } else {
- return classNames.some(function (c) {
- return c === selector;
- });
- }
- });
- };
-
- ItemManager.pluck = function pluck(data, property) {
- return data.reduce(function (acc, v) {
- return acc.concat(v[property]);
- }, []);
- };
-
- function ItemManager() {
- _classCallCheck(this, ItemManager);
-
- this.clear();
- }
-
- ItemManager.prototype.getStatus = function getStatus() {
- return {
- _data: this._data.map(function (data) {
- var items = data.items.map(function (item) {
- var item2 = _extends({}, item);
-
- delete item2.el;
- return item2;
- });
- var data2 = _extends({}, data);
-
- data2.items = items;
- return data2;
- })
- };
- };
-
- ItemManager.prototype.setStatus = function setStatus(status, start, end) {
- var data = status._data;
-
- for (var i = start; i <= end; i++) {
- data[i].items = _DOMRenderer2["default"].createElements(data[i].items);
- }
- this.set(data);
- };
-
- ItemManager.prototype.size = function size() {
- return this._data.length;
- };
-
- ItemManager.prototype.fit = function fit(base, isVertical) {
- if (!this._data.length) {
- return;
- }
- var property = isVertical ? "top" : "left";
-
- if (base !== 0) {
- this._data = this._data.map(function (v) {
- v.items = v.items.map(function (item) {
- item.rect[property] -= base;
- return item;
- });
- v.outlines.start = v.outlines.start.map(function (start) {
- return start - base;
- });
- v.outlines.end = v.outlines.end.map(function (end) {
- return end - base;
- });
- return v;
- });
- }
- };
-
- ItemManager.prototype.pluck = function pluck(property, start, end) {
- if (typeof start !== "undefined") {
- if (typeof end !== "undefined") {
- return ItemManager.pluck(this._data.slice(start, end + 1), property);
- } else {
- return ItemManager.pluck(this._data.slice(start, start + 1), property);
- }
- } else {
- return ItemManager.pluck(this._data, property);
- }
- };
-
- ItemManager.prototype.getOutline = function getOutline(index, property) {
- if (this._data.length) {
- return this._data[index].outlines[property];
- } else {
- return [];
- }
- };
-
- ItemManager.prototype.getEdgeIndex = function getEdgeIndex(cursor, start, end) {
- var prop = cursor === "start" ? "min" : "max";
- var index = -1;
- var targetValue = cursor === "start" ? Infinity : -Infinity;
-
- for (var i = start; i <= end; i++) {
- var value = Math[prop].apply(Math, this.getOutline(i, cursor));
-
- if (cursor === "start" && targetValue > value || cursor === "end" && targetValue < value) {
- targetValue = value;
- index = i;
- }
- }
- return index;
- };
-
- ItemManager.prototype.getEdge = function getEdge(cursor, start, end) {
- var dataIdx = this.getEdgeIndex(cursor, start, end);
- var items = this.pluck("items", dataIdx);
-
- if (items.length) {
- var itemIdx = this.getOutline(dataIdx, cursor + "Index");
-
- return items.length > itemIdx ? items[itemIdx] : null;
- }
- return null;
- };
-
- ItemManager.prototype.getEdgeValue = function getEdgeValue(cursor, start, end) {
- var outlines = this.pluck("outlines", this.getEdgeIndex(cursor, start, end)).reduce(function (acc, v) {
- return acc.concat(v[cursor]);
- }, []);
-
- return outlines.length ? Math[cursor === "start" ? "min" : "max"].apply(Math, outlines) : 0;
- };
-
- ItemManager.prototype.append = function append(layouted) {
- this._data.push(layouted);
- return layouted.items;
- };
-
- ItemManager.prototype.prepend = function prepend(layouted) {
- this._data.unshift(layouted);
- return layouted.items;
- };
-
- ItemManager.prototype.clear = function clear() {
- this._data = [];
- };
-
- ItemManager.prototype.remove = function remove(element, start, end) {
- var items = null;
- var key = element.getAttribute(_consts.GROUPKEY_ATT);
- var data = this.get(start, end).filter(function (v) {
- return String(v.groupKey) === key;
- });
-
- if (!data.length) {
- return items;
- }
- data = data[0];
-
- var len = data.items.length;
- var idx = -1;
-
- for (var i = 0; i < len; i++) {
- if (data.items[i].el === element) {
- idx = i;
- break;
- }
- }
- if (~idx) {
- // remove item information
- data.items.splice(idx, 1);
- this.set(data, key);
- items = data.items;
- }
- return items;
- };
-
- ItemManager.prototype.get = function get(start, end) {
- if (typeof start !== "undefined") {
- if (typeof end !== "undefined") {
- return this._data.slice(start, end + 1);
- } else {
- return this._data.slice(start, start + 1);
- }
- } else {
- return this._data.concat();
- }
- };
-
- ItemManager.prototype.set = function set(data, key) {
- if (typeof key !== "undefined" && !Array.isArray(data)) {
- var len = this._data.length;
- var idx = -1;
-
- for (var i = 0; i < len; i++) {
- if (this._data[i].groupKey === key) {
- idx = i;
- break;
- }
- }
- ~idx && (this._data[idx] = data);
- } else {
- this._data = data.concat();
- }
- };
-
- return ItemManager;
-}();
-
-exports["default"] = ItemManager;
-module.exports = exports["default"];
-
-/***/ }),
-/* 9 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.__esModule = true;
-
-var _consts = __webpack_require__(0);
-
-var _utils = __webpack_require__(1);
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-var ImageLoaded = function () {
- function ImageLoaded() {
- _classCallCheck(this, ImageLoaded);
- }
-
- ImageLoaded.waitImageLoaded = function waitImageLoaded(needCheck, callback) {
- var checkCount = needCheck.length;
- var checkImage = function checkImage() {
- checkCount--;
- checkCount <= 0 && callback && callback();
- };
- var onCheck = function onCheck(e) {
- (0, _utils.removeEvent)(e.target || e.srcElement, "load", onCheck);
- (0, _utils.removeEvent)(e.target || e.srcElement, "error", onCheck);
- checkImage();
- };
-
- // workaround for IE
- _consts.IS_IE && needCheck.forEach(function (v) {
- return v.setAttribute("src", v.getAttribute("src"));
- });
- needCheck.forEach(function (v) {
- if (v.complete) {
- checkImage();
- } else {
- (0, _utils.addEvent)(v, "load", onCheck);
- (0, _utils.addEvent)(v, "error", onCheck);
- }
- });
- };
-
- ImageLoaded.checkImageLoaded = function checkImageLoaded(el) {
- if (el.tagName === "IMG") {
- return !el.complete ? [el] : [];
- } else {
- return (0, _utils.toArray)(el.querySelectorAll("img")).filter(function (v) {
- if (v.nodeType && [1, 9, 11].indexOf(v.nodeType) !== -1) {
- return !v.complete;
- } else {
- return false;
- }
- });
- }
- };
-
- ImageLoaded.check = function check(elements, callback) {
- var _this = this;
-
- var needCheck = elements.reduce(function (acc, v) {
- return acc.concat(_this.checkImageLoaded(v));
- }, []);
-
- if (needCheck.length > 0) {
- ImageLoaded.waitImageLoaded(needCheck, callback);
- } else {
- // convert to async
- setTimeout(function () {
- callback && callback();
- }, 0);
- }
- };
-
- return ImageLoaded;
-}();
-
-exports["default"] = ImageLoaded;
-module.exports = exports["default"];
-
-/***/ }),
-/* 10 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.__esModule = true;
-
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var _consts = __webpack_require__(0);
-
-var _utils = __webpack_require__(1);
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-var Watcher = function () {
- function Watcher(renderer, callback) {
- _classCallCheck(this, Watcher);
-
- _extends(this._callback = {
- layout: null,
- check: null
- }, callback);
- this._timer = {
- resize: null
- // doubleCheck: null,
- // doubleCheckCount: RETRY,
- };
- this.reset();
- this._renderer = renderer;
- this._onCheck = this._onCheck.bind(this);
- this._onResize = this._onResize.bind(this);
- this.attachEvent();
- this.setScrollPos();
- }
-
- Watcher.prototype.getStatus = function getStatus() {
- return {
- _prevPos: this._prevPos,
- scrollPos: this.getOrgScrollPos()
- };
- };
-
- Watcher.prototype.setStatus = function setStatus(status) {
- var applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
-
- this._prevPos = status._prevPos;
- applyScrollPos && this.scrollTo(status.scrollPos);
- };
-
- Watcher.prototype.scrollTo = function scrollTo(pos) {
- var arrPos = this._renderer.options.isVertical ? [0, pos] : [pos, 0];
-
- _utils.scrollTo.apply(undefined, [this._renderer.view].concat(arrPos));
- };
-
- Watcher.prototype.getScrollPos = function getScrollPos() {
- return this._prevPos;
- };
-
- Watcher.prototype.setScrollPos = function setScrollPos(pos) {
- var rawPos = pos;
-
- if (typeof pos === "undefined") {
- rawPos = this.getOrgScrollPos();
- }
- this._prevPos = rawPos - this._renderer.getContainerOffset();
- };
-
- Watcher.prototype.attachEvent = function attachEvent() {
- (0, _utils.addEvent)(this._renderer.view, "scroll", this._onCheck);
- (0, _utils.addEvent)(window, "resize", this._onResize);
- };
-
- Watcher.prototype.getOrgScrollPos = function getOrgScrollPos() {
- return (0, _utils.scroll)(this._renderer.view, this._renderer.options.isVertical);
- };
-
- Watcher.prototype.reset = function reset() {
- this._prevPos = null;
- };
-
- Watcher.prototype._onCheck = function _onCheck() {
- var prevPos = this.getScrollPos();
- var orgScrollPos = this.getOrgScrollPos();
-
- this.setScrollPos(orgScrollPos);
- var scrollPos = this.getScrollPos();
-
- if (prevPos === null || _consts.IS_IOS && orgScrollPos === 0 || prevPos === scrollPos) {
- return;
- }
-
- this._callback.check && this._callback.check({
- isForward: prevPos < scrollPos,
- scrollPos: scrollPos,
- orgScrollPos: orgScrollPos,
- horizontal: !this._renderer.options.isVertical
- });
- };
-
- Watcher.prototype._onResize = function _onResize() {
- var _this = this;
-
- if (this._timer.resize) {
- clearTimeout(this._timer.resize);
- }
- this._timer.resize = setTimeout(function () {
- _this._renderer.isNeededResize() && _this._callback.layout && _this._callback.layout();
- _this._timer.resize = null;
- _this.reset();
- }, 100);
- };
-
- Watcher.prototype.detachEvent = function detachEvent() {
- (0, _utils.removeEvent)(window, "resize", this._onResize);
- };
-
- Watcher.prototype.destroy = function destroy() {
- this.detachEvent();
- this.reset();
- };
-
- return Watcher;
-}();
-
-exports["default"] = Watcher;
-module.exports = exports["default"];
-
-/***/ }),
-/* 11 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.__esModule = true;
-
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var _consts = __webpack_require__(0);
-
-var _utils = __webpack_require__(1);
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-// ALIGN
-var START = _consts.ALIGN.START,
- CENTER = _consts.ALIGN.CENTER,
- END = _consts.ALIGN.END,
- JUSTIFY = _consts.ALIGN.JUSTIFY;
-
-/**
- * @classdesc GridLayout is a layout in which images with the same width are arranged in a staggered arrangement, like a stack of bricks. Adjust the width of all images to the same size, find the lowest height column, and insert a new image.
- * @ko GridLayout는 벽돌을 쌓아 올린 모양처럼 동일한 너비를 가진 이미지가 엇갈려 배열되는 레이아웃이다. 모든 이미지의 너비를 동일한 크기로 조정하고, 가장 높이가 낮은 열을 찾아 새로운 이미지를 삽입한다. 따라서 배치된 이미지 사이에 빈 공간이 생기지는 않지만 배치된 레이아웃의 아래쪽은 울퉁불퉁해진다.
- * @class eg.InfiniteGrid.GridLayout
- * @param {Object} [options] The option object of eg.InfiniteGrid.GridLayout module eg.InfiniteGrid.GridLayout 모듈의 옵션 객체
- * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간
- * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)
- * @param {Boolean} [options.align=START] Align of the position of the items (START, CENTER, END, JUSTIFY) 아이템들의 위치의 정렬 (START, CENTER, END, JUSTIFY)
- * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다.
- * @example
-```
-
-```
- **/
-
-var GridLayout = function () {
- function GridLayout() {
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-
- _classCallCheck(this, GridLayout);
-
- this.options = (0, _utils.assignOptions)({
- align: START,
- itemSize: 0
- }, options);
- this._size = 0;
- this._columnSize = 0;
- this._columnLength = 0;
- this._style = (0, _utils.getStyleNames)(this.options.horizontal);
- }
-
- GridLayout.prototype.getPoints = function getPoints(outlines) {
- var pos = this.options.horizontal ? "left" : "top";
-
- return outlines.map(function (outline) {
- return outline[pos];
- });
- };
-
- GridLayout.prototype.checkColumn = function checkColumn(item) {
- var margin = this.options.margin;
- var sizeName = this.options.horizontal ? "height" : "width";
- var columnSize = this.options.itemSize || item && item.size[sizeName] || 0;
-
- this._columnSize = columnSize;
- if (!columnSize) {
- this._columnLength = 1;
- return;
- }
- this._columnLength = Math.max(parseInt((this._size + margin) / (columnSize + margin), 10), 1);
- };
-
- GridLayout.prototype._layout = function _layout(items, outline, isAppend) {
- var length = items.length;
- var margin = this.options.margin;
- var align = this.options.align;
- var style = this._style;
-
- var size1Name = style.size1;
- var size2Name = style.size2;
- var pos1Name = style.pos1;
- var pos2Name = style.pos2;
- var columnSize = this._columnSize;
- var columnLength = this._columnLength;
-
- var size = this._size;
- var viewDist = size - (columnSize + margin) * columnLength + margin;
-
- var pointCaculateName = isAppend ? "min" : "max";
- var startOutline = outline.slice();
- var endOutline = outline.slice();
- var startIndex = 0;
- var endIndex = -1;
- var endPos = -1;
-
- for (var i = 0; i < length; ++i) {
- var _item$rect;
-
- var point = Math[pointCaculateName].apply(Math, endOutline) || 0;
- var index = endOutline.indexOf(point);
- var item = items[isAppend ? i : length - 1 - i];
- var size1 = item.size[size1Name];
- var size2 = item.size[size2Name];
- var pos1 = isAppend ? point : point - margin - size1;
- var endPos1 = pos1 + size1 + margin;
-
- if (index === -1) {
- index = 0;
- }
- var pos2 = (columnSize + margin) * index;
-
- // ALIGN
- if (align === CENTER) {
- pos2 += viewDist / 2;
- } else if (align === END) {
- pos2 += viewDist + columnSize - size2;
- } else if (align === JUSTIFY) {
- if (columnLength <= 1) {
- pos2 += viewDist / 2;
- } else {
- pos2 = (size - columnSize) / (columnLength - 1) * index;
- }
- }
- // tetris
- item.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect);
- item.column = index;
- endOutline[index] = isAppend ? endPos1 : pos1;
- if (endIndex === -1) {
- endIndex = i;
- endPos = endPos1;
- } else if (endPos < endPos1) {
- endIndex = i;
- endPos = endPos1;
- }
- }
- if (!isAppend) {
- items.sort(function (a, b) {
- var item1pos1 = a.rect[pos1Name];
- var item1pos2 = a.rect[pos2Name];
- var item2pos1 = b.rect[pos1Name];
- var item2pos2 = b.rect[pos2Name];
-
- if (item1pos1 - item2pos1) {
- return item1pos1 - item2pos1;
- }
- return item1pos2 - item2pos2;
- });
- endIndex = length - 1;
- }
- // if append items, startOutline is low, endOutline is high
- // if prepend items, startOutline is high, endOutline is low
- return {
- start: isAppend ? startOutline : endOutline,
- end: isAppend ? endOutline : startOutline,
- startIndex: startIndex,
- endIndex: endIndex
- };
- };
-
- GridLayout.prototype._insert = function _insert() {
- var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
- var outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
- var type = arguments[2];
-
- var clone = items.map(function (item) {
- return _extends({}, item);
- });
-
- var startOutline = outline;
-
- if (!this._columnLength) {
- this.checkColumn(items[0]);
- }
- if (outline.length !== this._columnLength) {
- startOutline = (0, _utils.fill)(this._columnLength, outline.length === 0 ? 0 : Math[type === _consts.APPEND ? "min" : "max"].apply(Math, outline) || 0);
- }
-
- var result = this._layout(clone, startOutline, type);
-
- return {
- items: clone,
- outlines: result
- };
- };
- /**
- * Adds items at the bottom of a outline.
- * @ko 아이템들을 아웃라인 아래에 추가한다.
- * @method eg.InfiniteGrid.GridLayout#append
- * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열
- * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열
- * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보
- * @example
- * layout.prepend(items, [100, 200, 300, 400]);
- */
-
-
- GridLayout.prototype.append = function append(items, outline) {
- return this._insert(items, outline, _consts.APPEND);
- };
- /**
- * Adds items at the top of a outline.
- * @ko 아이템을 아웃라인 위에 추가한다.
- * @method eg.InfiniteGrid.GridLayout#prepend
- * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열
- * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열
- * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보
- * @example
- * layout.prepend(items, [100, 200, 300, 400]);
- */
-
-
- GridLayout.prototype.prepend = function prepend(items, outline) {
- return this._insert(items, outline, _consts.PREPEND);
- };
- /**
- * Adds items of groups at the bottom of a outline.
- * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.
- * @method eg.InfiniteGrid.GridLayout#layout
- * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열
- * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열
- * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스
- * @example
- * layout.layout(groups, [100, 200, 300, 400]);
- */
-
-
- GridLayout.prototype.layout = function layout() {
- var _this = this;
-
- var groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
- var outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
-
- var firstItem = groups.length && groups[0].items.length && groups[0].items[0] || 0;
-
- this.checkColumn(firstItem);
-
- // if outlines' length and columns' length are now same, re-caculate outlines.
- var startOutline = void 0;
-
- if (outline.length !== this._columnLength) {
- var pos = outline.length === 0 ? 0 : Math.min.apply(Math, outline);
-
- // re-layout items.
- startOutline = (0, _utils.fill)(this._columnLength, pos);
- } else {
- startOutline = outline.slice();
- }
- groups.forEach(function (group) {
- var items = group.items;
- var result = _this._layout(items, startOutline, _consts.APPEND);
-
- group.outlines = result;
- startOutline = result.end;
- });
-
- return this;
- };
- /**
- * Set the viewport size of the layout.
- * @ko 레이아웃의 가시 사이즈를 설정한다.
- * @method eg.InfiniteGrid.GridLayout#setSize
- * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈
- * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스
- * @example
- * layout.setSize(800);
- */
-
-
- GridLayout.prototype.setSize = function setSize(size) {
- this._size = size;
- return this;
- };
-
- return GridLayout;
-}();
-
-exports["default"] = GridLayout;
-module.exports = exports["default"];
-
-/***/ }),
-/* 12 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.__esModule = true;
-
-var _FrameLayout2 = __webpack_require__(4);
-
-var _FrameLayout3 = _interopRequireDefault(_FrameLayout2);
-
-var _utils = __webpack_require__(1);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-function makeShapeOutline(outline, itemSize, columnLength, isAppend) {
- var point = Math[isAppend ? "min" : "max"].apply(Math, outline) || 0;
-
- if (outline.length !== columnLength) {
- return (0, _utils.fill)(columnLength, 0);
- }
- return outline.map(function (l) {
- return parseInt((l - point) / itemSize, 10);
- });
-}
-function getColumn(item) {
- if (item.column) {
- return item.column;
- }
- var column = 0;
-
- if (item.el) {
- var dataset = item.el.dataset;
-
- if (dataset) {
- column = dataset.column || 1;
- } else {
- column = item.el.getAttribute("column") || 1;
- }
- } else {
- column = 1;
- }
- item.column = column;
- return column;
-}
-
-/**
- * @classdesc FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.
- * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.
- * @class eg.InfiniteGrid.SquareLayout
- * @extends eg.InfiniteGrid.FrameLayout
- * @param {Object} [options] The option object of eg.InfiniteGrid.SquareLayout module eg.InfiniteGrid.SquareLayout 모듈의 옵션 객체
- * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간
- * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)
- * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다.
- * @example
-```
-
-```
- **/
-
-var SquareLayout = function (_FrameLayout) {
- _inherits(SquareLayout, _FrameLayout);
-
- function SquareLayout() {
- _classCallCheck(this, SquareLayout);
-
- return _possibleConstructorReturn(this, _FrameLayout.apply(this, arguments));
- }
-
- SquareLayout.prototype._checkItemSize = function _checkItemSize() {
- var column = this.options.column;
-
- if (!column) {
- _FrameLayout.prototype._checkItemSize.call(this);
- return;
- }
- var margin = this.options.margin;
-
- // if itemSize is not in options, caculate itemSize from size.
- this._itemSize = (this._size + margin) / column - margin;
- };
-
- SquareLayout.prototype._layout = function _layout(items) {
- var _shapes;
-
- var outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
- var isAppend = arguments[2];
-
- var itemSize = this._getItemSize();
- var margin = this.options.margin;
- var columnLength = this.options.column || parseInt((this._size + margin) / (itemSize + margin), 10) || 1;
- var length = items.length;
- var endOutline = makeShapeOutline(outline, itemSize, columnLength, isAppend);
- var pointCaculateName = isAppend ? "min" : "max";
- var shapes = [];
- var sign = isAppend ? 1 : -1;
- var style = this._style;
- var pos1Name = style.pos1;
- var pos2Name = style.pos2;
-
- for (var i = 0; i < length; ++i) {
- var _shapes$push;
-
- var point = Math[pointCaculateName].apply(Math, endOutline);
- var index = (0, _utils.indexOf)(endOutline, point, !isAppend);
- var item = items[i];
- var columnWidth = item.columnWidth;
- var column = columnWidth && columnWidth[0] === columnLength && columnWidth[1] || getColumn(item);
- var columnCount = 1;
-
- if (column > 1) {
- for (var j = 1; j < column && (isAppend && index + j < columnLength || !isAppend && index - j >= 0); ++j) {
- if (isAppend && endOutline[index + sign * j] <= point || !isAppend && endOutline[index + sign * j] >= point) {
- ++columnCount;
- continue;
- }
- break;
- }
- if (!isAppend) {
- index -= columnCount - 1;
- }
- }
- item.columnWidth = [columnLength, columnCount];
- shapes.push((_shapes$push = {
- width: columnCount,
- height: columnCount
- }, _shapes$push[pos1Name] = point - (!isAppend ? columnCount : 0), _shapes$push[pos2Name] = index, _shapes$push.index = i, _shapes$push));
- for (var _j = 0; _j < columnCount; ++_j) {
- endOutline[index + _j] = point + sign * columnCount;
- }
- }
- this._shapes = (_shapes = {
- shapes: shapes
- }, _shapes[style.size2] = columnLength, _shapes);
-
- var result = _FrameLayout.prototype._layout.call(this, items, outline, isAppend);
-
- if (!isAppend) {
- var lastItem = items[items.length - 1];
-
- shapes.sort(function (shape1, shape2) {
- var item1pos1 = shape1[pos1Name];
- var item1pos2 = shape1[pos2Name];
- var item2pos1 = shape2[pos1Name];
- var item2pos2 = shape2[pos2Name];
-
- if (item1pos1 - item2pos1) {
- return item1pos1 - item2pos1;
- }
- return item1pos2 - item2pos2;
- });
- items.sort(function (a, b) {
- var item1pos1 = a.rect[pos1Name];
- var item1pos2 = a.rect[pos2Name];
- var item2pos1 = b.rect[pos1Name];
- var item2pos2 = b.rect[pos2Name];
-
- if (item1pos1 - item2pos1) {
- return item1pos1 - item2pos1;
- }
- return item1pos2 - item2pos2;
- });
- result.startIndex = 0;
- result.endIndex = items.indexOf(lastItem);
- }
- return result;
- };
-
- return SquareLayout;
-}(_FrameLayout3["default"]);
-
-exports["default"] = SquareLayout;
-module.exports = exports["default"];
-
-/***/ }),
-/* 13 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.__esModule = true;
-
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var _BoxModel = __webpack_require__(14);
-
-var _BoxModel2 = _interopRequireDefault(_BoxModel);
-
-var _consts = __webpack_require__(0);
-
-var _utils = __webpack_require__(1);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function getCost(originLength, length) {
- var cost = originLength / length;
-
- if (cost < 1) {
- cost = 1 / cost;
- }
-
- return cost - 1;
-}
-function fitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical) {
- item.setHeight(itemFitSize.height);
- item.setWidth(itemFitSize.width);
- bestFitArea.setHeight(containerFitSize.height);
- bestFitArea.setWidth(containerFitSize.width);
-
- if (layoutVertical) {
- item.setTop(bestFitArea.getTop() + bestFitArea.getHeight());
- item.setLeft(bestFitArea.getLeft());
- } else {
- item.setLeft(bestFitArea.getLeft() + bestFitArea.getWidth());
- item.setTop(bestFitArea.getTop());
- }
-}
-
-/**
- * @classdesc PackingLayout show important images bigger without sacrificing the inherent size of the image. Rows and columns are separated so that images are dynamically placed within the horizontal and vertical space rather than arranged in an orderly fashion.
- * @ko PackingLayout은 이미지의 본래 크기에 따른 비중을 해치지 않으면서 중요한 이미지는 더 크게 보여 준다. 행과 열이 구분돼 이미지를 정돈되게 배치하는 대신 가로세로 일정 공간 내에서 동적으로 이미지를 배치한다.
- * @class eg.InfiniteGrid.PackingLayout
- * @param {Object} [options] The option object of eg.InfiniteGrid.PackingLayout module eg.InfiniteGrid.PackingLayout 모듈의 옵션 객체
- * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간
- * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)
- * @param {Boolean} [options.aspectRatio=1] The aspect ratio of the group 그룹의 가로 세로 비
- * @param {Boolean} [options.sizeWeight=1] The size weight when placing an image 이미지를 배치할 때 사이즈 가중치
- * @param {Boolean} [options.ratioWeight=1] The ratio weight when placing an image 이미지를 배치할 때 비율 가중치
- * @example
-```
-
-```
- **/
-
-var PackingLayout = function () {
- function PackingLayout() {
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-
- _classCallCheck(this, PackingLayout);
-
- this.options = (0, _utils.assignOptions)({
- aspectRatio: 1,
- sizeWeight: 1,
- ratioWeight: 1
- }, options);
- this._size = 0;
- this._style = (0, _utils.getStyleNames)(this.options.horizontal);
- }
-
- PackingLayout.prototype._findBestFitArea = function _findBestFitArea(container, item) {
- if (container.getRatio() === 0) {
- // 아이템 최초 삽입시 전체영역 지정
- container.setOriginWidth(item.getWidth());
- container.setOriginHeight(item.getHeight());
- container.setWidth(item.getWidth());
- container.setHeight(item.getHeight());
- return;
- }
-
- var bestFitArea = null;
- var minCost = 10000000;
- var layoutVertical = false;
- var itemFitSize = {
- width: 0,
- height: 0
- };
- var containerFitSize = {
- width: 0,
- height: 0
- };
- var _options = this.options,
- sizeWeight = _options.sizeWeight,
- ratioWeight = _options.ratioWeight;
-
-
- container.innerItem().forEach(function (v) {
- var containerSizeCost = getCost(v.getOriginSize(), v.getSize()) * sizeWeight;
- var containerRatioCost = getCost(v.getOriginRatio(), v.getRatio()) * ratioWeight;
- var cost = void 0;
-
- for (var i = 0; i < 2; ++i) {
- var itemWidth = void 0;
- var itemHeight = void 0;
- var containerWidth = void 0;
- var containerHeight = void 0;
-
- if (i === 0) {
- // 상하에 아이템 추가
- itemWidth = v.getWidth();
- itemHeight = v.getHeight() * (item.getHeight() / (v.getOriginHeight() + item.getHeight()));
- containerWidth = v.getWidth();
- containerHeight = v.getHeight() - itemHeight;
- } else {
- // 좌우에 아이템 추가
- itemHeight = v.getHeight();
- itemWidth = v.getWidth() * (item.getWidth() / (v.getOriginWidth() + item.getWidth()));
- containerHeight = v.getHeight();
- containerWidth = v.getWidth() - itemWidth;
- }
-
- var itemSize = itemWidth * itemHeight;
- var itemRatio = itemWidth / itemHeight;
- var containerSize = containerWidth * containerHeight;
- var containerRatio = containerHeight / containerHeight;
-
- cost = getCost(item.getSize(), itemSize) * sizeWeight;
- cost += getCost(item.getRatio(), itemRatio) * ratioWeight;
- cost += getCost(v.getOriginSize(), containerSize) * sizeWeight - containerSizeCost;
- cost += getCost(v.getOriginRatio(), containerRatio) * ratioWeight - containerRatioCost;
-
- if (cost === Math.min(cost, minCost)) {
- minCost = cost;
- bestFitArea = v;
- layoutVertical = i === 0;
- itemFitSize.width = itemWidth;
- itemFitSize.height = itemHeight;
- containerFitSize.width = containerWidth;
- containerFitSize.height = containerHeight;
- }
- }
- });
-
- fitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical);
- };
-
- PackingLayout.prototype._layout = function _layout(items) {
- var _this = this;
-
- var outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
- var isAppend = arguments[2];
-
- var style = this._style;
- var isHorizontal = this.options.horizontal;
- var aspectRatio = this.options.aspectRatio;
- var margin = this.options.margin;
- var pos1Name = style.pos1;
- var size1Name = style.size1;
- var containerWidth = this._size * (isHorizontal ? aspectRatio : 1);
- var containerHeight = this._size / (isHorizontal ? 1 : aspectRatio);
- var containerSize1 = isHorizontal ? containerWidth : containerHeight;
- var prevOutline = (0, _utils.toZeroArray)(outline);
- var start = isAppend ? Math.max.apply(Math, prevOutline) : Math.min.apply(Math, prevOutline) - containerSize1 - margin;
- var end = start + containerSize1 + margin;
- var container = new _BoxModel2["default"]({});
-
- var startIndex = -1;
- var endIndex = -1;
- var startPos = -1;
- var endPos = -1;
-
- items.forEach(function (item) {
- var model = new _BoxModel2["default"]({
- originWidth: item.orgSize.width,
- originHeight: item.orgSize.height,
- width: item.orgSize.width,
- height: item.orgSize.height
- });
-
- _this._findBestFitArea(container, model);
- container.pushItem(model);
- container.scaleTo(containerWidth + margin, containerHeight + margin);
- });
- items.forEach(function (item, i) {
- var boxItem = container.innerItem()[i];
- // console.log("boxItem", boxItem, boxItem instanceof BoxModel);
- var width = boxItem.getWidth();
- var height = boxItem.getHeight();
- var top = boxItem.getTop();
- var left = boxItem.getLeft();
-
- item.rect = { top: top, left: left, width: width - margin, height: height - margin };
- item.rect[pos1Name] += start;
-
- if (startIndex === -1) {
- startIndex = i;
- endIndex = i;
- startPos = item.rect[pos1Name];
- endPos = startPos;
- }
- if (startPos > item.rect[pos1Name]) {
- startPos = item.rect[pos1Name];
- startIndex = i;
- }
- if (endPos < item.rect[pos1Name] + item.rect[size1Name] + margin) {
- endPos = item.rect[pos1Name] + item.rect[size1Name] + margin;
- endIndex = i;
- }
- });
-
- return {
- start: [start],
- end: [end],
- startIndex: startIndex,
- endIndex: endIndex
- };
- };
-
- PackingLayout.prototype._insert = function _insert() {
- var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
- var outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
- var type = arguments[2];
-
- // this only needs the size of the item.
- var clone = items.map(function (item) {
- return _extends({}, item);
- });
-
- return {
- items: clone,
- outlines: this._layout(clone, outline, type)
- };
- };
- /**
- * Adds items at the bottom of a outline.
- * @ko 아이템들을 아웃라인 아래에 추가한다.
- * @method eg.InfiniteGrid.PackingLayout#append
- * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열
- * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열
- * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보
- * @example
- * layout.prepend(items, [100]);
- */
-
-
- PackingLayout.prototype.append = function append(items, outline) {
- return this._insert(items, outline, _consts.APPEND);
- };
- /**
- * Adds items at the top of a outline.
- * @ko 아이템을 아웃라인 위에 추가한다.
- * @method eg.InfiniteGrid.PackingLayout#prepend
- * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열
- * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열
- * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보
- * @example
- * layout.prepend(items, [100]);
- */
-
-
- PackingLayout.prototype.prepend = function prepend(items, outline) {
- return this._insert(items, outline, _consts.PREPEND);
- };
- /**
- * Adds items of groups at the bottom of a outline.
- * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.
- * @method eg.InfiniteGrid.PackingLayout#layout
- * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열
- * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열
- * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스
- * @example
- * layout.layout(groups, [100, 200, 300, 400]);
- */
-
-
- PackingLayout.prototype.layout = function layout() {
- var groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
- var outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
-
- var length = groups.length;
- var point = outline;
-
- for (var i = 0; i < length; ++i) {
- var group = groups[i];
-
- point = this._layout(group.items, point, _consts.APPEND);
- group.outlines = point;
- point = point.end;
- }
- return this;
- };
- /**
- * Set the viewport size of the layout.
- * @ko 레이아웃의 가시 사이즈를 설정한다.
- * @method eg.InfiniteGrid.PackingLayout#setSize
- * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈
- * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스
- * @example
- * layout.setSize(800);
- */
-
-
- PackingLayout.prototype.setSize = function setSize(size) {
- this._size = size;
- return this;
- };
-
- return PackingLayout;
-}();
-
-exports["default"] = PackingLayout;
-module.exports = exports["default"];
-
-/***/ }),
-/* 14 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-var BoxModel = function () {
- function BoxModel(option) {
- _classCallCheck(this, BoxModel);
-
- this._originWidth = option.originWidth || 0;
- this._originHeight = option.originHeight || 0;
- this._width = option.width || 0;
- this._height = option.height || 0;
- this._left = option.left || 0;
- this._top = option.top || 0;
- this._item = option.item;
- this._innerItem = option.innerItem || [];
- }
-
- BoxModel.prototype.getOriginWidth = function getOriginWidth() {
- return this._originWidth;
- };
-
- BoxModel.prototype.setOriginWidth = function setOriginWidth(width) {
- this._originWidth = width;
- };
-
- BoxModel.prototype.getOriginHeight = function getOriginHeight() {
- return this._originHeight;
- };
-
- BoxModel.prototype.setOriginHeight = function setOriginHeight(height) {
- this._originHeight = height;
- };
-
- BoxModel.prototype.getWidth = function getWidth() {
- return this._width;
- };
-
- BoxModel.prototype.setWidth = function setWidth(width) {
- this._width = width;
- };
-
- BoxModel.prototype.getHeight = function getHeight() {
- return this._height;
- };
-
- BoxModel.prototype.setHeight = function setHeight(height) {
- this._height = height;
- };
-
- BoxModel.prototype.getLeft = function getLeft() {
- return this._left;
- };
-
- BoxModel.prototype.setLeft = function setLeft(left) {
- this._left = left;
- };
-
- BoxModel.prototype.getTop = function getTop() {
- return this._top;
- };
-
- BoxModel.prototype.setTop = function setTop(top) {
- this._top = top;
- };
-
- BoxModel.prototype.innerItem = function innerItem() {
- return this._innerItem;
- };
-
- BoxModel.prototype.scaleTo = function scaleTo(width, height) {
- var scaleX = this._width === 0 ? 0 : width / this._width;
- var scaleY = this._height === 0 ? 0 : height / this._height;
-
- this._innerItem.forEach(function (v) {
- if (scaleX !== 0) {
- v._left *= scaleX;
- v._width *= scaleX;
- }
- if (scaleY !== 0) {
- v._top *= scaleY;
- v._height *= scaleY;
- }
- });
-
- this._width = width;
- this._height = height;
- };
-
- BoxModel.prototype.pushItem = function pushItem(item) {
- this._innerItem.push(item);
- };
-
- BoxModel.prototype.getOriginSize = function getOriginSize() {
- return this._originWidth * this._originHeight;
- };
-
- BoxModel.prototype.getSize = function getSize() {
- return this._width * this._height;
- };
-
- BoxModel.prototype.getOriginRatio = function getOriginRatio() {
- return this._originHeight === 0 ? 0 : this._originWidth / this._originHeight;
- };
-
- BoxModel.prototype.getRatio = function getRatio() {
- return this._height === 0 ? 0 : this._width / this._height;
- };
-
- BoxModel.prototype.isSmallerThen = function isSmallerThen(box) {
- return this._width <= box._width && this._height <= box._height;
- };
-
- BoxModel.prototype.isEqual = function isEqual(box) {
- return this._left === box._left && this._top === box._top && this._width === box._width && this._height === box._height;
- };
-
- return BoxModel;
-}();
-
-module.exports = BoxModel;
-
-/***/ }),
-/* 15 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.__esModule = true;
-
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var _dijkstra = __webpack_require__(16);
-
-var _dijkstra2 = _interopRequireDefault(_dijkstra);
-
-var _consts = __webpack_require__(0);
-
-var _utils = __webpack_require__(1);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/**
- * @classdesc 'justified' is a printing term with the meaning that 'it fits in one row wide'. JustifiedLayout is a layout in which the image is filled up on the basis of a line given a width in the meaning of the term.
- * @ko 'justified'는 '1행의 너비에 맞게 꼭 들어찬'이라는 의미를 가진 인쇄 용어다. 용어의 의미대로 너비가 주어진 한 행을 기준으로 이미지가 가득 차도록 배치하는 레이아웃이다.
- * @class eg.InfiniteGrid.JustifiedLayout
- * @param {Object} [options] The option object of eg.InfiniteGrid.JustifiedLayout module eg.InfiniteGrid.JustifiedLayout 모듈의 옵션 객체
- * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간
- * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)
- * @param {Boolean} [options.minSize=0] Minimum size of item to be resized 아이템이 조정되는 최소 크기
- * @param {Boolean} [options.maxSize=0] Maximum size of item to be resized 아이템이 조정되는 최대 크기
- * @example
-```
-
-```
- **/
-var JustifiedLayout = function () {
- function JustifiedLayout() {
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-
- _classCallCheck(this, JustifiedLayout);
-
- this.options = (0, _utils.assignOptions)({
- minSize: 0,
- maxSize: 0
- }, options);
- this._style = (0, _utils.getStyleNames)(this.options.horizontal);
- this._size = 0;
- }
-
- JustifiedLayout.prototype._layout = function _layout(items, outline, isAppend) {
- var _this = this;
-
- var style = this._style;
- var size1Name = style.size1;
- var size2Name = style.size2;
- var startIndex = 0;
- var endIndex = items.length;
- var graph = function graph(_start) {
- var results = {};
- var start = +_start.replace(/[^0-9]/g, "");
- var length = endIndex + 1;
-
- for (var i = start + 1; i < length; ++i) {
- if (i - start > 8) {
- break;
- }
- var cost = _this._getCost(items, start, i, size1Name, size2Name);
-
- if (cost < 0 && i === length - 1) {
- cost = 0;
- }
- if (cost !== null) {
- results["node" + i] = Math.pow(cost, 2);
- }
- }
-
- return results;
- };
- // shortest path for items' total height.
- var path = _dijkstra2["default"].find_path(graph, "node" + startIndex, "node" + endIndex);
-
- return this._setStyle(items, path, outline, isAppend);
- };
-
- JustifiedLayout.prototype._getSize = function _getSize(items, size1Name, size2Name) {
- var margin = this.options.margin;
- var size = items.reduce(function (sum, item) {
- return sum + item.size[size2Name] / item.size[size1Name];
- }, 0);
-
- return (this._size - margin * (items.length - 1)) / size;
- };
-
- JustifiedLayout.prototype._getCost = function _getCost(items, i, j, size1Name, size2Name) {
- var size = this._getSize(items.slice(i, j), size1Name, size2Name);
- var min = this.options.minSize || 0;
- var max = this.options.maxSize || Infinity;
-
- if (isFinite(max)) {
- // if this size is not in range, the cost increases sharply.
- if (size < min) {
- return Math.pow(size - min, 2) + Math.pow(max, 2);
- } else if (size > max) {
- return Math.pow(size - max, 2) + Math.pow(max, 2);
- } else {
- // if this size in range, the cost is negative or low.
- return Math.min(size - max, min - size);
- }
- }
- // if max is infinite type, caculate cost only with "min".
- if (size < min) {
- return Math.max(Math.pow(min, 2), Math.pow(size, 2));
- }
- return size - min;
- };
-
- JustifiedLayout.prototype._setStyle = function _setStyle(items, path) {
- var outline = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
- var isAppend = arguments[3];
-
- var style = this._style;
- // if direction is vertical
- // pos1 : top, pos11 : bottom
- // size1 : height
- // pos2 : left, pos22 : right
- // size2 : width
-
- // if direction is horizontal
- // pos1 : left, pos11 : right
- // size1 : width
- // pos2 : top, pos22 : bottom
- // size2 : height
- var pos1Name = style.pos1;
- var size1Name = style.size1;
- var pos2Name = style.pos2;
- var size2Name = style.size2;
- var length = path.length;
- var margin = this.options.margin;
- var startPoint = outline[0] || 0;
- var endPoint = startPoint;
- var height = 0;
-
- for (var i = 0; i < length - 1; ++i) {
- var path1 = parseInt(path[i].replace("node", ""), 10);
- var path2 = parseInt(path[i + 1].replace("node", ""), 10);
- // pathItems(path1 to path2) are in 1 line.
- var pathItems = items.slice(path1, path2);
- var pathItemsLength = pathItems.length;
- var size1 = this._getSize(pathItems, size1Name, size2Name);
- var pos1 = endPoint;
-
- for (var j = 0; j < pathItemsLength; ++j) {
- var _item$rect;
-
- var item = pathItems[j];
- var size2 = item.size[size2Name] / item.size[size1Name] * size1;
- // item has margin bottom and right.
- // first item has not margin.
- var prevItemRect = j === 0 ? 0 : pathItems[j - 1].rect;
- var pos2 = prevItemRect ? prevItemRect[pos2Name] + prevItemRect[size2Name] + margin : 0;
-
- item.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);
- }
- height += margin + size1;
- endPoint = startPoint + height;
- }
- var itemsLength = items.length;
- var startIndex = itemsLength ? 0 : -1;
- var endIndex = itemsLength ? itemsLength - 1 : -1;
-
- if (isAppend) {
- // previous group's end outline is current group's start outline
- return {
- start: [startPoint],
- end: [endPoint],
- startIndex: startIndex,
- endIndex: endIndex
- };
- }
- // for prepend, only substract height from position.
- // always start is lower than end.
-
- for (var _i = 0; _i < itemsLength; ++_i) {
- var _item = items[_i];
-
- // move items as long as height for prepend
- _item.rect[pos1Name] -= height;
- }
- return {
- start: [startPoint - height],
- end: [startPoint], // endPoint - height = startPoint
- startIndex: startIndex,
- endIndex: endIndex
- };
- };
-
- JustifiedLayout.prototype._insert = function _insert(items, outline, type) {
- // this only needs the size of the item.
- var clone = items.map(function (item) {
- return _extends({}, item);
- });
-
- return {
- items: clone,
- outlines: this._layout(clone, outline, type)
- };
- };
- /**
- * Set the viewport size of the layout.
- * @ko 레이아웃의 가시 사이즈를 설정한다.
- * @method eg.InfiniteGrid.JustifiedLayout#setSize
- * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈
- * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스
- * @example
- * layout.setSize(800);
- */
-
-
- JustifiedLayout.prototype.setSize = function setSize(size) {
- this._size = size;
- return this;
- };
- /**
- * Adds items at the bottom of a outline.
- * @ko 아이템들을 아웃라인 아래에 추가한다.
- * @method eg.InfiniteGrid.JustifiedLayout#append
- * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열
- * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열
- * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보
- * @example
- * layout.prepend(items, [100]);
- */
-
-
- JustifiedLayout.prototype.append = function append(items, outline) {
- return this._insert(items, outline, _consts.APPEND);
- };
- /**
- * Adds items at the top of a outline.
- * @ko 아이템을 아웃라인 위에 추가한다.
- * @method eg.InfiniteGrid.JustifiedLayout#prepend
- * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열
- * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열
- * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보
- * @example
- * layout.prepend(items, [100]);
- */
-
-
- JustifiedLayout.prototype.prepend = function prepend(items, outline) {
- return this._insert(items, outline, _consts.PREPEND);
- };
- /**
- * Adds items of groups at the bottom of a outline.
- * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.
- * @method eg.InfiniteGrid.JustifiedLayout#layout
- * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열
- * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열
- * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스
- * @example
- * layout.layout(groups, [100]);
- */
-
-
- JustifiedLayout.prototype.layout = function layout(groups, outlines) {
- var length = groups.length;
- var point = outlines;
-
- for (var i = 0; i < length; ++i) {
- var group = groups[i];
-
- point = this._layout(group.items, point, _consts.APPEND);
- group.outlines = point;
- point = point.end;
- }
- return this;
- };
-
- return JustifiedLayout;
-}();
-
-exports["default"] = JustifiedLayout;
-module.exports = exports["default"];
-
-/***/ }),
-/* 16 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-/* eslint-disable */
-/******************************************************************************
- * Created 2008-08-19.
- *
- * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.
- *
- * Copyright (C) 2008
- * Wyatt Baldwin
- * All rights reserved
- *
- * Licensed under the MIT license.
- *
- * http://www.opensource.org/licenses/mit-license.php
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- *****************************************************************************/
-(function () {
- var dijkstra = {
- single_source_shortest_paths: function single_source_shortest_paths(graph, s, d) {
- // Predecessor map for each node that has been encountered.
- // node ID => predecessor node ID
- var predecessors = {};
-
- // Costs of shortest paths from s to all nodes encountered.
- // node ID => cost
- var costs = {};
- costs[s] = 0;
-
- // Costs of shortest paths from s to all nodes encountered; differs from
- // `costs` in that it provides easy access to the node that currently has
- // the known shortest path from s.
- // XXX: Do we actually need both `costs` and `open`?
- var open = new BinaryHeap(function (x) {
- return x.cost;
- });
- open.push({ value: s, cost: 0 });
-
- var closest, u, cost_of_s_to_u, adjacent_nodes, cost_of_e, cost_of_s_to_u_plus_cost_of_e, cost_of_s_to_v, first_visit;
- while (open.size()) {
- // In the nodes remaining in graph that have a known cost from s,
- // find the node, u, that currently has the shortest path from s.
- closest = open.pop();
- u = closest.value;
- cost_of_s_to_u = closest.cost;
-
- // Get nodes adjacent to u...
- adjacent_nodes = graph(u) || {};
-
- // ...and explore the edges that connect u to those nodes, updating
- // the cost of the shortest paths to any or all of those nodes as
- // necessary. v is the node across the current edge from u.
- for (var v in adjacent_nodes) {
- // Get the cost of the edge running from u to v.
- cost_of_e = adjacent_nodes[v];
-
- // Cost of s to u plus the cost of u to v across e--this is *a*
- // cost from s to v that may or may not be less than the current
- // known cost to v.
- cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;
-
- // If we haven't visited v yet OR if the current known cost from s to
- // v is greater than the new cost we just found (cost of s to u plus
- // cost of u to v across e), update v's cost in the cost list and
- // update v's predecessor in the predecessor list (it's now u).
- cost_of_s_to_v = costs[v];
- first_visit = typeof costs[v] === 'undefined';
- if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {
- costs[v] = cost_of_s_to_u_plus_cost_of_e;
- open.push({ value: v, cost: cost_of_s_to_u_plus_cost_of_e });
- predecessors[v] = u;
- }
- }
- }
-
- if (typeof costs[d] === 'undefined') {
- var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');
- throw new Error(msg);
- }
-
- return predecessors;
- },
-
- extract_shortest_path_from_predecessor_list: function extract_shortest_path_from_predecessor_list(predecessors, d) {
- var nodes = [];
- var u = d;
- var predecessor;
- while (u) {
- nodes.push(u);
- predecessor = predecessors[u];
- u = predecessors[u];
- }
- nodes.reverse();
- return nodes;
- },
-
- find_path: function find_path(graph, s, d) {
- var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);
- return dijkstra.extract_shortest_path_from_predecessor_list(predecessors, d);
- }
-
- };
-
- function BinaryHeap(scoreFunction) {
- this.content = [];
- this.scoreFunction = scoreFunction;
- }
-
- BinaryHeap.prototype = {
- push: function push(element) {
- // Add the new element to the end of the array.
- this.content.push(element);
- // Allow it to bubble up.
- this.bubbleUp(this.content.length - 1);
- },
-
- pop: function pop() {
- // Store the first element so we can return it later.
- var result = this.content[0];
- // Get the element at the end of the array.
- var end = this.content.pop();
- // If there are any elements left, put the end element at the
- // start, and let it sink down.
- if (this.content.length > 0) {
- this.content[0] = end;
- this.sinkDown(0);
- }
- return result;
- },
-
- remove: function remove(node) {
- var len = this.content.length;
- // To remove a value, we must search through the array to find
- // it.
- for (var i = 0; i < len; i++) {
- if (this.content[i] === node) {
- // When it is found, the process seen in 'pop' is repeated
- // to fill up the hole.
- var end = this.content.pop();
- if (i !== len - 1) {
- this.content[i] = end;
- if (this.scoreFunction(end) < this.scoreFunction(node)) {
- this.bubbleUp(i);
- } else {
- this.sinkDown(i);
- }
- }
- return;
- }
- }
- throw new Error('Node not found.');
- },
-
- size: function size() {
- return this.content.length;
- },
-
- bubbleUp: function bubbleUp(n) {
- // Fetch the element that has to be moved.
- var element = this.content[n];
- // When at 0, an element can not go up any further.
- while (n > 0) {
- // Compute the parent element's index, and fetch it.
- var parentN = Math.floor((n + 1) / 2) - 1,
- parent = this.content[parentN];
- // Swap the elements if the parent is greater.
- if (this.scoreFunction(element) < this.scoreFunction(parent)) {
- this.content[parentN] = element;
- this.content[n] = parent;
- // Update 'n' to continue at the new position.
- n = parentN;
- }
- // Found a parent that is less, no need to move it further.
- else {
- break;
- }
- }
- },
-
- sinkDown: function sinkDown(n) {
- // Look up the target element and its score.
- var length = this.content.length,
- element = this.content[n],
- elemScore = this.scoreFunction(element);
-
- while (true) {
- // Compute the indices of the child elements.
- var child2N = (n + 1) * 2,
- child1N = child2N - 1;
- // This is used to store the new position of the element,
- // if any.
- var swap = null;
- // If the first child exists (is inside the array)...
- if (child1N < length) {
- // Look it up and compute its score.
- var child1 = this.content[child1N],
- child1Score = this.scoreFunction(child1);
- // If the score is less than our element's, we need to swap.
- if (child1Score < elemScore) {
- swap = child1N;
- }
- }
- // Do the same checks for the other child.
- if (child2N < length) {
- var child2 = this.content[child2N],
- child2Score = this.scoreFunction(child2);
- if (child2Score < (swap == null ? elemScore : child1Score)) {
- swap = child2N;
- }
- }
-
- // If the element needs to be moved, swap it, and continue.
- if (swap !== null) {
- this.content[n] = this.content[swap];
- this.content[swap] = element;
- n = swap;
- }
- // Otherwise, we are done.
- else {
- break;
- }
- }
- }
- };
-
- /**
- * Browserify 지원을 위한 모듈화 코드
- */
- if (typeof module !== 'undefined' && module.exports) {
- module.exports = dijkstra;
- } else {
- window.dijkstra = dijkstra;
- }
-})();
-
-/***/ })
-/******/ ]);
-});
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.InfiniteGrid=e():(t.eg=t.eg||{},t.eg.InfiniteGrid=e())}("undefined"!=typeof self?self:this,function(){return function(t){function __webpack_require__(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}var e={};return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,i){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=5)}([function(t,e,i){"use strict";e.__esModule=!0,e.DEFENSE_BROWSER=e.WEBKIT_VERSION=e.PROCESSING=e.LOADING_PREPEND=e.LOADING_APPEND=e.IDLE=e.ALIGN=e.isMobile=e.agent=e.DEFAULT_OPTIONS=e.GROUPKEY_ATT=e.DUMMY_POSITION=e.SINGLE=e.MULTI=e.NO_TRUSTED=e.TRUSTED=e.NO_CACHE=e.CACHE=e.HORIZONTAL=e.VERTICAL=e.PREPEND=e.APPEND=e.IGNORE_CLASSNAME=e.CONTAINER_CLASSNAME=e.RETRY=e.IS_ANDROID2=e.IS_IOS=e.IS_IE=e.SUPPORT_PASSIVE=e.SUPPORT_ADDEVENTLISTENER=e.SUPPORT_COMPUTEDSTYLE=undefined;var n=i(2),r=n.window.navigator.userAgent,o=(e.SUPPORT_COMPUTEDSTYLE=!!("getComputedStyle"in n.window),e.SUPPORT_ADDEVENTLISTENER=!!("addEventListener"in document)),s=(e.SUPPORT_PASSIVE=function(){var t=!1;try{o&&Object.defineProperty&&document.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){t=!0}}))}catch(e){}return t}(),e.IS_IE=/MSIE|Trident|Windows Phone|Edge/.test(r),e.IS_IOS=/iPhone|iPad/.test(r),e.IS_ANDROID2=/Android 2\./.test(r),e.RETRY=3,e.CONTAINER_CLASSNAME="_eg-infinitegrid-container_",e.IGNORE_CLASSNAME="_eg-infinitegrid-ignore_",e.APPEND=!0,e.PREPEND=!1,e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e.CACHE=!0,e.NO_CACHE=!1,e.TRUSTED=!0,e.NO_TRUSTED=!1,e.MULTI=!0,e.SINGLE=!1,e.DUMMY_POSITION=-1e5,e.GROUPKEY_ATT="data-groupkey",e.DEFAULT_OPTIONS={horizontal:!1,margin:0},e.agent=r.toLowerCase()),a=(e.isMobile=/mobi|ios|android/.test(s),e.ALIGN={START:"start",CENTER:"center",END:"end",JUSTIFY:"justify"},e.IDLE=0,e.LOADING_APPEND=1,e.LOADING_PREPEND=2,e.PROCESSING=4,/applewebkit\/([\d|.]*)/g.exec(s)),u=e.WEBKIT_VERSION=a&&parseInt(a[1],10)||0;e.DEFENSE_BROWSER=u&&u<537},function(t,e,i){"use strict";function toArray(t){var e=[];if(t)for(var i=0,n=t.length;i1&&arguments[1]!==undefined&&arguments[1],i=void 0;if("string"==typeof t){if(t.match(/^<([A-z]+)\s*([^>]*)>/)){var n=o.document.createElement("div");n.innerHTML=t,i=n.childNodes}else i=o.document.querySelectorAll(t);i=e?toArray(i):i&&i.length>0&&i[0]||undefined}else t===o.window?i=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in o.window&&t instanceof o.window.jQuery||t.constructor.prototype.jquery?i=e?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return $(t)}),e||(i=i.length>=1?i[0]:undefined)):i=t;return i}function getStyles(t){return s.SUPPORT_COMPUTEDSTYLE?o.window.getComputedStyle(t):t.currentStyle}function _getSize(t,e){if(t===o.window)return t.document.documentElement["client"+e];if(9===t.nodeType){var i=t.documentElement;return Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])}var n=getStyles(t),r=n[e.toLowerCase()];return parseFloat(/auto|%/.test(r)?t["offset"+e]:n[e.toLowerCase()])}e.__esModule=!0,e.STYLE=undefined;var n=Object.assign||function(t){for(var e=1;e=0;--n)i[n]=e;return i},e.$=$,e.addEvent=function(t,e,i,n){if(s.SUPPORT_ADDEVENTLISTENER){var o=n||!1;"object"===(void 0===n?"undefined":r(n))&&(o=!!s.SUPPORT_PASSIVE&&n),t.addEventListener(e,i,o)}else t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i},e.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=null},e.scroll=function(t,e){var i="scroll"+(e?"Top":"Left");return t===o.window?o.window[e?"pageYOffset":"pageXOffset"]||o.document.body[i]||o.document.documentElement[i]:t[i]},e.scrollTo=function(t,e,i){t===o.window?t.scroll(e,i):(t.scrollLeft=e,t.scrollTop=i)},e.scrollBy=function(t,e,i){t===o.window?t.scrollBy(e,i):(t.scrollLeft+=e,t.scrollTop+=i)},e.getStyles=getStyles,e.innerWidth=function(t){return _getSize(t,"Width")},e.innerHeight=function(t){return _getSize(t,"Height")},e.getStyleNames=function(t){return a[t?s.HORIZONTAL:s.VERTICAL]},e.assignOptions=function(t,e){return n({},s.DEFAULT_OPTIONS,t,e)},e.toZeroArray=function(t){return t&&t.length?t:[0]},e.isWindow=function(t){return t===o.window},e.indexOf=function(t,e){if(!(arguments.length>2&&arguments[2]!==undefined&&arguments[2]))return t.indexOf(e);for(var i=t.length-1;i>=0;--i)if(t[i]===e)return i;return-1};var o=i(2),s=i(0),a=e.STYLE={vertical:{pos1:"top",endPos1:"bottom",size1:"height",pos2:"left",endPos2:"right",size2:"width"},horizontal:{pos1:"left",endPos1:"right",size1:"width",pos2:"top",endPos2:"bottom",size2:"height"}}},function(t,e,i){"use strict";e.__esModule=!0;var n=window;e.window=window;e.document=n.document},function(t,e,i){"use strict";e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e0&&arguments[0]!==undefined?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,FrameLayout),this.options=(0,s.assignOptions)({itemSize:0,frame:[],frameFill:!0},t);var e=function(t){for(var e=t.length,i=e?t[0].length:0,n=[],r=0;r1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],n=t.length,a=this._style,u=this.options,h=u.margin,c=u.frameFill,l=a.size1,f=a.size2,p=a.pos1,d=a.pos2,_=this._getItemSize(),g="object"===(void 0===_?"undefined":r(_)),y=g?_[f]:_,m=g?_[l]:_,v=this._shapes[f],S=this._shapes.shapes,E=S.length,I=(0,s.fill)(v,o.DUMMY_POSITION),w=(0,s.fill)(v,o.DUMMY_POSITION),O=0,P=0,M=-1,z=-1,L=-1,b=-1;if(!E)return{start:e,end:e,startIndex:M,endIndex:z};for(var C=0;CV&&(L=V,M=C+R),b0&&arguments[0]!==undefined&&arguments[0]?"_getItems":"_getVisibleItems"]()},InfiniteGrid.prototype._getItems=function(){return this._items.pluck("items",0,this._items.size())},InfiniteGrid.prototype._getVisibleItems=function(){return this._items.pluck("items",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._updateEdge=function(){this._status.start=this._items.getEdge("start",this._status.startCursor,this._status.endCursor),this._status.end=this._items.getEdge("end",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._getEdgeOffset=function(t){var e=null;if(!this._status[t]){var i=this._items.getEdge(t);this._status[t]=i}return this._status[t]&&(e=this._status[t].rect,"start"===t&&(e.bottom=e.top+this._status[t].size.height,e.right=e.left+this._status[t].size.width)),e},InfiniteGrid.prototype._fit=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"after";if(!this._layout)return 0;var e=this._getEdgeValue("start"),i=this._getLoadingStatus()===c.LOADING_PREPEND&&this._status.loadingSize||0;if(!this.options.useRecycle||c.DEFENSE_BROWSER)return"before"===t&&i&&e0&&arguments[0]!==undefined)||arguments[0];if(!this._layout||this._isProcessing())return this;if(!this._items.size())return this._insert((0,l.toArray)(this._renderer.container.children),!0),this;this._process(c.PROCESSING);var i=void 0,n=void 0;return e?(i=this._items.get(this._status.startCursor,this._status.endCursor),this._renderer.resize()&&(this._layout.setSize(this._renderer.getViewportSize()),i.forEach(function(e){i.items=t._renderer.updateSize(e.items)}))):(i=this._items.get(this._status.startCursor,this._items.size()),n=this._items.getOutline(this._status.startCursor,"start")),i.length?(this._layout.layout(i,n),e?this._items._data.forEach(function(e,i){t._status.startCursor<=i&&i<=t._status.endCursor||(e.outlines.start=[],e.outlines.end=[])}):i.forEach(function(e){return t._items.set(e,e.groupKey)}),this._onLayoutComplete(i,c.APPEND,c.NO_TRUSTED,!1),a["default"].renderItems(this._getVisibleItems()),e&&this._watcher.setScrollPos(),this):this},InfiniteGrid.prototype.remove=function(t){if(t){var e=this._items.remove(t,this._status.startCursor,this._status.endCursor);if(e)return a["default"].removeElement(t),e}return null},InfiniteGrid.prototype._getNextItems=function(t){var e=[],i=this._items.size();return i>0&&-1!==this._status.startCursor&&-1!==this._status.endCursor&&(t&&i>this._status.endCursor+1?e=this._items.pluck("items",this._status.endCursor+1):!t&&this._status.startCursor>0&&(e=this._items.pluck("items",this._status.startCursor-1))),e},InfiniteGrid.prototype.getGroupKeys=function(t){return(t?this._items.get():this._items.get(this._status.startCursor,this._status.endCursor)).map(function(t){return t.groupKey})},InfiniteGrid.prototype.getStatus=function(){return{options:n({},this.options),_status:n({},this._status),_items:this._items.getStatus(),_renderer:this._renderer.getStatus(),_watcher:this._watcher.getStatus()}},InfiniteGrid.prototype.setStatus=function(t){var e=!(arguments.length>1&&arguments[1]!==undefined)||arguments[1];return t&&t.options&&t._status&&t._renderer&&t._items&&t._watcher?(this._watcher.detachEvent(),n(this.options,t.options),n(this._status,t._status),this._items.setStatus(t._items,this._status.startCursor,this._status.endCursor),this._renderer.setStatus(t._renderer,this._getVisibleItems()),this._watcher.setStatus(t._watcher,e),this._updateEdge(),this._watcher.attachEvent(),this):this},InfiniteGrid.prototype.clear=function(){return this._items.clear(),this._renderer.clear(),this._reset(),this._appendLoadingBar(),this},InfiniteGrid.prototype.setLoadingBar=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e="object"===(void 0===t?"undefined":r(t))?t:{append:t,prepend:t};this._status.loadingSize=0,this._status.loadingStyle={},this._loadingBar=this._loadingBar||{};var i=this._loadingBar;for(var n in e)i[n]=(0,l.$)(e[n]),i[n].className+=" "+c.IGNORE_CLASSNAME;return this._appendLoadingBar(),this},InfiniteGrid.prototype._appendLoadingBar=function(){var t=this._loadingBar,e=this._renderer.container;for(var i in t)e.appendChild(t[i])},InfiniteGrid.prototype.isProcessing=function(){return this._isProcessing()||this._isLoading()},InfiniteGrid.prototype._isProcessing=function(){return(this._status.processingStatus&c.PROCESSING)>0},InfiniteGrid.prototype._isLoading=function(){return this._getLoadingStatus()>0},InfiniteGrid.prototype._getLoadingStatus=function(){return this._status.processingStatus&(c.LOADING_APPEND|c.LOADING_PREPEND)},InfiniteGrid.prototype._process=function(t){!(arguments.length>1&&arguments[1]!==undefined)||arguments[1]?this._status.processingStatus|=t:this._status.processingStatus-=this._status.processingStatus&t},InfiniteGrid.prototype._insert=function(t,e,i){if(!this._isProcessing()&&0!==t.length){var n=void 0===i?(new Date).getTime()+Math.floor(1e3*Math.random()):i,r=s["default"].from((0,l.$)(t,!0),this.options.itemSelector,{isAppend:e,groupKey:n});r.length&&this._postLayout(c.NO_CACHE,r,e,c.NO_TRUSTED)}},InfiniteGrid.prototype._recycle=function(t){var e=[];if(this._status.startCursor!==this._status.endCursor)for(var i=this._status.startCursor;i<=this._status.endCursor;i++)e.push(this._isVisible(i));var n=e.indexOf(t?1:-1),r=e.lastIndexOf(t?1:-1);-1!==e.indexOf(0)&&-1!==n&&-1!==r&&(n=this._status.startCursor+(t?0:n),r=t?this._status.startCursor+r:this._status.endCursor,a["default"].removeItems(this._items.pluck("items",n,r)),t?this._status.startCursor=r+1:this._status.endCursor=n-1)},InfiniteGrid.prototype.getLoadingBar=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._getLoadingStatus()!==c.LOADING_PREPEND;return this._loadingBar[t?"append":"prepend"]},InfiniteGrid.prototype.startLoading=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{display:"block"};if(this._isLoading())return this;var i=t?"append":"prepend";return this._process(t?c.LOADING_APPEND:c.LOADING_PREPEND),this._loadingBar[i]?(this._renderLoading(e),this._status.loadingStyle=e,t?this._renderer.setContainerSize(this._getEdgeValue("end")+this._status.loadingSize):this._fit("before"),this):this},InfiniteGrid.prototype._renderLoading=function(){var t,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._status.loadingStyle;if(this._isLoading()){var i=this._getLoadingStatus()===c.LOADING_APPEND,r=this._loadingBar[i?"append":"prepend"];if(r){this._status.loadingSize=this._isVertical?(0,l.innerHeight)(r):(0,l.innerWidth)(r);var o=i?this._getEdgeValue("end"):this._getEdgeValue("start")-this._status.loadingSize,s=n((t={position:"absolute"},t[this._isVertical?"top":"left"]=o+"px",t),e);for(var a in s)r.style[a]=s[a]}}},InfiniteGrid.prototype.endLoading=function(){var t,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{display:"none"};if(!this._isLoading())return this;var i=this._getLoadingStatus()===c.LOADING_APPEND,r=i?"append":"prepend",o=this._loadingBar[r],s=this._status.loadingSize;if(this._process(c.LOADING_APPEND|c.LOADING_PREPEND,!1),this._status.loadingSize=0,this._status.loadingStyle={},!o)return this;var u=n((t={},t[this._isVertical?"top":"left"]=-s+"px",t),e);for(var h in u)o.style[h]=u[h];return i||(this._renderer.scrollBy(-s),this._watcher.setScrollPos(),this._items.fit(s,this._isVertical),a["default"].renderItems(this._getVisibleItems()),this._renderer.setContainerSize(this._getEdgeValue("end"))),this._renderer.setContainerSize(this._getEdgeValue("end")),this},InfiniteGrid.prototype._postLayout=function(t,e,i,n){var r=this,o=this._items.getOutline(i?this._status.endCursor:this._status.startCursor,i?"end":"start");if(t){var s=this._items.getOutline(i?this._status.endCursor+1:this._status.startCursor-1,i?"start":"end");if(!(o.length!==s.length||!o.every(function(t,e){return t===s[e]})))return this._renderer.createAndInsert(e,i),this._updateCursor(i),this._onLayoutComplete(e,i,n),this}this._process(c.PROCESSING);var h=i?"append":"prepend";return t&&a["default"].createElements(e),this._renderer[h](e),u["default"].check(e.map(function(t){return t.el}),function(){var s=r._layout[h](r._renderer.updateSize(e),o);t?r._setItems(s):r._insertItems(s,i),r._updateCursor(i),a["default"].renderItems(s.items),r._onLayoutComplete(s.items,i,n)}),this},InfiniteGrid.prototype._isVisible=function(t){var e=Math.min.apply(Math,this._items.getOutline(t,"start")),i=Math.max.apply(Math,this._items.getOutline(t,"end")),n=this._watcher.getScrollPos();return n+this._renderer.getViewSize()+this.options.thresholdi?1:0},InfiniteGrid.prototype._updateCursor=function(t){this.options.useRecycle?(t?this._status.endCursor++:this._status.startCursor>0?this._status.startCursor--:this._status.endCursor++,this._status.startCursor<0&&(this._status.startCursor=0)):(this._status.startCursor=0,this._status.endCursor=this._items.size()-1)},InfiniteGrid.prototype._setItems=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:t.items&&t.items[0].groupKey||0;t.groupKey=e,this._items.set(t,e)},InfiniteGrid.prototype._insertItems=function(t,e){t.groupKey=t.items[0].groupKey,this._items[e?"append":"prepend"](t)},InfiniteGrid.prototype._requestAppend=function(){var t=this._getNextItems(c.APPEND);this._isProcessing()||(t.length?this._postLayout(c.CACHE,t,c.APPEND,c.TRUSTED):this.trigger("append",{isTrusted:!0,groupKey:this.getGroupKeys().pop()}))},InfiniteGrid.prototype._requestPrepend=function(){var t=this._getNextItems(c.PREPEND);this._isProcessing()||(t.length?this._postLayout(c.CACHE,t,c.PREPEND,c.TRUSTED):this.trigger("prepend",{isTrusted:!0,groupKey:this.getGroupKeys().shift()}))},InfiniteGrid.prototype._onCheck=function(t){var e=t.isForward,i=t.scrollPos,n=t.horizontal,r=t.orgScrollPos;this.trigger("change",{isForward:e,horizontal:n,scrollPos:i,orgScrollPos:r});var o=this._getEdgeOffset(e?"end":"start"),s=this.isProcessing();if(o){var a=e?o[n?"left":"top"]-this._renderer.getViewSize():o[n?"right":"bottom"];!s&&e?i>=a&&this._requestAppend():i<=a&&(this._fit("before"),this._requestPrepend())}},InfiniteGrid.prototype._onLayoutComplete=function(t,e){var i=arguments.length>2&&arguments[2]!==undefined&&arguments[2],n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:this.options.useRecycle;this._isLoading()&&this._renderLoading(),!e&&this._fit("after"),n&&this._recycle(e);var r=this._getEdgeValue("end");this._updateEdge(),e&&this._renderer.setContainerSize(r+this._status.loadingSize||0),this._process(c.PROCESSING,!1);var o=this._watcher.getScrollPos();this.trigger("layoutComplete",{target:t.concat(),isAppend:e,isTrusted:i,isScroll:this._renderer.getViewSize()=r?this._requestAppend():!e&&o<=this._getEdgeValue("start")&&(this._fit("before"),this._requestPrepend())},InfiniteGrid.prototype._reset=function(){this._status={processingStatus:c.IDLE,loadingSize:0,startCursor:-1,endCursor:-1,start:null,end:null}},InfiniteGrid.prototype.destroy=function(){this.off(),this._watcher.destroy(),this._reset(),this._items.clear(),this._renderer.destroy()},InfiniteGrid}(o["default"]);f.VERSION="3.0.0-rc",e["default"]=f,t.exports=e["default"]},function(t,e,i){!function(e,i){t.exports=i()}(0,function(){return function(t){function __webpack_require__(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}var e={};return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,i){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=0)}([function(t,e,i){"use strict";var n=function(t){return t&&t.__esModule?t:{"default":t}}(i(1));n["default"].VERSION="2.1.0",t.exports=n["default"]},function(t,e,i){"use strict";e.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function Component(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,Component),this._eventHandler={},this.options={}}return Component.prototype.trigger=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},i=this._eventHandler[t]||[];if(!(i.length>0))return!0;i=i.concat(),e.eventType=t;var n=!1,r=[e],o=0;e.stop=function(){n=!0},e.currentTarget=this;for(var s=arguments.length,a=Array(s>2?s-2:0),u=2;u=1&&(r=r.concat(a)),o=0;i[o];o++)i[o].apply(this,r);return!n},Component.prototype.once=function(t,e){if("object"===(void 0===t?"undefined":n(t))&&void 0===e){var i=t,r=void 0;for(r in i)this.once(r,i[r]);return this}if("string"==typeof t&&"function"==typeof e){var o=this;this.on(t,function listener(){for(var i=arguments.length,n=Array(i),r=0;ra||"end"===t&&oo?r[o]:null}return null},ItemManager.prototype.getEdgeValue=function(t,e,i){var n=this.pluck("outlines",this.getEdgeIndex(t,e,i)).reduce(function(e,i){return e.concat(i[t])},[]);return n.length?Math["start"===t?"min":"max"].apply(Math,n):0},ItemManager.prototype.append=function(t){return this._data.push(t),t.items},ItemManager.prototype.prepend=function(t){return this._data.unshift(t),t.items},ItemManager.prototype.clear=function(){this._data=[]},ItemManager.prototype.remove=function(t,e,i){var n=null,o=t.getAttribute(r.GROUPKEY_ATT),s=this.get(e,i).filter(function(t){return String(t.groupKey)===o});if(!s.length)return n;for(var a=(s=s[0]).items.length,u=-1,h=0;h0?ImageLoaded.waitImageLoaded(n,e):setTimeout(function(){e&&e()},0)},ImageLoaded}();e["default"]=o,t.exports=e["default"]},function(t,e,i){"use strict";e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e1&&arguments[1]!==undefined)||arguments[1];this._prevPos=t._prevPos,e&&this.scrollTo(t.scrollPos)},Watcher.prototype.scrollTo=function(t){var e=this._renderer.options.isVertical?[0,t]:[t,0];o.scrollTo.apply(undefined,[this._renderer.view].concat(e))},Watcher.prototype.getScrollPos=function(){return this._prevPos},Watcher.prototype.setScrollPos=function(t){var e=t;void 0===t&&(e=this.getOrgScrollPos()),this._prevPos=e-this._renderer.getContainerOffset()},Watcher.prototype.attachEvent=function(){(0,o.addEvent)(this._renderer.view,"scroll",this._onCheck),(0,o.addEvent)(window,"resize",this._onResize)},Watcher.prototype.getOrgScrollPos=function(){return(0,o.scroll)(this._renderer.view,this._renderer.options.isVertical)},Watcher.prototype.reset=function(){this._prevPos=null},Watcher.prototype._onCheck=function(){var t=this.getScrollPos(),e=this.getOrgScrollPos();this.setScrollPos(e);var i=this.getScrollPos();null===t||r.IS_IOS&&0===e||t===i||this._callback.check&&this._callback.check({isForward:t0&&arguments[0]!==undefined?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,GridLayout),this.options=(0,o.assignOptions)({align:s,itemSize:0},t),this._size=0,this._columnSize=0,this._columnLength=0,this._style=(0,o.getStyleNames)(this.options.horizontal)}return GridLayout.prototype.getPoints=function(t){var e=this.options.horizontal?"left":"top";return t.map(function(t){return t[e]})},GridLayout.prototype.checkColumn=function(t){var e=this.options.margin,i=this.options.horizontal?"height":"width",n=this.options.itemSize||t&&t.size[i]||0;this._columnSize=n,this._columnLength=n?Math.max(parseInt((this._size+e)/(n+e),10),1):1},GridLayout.prototype._layout=function(t,e,i){for(var n=t.length,r=this.options.margin,o=this.options.align,s=this._style,c=s.size1,l=s.size2,f=s.pos1,p=s.pos2,d=this._columnSize,_=this._columnLength,g=this._size,y=g-(d+r)*_+r,m=i?"min":"max",v=e.slice(),S=e.slice(),E=-1,I=-1,w=0;w0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],s=t.map(function(t){return n({},t)}),a=e;this._columnLength||this.checkColumn(t[0]),e.length!==this._columnLength&&(a=(0,o.fill)(this._columnLength,0===e.length?0:Math[i===r.APPEND?"min":"max"].apply(Math,e)||0));return{items:s,outlines:this._layout(s,a,i)}},GridLayout.prototype.append=function(t,e){return this._insert(t,e,r.APPEND)},GridLayout.prototype.prepend=function(t,e){return this._insert(t,e,r.PREPEND)},GridLayout.prototype.layout=function(){var t=this,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=e.length&&e[0].items.length&&e[0].items[0]||0;this.checkColumn(n);var s=void 0;if(i.length!==this._columnLength){var a=0===i.length?0:Math.min.apply(Math,i);s=(0,o.fill)(this._columnLength,a)}else s=i.slice();return e.forEach(function(e){var i=e.items,n=t._layout(i,s,r.APPEND);e.outlines=n,s=n.end}),this},GridLayout.prototype.setSize=function(t){return this._size=t,this},GridLayout}();e["default"]=c,t.exports=e["default"]},function(t,e,i){"use strict";function getColumn(t){if(t.column)return t.column;var e=0;if(t.el){var i=t.el.dataset;e=i?i.column||1:t.el.getAttribute("column")||1}else e=1;return t.column=e,e}e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{"default":t}}(i(4)),r=i(1),o=function(t){function SquareLayout(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,SquareLayout),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(SquareLayout,t),SquareLayout.prototype._checkItemSize=function(){var e=this.options.column;if(e){var i=this.options.margin;this._itemSize=(this._size+i)/e-i}else t.prototype._checkItemSize.call(this)},SquareLayout.prototype._layout=function(e){for(var i,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],o=arguments[2],s=this._getItemSize(),a=this.options.margin,u=this.options.column||parseInt((this._size+a)/(s+a),10)||1,h=e.length,c=function(t,e,i,n){var o=Math[n?"min":"max"].apply(Math,t)||0;return t.length!==i?(0,r.fill)(i,0):t.map(function(t){return parseInt((t-o)/e,10)})}(n,s,u,o),l=o?"min":"max",f=[],p=o?1:-1,d=this._style,_=d.pos1,g=d.pos2,y=0;y1){for(var P=1;P=0)&&(o&&c[S+p*P]<=v||!o&&c[S+p*P]>=v);++P)++O;o||(S-=O-1)}E.columnWidth=[u,O],f.push((m={width:O,height:O},m[_]=v-(o?0:O),m[g]=S,m.index=y,m));for(var M=0;M0&&arguments[0]!==undefined?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,PackingLayout),this.options=(0,s.assignOptions)({aspectRatio:1,sizeWeight:1,ratioWeight:1},t),this._size=0,this._style=(0,s.getStyleNames)(this.options.horizontal)}return PackingLayout.prototype._findBestFitArea=function(t,e){if(0===t.getRatio())return t.setOriginWidth(e.getWidth()),t.setOriginHeight(e.getHeight()),t.setWidth(e.getWidth()),void t.setHeight(e.getHeight());var i=null,n=1e7,r=!1,o={width:0,height:0},s={width:0,height:0},a=this.options,u=a.sizeWeight,h=a.ratioWeight;t.innerItem().forEach(function(t){for(var a=getCost(t.getOriginSize(),t.getSize())*u,c=getCost(t.getOriginRatio(),t.getRatio())*h,l=void 0,f=0;f<2;++f){var p=void 0,d=void 0,_=void 0,g=void 0;0===f?(p=t.getWidth(),d=t.getHeight()*(e.getHeight()/(t.getOriginHeight()+e.getHeight())),_=t.getWidth(),g=t.getHeight()-d):(d=t.getHeight(),p=t.getWidth()*(e.getWidth()/(t.getOriginWidth()+e.getWidth())),g=t.getHeight(),_=t.getWidth()-p);var y=p*d,m=p/d,v=_*g,S=g/g;l=getCost(e.getSize(),y)*u,l+=getCost(e.getRatio(),m)*h,l+=getCost(t.getOriginSize(),v)*u-a,(l+=getCost(t.getOriginRatio(),S)*h-c)===Math.min(l,n)&&(n=l,i=t,r=0===f,o.width=p,o.height=d,s.width=_,s.height=g)}}),function(t,e,i,n,r){t.setHeight(i.height),t.setWidth(i.width),e.setHeight(n.height),e.setWidth(n.width),r?(t.setTop(e.getTop()+e.getHeight()),t.setLeft(e.getLeft())):(t.setLeft(e.getLeft()+e.getWidth()),t.setTop(e.getTop()))}(e,i,o,s,r)},PackingLayout.prototype._layout=function(t){var e=this,i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=arguments[2],o=this._style,a=this.options.horizontal,u=this.options.aspectRatio,h=this.options.margin,c=o.pos1,l=o.size1,f=this._size*(a?u:1),p=this._size/(a?1:u),d=a?f:p,_=(0,s.toZeroArray)(i),g=n?Math.max.apply(Math,_):Math.min.apply(Math,_)-d-h,y=g+d+h,m=new r["default"]({}),v=-1,S=-1,E=-1,I=-1;return t.forEach(function(t){var i=new r["default"]({originWidth:t.orgSize.width,originHeight:t.orgSize.height,width:t.orgSize.width,height:t.orgSize.height});e._findBestFitArea(m,i),m.pushItem(i),m.scaleTo(f+h,p+h)}),t.forEach(function(t,e){var i=m.innerItem()[e],n=i.getWidth(),r=i.getHeight(),o=i.getTop(),s=i.getLeft();t.rect={top:o,left:s,width:n-h,height:r-h},t.rect[c]+=g,-1===v&&(v=e,S=e,E=t.rect[c],I=E),E>t.rect[c]&&(E=t.rect[c],v=e),I0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],r=t.map(function(t){return n({},t)});return{items:r,outlines:this._layout(r,e,i)}},PackingLayout.prototype.append=function(t,e){return this._insert(t,e,o.APPEND)},PackingLayout.prototype.prepend=function(t,e){return this._insert(t,e,o.PREPEND)},PackingLayout.prototype.layout=function(){for(var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=t.length,n=e,r=0;r0&&arguments[0]!==undefined?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,JustifiedLayout),this.options=(0,s.assignOptions)({minSize:0,maxSize:0},t),this._style=(0,s.getStyleNames)(this.options.horizontal),this._size=0}return JustifiedLayout.prototype._layout=function(t,e,i){var n=this,o=this._style,s=o.size1,a=o.size2,u=t.length,h=r["default"].find_path(function(e){for(var i={},r=+e.replace(/[^0-9]/g,""),o=u+1,h=r+1;h8);++h){var c=n._getCost(t,r,h,s,a);c<0&&h===o-1&&(c=0),null!==c&&(i["node"+h]=Math.pow(c,2))}return i},"node0","node"+u);return this._setStyle(t,h,e,i)},JustifiedLayout.prototype._getSize=function(t,e,i){var n=this.options.margin,r=t.reduce(function(t,n){return t+n.size[i]/n.size[e]},0);return(this._size-n*(t.length-1))/r},JustifiedLayout.prototype._getCost=function(t,e,i,n,r){var o=this._getSize(t.slice(e,i),n,r),s=this.options.minSize||0,a=this.options.maxSize||Infinity;return isFinite(a)?oa?Math.pow(o-a,2)+Math.pow(a,2):Math.min(o-a,s-o):o2&&arguments[2]!==undefined?arguments[2]:[],n=arguments[3],r=this._style,o=r.pos1,s=r.size1,a=r.pos2,u=r.size2,h=e.length,c=this.options.margin,l=i[0]||0,f=l,p=0,d=0;dc)&&(r[f]=c,o.push({value:f,cost:c}),n[f]=a)}if("undefined"==typeof r[i]){var p=["Could not find a path from ",e," to ",i,"."].join("");throw new Error(p)}return n},extract_shortest_path_from_predecessor_list:function(t,e){for(var i=[],n=e;n;)i.push(n),t[n],n=t[n];return i.reverse(),i},find_path:function(t,i,n){var r=e.single_source_shortest_paths(t,i,n);return e.extract_shortest_path_from_predecessor_list(r,n)}};BinaryHeap.prototype={push:function(t){this.content.push(t),this.bubbleUp(this.content.length-1)},pop:function(){var t=this.content[0],e=this.content.pop();return this.content.length>0&&(this.content[0]=e,this.sinkDown(0)),t},remove:function(t){for(var e=this.content.length,i=0;i0;){var i=Math.floor((t+1)/2)-1,n=this.content[i];if(!(this.scoreFunction(e)= 0; --i) {\n\t\tarray[i] = value;\n\t}\n\treturn array;\n}\n/**\n * Select or create element\n * @param {String|HTMLElement|jQuery} param\n * when string given is as HTML tag, then create element\n * otherwise it returns selected elements\n * @param {Boolean} multi\n * @returns {HTMLElement}\n */\nfunction $(param) {\n\tvar multi = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n\tvar el = void 0;\n\n\tif (typeof param === \"string\") {\n\t\t// String (HTML, Selector)\n\t\t// check if string is HTML tag format\n\t\tvar match = param.match(/^<([A-z]+)\\s*([^>]*)>/);\n\n\t\t// creating element\n\t\tif (match) {\n\t\t\t// HTML\n\t\t\tvar dummy = _browser.document.createElement(\"div\");\n\n\t\t\tdummy.innerHTML = param;\n\t\t\tel = dummy.childNodes;\n\t\t} else {\n\t\t\t// Selector\n\t\t\tel = _browser.document.querySelectorAll(param);\n\t\t}\n\t\tif (multi) {\n\t\t\tel = toArray(el);\n\t\t} else {\n\t\t\tel = el && el.length > 0 && el[0] || undefined;\n\t\t}\n\t} else if (param === _browser.window) {\n\t\t// window\n\t\tel = param;\n\t} else if (param.nodeName && (param.nodeType === 1 || param.nodeType === 9)) {\n\t\t// HTMLElement, Document\n\t\tel = param;\n\t} else if (\"jQuery\" in _browser.window && param instanceof _browser.window.jQuery || param.constructor.prototype.jquery) {\n\t\t// jQuery\n\t\tel = multi ? param.toArray() : param.get(0);\n\t} else if (Array.isArray(param)) {\n\t\tel = param.map(function (v) {\n\t\t\treturn $(v);\n\t\t});\n\t\tif (!multi) {\n\t\t\tel = el.length >= 1 ? el[0] : undefined;\n\t\t}\n\t}\n\treturn el;\n}\nfunction addEvent(element, type, handler, eventListenerOptions) {\n\tif (_consts.SUPPORT_ADDEVENTLISTENER) {\n\t\tvar options = eventListenerOptions || false;\n\n\t\tif ((typeof eventListenerOptions === \"undefined\" ? \"undefined\" : _typeof(eventListenerOptions)) === \"object\") {\n\t\t\toptions = _consts.SUPPORT_PASSIVE ? eventListenerOptions : false;\n\t\t}\n\t\telement.addEventListener(type, handler, options);\n\t} else if (element.attachEvent) {\n\t\telement.attachEvent(\"on\" + type, handler);\n\t} else {\n\t\telement[\"on\" + type] = handler;\n\t}\n}\nfunction removeEvent(element, type, handler) {\n\tif (element.removeEventListener) {\n\t\telement.removeEventListener(type, handler, false);\n\t} else if (element.detachEvent) {\n\t\telement.detachEvent(\"on\" + type, handler);\n\t} else {\n\t\telement[\"on\" + type] = null;\n\t}\n}\nfunction scroll(el, isVertical) {\n\tvar prop = \"scroll\" + (isVertical ? \"Top\" : \"Left\");\n\n\tif (el === _browser.window) {\n\t\treturn _browser.window[isVertical ? \"pageYOffset\" : \"pageXOffset\"] || _browser.document.body[prop] || _browser.document.documentElement[prop];\n\t} else {\n\t\treturn el[prop];\n\t}\n}\nfunction scrollTo(el, x, y) {\n\tif (el === _browser.window) {\n\t\tel.scroll(x, y);\n\t} else {\n\t\tel.scrollLeft = x;\n\t\tel.scrollTop = y;\n\t}\n}\nfunction scrollBy(el, x, y) {\n\tif (el === _browser.window) {\n\t\tel.scrollBy(x, y);\n\t} else {\n\t\tel.scrollLeft += x;\n\t\tel.scrollTop += y;\n\t}\n}\nfunction getStyles(el) {\n\treturn _consts.SUPPORT_COMPUTEDSTYLE ? _browser.window.getComputedStyle(el) : el.currentStyle;\n}\nfunction _getSize(el, name) {\n\tif (el === _browser.window) {\n\t\t// WINDOW\n\t\treturn el.document.documentElement[\"client\" + name];\n\t} else if (el.nodeType === 9) {\n\t\t// DOCUMENT_NODE\n\t\tvar doc = el.documentElement;\n\n\t\treturn Math.max(el.body[\"scroll\" + name], doc[\"scroll\" + name], el.body[\"offset\" + name], doc[\"offset\" + name], doc[\"client\" + name]);\n\t} else {\n\t\t// NODE\n\t\tvar style = getStyles(el);\n\t\tvar value = style[name.toLowerCase()];\n\n\t\treturn parseFloat(/auto|%/.test(value) ? el[\"offset\" + name] : style[name.toLowerCase()]);\n\t}\n}\nfunction innerWidth(el) {\n\treturn _getSize(el, \"Width\");\n}\nfunction innerHeight(el) {\n\treturn _getSize(el, \"Height\");\n}\nvar STYLE = exports.STYLE = {\n\tvertical: {\n\t\tpos1: \"top\",\n\t\tendPos1: \"bottom\",\n\t\tsize1: \"height\",\n\t\tpos2: \"left\",\n\t\tendPos2: \"right\",\n\t\tsize2: \"width\"\n\t},\n\thorizontal: {\n\t\tpos1: \"left\",\n\t\tendPos1: \"right\",\n\t\tsize1: \"width\",\n\t\tpos2: \"top\",\n\t\tendPos2: \"bottom\",\n\t\tsize2: \"height\"\n\t}\n};\n\nfunction getStyleNames(isHorizontal) {\n\treturn STYLE[isHorizontal ? _consts.HORIZONTAL : _consts.VERTICAL];\n}\n\nfunction assignOptions(defaultOptions, options) {\n\treturn _extends({}, _consts.DEFAULT_OPTIONS, defaultOptions, options);\n}\n\nfunction toZeroArray(outline) {\n\tif (!outline || !outline.length) {\n\t\treturn [0];\n\t}\n\treturn outline;\n}\n\nfunction isWindow(el) {\n\treturn el === _browser.window;\n}\n\nfunction indexOf(arr, target) {\n\tvar isRight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n\tif (!isRight) {\n\t\treturn arr.indexOf(target);\n\t}\n\tvar length = arr.length;\n\n\tfor (var i = length - 1; i >= 0; --i) {\n\t\tif (arr[i] !== target) {\n\t\t\tcontinue;\n\t\t}\n\t\treturn i;\n\t}\n\treturn -1;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utils.js\n// module id = 1\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n/* eslint-disable no-new-func, no-nested-ternary */\nvar win = window;\n/* eslint-enable no-new-func, no-nested-ternary */\n\nexports.window = window;\nvar document = exports.document = win.document;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser.js\n// module id = 2\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defense(element) {\n\tvar container = document.createElement(\"div\");\n\n\tcontainer.className = _consts.CONTAINER_CLASSNAME;\n\tcontainer.style.position = \"relative\";\n\tcontainer.style.height = \"100%\";\n\n\tvar children = element.children;\n\tvar length = children.length; // for IE8\n\n\tfor (var i = 0; i < length; i++) {\n\t\tcontainer.appendChild(children[0]);\n\t}\n\n\telement.appendChild(container);\n\treturn container;\n}\n\nvar DOMRenderer = function () {\n\tDOMRenderer.renderItem = function renderItem(item, styles) {\n\t\tif (item.el) {\n\t\t\tvar elStyle = item.el.style;\n\n\t\t\t// for debugging\n\t\t\titem.el.setAttribute(_consts.GROUPKEY_ATT, item.groupKey);\n\t\t\telStyle.position = \"absolute\";\n\t\t\t[\"left\", \"top\", \"width\", \"height\"].forEach(function (p) {\n\t\t\t\tp in styles && (elStyle[p] = styles[p] + \"px\");\n\t\t\t});\n\t\t}\n\t};\n\n\tDOMRenderer.renderItems = function renderItems(items) {\n\t\titems.forEach(function (item) {\n\t\t\tDOMRenderer.renderItem(item, item.rect);\n\t\t});\n\t};\n\n\tDOMRenderer.removeItems = function removeItems(items) {\n\t\titems.forEach(function (item) {\n\t\t\tif (item.el) {\n\t\t\t\tDOMRenderer.removeElement(item.el);\n\t\t\t\titem.el = null;\n\t\t\t}\n\t\t});\n\t};\n\n\tDOMRenderer.removeElement = function removeElement(element) {\n\t\telement.parentNode.removeChild(element);\n\t};\n\n\tDOMRenderer.createElements = function createElements(items) {\n\t\tvar elements = (0, _utils.$)(items.reduce(function (acc, v, i) {\n\t\t\tacc.push(v.content.replace(/^[\\s\\uFEFF]+|[\\s\\uFEFF]+$/g, \"\"));\n\t\t\treturn acc;\n\t\t}, []).join(\"\"), _consts.MULTI);\n\n\t\treturn items.map(function (item, index) {\n\t\t\titem.el = elements[index];\n\t\t\treturn item;\n\t\t});\n\t};\n\n\tfunction DOMRenderer(element, options) {\n\t\t_classCallCheck(this, DOMRenderer);\n\n\t\t_extends(this.options = {\n\t\t\tisOverflowScroll: false,\n\t\t\tisEqualSize: false,\n\t\t\tisVertical: true\n\t\t}, options);\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tcontainer: -1,\n\t\t\tview: -1,\n\t\t\titem: null\n\t\t};\n\t\tthis._init(element);\n\t\tthis.resize();\n\t}\n\n\tDOMRenderer.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\tcssText: this.container.style.cssText,\n\t\t\toptions: _extends({}, this.options),\n\t\t\t_size: _extends({}, this._size)\n\t\t};\n\t};\n\n\tDOMRenderer.prototype.setStatus = function setStatus(status, items) {\n\t\tthis.container.style.cssText = status.cssText;\n\t\t_extends(this.options, status.options);\n\t\t_extends(this._size, status._size);\n\n\t\tDOMRenderer.renderItems(items);\n\t\tthis._insert(items, _consts.APPEND);\n\t};\n\n\tDOMRenderer.prototype.updateSize = function updateSize(items) {\n\t\tvar _this = this;\n\n\t\treturn items.map(function (item) {\n\t\t\tif (item.el) {\n\t\t\t\tif (_this.options.isEqualSize) {\n\t\t\t\t\t_this._size.item = _this._size.item || {\n\t\t\t\t\t\twidth: (0, _utils.innerWidth)(item.el),\n\t\t\t\t\t\theight: (0, _utils.innerHeight)(item.el)\n\t\t\t\t\t};\n\t\t\t\t\titem.size = _extends({}, _this._size.item);\n\t\t\t\t} else {\n\t\t\t\t\titem.size = {\n\t\t\t\t\t\twidth: (0, _utils.innerWidth)(item.el),\n\t\t\t\t\t\theight: (0, _utils.innerHeight)(item.el)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif (!item.orgSize) {\n\t\t\t\t\titem.orgSize = _extends({}, item.size);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t};\n\n\tDOMRenderer.prototype._init = function _init(el) {\n\t\tvar element = (0, _utils.$)(el);\n\t\tvar style = (0, _utils.getStyles)(element);\n\n\t\tthis._orgStyle = {};\n\n\t\tif (style.position === \"static\") {\n\t\t\tthis._orgStyle.position = element.style.position;\n\t\t\telement.style.position = \"relative\";\n\t\t}\n\t\tif (this.options.isOverflowScroll) {\n\t\t\tvar target = this.options.isVertical ? [\"Y\", \"X\"] : [\"X\", \"Y\"];\n\n\t\t\tthis._orgStyle.overflowX = element.style.overflowX;\n\t\t\tthis._orgStyle.overflowY = element.style.overflowY;\n\t\t\telement.style[\"overflow\" + target[0]] = \"scroll\";\n\t\t\telement.style[\"overflow\" + target[1]] = \"hidden\";\n\t\t\tthis.view = element;\n\t\t\t// defense code for android < 4.4 or webkit < 537\n\t\t\tthis.container = !this.options.isVertical && _consts.DEFENSE_BROWSER ? _defense(element) : element;\n\t\t} else {\n\t\t\tthis.view = window;\n\t\t\tthis.container = element;\n\t\t}\n\t};\n\n\tDOMRenderer.prototype.append = function append(items) {\n\t\tthis._insert(items, _consts.APPEND, {\n\t\t\ttop: _consts.DUMMY_POSITION,\n\t\t\tleft: _consts.DUMMY_POSITION\n\t\t});\n\t};\n\n\tDOMRenderer.prototype.prepend = function prepend(items) {\n\t\tthis._insert(items, _consts.PREPEND, {\n\t\t\ttop: _consts.DUMMY_POSITION,\n\t\t\tleft: _consts.DUMMY_POSITION\n\t\t});\n\t};\n\n\tDOMRenderer.prototype.clear = function clear() {\n\t\tthis.container.innerHTML = \"\";\n\t\tif (!this.options.isOverflowScroll) {\n\t\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = \"\";\n\t\t}\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tviewport: -1,\n\t\t\tcontainer: -1,\n\t\t\tview: -1\n\t\t};\n\t};\n\n\tDOMRenderer.prototype.createAndInsert = function createAndInsert(items, isAppend) {\n\t\tvar itemsWithElement = DOMRenderer.createElements(items);\n\n\t\tDOMRenderer.renderItems(itemsWithElement);\n\t\tthis._insert(itemsWithElement, isAppend);\n\t};\n\n\tDOMRenderer.prototype._insert = function _insert(items, isAppend, styles) {\n\t\tvar df = document.createDocumentFragment();\n\n\t\titems.forEach(function (item) {\n\t\t\tstyles && DOMRenderer.renderItem(item, styles);\n\t\t\tisAppend ? df.appendChild(item.el) : df.insertBefore(item.el, df.firstChild);\n\t\t});\n\t\tisAppend ? this.container.appendChild(df) : this.container.insertBefore(df, this.container.firstChild);\n\t};\n\n\tDOMRenderer.prototype._calcSize = function _calcSize() {\n\t\treturn this.options.isVertical ? (0, _utils.innerWidth)(this.container) : (0, _utils.innerHeight)(this.container);\n\t};\n\n\tDOMRenderer.prototype.getViewSize = function getViewSize() {\n\t\treturn this._size.view;\n\t};\n\n\tDOMRenderer.prototype.scrollBy = function scrollBy(point) {\n\t\tvar pos = this.options.isVertical ? [0, point] : [point, 0];\n\n\t\t_utils.scrollBy.apply(undefined, [this.view].concat(pos));\n\t};\n\n\tDOMRenderer.prototype.getContainerOffset = function getContainerOffset() {\n\t\treturn this._size.containerOffset;\n\t};\n\n\tDOMRenderer.prototype.getViewportSize = function getViewportSize() {\n\t\tthis.resize();\n\t\treturn this._size.viewport;\n\t};\n\n\tDOMRenderer.prototype.setContainerSize = function setContainerSize(size) {\n\t\tif (!this.options.isOverflowScroll || !this.options.isVertical && _consts.DEFENSE_BROWSER) {\n\t\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = size + \"px\";\n\t\t}\n\t};\n\n\tDOMRenderer.prototype.resize = function resize() {\n\t\tvar isVertical = this.options.isVertical;\n\n\t\tif (this.isNeededResize()) {\n\t\t\tthis._size = {\n\t\t\t\tcontainerOffset: this.options.isOverflowScroll ? 0 : this.container[\"offset\" + (isVertical ? \"Top\" : \"Left\")],\n\t\t\t\tviewport: this._calcSize(),\n\t\t\t\tview: isVertical ? (0, _utils.innerHeight)(this.view) : (0, _utils.innerWidth)(this.view),\n\t\t\t\titem: null\n\t\t\t};\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis._size.view = isVertical ? (0, _utils.innerHeight)(this.view) : (0, _utils.innerWidth)(this.view);\n\t\t}\n\t\treturn false;\n\t};\n\n\tDOMRenderer.prototype.isNeededResize = function isNeededResize() {\n\t\treturn this._calcSize() !== this._size.viewport;\n\t};\n\n\tDOMRenderer.prototype.destroy = function destroy() {\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tviewport: -1,\n\t\t\tview: -1,\n\t\t\titem: null\n\t\t};\n\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = \"\";\n\t\tfor (var p in this._orgStyle) {\n\t\t\tthis[this.options.isOverflowScroll ? \"view\" : \"container\"].style[p] = this._orgStyle[p];\n\t\t}\n\t};\n\n\treturn DOMRenderer;\n}();\n\nexports[\"default\"] = DOMRenderer;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/DOMRenderer.js\n// module id = 3\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/*\nFrame\n[\n[1, 1, 1, 1, 1],\n[0, 0, 2, 2, 2],\n[0, 0, 2, 2, 2],\n[3, 4, 5, 5, 5],\n]\n*/\nfunction disableFrame(frame, type, x, y, width, height) {\n\tfor (var i = y; i < y + height; ++i) {\n\t\tfor (var j = x; j < x + width; ++j) {\n\t\t\tif (type !== frame[i][j]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tframe[i][j] = 0;\n\t\t}\n\t}\n}\nfunction searchShapeInFrame(frame, type, top, left, width, height) {\n\tvar size = {\n\t\tleft: left,\n\t\ttop: top,\n\t\ttype: type,\n\t\twidth: 1,\n\t\theight: 1\n\t};\n\n\tfor (var i = left; i < width; ++i) {\n\t\tif (frame[top][i] === type) {\n\t\t\tsize.width = i - left + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\tfor (var _i = top; _i < height; ++_i) {\n\t\tif (frame[_i][left] === type) {\n\t\t\tsize.height = _i - top + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\t// After finding the shape, it will not find again.\n\tdisableFrame(frame, type, left, top, size.width, size.height);\n\treturn size;\n}\nfunction getShapes(frame) {\n\tvar height = frame.length;\n\tvar width = height ? frame[0].length : 0;\n\tvar shapes = [];\n\n\tfor (var i = 0; i < height; ++i) {\n\t\tfor (var j = 0; j < width; ++j) {\n\t\t\tvar type = frame[i][j];\n\n\t\t\tif (!type) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Separate shapes with other numbers.\n\t\t\tshapes.push(searchShapeInFrame(frame, type, i, j, width, height));\n\t\t}\n\t}\n\tshapes.sort(function (a, b) {\n\t\treturn a.type < b.type ? -1 : 1;\n\t});\n\treturn {\n\t\tshapes: shapes,\n\t\twidth: width,\n\t\theight: height\n\t};\n}\n/**\n * @classdesc FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.\n * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.\n * @class eg.InfiniteGrid.FrameLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.FrameLayout module eg.InfiniteGrid.FrameLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @param {Boolean} [options.frame=[]] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @param {Boolean} [options.frameFill=true] Make sure that the frame can be attached after the previous frame. 다음 프레임이 전 프레임에 이어 붙일 수 있는지 있는지 확인한다. \n * @example\n```\n\n```\n **/\n\nvar FrameLayout = function () {\n\tfunction FrameLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, FrameLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\titemSize: 0,\n\t\t\tframe: [],\n\t\t\tframeFill: true\n\t\t}, options);\n\t\tvar frame = this.options.frame.map(function (row) {\n\t\t\treturn row.slice();\n\t\t});\n\t\t// divide frame into shapes.\n\t\tvar shapes = getShapes(frame);\n\n\t\tthis._itemSize = this.options.itemSize || 0;\n\t\tthis._shapes = shapes;\n\t\tthis._size = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tFrameLayout.prototype._getItemSize = function _getItemSize() {\n\t\tthis._checkItemSize();\n\n\t\treturn this._itemSize;\n\t};\n\n\tFrameLayout.prototype._checkItemSize = function _checkItemSize() {\n\t\tif (this.options.itemSize) {\n\t\t\tthis._itemSize = this.options.itemSize;\n\t\t\treturn;\n\t\t}\n\t\tvar style = this._style;\n\t\tvar size = style.size2;\n\t\tvar margin = this.options.margin;\n\n\t\t// if itemSize is not in options, caculate itemSize from size.\n\t\tthis._itemSize = (this._size + margin) / this._shapes[size] - margin;\n\t};\n\n\tFrameLayout.prototype._layout = function _layout(items) {\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar length = items.length;\n\t\tvar style = this._style;\n\t\tvar _options = this.options,\n\t\t margin = _options.margin,\n\t\t frameFill = _options.frameFill;\n\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar itemSize = this._getItemSize();\n\t\tvar isItemObject = (typeof itemSize === \"undefined\" ? \"undefined\" : _typeof(itemSize)) === \"object\";\n\t\tvar itemSize2 = isItemObject ? itemSize[size2Name] : itemSize;\n\t\tvar itemSize1 = isItemObject ? itemSize[size1Name] : itemSize;\n\t\tvar shapesSize = this._shapes[size2Name];\n\t\tvar shapes = this._shapes.shapes;\n\t\tvar shapesLength = shapes.length;\n\t\tvar startOutline = (0, _utils.fill)(shapesSize, _consts.DUMMY_POSITION);\n\t\tvar endOutline = (0, _utils.fill)(shapesSize, _consts.DUMMY_POSITION);\n\t\tvar dist = 0;\n\t\tvar end = 0;\n\t\tvar startIndex = -1;\n\t\tvar endIndex = -1;\n\t\tvar minPos = -1;\n\t\tvar maxPos = -1;\n\n\t\tif (!shapesLength) {\n\t\t\treturn { start: outline, end: outline, startIndex: startIndex, endIndex: endIndex };\n\t\t}\n\t\tfor (var i = 0; i < length; i += shapesLength) {\n\t\t\tfor (var j = 0; j < shapesLength && i + j < length; ++j) {\n\t\t\t\tvar _item$rect;\n\n\t\t\t\tvar item = items[i + j];\n\t\t\t\tvar shape = shapes[j];\n\t\t\t\tvar shapePos1 = shape[pos1Name];\n\t\t\t\tvar shapePos2 = shape[pos2Name];\n\t\t\t\tvar shapeSize1 = shape[size1Name];\n\t\t\t\tvar shapeSize2 = shape[size2Name];\n\t\t\t\tvar pos1 = end - dist + shapePos1 * (itemSize1 + margin);\n\t\t\t\tvar pos2 = shapePos2 * (itemSize2 + margin);\n\t\t\t\tvar size1 = shapeSize1 * (itemSize1 + margin) - margin;\n\t\t\t\tvar size2 = shapeSize2 * (itemSize2 + margin) - margin;\n\n\t\t\t\tfor (var k = shapePos2; k < shapePos2 + shapeSize2 && k < shapesSize; ++k) {\n\t\t\t\t\tif (startOutline[k] === _consts.DUMMY_POSITION) {\n\t\t\t\t\t\tstartOutline[k] = pos1;\n\t\t\t\t\t}\n\t\t\t\t\tif (startIndex === -1) {\n\t\t\t\t\t\tminPos = pos1;\n\t\t\t\t\t\tstartIndex = i + j;\n\t\t\t\t\t\tmaxPos = pos1 + size1 + margin;\n\t\t\t\t\t\tendIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tif (minPos > pos1) {\n\t\t\t\t\t\tminPos = pos1;\n\t\t\t\t\t\tstartIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tif (maxPos < pos1 + size1 + margin) {\n\t\t\t\t\t\tmaxPos = pos1 + size1 + margin;\n\t\t\t\t\t\tendIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tstartOutline[k] = Math.min(startOutline[k], pos1);\n\t\t\t\t\tendOutline[k] = Math.max(endOutline[k], pos1 + size1 + margin);\n\t\t\t\t}\n\t\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);\n\t\t\t}\n\t\t\tend = Math.max.apply(Math, endOutline);\n\t\t\t// check dist once\n\t\t\tif (i !== 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// find & fill empty block\n\t\t\tif (!frameFill) {\n\t\t\t\tdist = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdist = end;\n\n\t\t\tfor (var _j = 0; _j < shapesSize; ++_j) {\n\t\t\t\tif (startOutline[_j] === _consts.DUMMY_POSITION) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// the dist between frame's end outline and next frame's start outline\n\t\t\t\t// expect that next frame's start outline is startOutline[j] + end\n\t\t\t\tdist = Math.min(startOutline[_j] + end - endOutline[_j], dist);\n\t\t\t}\n\t\t}\n\t\tfor (var _i2 = 0; _i2 < shapesSize; ++_i2) {\n\t\t\tif (startOutline[_i2] !== _consts.DUMMY_POSITION) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tstartOutline[_i2] = Math.max.apply(Math, startOutline);\n\t\t\tendOutline[_i2] = startOutline[_i2];\n\t\t}\n\t\t// The target outline is start outline when type is APPENDING\n\t\tvar targetOutline = isAppend ? startOutline : endOutline;\n\t\tvar prevOutlineEnd = outline.length === 0 ? 0 : Math[isAppend ? \"max\" : \"min\"].apply(Math, outline);\n\t\tvar prevOutlineDist = isAppend ? 0 : end;\n\n\t\tif (frameFill && outline.length === shapesSize) {\n\t\t\tprevOutlineDist = -_consts.DUMMY_POSITION;\n\t\t\tfor (var _i3 = 0; _i3 < shapesSize; ++_i3) {\n\t\t\t\tif (startOutline[_i3] === endOutline[_i3]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// if appending type is PREPEND, subtract dist from appending group's height.\n\n\t\t\t\tprevOutlineDist = Math.min(targetOutline[_i3] + prevOutlineEnd - outline[_i3], prevOutlineDist);\n\t\t\t}\n\t\t}\n\t\tfor (var _i4 = 0; _i4 < shapesSize; ++_i4) {\n\t\t\tstartOutline[_i4] += prevOutlineEnd - prevOutlineDist;\n\t\t\tendOutline[_i4] += prevOutlineEnd - prevOutlineDist;\n\t\t}\n\t\titems.forEach(function (item) {\n\t\t\titem.rect[pos1Name] += prevOutlineEnd - prevOutlineDist;\n\t\t});\n\t\treturn {\n\t\t\tstart: startOutline,\n\t\t\tend: endOutline,\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tFrameLayout.prototype._insert = function _insert(items, outline, type) {\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tFrameLayout.prototype.layout = function layout(groups, outlines) {\n\t\tvar length = groups.length;\n\t\tvar point = outlines;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.FrameLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tFrameLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tFrameLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tFrameLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\n\treturn FrameLayout;\n}();\n\nexports[\"default\"] = FrameLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/FrameLayout.js\n// module id = 4\n// module chunks = 0 1","\"use strict\";\n\nvar _InfiniteGrid = require(\"./InfiniteGrid\");\n\nvar _InfiniteGrid2 = _interopRequireDefault(_InfiniteGrid);\n\nvar _GridLayout = require(\"./layouts/GridLayout\");\n\nvar _GridLayout2 = _interopRequireDefault(_GridLayout);\n\nvar _FrameLayout = require(\"./layouts/FrameLayout\");\n\nvar _FrameLayout2 = _interopRequireDefault(_FrameLayout);\n\nvar _SquareLayout = require(\"./layouts/SquareLayout\");\n\nvar _SquareLayout2 = _interopRequireDefault(_SquareLayout);\n\nvar _PackingLayout = require(\"./layouts/PackingLayout\");\n\nvar _PackingLayout2 = _interopRequireDefault(_PackingLayout);\n\nvar _JustifiedLayout = require(\"./layouts/JustifiedLayout\");\n\nvar _JustifiedLayout2 = _interopRequireDefault(_JustifiedLayout);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n/**\n * Copyright (c) NAVER Corp.\n * egjs-infinitegrid projects are licensed under the MIT license\n */\n_InfiniteGrid2[\"default\"].GridLayout = _GridLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].FrameLayout = _FrameLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].SquareLayout = _SquareLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].PackingLayout = _PackingLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].JustifiedLayout = _JustifiedLayout2[\"default\"];\n\nmodule.exports = _InfiniteGrid2[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/index.js\n// module id = 5\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; /**\n * Copyright (c) 2017 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\n\nvar _component = require(\"@egjs/component\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _ItemManager = require(\"./ItemManager\");\n\nvar _ItemManager2 = _interopRequireDefault(_ItemManager);\n\nvar _DOMRenderer = require(\"./DOMRenderer\");\n\nvar _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);\n\nvar _ImageLoaded = require(\"./ImageLoaded\");\n\nvar _ImageLoaded2 = _interopRequireDefault(_ImageLoaded);\n\nvar _Watcher = require(\"./Watcher\");\n\nvar _Watcher2 = _interopRequireDefault(_Watcher);\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// IE8\n// https://stackoverflow.com/questions/43216659/babel-ie8-inherit-issue-with-object-create\n/* eslint-disable */\nif (typeof Object.create !== \"function\") {\n\tObject.create = function (o, properties) {\n\t\tif ((typeof o === \"undefined\" ? \"undefined\" : _typeof(o)) !== \"object\" && typeof o !== \"function\") {\n\t\t\tthrow new TypeError(\"Object prototype may only be an Object: \" + o);\n\t\t} else if (o === null) {\n\t\t\tthrow new Error(\"This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument.\");\n\t\t}\n\t\tfunction F() {}\n\t\tF.prototype = o;\n\t\treturn new F();\n\t};\n}\n/* eslint-enable */\n\n/**\n * A module used to arrange card elements including content infinitely according to layout type. With this module, you can implement various layouts composed of different card elements whose sizes vary. It guarantees performance by maintaining the number of DOMs the module is handling under any circumstance\n * @ko 콘텐츠가 있는 카드 엘리먼트를 레이아웃 타입에 따라 무한으로 배치하는 모듈. 다양한 크기의 카드 엘리먼트를 다양한 레이아웃으로 배치할 수 있다. 카드 엘리먼트의 개수가 계속 늘어나도 모듈이 처리하는 DOM의 개수를 일정하게 유지해 최적의 성능을 보장한다\n * @alias eg.InfiniteGrid\n * @extends eg.Component\n *\n * @example\n```\n\n\t- \n\t\t
test1
\n\t \n\t- \n\t\t
test2
\n\t \n\t- \n\t\t
test3
\n\t \n\t- \n\t\t
test4
\n\t \n\t- \n\t\t
test5
\n\t \n\t- \n\t\t
test6
\n\t \n
\n\n```\n *\n * @support {\"ie\": \"8+\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"2.1+ (except 3.x)\"}\n **/\n\nvar InfiniteGrid = function (_Component) {\n\t_inherits(InfiniteGrid, _Component);\n\n\t/**\n * @param {HTMLElement|String|jQuery} element A base element for a module 모듈을 적용할 기준 엘리먼트\n * @param {Object} [options] The option object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 옵션 객체\n * @param {String} [options.itemSelector] A selector to select card elements that make up the layout레이아웃을 구성하는 카드 엘리먼트를 선택할 선택자(selector)\n * @param {Boolean} [options.useRecycle=true] Indicates whether keep the number of DOMs is maintained. If the useRecycle value is 'true', keep the number of DOMs is maintained. If the useRecycle value is 'false', the number of DOMs will increase as card elements are added. DOM의 수를 유지할지 여부를 나타낸다. useRecycle 값이 'true'이면 DOM 개수를 일정하게 유지한다. useRecycle 값이 'false' 이면 카드 엘리먼트가 추가될수록 DOM 개수가 계속 증가한다.\n * @param {Boolean} [options.isOverflowScroll=false] Indicates whether overflow:scroll is appliedoverflow:scroll 적용여부를 결정한다.\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향\n * @param {Boolean} [options.isEqualSize=false] Indicates whether sizes of all card elements are equal to one another. If sizes of card elements to be arranged are all equal and this option is set to \"true\", the performance of layout arrangement can be improved. 카드 엘리먼트의 크기가 동일한지 여부. 배치될 카드 엘리먼트의 크기가 모두 동일할 때 이 옵션을 'true'로 설정하면 레이아웃 배치 성능을 높일 수 있다\n * @param {Number} [options.threshold=100] The threshold size of an event area where card elements are added to a layout.레이아웃에 카드 엘리먼트를 추가하는 이벤트가 발생하는 기준 영역의 크기.\n */\n\tfunction InfiniteGrid(element, options) {\n\t\t_classCallCheck(this, InfiniteGrid);\n\n\t\tvar _this = _possibleConstructorReturn(this, _Component.call(this));\n\n\t\t_extends(_this.options = {\n\t\t\titemSelector: \"*\",\n\t\t\tisOverflowScroll: false,\n\t\t\tthreshold: 100,\n\t\t\tisEqualSize: false,\n\t\t\tuseRecycle: true,\n\t\t\thorizontal: false\n\t\t}, options);\n\t\t_consts.IS_ANDROID2 && (_this.options.isOverflowScroll = false);\n\t\t_this._isVertical = !_this.options.horizontal;\n\t\t_this._reset();\n\t\t_this._items = new _ItemManager2[\"default\"]();\n\t\t_this._renderer = new _DOMRenderer2[\"default\"](element, {\n\t\t\tisOverflowScroll: _this.options.isOverflowScroll,\n\t\t\tisEqualSize: _this.options.isEqualSize,\n\t\t\tisVertical: _this._isVertical\n\t\t});\n\t\t_this._watcher = new _Watcher2[\"default\"](_this._renderer, {\n\t\t\tlayout: function layout() {\n\t\t\t\treturn _this.layout();\n\t\t\t},\n\t\t\tcheck: function check(param) {\n\t\t\t\treturn _this._onCheck(param);\n\t\t\t}\n\t\t});\n\t\treturn _this;\n\t}\n\t/**\n * Adds a card element at the bottom of a layout. This method is available only if the isProcessing() method returns false.\n * @ko 카드 엘리먼트를 레이아웃 아래에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다\n * 이 메소드는 isProcessing()의 반환값이 false일 경우에만 사용 가능하다.\n * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트의 배열\n * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.\n * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.append(\"<div class='item'>test1</div><div class='item'>test2</div>\");\n * infinitegrid.append([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]);\n * infinitegrid.append([HTMLElement1, HTMLElement2]);\n * infinitegrid.append(jQuery([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]));\n */\n\n\n\tInfiniteGrid.prototype.append = function append(elements, groupKey) {\n\t\tthis._layout && this._insert(elements, _consts.APPEND, groupKey);\n\t\treturn this;\n\t};\n\t/**\n * Adds a card element at the top of a layout. This method is available only if the isProcessing() method returns false.\n * @ko 카드 엘리먼트를 레이아웃의 위에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다\n * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트 배열\n * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.\n * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.prepend(\"<div class='item'>test1</div><div class='item'>test2</div>\");\n * infinitegrid.prepend([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]);\n * infinitegrid.prepend([HTMLElement1, HTMLElement2]);\n * infinitegrid.prepend(jQuery([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]));\n */\n\n\n\tInfiniteGrid.prototype.prepend = function prepend(elements, groupKey) {\n\t\tthis._layout && this._insert(elements, _consts.PREPEND, groupKey);\n\t\treturn this;\n\t};\n\t/**\n * Specifies the Layout class to use.\n * @ko 사용할 Layout 클래스를 지정한다.\n * @param {Class} LayoutKlass The Layout class to use 사용할 Layout 클래스\n * @param {Object} options Options to apply to the Layout.Layout에 적용할 옵션\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.setLayout(eg.InfiniteGrid.GridLayout, {\n * margin: 10,\n * align: \"start\"\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.JustifiedLayout, {\n * margin: 10,\n * minSize: 100,\n * maxSize: 200\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.SquareLayout, {\n * margin: 10,\n * column: 2\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.FrameLayout, {\n * margin: 10,\n * frame: [\n * [1, 2],\n * [4, 3],\n * ]\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.PackingLayout, {\n * margin: 10,\n * aspectRatio: 1.5\n * });\n */\n\n\n\tInfiniteGrid.prototype.setLayout = function setLayout(LayoutKlass, options) {\n\t\tthis._layout = new LayoutKlass(_extends(options || {}, {\n\t\t\thorizontal: !this._isVertical\n\t\t}));\n\t\tthis._layout.setSize(this._renderer.getViewportSize());\n\t\treturn this;\n\t};\n\t/**\n * Returns the layouted items.\n * @ko 레이아웃된 아이템들을 반환한다.\n * @param {Boolean} includeCached Indicates whether to include the cached items. 캐싱된 아이템을 포함할지 여부를 나타낸다.\n * @returns {Array} List of items 아이템의 목록\n */\n\n\n\tInfiniteGrid.prototype.getItems = function getItems() {\n\t\tvar includeCached = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n\t\treturn this[includeCached ? \"_getItems\" : \"_getVisibleItems\"]();\n\t};\n\n\tInfiniteGrid.prototype._getItems = function _getItems() {\n\t\treturn this._items.pluck(\"items\", 0, this._items.size());\n\t};\n\n\tInfiniteGrid.prototype._getVisibleItems = function _getVisibleItems() {\n\t\treturn this._items.pluck(\"items\", this._status.startCursor, this._status.endCursor);\n\t};\n\n\tInfiniteGrid.prototype._updateEdge = function _updateEdge() {\n\t\tthis._status.start = this._items.getEdge(\"start\", this._status.startCursor, this._status.endCursor);\n\t\tthis._status.end = this._items.getEdge(\"end\", this._status.startCursor, this._status.endCursor);\n\t};\n\n\tInfiniteGrid.prototype._getEdgeOffset = function _getEdgeOffset(cursor) {\n\t\tvar rect = null;\n\n\t\tif (!this._status[cursor]) {\n\t\t\tvar item = this._items.getEdge(cursor);\n\n\t\t\tthis._status[cursor] = item;\n\t\t}\n\n\t\tif (this._status[cursor]) {\n\t\t\trect = this._status[cursor].rect;\n\t\t\tif (cursor === \"start\") {\n\t\t\t\trect.bottom = rect.top + this._status[cursor].size.height;\n\t\t\t\trect.right = rect.left + this._status[cursor].size.width;\n\t\t\t}\n\t\t}\n\t\treturn rect;\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._fit = function _fit() {\n\t\tvar scrollCycle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"after\";\n\n\t\t// for caching\n\t\tif (!this._layout) {\n\t\t\treturn 0;\n\t\t}\n\t\tvar base = this._getEdgeValue(\"start\");\n\t\tvar margin = this._getLoadingStatus() === _consts.LOADING_PREPEND && this._status.loadingSize || 0;\n\n\t\tif (!this.options.useRecycle || _consts.DEFENSE_BROWSER) {\n\t\t\tif (scrollCycle === \"before\" && margin && base < margin) {\n\t\t\t\tthis._renderer.scrollBy(-Math.abs(base) + margin);\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\t} else if (scrollCycle === \"after\" && base < 0) {\n\t\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\t\tthis._renderer.scrollBy(Math.abs(base));\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (base !== 0 || margin) {\n\t\t\tvar isProcessing = this._isProcessing();\n\n\t\t\tthis._process(_consts.PROCESSING);\n\t\t\tif (scrollCycle === \"before\") {\n\t\t\t\tthis._renderer.scrollBy(-Math.abs(base) + margin);\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t}\n\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\tif (scrollCycle === \"after\") {\n\t\t\t\tthis._renderer.scrollBy(Math.abs(base) + margin);\n\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t}\n\t\t\tif (!isProcessing) {\n\t\t\t\tthis._process(_consts.PROCESSING, false);\n\t\t\t}\n\t\t}\n\t\treturn base;\n\t};\n\n\tInfiniteGrid.prototype._getEdgeValue = function _getEdgeValue(cursor) {\n\t\treturn this._items.getEdgeValue(cursor, this._status.startCursor, this._status.endCursor);\n\t};\n\t/**\n * Rearranges a layout.\n * @ko 레이아웃을 다시 배치한다.\n * @param {Boolean} [isRelayout=true] Indicates whether a card element is being relayouted 카드 엘리먼트 재배치 여부\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.layout = function layout() {\n\t\tvar _this2 = this;\n\n\t\tvar isRelayout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n\t\tif (!this._layout || this._isProcessing()) {\n\t\t\treturn this;\n\t\t}\n\t\t// check childElement\n\t\tif (!this._items.size()) {\n\t\t\tthis._insert((0, _utils.toArray)(this._renderer.container.children), true);\n\t\t\treturn this;\n\t\t}\n\t\tthis._process(_consts.PROCESSING);\n\n\t\tvar data = void 0;\n\t\tvar outline = void 0;\n\n\t\tif (isRelayout) {\n\t\t\t// remove cache\n\t\t\tdata = this._items.get(this._status.startCursor, this._status.endCursor);\n\t\t\tif (this._renderer.resize()) {\n\t\t\t\tthis._layout.setSize(this._renderer.getViewportSize());\n\t\t\t\tdata.forEach(function (v) {\n\t\t\t\t\tdata.items = _this2._renderer.updateSize(v.items);\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tdata = this._items.get(this._status.startCursor, this._items.size());\n\t\t\toutline = this._items.getOutline(this._status.startCursor, \"start\");\n\t\t}\n\t\tif (!data.length) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._layout.layout(data, outline);\n\n\t\tif (isRelayout) {\n\t\t\tthis._items._data.forEach(function (group, cursor) {\n\t\t\t\tif (_this2._status.startCursor <= cursor && cursor <= _this2._status.endCursor) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgroup.outlines.start = [];\n\t\t\t\tgroup.outlines.end = [];\n\t\t\t});\n\t\t} else {\n\t\t\tdata.forEach(function (v) {\n\t\t\t\treturn _this2._items.set(v, v.groupKey);\n\t\t\t});\n\t\t}\n\t\tthis._onLayoutComplete(data, _consts.APPEND, _consts.NO_TRUSTED, false);\n\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\tisRelayout && this._watcher.setScrollPos();\n\n\t\treturn this;\n\t};\n\t/**\n * Removes a item element on a grid layout.\n * @ko 그리드 레이아웃의 카드 엘리먼트를 삭제한다.\n * @param {HTMLElement} item element to be removed 삭제될 아이템 엘리먼트\n * @return {Object} Removed item element 삭제된 아이템 엘리먼트 정보\n */\n\n\n\tInfiniteGrid.prototype.remove = function remove(element) {\n\t\tif (element) {\n\t\t\tvar items = this._items.remove(element, this._status.startCursor, this._status.endCursor);\n\n\t\t\tif (items) {\n\t\t\t\t_DOMRenderer2[\"default\"].removeElement(element);\n\t\t\t\treturn items;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tInfiniteGrid.prototype._getNextItems = function _getNextItems(isAppend) {\n\t\tvar items = [];\n\t\tvar size = this._items.size();\n\n\t\t// from cache\n\t\tif (size > 0 && this._status.startCursor !== -1 && this._status.endCursor !== -1) {\n\t\t\tif (isAppend && size > this._status.endCursor + 1) {\n\t\t\t\titems = this._items.pluck(\"items\", this._status.endCursor + 1);\n\t\t\t} else if (!isAppend && this._status.startCursor > 0) {\n\t\t\t\titems = this._items.pluck(\"items\", this._status.startCursor - 1);\n\t\t\t}\n\t\t}\n\t\treturn items;\n\t};\n\t/**\n * Returns the list of group keys which belongs to card elements currently being maintained. You can use the append() or prepend() method to configure group keys so that multiple card elements can be managed at once. If you do not use these methods to configure group keys, groupkey is automatically generated.\n * @ko 현재 유지하고 있는 카드 엘리먼트의 그룹 키 목록을 반환한다. 여러 개의 카드 엘리먼트를 묶어서 관리할 수 있도록 append() 메서드나 prepend() 메서드에서 그룹 키를 지정할 수 있다. append() 메서드나 prepend() 메서드에서 그룹 키를 지정하지 않았다면 자동으로 그룹키가 생성된다.\n * @param {Boolean} includeCached Indicates whether to include the cached groups. 캐싱된 그룹을 포함할지 여부를 나타낸다.\n * @return {Array} List of group keys 그룹 키의 목록\n */\n\n\n\tInfiniteGrid.prototype.getGroupKeys = function getGroupKeys(includeCached) {\n\t\tvar data = includeCached ? this._items.get() : this._items.get(this._status.startCursor, this._status.endCursor);\n\n\t\treturn data.map(function (v) {\n\t\t\treturn v.groupKey;\n\t\t});\n\t};\n\t/**\n * Returns the current state of a module such as location information. You can use the setStatus() method to restore the information returned through a call to this method.\n * @ko 카드의 위치 정보 등 모듈의 현재 상태 정보를 반환한다. 이 메서드가 반환한 정보를 저장해 두었다가 setStatus() 메서드로 복원할 수 있다\n * @return {Object} State object of the eg.InfiniteGrid moduleeg.InfiniteGrid 모듈의 상태 객체\n */\n\n\n\tInfiniteGrid.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\toptions: _extends({}, this.options),\n\t\t\t_status: _extends({}, this._status),\n\t\t\t_items: this._items.getStatus(),\n\t\t\t_renderer: this._renderer.getStatus(),\n\t\t\t_watcher: this._watcher.getStatus()\n\t\t};\n\t};\n\t/**\n * Sets the state of the eg.InfiniteGrid module with the information returned through a call to the getStatue() method.\n * @ko getStatue() 메서드가 저장한 정보로 eg.InfiniteGrid 모듈의 상태를 설정한다.\n * @param {Object} status State object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 상태 객체\n * @param {boolean} [applyScrollPos=true] Checks whether to scroll스크롤의 위치를 복원할지 결정한다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.setStatus = function setStatus(status) {\n\t\tvar applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tif (!status || !status.options || !status._status || !status._renderer || !status._items || !status._watcher) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._watcher.detachEvent();\n\t\t_extends(this.options, status.options);\n\t\t_extends(this._status, status._status);\n\t\tthis._items.setStatus(status._items, this._status.startCursor, this._status.endCursor);\n\t\tthis._renderer.setStatus(status._renderer, this._getVisibleItems());\n\t\tthis._watcher.setStatus(status._watcher, applyScrollPos);\n\t\tthis._updateEdge();\n\t\tthis._watcher.attachEvent();\n\t\treturn this;\n\t};\n\t/**\n * Clears added card elements and data.\n * @ko 추가된 카드 엘리먼트와 데이터를 모두 지운다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.clear = function clear() {\n\t\tthis._items.clear();\n\t\tthis._renderer.clear();\n\t\tthis._reset();\n\t\tthis._appendLoadingBar();\n\t\treturn this;\n\t};\n\t/**\n * Specifies the Loading Bar to use for append or prepend items.\n * @ko 아이템을 append 또는 prepend 하기 위해 사용할 로딩 바를 지정한다.\n * @param {String|Object} [userLoadingBar={}] The loading bar HTML markup or element or element selector 로딩 바 HTML 또는 element 또는 selector \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.setLoadingBar = function setLoadingBar() {\n\t\tvar userLoadingBar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\tvar loadingBarObj = (typeof userLoadingBar === \"undefined\" ? \"undefined\" : _typeof(userLoadingBar)) === \"object\" ? userLoadingBar : {\n\t\t\t\"append\": userLoadingBar,\n\t\t\t\"prepend\": userLoadingBar\n\t\t};\n\n\t\tthis._status.loadingSize = 0;\n\t\tthis._status.loadingStyle = {};\n\t\tthis._loadingBar = this._loadingBar || {};\n\t\tvar loadingBar = this._loadingBar;\n\n\t\tfor (var type in loadingBarObj) {\n\t\t\tloadingBar[type] = (0, _utils.$)(loadingBarObj[type]);\n\t\t\tloadingBar[type].className += \" \" + _consts.IGNORE_CLASSNAME;\n\t\t}\n\t\tthis._appendLoadingBar();\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._appendLoadingBar = function _appendLoadingBar() {\n\t\tvar loadingBar = this._loadingBar;\n\t\tvar container = this._renderer.container;\n\n\t\tfor (var type in loadingBar) {\n\t\t\tcontainer.appendChild(loadingBar[type]);\n\t\t}\n\t};\n\t/**\n * Checks whether a card element or data is being added.\n * @ko 카드 엘리먼트 추가 또는 데이터 로딩이 진행 중인지 확인한다\n * @return {Boolean} Indicates whether a card element or data is being added 카드 엘리먼트 추가 또는 데이터 로딩 진행 중 여부\n */\n\n\n\tInfiniteGrid.prototype.isProcessing = function isProcessing() {\n\t\treturn this._isProcessing() || this._isLoading();\n\t};\n\n\tInfiniteGrid.prototype._isProcessing = function _isProcessing() {\n\t\treturn (this._status.processingStatus & _consts.PROCESSING) > 0;\n\t};\n\n\tInfiniteGrid.prototype._isLoading = function _isLoading() {\n\t\treturn this._getLoadingStatus() > 0;\n\t};\n\n\tInfiniteGrid.prototype._getLoadingStatus = function _getLoadingStatus() {\n\t\treturn this._status.processingStatus & (_consts.LOADING_APPEND | _consts.LOADING_PREPEND);\n\t};\n\n\tInfiniteGrid.prototype._process = function _process(status) {\n\t\tvar isAdd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tif (isAdd) {\n\t\t\tthis._status.processingStatus |= status;\n\t\t} else {\n\t\t\tthis._status.processingStatus -= this._status.processingStatus & status;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._insert = function _insert(elements, isAppend, groupKey) {\n\t\tif (this._isProcessing() || elements.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tvar key = typeof groupKey === \"undefined\" ? new Date().getTime() + Math.floor(Math.random() * 1000) : groupKey;\n\t\tvar items = _ItemManager2[\"default\"].from((0, _utils.$)(elements, true), this.options.itemSelector, {\n\t\t\tisAppend: isAppend,\n\t\t\tgroupKey: key\n\t\t});\n\n\t\tif (!items.length) {\n\t\t\treturn;\n\t\t}\n\t\tthis._postLayout(_consts.NO_CACHE, items, isAppend, _consts.NO_TRUSTED);\n\t};\n\t// add items, and remove items for recycling\n\n\n\tInfiniteGrid.prototype._recycle = function _recycle(isAppend) {\n\t\tvar remove = [];\n\n\t\tif (this._status.startCursor !== this._status.endCursor) {\n\t\t\tfor (var i = this._status.startCursor; i <= this._status.endCursor; i++) {\n\t\t\t\tremove.push(this._isVisible(i));\n\t\t\t}\n\t\t}\n\t\tvar start = remove.indexOf(isAppend ? 1 : -1);\n\t\tvar end = remove.lastIndexOf(isAppend ? 1 : -1);\n\t\tvar visible = remove.indexOf(0);\n\n\t\tif (visible === -1 || start === -1 || end === -1) {\n\t\t\treturn;\n\t\t}\n\n\t\tstart = this._status.startCursor + (isAppend ? 0 : start);\n\t\tend = isAppend ? this._status.startCursor + end : this._status.endCursor;\n\t\t_DOMRenderer2[\"default\"].removeItems(this._items.pluck(\"items\", start, end));\n\t\tif (isAppend) {\n\t\t\tthis._status.startCursor = end + 1;\n\t\t} else {\n\t\t\tthis._status.endCursor = start - 1;\n\t\t}\n\t};\n\t/**\n * Returns the element of loading bar.\n * @ko 로딩 바의 element를 반환한다.\n * @param {Boolean} [isAppend=currentLoadingBar|true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.\n * @return {Element} The element of loading bar. 로딩 바의 element\n */\n\n\n\tInfiniteGrid.prototype.getLoadingBar = function getLoadingBar() {\n\t\tvar isAppend = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._getLoadingStatus() !== _consts.LOADING_PREPEND;\n\n\t\treturn this._loadingBar[isAppend ? \"append\" : \"prepend\"];\n\t};\n\t/**\n * Start loading for append/prepend during loading data.\n * @ko 데이터가 로딩되는 동안 append/prepend하길 위해 로딩을 시작한다.\n * @param {Boolean} [isAppend=true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.\n * @param {Object} [userStyle = {display: \"block\"}] custom style to apply to this loading bar for start. 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일 \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.startLoading = function startLoading(isAppend) {\n\t\tvar userStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { display: \"block\" };\n\n\t\tif (this._isLoading()) {\n\t\t\treturn this;\n\t\t}\n\t\tvar type = isAppend ? \"append\" : \"prepend\";\n\n\t\tthis._process(isAppend ? _consts.LOADING_APPEND : _consts.LOADING_PREPEND);\n\t\tif (!this._loadingBar[type]) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._renderLoading(userStyle);\n\t\tthis._status.loadingStyle = userStyle;\n\t\tif (!isAppend) {\n\t\t\tthis._fit(\"before\");\n\t\t} else {\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") + this._status.loadingSize);\n\t\t}\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._renderLoading = function _renderLoading() {\n\t\tvar _extends2;\n\n\t\tvar userStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._status.loadingStyle;\n\n\t\tif (!this._isLoading()) {\n\t\t\treturn;\n\t\t}\n\t\tvar isAppend = this._getLoadingStatus() === _consts.LOADING_APPEND;\n\t\tvar el = this._loadingBar[isAppend ? \"append\" : \"prepend\"];\n\n\t\tif (!el) {\n\t\t\treturn;\n\t\t}\n\t\tthis._status.loadingSize = this._isVertical ? (0, _utils.innerHeight)(el) : (0, _utils.innerWidth)(el);\n\t\tvar pos = isAppend ? this._getEdgeValue(\"end\") : this._getEdgeValue(\"start\") - this._status.loadingSize;\n\t\tvar style = _extends((_extends2 = {\n\t\t\tposition: \"absolute\"\n\t\t}, _extends2[this._isVertical ? \"top\" : \"left\"] = pos + \"px\", _extends2), userStyle);\n\n\t\tfor (var property in style) {\n\t\t\tel.style[property] = style[property];\n\t\t}\n\t};\n\t/**\n * End loading after startLoading() for append/prepend\n * @ko append/prepend하길 위해 startLoading() 호출해선 걸었던 로딩을 끝낸다.\n * @param {Object} [userStyle = {display: \"none\"}] custom style to apply to this loading bar for end 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일 \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.endLoading = function endLoading() {\n\t\tvar _extends3;\n\n\t\tvar userStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { display: \"none\" };\n\n\t\tif (!this._isLoading()) {\n\t\t\treturn this;\n\t\t}\n\t\tvar isAppend = this._getLoadingStatus() === _consts.LOADING_APPEND;\n\t\tvar type = isAppend ? \"append\" : \"prepend\";\n\t\tvar el = this._loadingBar[type];\n\t\tvar size = this._status.loadingSize;\n\n\t\tthis._process(_consts.LOADING_APPEND | _consts.LOADING_PREPEND, false);\n\t\tthis._status.loadingSize = 0;\n\t\tthis._status.loadingStyle = {};\n\t\tif (!el) {\n\t\t\treturn this;\n\t\t}\n\t\tvar style = _extends((_extends3 = {}, _extends3[this._isVertical ? \"top\" : \"left\"] = -size + \"px\", _extends3), userStyle);\n\n\t\tfor (var property in style) {\n\t\t\tel.style[property] = style[property];\n\t\t}\n\t\tif (!isAppend) {\n\t\t\tthis._renderer.scrollBy(-size);\n\t\t\tthis._watcher.setScrollPos();\n\t\t\tthis._items.fit(size, this._isVertical);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\"));\n\t\t}\n\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\"));\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._postLayout = function _postLayout(fromCache, items, isAppend, isTrusted) {\n\t\tvar _this3 = this;\n\n\t\tvar outline = this._items.getOutline(isAppend ? this._status.endCursor : this._status.startCursor, isAppend ? \"end\" : \"start\");\n\n\t\tvar fromRelayout = false;\n\n\t\tif (fromCache) {\n\t\t\tvar cacheOutline = this._items.getOutline(isAppend ? this._status.endCursor + 1 : this._status.startCursor - 1, isAppend ? \"start\" : \"end\");\n\n\t\t\tfromRelayout = outline.length === cacheOutline.length ? !outline.every(function (v, index) {\n\t\t\t\treturn v === cacheOutline[index];\n\t\t\t}) : true;\n\n\t\t\tif (!fromRelayout) {\n\t\t\t\tthis._renderer.createAndInsert(items, isAppend);\n\t\t\t\tthis._updateCursor(isAppend);\n\t\t\t\tthis._onLayoutComplete(items, isAppend, isTrusted);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\t\tthis._process(_consts.PROCESSING);\n\t\tvar method = isAppend ? \"append\" : \"prepend\";\n\n\t\tfromCache && _DOMRenderer2[\"default\"].createElements(items);\n\t\tthis._renderer[method](items);\n\t\t// check image sizes after elements are attated on DOM\n\t\t_ImageLoaded2[\"default\"].check(items.map(function (item) {\n\t\t\treturn item.el;\n\t\t}), function () {\n\t\t\tvar layouted = _this3._layout[method](_this3._renderer.updateSize(items), outline);\n\n\t\t\tif (fromCache) {\n\t\t\t\t_this3._setItems(layouted);\n\t\t\t} else {\n\t\t\t\t_this3._insertItems(layouted, isAppend);\n\t\t\t}\n\t\t\t_this3._updateCursor(isAppend);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(layouted.items);\n\t\t\t_this3._onLayoutComplete(layouted.items, isAppend, isTrusted);\n\t\t});\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._isVisible = function _isVisible(index) {\n\t\tvar min = Math.min.apply(Math, this._items.getOutline(index, \"start\"));\n\t\tvar max = Math.max.apply(Math, this._items.getOutline(index, \"end\"));\n\t\tvar pos = this._watcher.getScrollPos();\n\t\tvar viewSize = this._renderer.getViewSize();\n\n\t\tif (pos + viewSize + this.options.threshold < min) {\n\t\t\treturn -1;\n\t\t} else if (pos - this.options.threshold > max) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t};\n\n\tInfiniteGrid.prototype._updateCursor = function _updateCursor(isAppend) {\n\t\tif (this.options.useRecycle) {\n\t\t\tif (isAppend) {\n\t\t\t\tthis._status.endCursor++;\n\t\t\t} else if (this._status.startCursor > 0) {\n\t\t\t\tthis._status.startCursor--;\n\t\t\t} else {\n\t\t\t\tthis._status.endCursor++; // outside prepend\n\t\t\t}\n\t\t\tif (this._status.startCursor < 0) {\n\t\t\t\tthis._status.startCursor = 0;\n\t\t\t}\n\t\t} else {\n\t\t\tthis._status.startCursor = 0;\n\t\t\tthis._status.endCursor = this._items.size() - 1;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._setItems = function _setItems(layouted) {\n\t\tvar groupKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : layouted.items && layouted.items[0].groupKey || 0;\n\n\t\tlayouted.groupKey = groupKey;\n\t\tthis._items.set(layouted, groupKey);\n\t};\n\n\tInfiniteGrid.prototype._insertItems = function _insertItems(layouted, isAppend) {\n\t\tlayouted.groupKey = layouted.items[0].groupKey;\n\t\tthis._items[isAppend ? \"append\" : \"prepend\"](layouted);\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._requestAppend = function _requestAppend() {\n\t\tvar items = this._getNextItems(_consts.APPEND);\n\n\t\tif (this._isProcessing()) {\n\t\t\treturn;\n\t\t}\n\t\tif (items.length) {\n\t\t\tthis._postLayout(_consts.CACHE, items, _consts.APPEND, _consts.TRUSTED);\n\t\t} else {\n\t\t\t/**\n * This event is fired when a card element must be added at the bottom or right of a layout because there is no card to be displayed on screen when a user scrolls near bottom or right.\n * @ko 카드 엘리먼트가 레이아웃의 아래나 오른쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 아래나 오른쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다\n * @event eg.InfiniteGrid#append\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 마지막 그룹의 그룹키\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\t\tthis.trigger(\"append\", {\n\t\t\t\tisTrusted: true,\n\t\t\t\tgroupKey: this.getGroupKeys().pop()\n\t\t\t});\n\t\t}\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._requestPrepend = function _requestPrepend() {\n\t\tvar items = this._getNextItems(_consts.PREPEND);\n\n\t\tif (this._isProcessing()) {\n\t\t\treturn;\n\t\t}\n\t\tif (items.length) {\n\t\t\tthis._postLayout(_consts.CACHE, items, _consts.PREPEND, _consts.TRUSTED);\n\t\t} else {\n\t\t\t/**\n * This event is fired when a card element must be added at the top or left of a layout because there is no card to be displayed on screen when a user scrolls near top or left.\n * @ko 카드가 레이아웃의 위나 왼쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 위나 왼쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다.\n * @event eg.InfiniteGrid#prepend\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 첫번째 그룹의 그룹키\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\t\tthis.trigger(\"prepend\", {\n\t\t\t\tisTrusted: true,\n\t\t\t\tgroupKey: this.getGroupKeys().shift()\n\t\t\t});\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._onCheck = function _onCheck(_ref) {\n\t\tvar isForward = _ref.isForward,\n\t\t scrollPos = _ref.scrollPos,\n\t\t horizontal = _ref.horizontal,\n\t\t orgScrollPos = _ref.orgScrollPos;\n\n\t\t/**\n * This event is fired when the user scrolls.\n * @ko 사용자가 스크롤 할 경우 발생하는 이벤트.\n * @event eg.InfiniteGrid#change\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {Boolean} param.isForward Indicates whether the scroll progression direction is forward or backword. 스크롤 진행방향이 앞쪽으로 진행하는 지, 뒤쪽으로 진행하는지를 나타낸다.\n * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값\n * @param {Boolean} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n * @param {Boolean} options.horizontal Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향\n */\n\t\tthis.trigger(\"change\", {\n\t\t\tisForward: isForward,\n\t\t\thorizontal: horizontal,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: orgScrollPos\n\t\t});\n\t\tvar rect = this._getEdgeOffset(isForward ? \"end\" : \"start\");\n\t\tvar isProcessing = this.isProcessing();\n\n\t\tif (!rect) {\n\t\t\treturn;\n\t\t}\n\t\tvar targetPos = isForward ? rect[horizontal ? \"left\" : \"top\"] - this._renderer.getViewSize() : rect[horizontal ? \"right\" : \"bottom\"];\n\n\t\tif (!isProcessing && isForward) {\n\t\t\tif (scrollPos >= targetPos) {\n\t\t\t\tthis._requestAppend();\n\t\t\t}\n\t\t} else if (scrollPos <= targetPos) {\n\t\t\tthis._fit(\"before\");\n\t\t\tthis._requestPrepend();\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._onLayoutComplete = function _onLayoutComplete(items, isAppend) {\n\t\tvar isTrusted = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\t\tvar useRecycle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.options.useRecycle;\n\n\t\tthis._isLoading() && this._renderLoading();\n\t\t!isAppend && this._fit(\"after\");\n\t\tuseRecycle && this._recycle(isAppend);\n\n\t\tvar size = this._getEdgeValue(\"end\");\n\n\t\t// recycle after _fit beacause prepend and append are occured simultaneously by scroll.\n\t\tthis._updateEdge();\n\n\t\tisAppend && this._renderer.setContainerSize(size + this._status.loadingSize || 0);\n\t\tthis._process(_consts.PROCESSING, false);\n\n\t\tvar scrollPos = this._watcher.getScrollPos();\n\n\t\t/**\n * This event is fired when layout is successfully arranged through a call to the append(), prepend(), or layout() method.\n * @ko 레이아웃 배치가 완료됐을 때 발생하는 이벤트. append() 메서드나 prepend() 메서드, layout() 메서드 호출 후 카드의 배치가 완료됐을 때 발생한다\n * @event eg.InfiniteGrid#layoutComplete\n *\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {Array} param.target Rearranged card elements재배치된 카드 엘리먼트들\n * @param {Boolean} param.isAppend Checks whether the append() method is used to add a card element. It returns true even though the layoutComplete event is fired after the layout() method is called. 카드 엘리먼트가 append() 메서드로 추가됐는지 확인한다. layout() 메서드가 호출된 후 layoutComplete 이벤트가 발생해도 'true'를 반환한다.\n * @param {Boolean} param.isScroll Checks whether scrolling has occurred after the append(), prepend(), ..., etc method is called\n * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값\n * @param {Number} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값\n * @param {Number} param.size The size of container element 컨테이너 엘리먼트의 크기\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\tthis.trigger(\"layoutComplete\", {\n\t\t\ttarget: items.concat(),\n\t\t\tisAppend: isAppend,\n\t\t\tisTrusted: isTrusted,\n\t\t\tisScroll: this._renderer.getViewSize() < this._renderer.getContainerOffset() + size,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: this._watcher.getOrgScrollPos(),\n\t\t\tsize: size\n\t\t});\n\n\t\tif (isAppend && scrollPos >= size) {\n\t\t\tthis._requestAppend();\n\t\t} else if (!isAppend && scrollPos <= this._getEdgeValue(\"start\")) {\n\t\t\tthis._fit(\"before\");\n\t\t\tthis._requestPrepend();\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._reset = function _reset() {\n\t\tthis._status = {\n\t\t\tprocessingStatus: _consts.IDLE,\n\t\t\tloadingSize: 0,\n\t\t\tstartCursor: -1,\n\t\t\tendCursor: -1,\n\t\t\tstart: null,\n\t\t\tend: null\n\t\t};\n\t};\n\t/**\n * Destroys elements, properties, and events used on a grid layout.\n * @ko 그리드 레이아웃에 사용한 엘리먼트와 속성, 이벤트를 해제한다\n */\n\n\n\tInfiniteGrid.prototype.destroy = function destroy() {\n\t\tthis.off();\n\t\tthis._watcher.destroy();\n\t\tthis._reset();\n\t\tthis._items.clear();\n\t\tthis._renderer.destroy();\n\t};\n\n\treturn InfiniteGrid;\n}(_component2[\"default\"]);\n\nInfiniteGrid.VERSION = \"3.0.0-rc\";\n\nexports[\"default\"] = InfiniteGrid;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/InfiniteGrid.js\n// module id = 6\n// module chunks = 0 1","/*!\n * Copyright (c) 2017 NAVER Corp.\r\n * @egjs/component project is licensed under the MIT license\r\n * \r\n * @egjs/component JavaScript library\r\n * http://naver.github.io/egjs/component\r\n * \r\n * @version 2.1.0\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Component\"] = factory();\n\telse\n\t\troot[\"eg\"] = root[\"eg\"] || {}, root[\"eg\"][\"Component\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _Component = __webpack_require__(1);\n\nvar _Component2 = _interopRequireDefault(_Component);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n_Component2[\"default\"].VERSION = \"2.1.0\";\nmodule.exports = _Component2[\"default\"];\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\n/**\n * A class used to manage events and options in a component\n * @ko 컴포넌트의 이벤트와 옵션을 관리할 수 있게 하는 클래스\n * @alias eg.Component\n */\nvar Component = function () {\n\t/**\n * @support {\"ie\": \"7+\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"2.1+ (except 3.x)\"}\n */\n\tfunction Component() {\n\t\t_classCallCheck(this, Component);\n\n\t\tthis._eventHandler = {};\n\t\tthis.options = {};\n\t}\n\t/**\n * Triggers a custom event.\n * @ko 커스텀 이벤트를 발생시킨다\n * @param {String} eventName The name of the custom event to be triggered 발생할 커스텀 이벤트의 이름\n * @param {Object} customEvent Event data to be sent when triggering a custom event 커스텀 이벤트가 발생할 때 전달할 데이터\n * @return {Boolean} Indicates whether the event has occurred. If the stop() method is called by a custom event handler, it will return false and prevent the event from occurring. Ref 이벤트 발생 여부. 커스텀 이벤트 핸들러에서 stop() 메서드를 호출하면 'false'를 반환하고 이벤트 발생을 중단한다. 참고\n * @example\n class Some extends eg.Component {\n some(){\n \tif(this.trigger(\"beforeHi\")){ // When event call to stop return false.\n \tthis.trigger(\"hi\");// fire hi event.\n \t}\n }\n }\n const some = new Some();\n some.on(\"beforeHi\", (e) => {\n if(condition){\n \te.stop(); // When event call to stop, `hi` event not call.\n }\n });\n some.on(\"hi\", (e) => {\n // `currentTarget` is component instance.\n console.log(some === e.currentTarget); // true\n });\n // If you want to more know event design. You can see article.\n // https://github.com/naver/egjs-component/wiki/How-to-make-Component-event-design%3F\n */\n\n\n\tComponent.prototype.trigger = function trigger(eventName) {\n\t\tvar customEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tvar handlerList = this._eventHandler[eventName] || [];\n\t\tvar hasHandlerList = handlerList.length > 0;\n\n\t\tif (!hasHandlerList) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If detach method call in handler in first time then handeler list calls.\n\t\thandlerList = handlerList.concat();\n\n\t\tcustomEvent.eventType = eventName;\n\n\t\tvar isCanceled = false;\n\t\tvar arg = [customEvent];\n\t\tvar i = 0;\n\n\t\tcustomEvent.stop = function () {\n\t\t\tisCanceled = true;\n\t\t};\n\t\tcustomEvent.currentTarget = this;\n\n\t\tfor (var _len = arguments.length, restParam = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n\t\t\trestParam[_key - 2] = arguments[_key];\n\t\t}\n\n\t\tif (restParam.length >= 1) {\n\t\t\targ = arg.concat(restParam);\n\t\t}\n\n\t\tfor (i = 0; handlerList[i]; i++) {\n\t\t\thandlerList[i].apply(this, arg);\n\t\t}\n\n\t\treturn !isCanceled;\n\t};\n\t/**\n * Executed event just one time.\n * @ko 이벤트가 한번만 실행된다.\n * @param {eventName} eventName The name of the event to be attached 등록할 이벤트의 이름\n * @param {Function} handlerToAttach The handler function of the event to be attached 등록할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n alert(\"hi\");\n }\n thing() {\n this.once(\"hi\", this.hi);\n }\n }\n var some = new Some();\n some.thing();\n some.trigger(\"hi\");\n // fire alert(\"hi\");\n some.trigger(\"hi\");\n // Nothing happens\n */\n\n\n\tComponent.prototype.once = function once(eventName, handlerToAttach) {\n\t\tif ((typeof eventName === \"undefined\" ? \"undefined\" : _typeof(eventName)) === \"object\" && typeof handlerToAttach === \"undefined\") {\n\t\t\tvar eventHash = eventName;\n\t\t\tvar i = void 0;\n\n\t\t\tfor (i in eventHash) {\n\t\t\t\tthis.once(i, eventHash[i]);\n\t\t\t}\n\t\t\treturn this;\n\t\t} else if (typeof eventName === \"string\" && typeof handlerToAttach === \"function\") {\n\t\t\tvar self = this;\n\n\t\t\tthis.on(eventName, function listener() {\n\t\t\t\tfor (var _len2 = arguments.length, arg = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t\t\t\t\targ[_key2] = arguments[_key2];\n\t\t\t\t}\n\n\t\t\t\thandlerToAttach.apply(self, arg);\n\t\t\t\tself.off(eventName, listener);\n\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t};\n\n\t/**\n * Checks whether an event has been attached to a component.\n * @ko 컴포넌트에 이벤트가 등록됐는지 확인한다.\n * @param {String} eventName The name of the event to be attached 등록 여부를 확인할 이벤트의 이름\n * @return {Boolean} Indicates whether the event is attached. 이벤트 등록 여부\n * @example\n class Some extends eg.Component {\n some() {\n this.hasOn(\"hi\");// check hi event.\n }\n }\n */\n\n\n\tComponent.prototype.hasOn = function hasOn(eventName) {\n\t\treturn !!this._eventHandler[eventName];\n\t};\n\n\t/**\n * Attaches an event to a component.\n * @ko 컴포넌트에 이벤트를 등록한다.\n * @param {eventName} eventName The name of the event to be attached 등록할 이벤트의 이름\n * @param {Function} handlerToAttach The handler function of the event to be attached 등록할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n console.log(\"hi\");\n }\n some() {\n this.on(\"hi\",this.hi); //attach event\n }\n }\n */\n\n\n\tComponent.prototype.on = function on(eventName, handlerToAttach) {\n\t\tif ((typeof eventName === \"undefined\" ? \"undefined\" : _typeof(eventName)) === \"object\" && typeof handlerToAttach === \"undefined\") {\n\t\t\tvar eventHash = eventName;\n\t\t\tvar name = void 0;\n\n\t\t\tfor (name in eventHash) {\n\t\t\t\tthis.on(name, eventHash[name]);\n\t\t\t}\n\t\t\treturn this;\n\t\t} else if (typeof eventName === \"string\" && typeof handlerToAttach === \"function\") {\n\t\t\tvar handlerList = this._eventHandler[eventName];\n\n\t\t\tif (typeof handlerList === \"undefined\") {\n\t\t\t\tthis._eventHandler[eventName] = [];\n\t\t\t\thandlerList = this._eventHandler[eventName];\n\t\t\t}\n\n\t\t\thandlerList.push(handlerToAttach);\n\t\t}\n\n\t\treturn this;\n\t};\n\t/**\n * Detaches an event from the component.\n * @ko 컴포넌트에 등록된 이벤트를 해제한다\n * @param {eventName} eventName The name of the event to be detached 해제할 이벤트의 이름\n * @param {Function} handlerToDetach The handler function of the event to be detached 해제할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself 컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n console.log(\"hi\");\n }\n some() {\n this.off(\"hi\",this.hi); //detach event\n }\n }\n */\n\n\n\tComponent.prototype.off = function off(eventName, handlerToDetach) {\n\t\t// All event detach.\n\t\tif (typeof eventName === \"undefined\") {\n\t\t\tthis._eventHandler = {};\n\t\t\treturn this;\n\t\t}\n\n\t\t// All handler of specific event detach.\n\t\tif (typeof handlerToDetach === \"undefined\") {\n\t\t\tif (typeof eventName === \"string\") {\n\t\t\t\tthis._eventHandler[eventName] = undefined;\n\t\t\t\treturn this;\n\t\t\t} else {\n\t\t\t\tvar eventHash = eventName;\n\t\t\t\tvar name = void 0;\n\n\t\t\t\tfor (name in eventHash) {\n\t\t\t\t\tthis.off(name, eventHash[name]);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\n\t\t// The handler of specific event detach.\n\t\tvar handlerList = this._eventHandler[eventName];\n\n\t\tif (handlerList) {\n\t\t\tvar k = void 0;\n\t\t\tvar handlerFunction = void 0;\n\n\t\t\tfor (k = 0; (handlerFunction = handlerList[k]) !== undefined; k++) {\n\t\t\t\tif (handlerFunction === handlerToDetach) {\n\t\t\t\t\thandlerList = handlerList.splice(k, 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t};\n\n\treturn Component;\n}();\n\nexports[\"default\"] = Component;\nmodule.exports = exports[\"default\"];\n\n/***/ })\n/******/ ]);\n});\n//# sourceMappingURL=component.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@egjs/component/dist/component.js\n// module id = 7\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"./consts\");\n\nvar _DOMRenderer = require(\"./DOMRenderer\");\n\nvar _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ItemManager = function () {\n\tItemManager.from = function from(elements, selector, _ref) {\n\t\tvar groupKey = _ref.groupKey,\n\t\t isAppend = _ref.isAppend;\n\n\t\tvar filted = ItemManager.selectItems((0, _utils.$)(elements, _consts.MULTI), selector);\n\n\t\t// Item Structure\n\t\treturn (0, _utils.toArray)(filted).map(function (el) {\n\t\t\treturn {\n\t\t\t\tel: el,\n\t\t\t\tgroupKey: groupKey,\n\t\t\t\tcontent: el.outerHTML\n\t\t\t};\n\t\t});\n\t};\n\n\tItemManager.selectItems = function selectItems(elements, selector) {\n\t\treturn elements.filter(function (v) {\n\t\t\tvar classNames = v.className.split(\" \");\n\n\t\t\tif (classNames.some(function (c) {\n\t\t\t\treturn c === _consts.IGNORE_CLASSNAME;\n\t\t\t})) {\n\t\t\t\treturn false;\n\t\t\t} else if (selector === \"*\") {\n\t\t\t\treturn v;\n\t\t\t} else {\n\t\t\t\treturn classNames.some(function (c) {\n\t\t\t\t\treturn c === selector;\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\tItemManager.pluck = function pluck(data, property) {\n\t\treturn data.reduce(function (acc, v) {\n\t\t\treturn acc.concat(v[property]);\n\t\t}, []);\n\t};\n\n\tfunction ItemManager() {\n\t\t_classCallCheck(this, ItemManager);\n\n\t\tthis.clear();\n\t}\n\n\tItemManager.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\t_data: this._data.map(function (data) {\n\t\t\t\tvar items = data.items.map(function (item) {\n\t\t\t\t\tvar item2 = _extends({}, item);\n\n\t\t\t\t\tdelete item2.el;\n\t\t\t\t\treturn item2;\n\t\t\t\t});\n\t\t\t\tvar data2 = _extends({}, data);\n\n\t\t\t\tdata2.items = items;\n\t\t\t\treturn data2;\n\t\t\t})\n\t\t};\n\t};\n\n\tItemManager.prototype.setStatus = function setStatus(status, start, end) {\n\t\tvar data = status._data;\n\n\t\tfor (var i = start; i <= end; i++) {\n\t\t\tdata[i].items = _DOMRenderer2[\"default\"].createElements(data[i].items);\n\t\t}\n\t\tthis.set(data);\n\t};\n\n\tItemManager.prototype.size = function size() {\n\t\treturn this._data.length;\n\t};\n\n\tItemManager.prototype.fit = function fit(base, isVertical) {\n\t\tif (!this._data.length) {\n\t\t\treturn;\n\t\t}\n\t\tvar property = isVertical ? \"top\" : \"left\";\n\n\t\tif (base !== 0) {\n\t\t\tthis._data = this._data.map(function (v) {\n\t\t\t\tv.items = v.items.map(function (item) {\n\t\t\t\t\titem.rect[property] -= base;\n\t\t\t\t\treturn item;\n\t\t\t\t});\n\t\t\t\tv.outlines.start = v.outlines.start.map(function (start) {\n\t\t\t\t\treturn start - base;\n\t\t\t\t});\n\t\t\t\tv.outlines.end = v.outlines.end.map(function (end) {\n\t\t\t\t\treturn end - base;\n\t\t\t\t});\n\t\t\t\treturn v;\n\t\t\t});\n\t\t}\n\t};\n\n\tItemManager.prototype.pluck = function pluck(property, start, end) {\n\t\tif (typeof start !== \"undefined\") {\n\t\t\tif (typeof end !== \"undefined\") {\n\t\t\t\treturn ItemManager.pluck(this._data.slice(start, end + 1), property);\n\t\t\t} else {\n\t\t\t\treturn ItemManager.pluck(this._data.slice(start, start + 1), property);\n\t\t\t}\n\t\t} else {\n\t\t\treturn ItemManager.pluck(this._data, property);\n\t\t}\n\t};\n\n\tItemManager.prototype.getOutline = function getOutline(index, property) {\n\t\tif (this._data.length) {\n\t\t\treturn this._data[index].outlines[property];\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t};\n\n\tItemManager.prototype.getEdgeIndex = function getEdgeIndex(cursor, start, end) {\n\t\tvar prop = cursor === \"start\" ? \"min\" : \"max\";\n\t\tvar index = -1;\n\t\tvar targetValue = cursor === \"start\" ? Infinity : -Infinity;\n\n\t\tfor (var i = start; i <= end; i++) {\n\t\t\tvar value = Math[prop].apply(Math, this.getOutline(i, cursor));\n\n\t\t\tif (cursor === \"start\" && targetValue > value || cursor === \"end\" && targetValue < value) {\n\t\t\t\ttargetValue = value;\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t};\n\n\tItemManager.prototype.getEdge = function getEdge(cursor, start, end) {\n\t\tvar dataIdx = this.getEdgeIndex(cursor, start, end);\n\t\tvar items = this.pluck(\"items\", dataIdx);\n\n\t\tif (items.length) {\n\t\t\tvar itemIdx = this.getOutline(dataIdx, cursor + \"Index\");\n\n\t\t\treturn items.length > itemIdx ? items[itemIdx] : null;\n\t\t}\n\t\treturn null;\n\t};\n\n\tItemManager.prototype.getEdgeValue = function getEdgeValue(cursor, start, end) {\n\t\tvar outlines = this.pluck(\"outlines\", this.getEdgeIndex(cursor, start, end)).reduce(function (acc, v) {\n\t\t\treturn acc.concat(v[cursor]);\n\t\t}, []);\n\n\t\treturn outlines.length ? Math[cursor === \"start\" ? \"min\" : \"max\"].apply(Math, outlines) : 0;\n\t};\n\n\tItemManager.prototype.append = function append(layouted) {\n\t\tthis._data.push(layouted);\n\t\treturn layouted.items;\n\t};\n\n\tItemManager.prototype.prepend = function prepend(layouted) {\n\t\tthis._data.unshift(layouted);\n\t\treturn layouted.items;\n\t};\n\n\tItemManager.prototype.clear = function clear() {\n\t\tthis._data = [];\n\t};\n\n\tItemManager.prototype.remove = function remove(element, start, end) {\n\t\tvar items = null;\n\t\tvar key = element.getAttribute(_consts.GROUPKEY_ATT);\n\t\tvar data = this.get(start, end).filter(function (v) {\n\t\t\treturn String(v.groupKey) === key;\n\t\t});\n\n\t\tif (!data.length) {\n\t\t\treturn items;\n\t\t}\n\t\tdata = data[0];\n\n\t\tvar len = data.items.length;\n\t\tvar idx = -1;\n\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tif (data.items[i].el === element) {\n\t\t\t\tidx = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (~idx) {\n\t\t\t// remove item information\n\t\t\tdata.items.splice(idx, 1);\n\t\t\tthis.set(data, key);\n\t\t\titems = data.items;\n\t\t}\n\t\treturn items;\n\t};\n\n\tItemManager.prototype.get = function get(start, end) {\n\t\tif (typeof start !== \"undefined\") {\n\t\t\tif (typeof end !== \"undefined\") {\n\t\t\t\treturn this._data.slice(start, end + 1);\n\t\t\t} else {\n\t\t\t\treturn this._data.slice(start, start + 1);\n\t\t\t}\n\t\t} else {\n\t\t\treturn this._data.concat();\n\t\t}\n\t};\n\n\tItemManager.prototype.set = function set(data, key) {\n\t\tif (typeof key !== \"undefined\" && !Array.isArray(data)) {\n\t\t\tvar len = this._data.length;\n\t\t\tvar idx = -1;\n\n\t\t\tfor (var i = 0; i < len; i++) {\n\t\t\t\tif (this._data[i].groupKey === key) {\n\t\t\t\t\tidx = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t~idx && (this._data[idx] = data);\n\t\t} else {\n\t\t\tthis._data = data.concat();\n\t\t}\n\t};\n\n\treturn ItemManager;\n}();\n\nexports[\"default\"] = ItemManager;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/ItemManager.js\n// module id = 8\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ImageLoaded = function () {\n\tfunction ImageLoaded() {\n\t\t_classCallCheck(this, ImageLoaded);\n\t}\n\n\tImageLoaded.waitImageLoaded = function waitImageLoaded(needCheck, callback) {\n\t\tvar checkCount = needCheck.length;\n\t\tvar checkImage = function checkImage() {\n\t\t\tcheckCount--;\n\t\t\tcheckCount <= 0 && callback && callback();\n\t\t};\n\t\tvar onCheck = function onCheck(e) {\n\t\t\t(0, _utils.removeEvent)(e.target || e.srcElement, \"load\", onCheck);\n\t\t\t(0, _utils.removeEvent)(e.target || e.srcElement, \"error\", onCheck);\n\t\t\tcheckImage();\n\t\t};\n\n\t\t// workaround for IE\n\t\t_consts.IS_IE && needCheck.forEach(function (v) {\n\t\t\treturn v.setAttribute(\"src\", v.getAttribute(\"src\"));\n\t\t});\n\t\tneedCheck.forEach(function (v) {\n\t\t\tif (v.complete) {\n\t\t\t\tcheckImage();\n\t\t\t} else {\n\t\t\t\t(0, _utils.addEvent)(v, \"load\", onCheck);\n\t\t\t\t(0, _utils.addEvent)(v, \"error\", onCheck);\n\t\t\t}\n\t\t});\n\t};\n\n\tImageLoaded.checkImageLoaded = function checkImageLoaded(el) {\n\t\tif (el.tagName === \"IMG\") {\n\t\t\treturn !el.complete ? [el] : [];\n\t\t} else {\n\t\t\treturn (0, _utils.toArray)(el.querySelectorAll(\"img\")).filter(function (v) {\n\t\t\t\tif (v.nodeType && [1, 9, 11].indexOf(v.nodeType) !== -1) {\n\t\t\t\t\treturn !v.complete;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\tImageLoaded.check = function check(elements, callback) {\n\t\tvar _this = this;\n\n\t\tvar needCheck = elements.reduce(function (acc, v) {\n\t\t\treturn acc.concat(_this.checkImageLoaded(v));\n\t\t}, []);\n\n\t\tif (needCheck.length > 0) {\n\t\t\tImageLoaded.waitImageLoaded(needCheck, callback);\n\t\t} else {\n\t\t\t// convert to async\n\t\t\tsetTimeout(function () {\n\t\t\t\tcallback && callback();\n\t\t\t}, 0);\n\t\t}\n\t};\n\n\treturn ImageLoaded;\n}();\n\nexports[\"default\"] = ImageLoaded;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/ImageLoaded.js\n// module id = 9\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Watcher = function () {\n\tfunction Watcher(renderer, callback) {\n\t\t_classCallCheck(this, Watcher);\n\n\t\t_extends(this._callback = {\n\t\t\tlayout: null,\n\t\t\tcheck: null\n\t\t}, callback);\n\t\tthis._timer = {\n\t\t\tresize: null\n\t\t\t// doubleCheck: null,\n\t\t\t// doubleCheckCount: RETRY,\n\t\t};\n\t\tthis.reset();\n\t\tthis._renderer = renderer;\n\t\tthis._onCheck = this._onCheck.bind(this);\n\t\tthis._onResize = this._onResize.bind(this);\n\t\tthis.attachEvent();\n\t\tthis.setScrollPos();\n\t}\n\n\tWatcher.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\t_prevPos: this._prevPos,\n\t\t\tscrollPos: this.getOrgScrollPos()\n\t\t};\n\t};\n\n\tWatcher.prototype.setStatus = function setStatus(status) {\n\t\tvar applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tthis._prevPos = status._prevPos;\n\t\tapplyScrollPos && this.scrollTo(status.scrollPos);\n\t};\n\n\tWatcher.prototype.scrollTo = function scrollTo(pos) {\n\t\tvar arrPos = this._renderer.options.isVertical ? [0, pos] : [pos, 0];\n\n\t\t_utils.scrollTo.apply(undefined, [this._renderer.view].concat(arrPos));\n\t};\n\n\tWatcher.prototype.getScrollPos = function getScrollPos() {\n\t\treturn this._prevPos;\n\t};\n\n\tWatcher.prototype.setScrollPos = function setScrollPos(pos) {\n\t\tvar rawPos = pos;\n\n\t\tif (typeof pos === \"undefined\") {\n\t\t\trawPos = this.getOrgScrollPos();\n\t\t}\n\t\tthis._prevPos = rawPos - this._renderer.getContainerOffset();\n\t};\n\n\tWatcher.prototype.attachEvent = function attachEvent() {\n\t\t(0, _utils.addEvent)(this._renderer.view, \"scroll\", this._onCheck);\n\t\t(0, _utils.addEvent)(window, \"resize\", this._onResize);\n\t};\n\n\tWatcher.prototype.getOrgScrollPos = function getOrgScrollPos() {\n\t\treturn (0, _utils.scroll)(this._renderer.view, this._renderer.options.isVertical);\n\t};\n\n\tWatcher.prototype.reset = function reset() {\n\t\tthis._prevPos = null;\n\t};\n\n\tWatcher.prototype._onCheck = function _onCheck() {\n\t\tvar prevPos = this.getScrollPos();\n\t\tvar orgScrollPos = this.getOrgScrollPos();\n\n\t\tthis.setScrollPos(orgScrollPos);\n\t\tvar scrollPos = this.getScrollPos();\n\n\t\tif (prevPos === null || _consts.IS_IOS && orgScrollPos === 0 || prevPos === scrollPos) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._callback.check && this._callback.check({\n\t\t\tisForward: prevPos < scrollPos,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: orgScrollPos,\n\t\t\thorizontal: !this._renderer.options.isVertical\n\t\t});\n\t};\n\n\tWatcher.prototype._onResize = function _onResize() {\n\t\tvar _this = this;\n\n\t\tif (this._timer.resize) {\n\t\t\tclearTimeout(this._timer.resize);\n\t\t}\n\t\tthis._timer.resize = setTimeout(function () {\n\t\t\t_this._renderer.isNeededResize() && _this._callback.layout && _this._callback.layout();\n\t\t\t_this._timer.resize = null;\n\t\t\t_this.reset();\n\t\t}, 100);\n\t};\n\n\tWatcher.prototype.detachEvent = function detachEvent() {\n\t\t(0, _utils.removeEvent)(window, \"resize\", this._onResize);\n\t};\n\n\tWatcher.prototype.destroy = function destroy() {\n\t\tthis.detachEvent();\n\t\tthis.reset();\n\t};\n\n\treturn Watcher;\n}();\n\nexports[\"default\"] = Watcher;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Watcher.js\n// module id = 10\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// ALIGN\nvar START = _consts.ALIGN.START,\n CENTER = _consts.ALIGN.CENTER,\n END = _consts.ALIGN.END,\n JUSTIFY = _consts.ALIGN.JUSTIFY;\n\n/**\n * @classdesc GridLayout is a layout in which images with the same width are arranged in a staggered arrangement, like a stack of bricks. Adjust the width of all images to the same size, find the lowest height column, and insert a new image.\n * @ko GridLayout는 벽돌을 쌓아 올린 모양처럼 동일한 너비를 가진 이미지가 엇갈려 배열되는 레이아웃이다. 모든 이미지의 너비를 동일한 크기로 조정하고, 가장 높이가 낮은 열을 찾아 새로운 이미지를 삽입한다. 따라서 배치된 이미지 사이에 빈 공간이 생기지는 않지만 배치된 레이아웃의 아래쪽은 울퉁불퉁해진다.\n * @class eg.InfiniteGrid.GridLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.GridLayout module eg.InfiniteGrid.GridLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.align=START] Align of the position of the items (START, CENTER, END, JUSTIFY) 아이템들의 위치의 정렬 (START, CENTER, END, JUSTIFY)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @example\n```\n\n```\n **/\n\nvar GridLayout = function () {\n\tfunction GridLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, GridLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\talign: START,\n\t\t\titemSize: 0\n\t\t}, options);\n\t\tthis._size = 0;\n\t\tthis._columnSize = 0;\n\t\tthis._columnLength = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tGridLayout.prototype.getPoints = function getPoints(outlines) {\n\t\tvar pos = this.options.horizontal ? \"left\" : \"top\";\n\n\t\treturn outlines.map(function (outline) {\n\t\t\treturn outline[pos];\n\t\t});\n\t};\n\n\tGridLayout.prototype.checkColumn = function checkColumn(item) {\n\t\tvar margin = this.options.margin;\n\t\tvar sizeName = this.options.horizontal ? \"height\" : \"width\";\n\t\tvar columnSize = this.options.itemSize || item && item.size[sizeName] || 0;\n\n\t\tthis._columnSize = columnSize;\n\t\tif (!columnSize) {\n\t\t\tthis._columnLength = 1;\n\t\t\treturn;\n\t\t}\n\t\tthis._columnLength = Math.max(parseInt((this._size + margin) / (columnSize + margin), 10), 1);\n\t};\n\n\tGridLayout.prototype._layout = function _layout(items, outline, isAppend) {\n\t\tvar length = items.length;\n\t\tvar margin = this.options.margin;\n\t\tvar align = this.options.align;\n\t\tvar style = this._style;\n\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar columnSize = this._columnSize;\n\t\tvar columnLength = this._columnLength;\n\n\t\tvar size = this._size;\n\t\tvar viewDist = size - (columnSize + margin) * columnLength + margin;\n\n\t\tvar pointCaculateName = isAppend ? \"min\" : \"max\";\n\t\tvar startOutline = outline.slice();\n\t\tvar endOutline = outline.slice();\n\t\tvar startIndex = 0;\n\t\tvar endIndex = -1;\n\t\tvar endPos = -1;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar _item$rect;\n\n\t\t\tvar point = Math[pointCaculateName].apply(Math, endOutline) || 0;\n\t\t\tvar index = endOutline.indexOf(point);\n\t\t\tvar item = items[isAppend ? i : length - 1 - i];\n\t\t\tvar size1 = item.size[size1Name];\n\t\t\tvar size2 = item.size[size2Name];\n\t\t\tvar pos1 = isAppend ? point : point - margin - size1;\n\t\t\tvar endPos1 = pos1 + size1 + margin;\n\n\t\t\tif (index === -1) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\tvar pos2 = (columnSize + margin) * index;\n\n\t\t\t// ALIGN\n\t\t\tif (align === CENTER) {\n\t\t\t\tpos2 += viewDist / 2;\n\t\t\t} else if (align === END) {\n\t\t\t\tpos2 += viewDist + columnSize - size2;\n\t\t\t} else if (align === JUSTIFY) {\n\t\t\t\tif (columnLength <= 1) {\n\t\t\t\t\tpos2 += viewDist / 2;\n\t\t\t\t} else {\n\t\t\t\t\tpos2 = (size - columnSize) / (columnLength - 1) * index;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// tetris\n\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect);\n\t\t\titem.column = index;\n\t\t\tendOutline[index] = isAppend ? endPos1 : pos1;\n\t\t\tif (endIndex === -1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tendPos = endPos1;\n\t\t\t} else if (endPos < endPos1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tendPos = endPos1;\n\t\t\t}\n\t\t}\n\t\tif (!isAppend) {\n\t\t\titems.sort(function (a, b) {\n\t\t\t\tvar item1pos1 = a.rect[pos1Name];\n\t\t\t\tvar item1pos2 = a.rect[pos2Name];\n\t\t\t\tvar item2pos1 = b.rect[pos1Name];\n\t\t\t\tvar item2pos2 = b.rect[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\tendIndex = length - 1;\n\t\t}\n\t\t// if append items, startOutline is low, endOutline is high\n\t\t// if prepend items, startOutline is high, endOutline is low\n\t\treturn {\n\t\t\tstart: isAppend ? startOutline : endOutline,\n\t\t\tend: isAppend ? endOutline : startOutline,\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tGridLayout.prototype._insert = function _insert() {\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar type = arguments[2];\n\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\tvar startOutline = outline;\n\n\t\tif (!this._columnLength) {\n\t\t\tthis.checkColumn(items[0]);\n\t\t}\n\t\tif (outline.length !== this._columnLength) {\n\t\t\tstartOutline = (0, _utils.fill)(this._columnLength, outline.length === 0 ? 0 : Math[type === _consts.APPEND ? \"min\" : \"max\"].apply(Math, outline) || 0);\n\t\t}\n\n\t\tvar result = this._layout(clone, startOutline, type);\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: result\n\t\t};\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.layout = function layout() {\n\t\tvar _this = this;\n\n\t\tvar groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\tvar firstItem = groups.length && groups[0].items.length && groups[0].items[0] || 0;\n\n\t\tthis.checkColumn(firstItem);\n\n\t\t// if outlines' length and columns' length are now same, re-caculate outlines.\n\t\tvar startOutline = void 0;\n\n\t\tif (outline.length !== this._columnLength) {\n\t\t\tvar pos = outline.length === 0 ? 0 : Math.min.apply(Math, outline);\n\n\t\t\t// re-layout items.\n\t\t\tstartOutline = (0, _utils.fill)(this._columnLength, pos);\n\t\t} else {\n\t\t\tstartOutline = outline.slice();\n\t\t}\n\t\tgroups.forEach(function (group) {\n\t\t\tvar items = group.items;\n\t\t\tvar result = _this._layout(items, startOutline, _consts.APPEND);\n\n\t\t\tgroup.outlines = result;\n\t\t\tstartOutline = result.end;\n\t\t});\n\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.GridLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tGridLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\n\treturn GridLayout;\n}();\n\nexports[\"default\"] = GridLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/GridLayout.js\n// module id = 11\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _FrameLayout2 = require(\"./FrameLayout\");\n\nvar _FrameLayout3 = _interopRequireDefault(_FrameLayout2);\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction makeShapeOutline(outline, itemSize, columnLength, isAppend) {\n\tvar point = Math[isAppend ? \"min\" : \"max\"].apply(Math, outline) || 0;\n\n\tif (outline.length !== columnLength) {\n\t\treturn (0, _utils.fill)(columnLength, 0);\n\t}\n\treturn outline.map(function (l) {\n\t\treturn parseInt((l - point) / itemSize, 10);\n\t});\n}\nfunction getColumn(item) {\n\tif (item.column) {\n\t\treturn item.column;\n\t}\n\tvar column = 0;\n\n\tif (item.el) {\n\t\tvar dataset = item.el.dataset;\n\n\t\tif (dataset) {\n\t\t\tcolumn = dataset.column || 1;\n\t\t} else {\n\t\t\tcolumn = item.el.getAttribute(\"column\") || 1;\n\t\t}\n\t} else {\n\t\tcolumn = 1;\n\t}\n\titem.column = column;\n\treturn column;\n}\n\n/**\n * @classdesc FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.\n * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.\n * @class eg.InfiniteGrid.SquareLayout\n * @extends eg.InfiniteGrid.FrameLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.SquareLayout module eg.InfiniteGrid.SquareLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @example\n```\n\n```\n **/\n\nvar SquareLayout = function (_FrameLayout) {\n\t_inherits(SquareLayout, _FrameLayout);\n\n\tfunction SquareLayout() {\n\t\t_classCallCheck(this, SquareLayout);\n\n\t\treturn _possibleConstructorReturn(this, _FrameLayout.apply(this, arguments));\n\t}\n\n\tSquareLayout.prototype._checkItemSize = function _checkItemSize() {\n\t\tvar column = this.options.column;\n\n\t\tif (!column) {\n\t\t\t_FrameLayout.prototype._checkItemSize.call(this);\n\t\t\treturn;\n\t\t}\n\t\tvar margin = this.options.margin;\n\n\t\t// if itemSize is not in options, caculate itemSize from size.\n\t\tthis._itemSize = (this._size + margin) / column - margin;\n\t};\n\n\tSquareLayout.prototype._layout = function _layout(items) {\n\t\tvar _shapes;\n\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar itemSize = this._getItemSize();\n\t\tvar margin = this.options.margin;\n\t\tvar columnLength = this.options.column || parseInt((this._size + margin) / (itemSize + margin), 10) || 1;\n\t\tvar length = items.length;\n\t\tvar endOutline = makeShapeOutline(outline, itemSize, columnLength, isAppend);\n\t\tvar pointCaculateName = isAppend ? \"min\" : \"max\";\n\t\tvar shapes = [];\n\t\tvar sign = isAppend ? 1 : -1;\n\t\tvar style = this._style;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar _shapes$push;\n\n\t\t\tvar point = Math[pointCaculateName].apply(Math, endOutline);\n\t\t\tvar index = (0, _utils.indexOf)(endOutline, point, !isAppend);\n\t\t\tvar item = items[i];\n\t\t\tvar columnWidth = item.columnWidth;\n\t\t\tvar column = columnWidth && columnWidth[0] === columnLength && columnWidth[1] || getColumn(item);\n\t\t\tvar columnCount = 1;\n\n\t\t\tif (column > 1) {\n\t\t\t\tfor (var j = 1; j < column && (isAppend && index + j < columnLength || !isAppend && index - j >= 0); ++j) {\n\t\t\t\t\tif (isAppend && endOutline[index + sign * j] <= point || !isAppend && endOutline[index + sign * j] >= point) {\n\t\t\t\t\t\t++columnCount;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (!isAppend) {\n\t\t\t\t\tindex -= columnCount - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\titem.columnWidth = [columnLength, columnCount];\n\t\t\tshapes.push((_shapes$push = {\n\t\t\t\twidth: columnCount,\n\t\t\t\theight: columnCount\n\t\t\t}, _shapes$push[pos1Name] = point - (!isAppend ? columnCount : 0), _shapes$push[pos2Name] = index, _shapes$push.index = i, _shapes$push));\n\t\t\tfor (var _j = 0; _j < columnCount; ++_j) {\n\t\t\t\tendOutline[index + _j] = point + sign * columnCount;\n\t\t\t}\n\t\t}\n\t\tthis._shapes = (_shapes = {\n\t\t\tshapes: shapes\n\t\t}, _shapes[style.size2] = columnLength, _shapes);\n\n\t\tvar result = _FrameLayout.prototype._layout.call(this, items, outline, isAppend);\n\n\t\tif (!isAppend) {\n\t\t\tvar lastItem = items[items.length - 1];\n\n\t\t\tshapes.sort(function (shape1, shape2) {\n\t\t\t\tvar item1pos1 = shape1[pos1Name];\n\t\t\t\tvar item1pos2 = shape1[pos2Name];\n\t\t\t\tvar item2pos1 = shape2[pos1Name];\n\t\t\t\tvar item2pos2 = shape2[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\titems.sort(function (a, b) {\n\t\t\t\tvar item1pos1 = a.rect[pos1Name];\n\t\t\t\tvar item1pos2 = a.rect[pos2Name];\n\t\t\t\tvar item2pos1 = b.rect[pos1Name];\n\t\t\t\tvar item2pos2 = b.rect[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\tresult.startIndex = 0;\n\t\t\tresult.endIndex = items.indexOf(lastItem);\n\t\t}\n\t\treturn result;\n\t};\n\n\treturn SquareLayout;\n}(_FrameLayout3[\"default\"]);\n\nexports[\"default\"] = SquareLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/SquareLayout.js\n// module id = 12\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _BoxModel = require(\"./lib/BoxModel.js\");\n\nvar _BoxModel2 = _interopRequireDefault(_BoxModel);\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getCost(originLength, length) {\n\tvar cost = originLength / length;\n\n\tif (cost < 1) {\n\t\tcost = 1 / cost;\n\t}\n\n\treturn cost - 1;\n}\nfunction fitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical) {\n\titem.setHeight(itemFitSize.height);\n\titem.setWidth(itemFitSize.width);\n\tbestFitArea.setHeight(containerFitSize.height);\n\tbestFitArea.setWidth(containerFitSize.width);\n\n\tif (layoutVertical) {\n\t\titem.setTop(bestFitArea.getTop() + bestFitArea.getHeight());\n\t\titem.setLeft(bestFitArea.getLeft());\n\t} else {\n\t\titem.setLeft(bestFitArea.getLeft() + bestFitArea.getWidth());\n\t\titem.setTop(bestFitArea.getTop());\n\t}\n}\n\n/**\n * @classdesc PackingLayout show important images bigger without sacrificing the inherent size of the image. Rows and columns are separated so that images are dynamically placed within the horizontal and vertical space rather than arranged in an orderly fashion.\n * @ko PackingLayout은 이미지의 본래 크기에 따른 비중을 해치지 않으면서 중요한 이미지는 더 크게 보여 준다. 행과 열이 구분돼 이미지를 정돈되게 배치하는 대신 가로세로 일정 공간 내에서 동적으로 이미지를 배치한다.\n * @class eg.InfiniteGrid.PackingLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.PackingLayout module eg.InfiniteGrid.PackingLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.aspectRatio=1] The aspect ratio of the group 그룹의 가로 세로 비 \n * @param {Boolean} [options.sizeWeight=1] The size weight when placing an image 이미지를 배치할 때 사이즈 가중치 \n * @param {Boolean} [options.ratioWeight=1] The ratio weight when placing an image 이미지를 배치할 때 비율 가중치 \n * @example\n```\n\n```\n **/\n\nvar PackingLayout = function () {\n\tfunction PackingLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, PackingLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\taspectRatio: 1,\n\t\t\tsizeWeight: 1,\n\t\t\tratioWeight: 1\n\t\t}, options);\n\t\tthis._size = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tPackingLayout.prototype._findBestFitArea = function _findBestFitArea(container, item) {\n\t\tif (container.getRatio() === 0) {\n\t\t\t// 아이템 최초 삽입시 전체영역 지정\n\t\t\tcontainer.setOriginWidth(item.getWidth());\n\t\t\tcontainer.setOriginHeight(item.getHeight());\n\t\t\tcontainer.setWidth(item.getWidth());\n\t\t\tcontainer.setHeight(item.getHeight());\n\t\t\treturn;\n\t\t}\n\n\t\tvar bestFitArea = null;\n\t\tvar minCost = 10000000;\n\t\tvar layoutVertical = false;\n\t\tvar itemFitSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tvar containerFitSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tvar _options = this.options,\n\t\t sizeWeight = _options.sizeWeight,\n\t\t ratioWeight = _options.ratioWeight;\n\n\n\t\tcontainer.innerItem().forEach(function (v) {\n\t\t\tvar containerSizeCost = getCost(v.getOriginSize(), v.getSize()) * sizeWeight;\n\t\t\tvar containerRatioCost = getCost(v.getOriginRatio(), v.getRatio()) * ratioWeight;\n\t\t\tvar cost = void 0;\n\n\t\t\tfor (var i = 0; i < 2; ++i) {\n\t\t\t\tvar itemWidth = void 0;\n\t\t\t\tvar itemHeight = void 0;\n\t\t\t\tvar containerWidth = void 0;\n\t\t\t\tvar containerHeight = void 0;\n\n\t\t\t\tif (i === 0) {\n\t\t\t\t\t// 상하에 아이템 추가\n\t\t\t\t\titemWidth = v.getWidth();\n\t\t\t\t\titemHeight = v.getHeight() * (item.getHeight() / (v.getOriginHeight() + item.getHeight()));\n\t\t\t\t\tcontainerWidth = v.getWidth();\n\t\t\t\t\tcontainerHeight = v.getHeight() - itemHeight;\n\t\t\t\t} else {\n\t\t\t\t\t// 좌우에 아이템 추가\n\t\t\t\t\titemHeight = v.getHeight();\n\t\t\t\t\titemWidth = v.getWidth() * (item.getWidth() / (v.getOriginWidth() + item.getWidth()));\n\t\t\t\t\tcontainerHeight = v.getHeight();\n\t\t\t\t\tcontainerWidth = v.getWidth() - itemWidth;\n\t\t\t\t}\n\n\t\t\t\tvar itemSize = itemWidth * itemHeight;\n\t\t\t\tvar itemRatio = itemWidth / itemHeight;\n\t\t\t\tvar containerSize = containerWidth * containerHeight;\n\t\t\t\tvar containerRatio = containerHeight / containerHeight;\n\n\t\t\t\tcost = getCost(item.getSize(), itemSize) * sizeWeight;\n\t\t\t\tcost += getCost(item.getRatio(), itemRatio) * ratioWeight;\n\t\t\t\tcost += getCost(v.getOriginSize(), containerSize) * sizeWeight - containerSizeCost;\n\t\t\t\tcost += getCost(v.getOriginRatio(), containerRatio) * ratioWeight - containerRatioCost;\n\n\t\t\t\tif (cost === Math.min(cost, minCost)) {\n\t\t\t\t\tminCost = cost;\n\t\t\t\t\tbestFitArea = v;\n\t\t\t\t\tlayoutVertical = i === 0;\n\t\t\t\t\titemFitSize.width = itemWidth;\n\t\t\t\t\titemFitSize.height = itemHeight;\n\t\t\t\t\tcontainerFitSize.width = containerWidth;\n\t\t\t\t\tcontainerFitSize.height = containerHeight;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical);\n\t};\n\n\tPackingLayout.prototype._layout = function _layout(items) {\n\t\tvar _this = this;\n\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar style = this._style;\n\t\tvar isHorizontal = this.options.horizontal;\n\t\tvar aspectRatio = this.options.aspectRatio;\n\t\tvar margin = this.options.margin;\n\t\tvar pos1Name = style.pos1;\n\t\tvar size1Name = style.size1;\n\t\tvar containerWidth = this._size * (isHorizontal ? aspectRatio : 1);\n\t\tvar containerHeight = this._size / (isHorizontal ? 1 : aspectRatio);\n\t\tvar containerSize1 = isHorizontal ? containerWidth : containerHeight;\n\t\tvar prevOutline = (0, _utils.toZeroArray)(outline);\n\t\tvar start = isAppend ? Math.max.apply(Math, prevOutline) : Math.min.apply(Math, prevOutline) - containerSize1 - margin;\n\t\tvar end = start + containerSize1 + margin;\n\t\tvar container = new _BoxModel2[\"default\"]({});\n\n\t\tvar startIndex = -1;\n\t\tvar endIndex = -1;\n\t\tvar startPos = -1;\n\t\tvar endPos = -1;\n\n\t\titems.forEach(function (item) {\n\t\t\tvar model = new _BoxModel2[\"default\"]({\n\t\t\t\toriginWidth: item.orgSize.width,\n\t\t\t\toriginHeight: item.orgSize.height,\n\t\t\t\twidth: item.orgSize.width,\n\t\t\t\theight: item.orgSize.height\n\t\t\t});\n\n\t\t\t_this._findBestFitArea(container, model);\n\t\t\tcontainer.pushItem(model);\n\t\t\tcontainer.scaleTo(containerWidth + margin, containerHeight + margin);\n\t\t});\n\t\titems.forEach(function (item, i) {\n\t\t\tvar boxItem = container.innerItem()[i];\n\t\t\t// console.log(\"boxItem\", boxItem, boxItem instanceof BoxModel);\n\t\t\tvar width = boxItem.getWidth();\n\t\t\tvar height = boxItem.getHeight();\n\t\t\tvar top = boxItem.getTop();\n\t\t\tvar left = boxItem.getLeft();\n\n\t\t\titem.rect = { top: top, left: left, width: width - margin, height: height - margin };\n\t\t\titem.rect[pos1Name] += start;\n\n\t\t\tif (startIndex === -1) {\n\t\t\t\tstartIndex = i;\n\t\t\t\tendIndex = i;\n\t\t\t\tstartPos = item.rect[pos1Name];\n\t\t\t\tendPos = startPos;\n\t\t\t}\n\t\t\tif (startPos > item.rect[pos1Name]) {\n\t\t\t\tstartPos = item.rect[pos1Name];\n\t\t\t\tstartIndex = i;\n\t\t\t}\n\t\t\tif (endPos < item.rect[pos1Name] + item.rect[size1Name] + margin) {\n\t\t\t\tendPos = item.rect[pos1Name] + item.rect[size1Name] + margin;\n\t\t\t\tendIndex = i;\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tstart: [start],\n\t\t\tend: [end],\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tPackingLayout.prototype._insert = function _insert() {\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar type = arguments[2];\n\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tPackingLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tPackingLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tPackingLayout.prototype.layout = function layout() {\n\t\tvar groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\tvar length = groups.length;\n\t\tvar point = outline;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.PackingLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tPackingLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\n\treturn PackingLayout;\n}();\n\nexports[\"default\"] = PackingLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/PackingLayout.js\n// module id = 13\n// module chunks = 0 1","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar BoxModel = function () {\n\tfunction BoxModel(option) {\n\t\t_classCallCheck(this, BoxModel);\n\n\t\tthis._originWidth = option.originWidth || 0;\n\t\tthis._originHeight = option.originHeight || 0;\n\t\tthis._width = option.width || 0;\n\t\tthis._height = option.height || 0;\n\t\tthis._left = option.left || 0;\n\t\tthis._top = option.top || 0;\n\t\tthis._item = option.item;\n\t\tthis._innerItem = option.innerItem || [];\n\t}\n\n\tBoxModel.prototype.getOriginWidth = function getOriginWidth() {\n\t\treturn this._originWidth;\n\t};\n\n\tBoxModel.prototype.setOriginWidth = function setOriginWidth(width) {\n\t\tthis._originWidth = width;\n\t};\n\n\tBoxModel.prototype.getOriginHeight = function getOriginHeight() {\n\t\treturn this._originHeight;\n\t};\n\n\tBoxModel.prototype.setOriginHeight = function setOriginHeight(height) {\n\t\tthis._originHeight = height;\n\t};\n\n\tBoxModel.prototype.getWidth = function getWidth() {\n\t\treturn this._width;\n\t};\n\n\tBoxModel.prototype.setWidth = function setWidth(width) {\n\t\tthis._width = width;\n\t};\n\n\tBoxModel.prototype.getHeight = function getHeight() {\n\t\treturn this._height;\n\t};\n\n\tBoxModel.prototype.setHeight = function setHeight(height) {\n\t\tthis._height = height;\n\t};\n\n\tBoxModel.prototype.getLeft = function getLeft() {\n\t\treturn this._left;\n\t};\n\n\tBoxModel.prototype.setLeft = function setLeft(left) {\n\t\tthis._left = left;\n\t};\n\n\tBoxModel.prototype.getTop = function getTop() {\n\t\treturn this._top;\n\t};\n\n\tBoxModel.prototype.setTop = function setTop(top) {\n\t\tthis._top = top;\n\t};\n\n\tBoxModel.prototype.innerItem = function innerItem() {\n\t\treturn this._innerItem;\n\t};\n\n\tBoxModel.prototype.scaleTo = function scaleTo(width, height) {\n\t\tvar scaleX = this._width === 0 ? 0 : width / this._width;\n\t\tvar scaleY = this._height === 0 ? 0 : height / this._height;\n\n\t\tthis._innerItem.forEach(function (v) {\n\t\t\tif (scaleX !== 0) {\n\t\t\t\tv._left *= scaleX;\n\t\t\t\tv._width *= scaleX;\n\t\t\t}\n\t\t\tif (scaleY !== 0) {\n\t\t\t\tv._top *= scaleY;\n\t\t\t\tv._height *= scaleY;\n\t\t\t}\n\t\t});\n\n\t\tthis._width = width;\n\t\tthis._height = height;\n\t};\n\n\tBoxModel.prototype.pushItem = function pushItem(item) {\n\t\tthis._innerItem.push(item);\n\t};\n\n\tBoxModel.prototype.getOriginSize = function getOriginSize() {\n\t\treturn this._originWidth * this._originHeight;\n\t};\n\n\tBoxModel.prototype.getSize = function getSize() {\n\t\treturn this._width * this._height;\n\t};\n\n\tBoxModel.prototype.getOriginRatio = function getOriginRatio() {\n\t\treturn this._originHeight === 0 ? 0 : this._originWidth / this._originHeight;\n\t};\n\n\tBoxModel.prototype.getRatio = function getRatio() {\n\t\treturn this._height === 0 ? 0 : this._width / this._height;\n\t};\n\n\tBoxModel.prototype.isSmallerThen = function isSmallerThen(box) {\n\t\treturn this._width <= box._width && this._height <= box._height;\n\t};\n\n\tBoxModel.prototype.isEqual = function isEqual(box) {\n\t\treturn this._left === box._left && this._top === box._top && this._width === box._width && this._height === box._height;\n\t};\n\n\treturn BoxModel;\n}();\n\nmodule.exports = BoxModel;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/lib/BoxModel.js\n// module id = 14\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _dijkstra = require(\"./lib/dijkstra\");\n\nvar _dijkstra2 = _interopRequireDefault(_dijkstra);\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * @classdesc 'justified' is a printing term with the meaning that 'it fits in one row wide'. JustifiedLayout is a layout in which the image is filled up on the basis of a line given a width in the meaning of the term.\n * @ko 'justified'는 '1행의 너비에 맞게 꼭 들어찬'이라는 의미를 가진 인쇄 용어다. 용어의 의미대로 너비가 주어진 한 행을 기준으로 이미지가 가득 차도록 배치하는 레이아웃이다.\n * @class eg.InfiniteGrid.JustifiedLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.JustifiedLayout module eg.InfiniteGrid.JustifiedLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.minSize=0] Minimum size of item to be resized 아이템이 조정되는 최소 크기 \n * @param {Boolean} [options.maxSize=0] Maximum size of item to be resized 아이템이 조정되는 최대 크기 \n * @example\n```\n\n```\n **/\nvar JustifiedLayout = function () {\n\tfunction JustifiedLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, JustifiedLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\tminSize: 0,\n\t\t\tmaxSize: 0\n\t\t}, options);\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t\tthis._size = 0;\n\t}\n\n\tJustifiedLayout.prototype._layout = function _layout(items, outline, isAppend) {\n\t\tvar _this = this;\n\n\t\tvar style = this._style;\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar startIndex = 0;\n\t\tvar endIndex = items.length;\n\t\tvar graph = function graph(_start) {\n\t\t\tvar results = {};\n\t\t\tvar start = +_start.replace(/[^0-9]/g, \"\");\n\t\t\tvar length = endIndex + 1;\n\n\t\t\tfor (var i = start + 1; i < length; ++i) {\n\t\t\t\tif (i - start > 8) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tvar cost = _this._getCost(items, start, i, size1Name, size2Name);\n\n\t\t\t\tif (cost < 0 && i === length - 1) {\n\t\t\t\t\tcost = 0;\n\t\t\t\t}\n\t\t\t\tif (cost !== null) {\n\t\t\t\t\tresults[\"node\" + i] = Math.pow(cost, 2);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn results;\n\t\t};\n\t\t// shortest path for items' total height.\n\t\tvar path = _dijkstra2[\"default\"].find_path(graph, \"node\" + startIndex, \"node\" + endIndex);\n\n\t\treturn this._setStyle(items, path, outline, isAppend);\n\t};\n\n\tJustifiedLayout.prototype._getSize = function _getSize(items, size1Name, size2Name) {\n\t\tvar margin = this.options.margin;\n\t\tvar size = items.reduce(function (sum, item) {\n\t\t\treturn sum + item.size[size2Name] / item.size[size1Name];\n\t\t}, 0);\n\n\t\treturn (this._size - margin * (items.length - 1)) / size;\n\t};\n\n\tJustifiedLayout.prototype._getCost = function _getCost(items, i, j, size1Name, size2Name) {\n\t\tvar size = this._getSize(items.slice(i, j), size1Name, size2Name);\n\t\tvar min = this.options.minSize || 0;\n\t\tvar max = this.options.maxSize || Infinity;\n\n\t\tif (isFinite(max)) {\n\t\t\t// if this size is not in range, the cost increases sharply.\n\t\t\tif (size < min) {\n\t\t\t\treturn Math.pow(size - min, 2) + Math.pow(max, 2);\n\t\t\t} else if (size > max) {\n\t\t\t\treturn Math.pow(size - max, 2) + Math.pow(max, 2);\n\t\t\t} else {\n\t\t\t\t// if this size in range, the cost is negative or low.\n\t\t\t\treturn Math.min(size - max, min - size);\n\t\t\t}\n\t\t}\n\t\t// if max is infinite type, caculate cost only with \"min\".\n\t\tif (size < min) {\n\t\t\treturn Math.max(Math.pow(min, 2), Math.pow(size, 2));\n\t\t}\n\t\treturn size - min;\n\t};\n\n\tJustifiedLayout.prototype._setStyle = function _setStyle(items, path) {\n\t\tvar outline = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n\t\tvar isAppend = arguments[3];\n\n\t\tvar style = this._style;\n\t\t// if direction is vertical\n\t\t// pos1 : top, pos11 : bottom\n\t\t// size1 : height\n\t\t// pos2 : left, pos22 : right\n\t\t// size2 : width\n\n\t\t// if direction is horizontal\n\t\t// pos1 : left, pos11 : right\n\t\t// size1 : width\n\t\t// pos2 : top, pos22 : bottom\n\t\t// size2 : height\n\t\tvar pos1Name = style.pos1;\n\t\tvar size1Name = style.size1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar size2Name = style.size2;\n\t\tvar length = path.length;\n\t\tvar margin = this.options.margin;\n\t\tvar startPoint = outline[0] || 0;\n\t\tvar endPoint = startPoint;\n\t\tvar height = 0;\n\n\t\tfor (var i = 0; i < length - 1; ++i) {\n\t\t\tvar path1 = parseInt(path[i].replace(\"node\", \"\"), 10);\n\t\t\tvar path2 = parseInt(path[i + 1].replace(\"node\", \"\"), 10);\n\t\t\t// pathItems(path1 to path2) are in 1 line.\n\t\t\tvar pathItems = items.slice(path1, path2);\n\t\t\tvar pathItemsLength = pathItems.length;\n\t\t\tvar size1 = this._getSize(pathItems, size1Name, size2Name);\n\t\t\tvar pos1 = endPoint;\n\n\t\t\tfor (var j = 0; j < pathItemsLength; ++j) {\n\t\t\t\tvar _item$rect;\n\n\t\t\t\tvar item = pathItems[j];\n\t\t\t\tvar size2 = item.size[size2Name] / item.size[size1Name] * size1;\n\t\t\t\t// item has margin bottom and right.\n\t\t\t\t// first item has not margin.\n\t\t\t\tvar prevItemRect = j === 0 ? 0 : pathItems[j - 1].rect;\n\t\t\t\tvar pos2 = prevItemRect ? prevItemRect[pos2Name] + prevItemRect[size2Name] + margin : 0;\n\n\t\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);\n\t\t\t}\n\t\t\theight += margin + size1;\n\t\t\tendPoint = startPoint + height;\n\t\t}\n\t\tvar itemsLength = items.length;\n\t\tvar startIndex = itemsLength ? 0 : -1;\n\t\tvar endIndex = itemsLength ? itemsLength - 1 : -1;\n\n\t\tif (isAppend) {\n\t\t\t// previous group's end outline is current group's start outline\n\t\t\treturn {\n\t\t\t\tstart: [startPoint],\n\t\t\t\tend: [endPoint],\n\t\t\t\tstartIndex: startIndex,\n\t\t\t\tendIndex: endIndex\n\t\t\t};\n\t\t}\n\t\t// for prepend, only substract height from position.\n\t\t// always start is lower than end.\n\n\t\tfor (var _i = 0; _i < itemsLength; ++_i) {\n\t\t\tvar _item = items[_i];\n\n\t\t\t// move items as long as height for prepend\n\t\t\t_item.rect[pos1Name] -= height;\n\t\t}\n\t\treturn {\n\t\t\tstart: [startPoint - height],\n\t\t\tend: [startPoint], // endPoint - height = startPoint\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tJustifiedLayout.prototype._insert = function _insert(items, outline, type) {\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.JustifiedLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tJustifiedLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tJustifiedLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tJustifiedLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100]);\n */\n\n\n\tJustifiedLayout.prototype.layout = function layout(groups, outlines) {\n\t\tvar length = groups.length;\n\t\tvar point = outlines;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\n\treturn JustifiedLayout;\n}();\n\nexports[\"default\"] = JustifiedLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/JustifiedLayout.js\n// module id = 15\n// module chunks = 0 1","'use strict';\n\n/* eslint-disable */\n/******************************************************************************\n * Created 2008-08-19.\n *\n * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.\n *\n * Copyright (C) 2008\n * Wyatt Baldwin \n * All rights reserved\n *\n * Licensed under the MIT license.\n *\n * http://www.opensource.org/licenses/mit-license.php\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *****************************************************************************/\n(function () {\n var dijkstra = {\n single_source_shortest_paths: function single_source_shortest_paths(graph, s, d) {\n // Predecessor map for each node that has been encountered.\n // node ID => predecessor node ID\n var predecessors = {};\n\n // Costs of shortest paths from s to all nodes encountered.\n // node ID => cost\n var costs = {};\n costs[s] = 0;\n\n // Costs of shortest paths from s to all nodes encountered; differs from\n // `costs` in that it provides easy access to the node that currently has\n // the known shortest path from s.\n // XXX: Do we actually need both `costs` and `open`?\n var open = new BinaryHeap(function (x) {\n return x.cost;\n });\n open.push({ value: s, cost: 0 });\n\n var closest, u, cost_of_s_to_u, adjacent_nodes, cost_of_e, cost_of_s_to_u_plus_cost_of_e, cost_of_s_to_v, first_visit;\n while (open.size()) {\n // In the nodes remaining in graph that have a known cost from s,\n // find the node, u, that currently has the shortest path from s.\n closest = open.pop();\n u = closest.value;\n cost_of_s_to_u = closest.cost;\n\n // Get nodes adjacent to u...\n adjacent_nodes = graph(u) || {};\n\n // ...and explore the edges that connect u to those nodes, updating\n // the cost of the shortest paths to any or all of those nodes as\n // necessary. v is the node across the current edge from u.\n for (var v in adjacent_nodes) {\n // Get the cost of the edge running from u to v.\n cost_of_e = adjacent_nodes[v];\n\n // Cost of s to u plus the cost of u to v across e--this is *a*\n // cost from s to v that may or may not be less than the current\n // known cost to v.\n cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;\n\n // If we haven't visited v yet OR if the current known cost from s to\n // v is greater than the new cost we just found (cost of s to u plus\n // cost of u to v across e), update v's cost in the cost list and\n // update v's predecessor in the predecessor list (it's now u).\n cost_of_s_to_v = costs[v];\n first_visit = typeof costs[v] === 'undefined';\n if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {\n costs[v] = cost_of_s_to_u_plus_cost_of_e;\n open.push({ value: v, cost: cost_of_s_to_u_plus_cost_of_e });\n predecessors[v] = u;\n }\n }\n }\n\n if (typeof costs[d] === 'undefined') {\n var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');\n throw new Error(msg);\n }\n\n return predecessors;\n },\n\n extract_shortest_path_from_predecessor_list: function extract_shortest_path_from_predecessor_list(predecessors, d) {\n var nodes = [];\n var u = d;\n var predecessor;\n while (u) {\n nodes.push(u);\n predecessor = predecessors[u];\n u = predecessors[u];\n }\n nodes.reverse();\n return nodes;\n },\n\n find_path: function find_path(graph, s, d) {\n var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);\n return dijkstra.extract_shortest_path_from_predecessor_list(predecessors, d);\n }\n\n };\n\n function BinaryHeap(scoreFunction) {\n this.content = [];\n this.scoreFunction = scoreFunction;\n }\n\n BinaryHeap.prototype = {\n push: function push(element) {\n // Add the new element to the end of the array.\n this.content.push(element);\n // Allow it to bubble up.\n this.bubbleUp(this.content.length - 1);\n },\n\n pop: function pop() {\n // Store the first element so we can return it later.\n var result = this.content[0];\n // Get the element at the end of the array.\n var end = this.content.pop();\n // If there are any elements left, put the end element at the\n // start, and let it sink down.\n if (this.content.length > 0) {\n this.content[0] = end;\n this.sinkDown(0);\n }\n return result;\n },\n\n remove: function remove(node) {\n var len = this.content.length;\n // To remove a value, we must search through the array to find\n // it.\n for (var i = 0; i < len; i++) {\n if (this.content[i] === node) {\n // When it is found, the process seen in 'pop' is repeated\n // to fill up the hole.\n var end = this.content.pop();\n if (i !== len - 1) {\n this.content[i] = end;\n if (this.scoreFunction(end) < this.scoreFunction(node)) {\n this.bubbleUp(i);\n } else {\n this.sinkDown(i);\n }\n }\n return;\n }\n }\n throw new Error('Node not found.');\n },\n\n size: function size() {\n return this.content.length;\n },\n\n bubbleUp: function bubbleUp(n) {\n // Fetch the element that has to be moved.\n var element = this.content[n];\n // When at 0, an element can not go up any further.\n while (n > 0) {\n // Compute the parent element's index, and fetch it.\n var parentN = Math.floor((n + 1) / 2) - 1,\n parent = this.content[parentN];\n // Swap the elements if the parent is greater.\n if (this.scoreFunction(element) < this.scoreFunction(parent)) {\n this.content[parentN] = element;\n this.content[n] = parent;\n // Update 'n' to continue at the new position.\n n = parentN;\n }\n // Found a parent that is less, no need to move it further.\n else {\n break;\n }\n }\n },\n\n sinkDown: function sinkDown(n) {\n // Look up the target element and its score.\n var length = this.content.length,\n element = this.content[n],\n elemScore = this.scoreFunction(element);\n\n while (true) {\n // Compute the indices of the child elements.\n var child2N = (n + 1) * 2,\n child1N = child2N - 1;\n // This is used to store the new position of the element,\n // if any.\n var swap = null;\n // If the first child exists (is inside the array)...\n if (child1N < length) {\n // Look it up and compute its score.\n var child1 = this.content[child1N],\n child1Score = this.scoreFunction(child1);\n // If the score is less than our element's, we need to swap.\n if (child1Score < elemScore) {\n swap = child1N;\n }\n }\n // Do the same checks for the other child.\n if (child2N < length) {\n var child2 = this.content[child2N],\n child2Score = this.scoreFunction(child2);\n if (child2Score < (swap == null ? elemScore : child1Score)) {\n swap = child2N;\n }\n }\n\n // If the element needs to be moved, swap it, and continue.\n if (swap !== null) {\n this.content[n] = this.content[swap];\n this.content[swap] = element;\n n = swap;\n }\n // Otherwise, we are done.\n else {\n break;\n }\n }\n }\n };\n\n /**\n * Browserify 지원을 위한 모듈화 코드\n */\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = dijkstra;\n } else {\n window.dijkstra = dijkstra;\n }\n})();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/lib/dijkstra.js\n// module id = 16\n// module chunks = 0 1"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACh9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"infinitegrid.pkgd.min.js","sources":["webpack:///infinitegrid.pkgd.min.js"],"sourcesContent":["!function(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define([],e):\"object\"==typeof exports?exports.InfiniteGrid=e():(t.eg=t.eg||{},t.eg.InfiniteGrid=e())}(\"undefined\"!=typeof self?self:this,function(){return function(t){function __webpack_require__(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}var e={};return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,i){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t[\"default\"]}:function(){return t};return __webpack_require__.d(e,\"a\",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p=\"\",__webpack_require__(__webpack_require__.s=5)}([function(t,e,i){\"use strict\";e.__esModule=!0,e.DEFENSE_BROWSER=e.WEBKIT_VERSION=e.PROCESSING=e.LOADING_PREPEND=e.LOADING_APPEND=e.IDLE=e.ALIGN=e.isMobile=e.agent=e.DEFAULT_OPTIONS=e.GROUPKEY_ATT=e.DUMMY_POSITION=e.SINGLE=e.MULTI=e.NO_TRUSTED=e.TRUSTED=e.NO_CACHE=e.CACHE=e.HORIZONTAL=e.VERTICAL=e.PREPEND=e.APPEND=e.IGNORE_CLASSNAME=e.CONTAINER_CLASSNAME=e.RETRY=e.IS_ANDROID2=e.IS_IOS=e.IS_IE=e.SUPPORT_PASSIVE=e.SUPPORT_ADDEVENTLISTENER=e.SUPPORT_COMPUTEDSTYLE=undefined;var n=i(2),r=n.window.navigator.userAgent,o=(e.SUPPORT_COMPUTEDSTYLE=!!(\"getComputedStyle\"in n.window),e.SUPPORT_ADDEVENTLISTENER=!!(\"addEventListener\"in document)),s=(e.SUPPORT_PASSIVE=function(){var t=!1;try{o&&Object.defineProperty&&document.addEventListener(\"test\",null,Object.defineProperty({},\"passive\",{get:function(){t=!0}}))}catch(e){}return t}(),e.IS_IE=/MSIE|Trident|Windows Phone|Edge/.test(r),e.IS_IOS=/iPhone|iPad/.test(r),e.IS_ANDROID2=/Android 2\\./.test(r),e.RETRY=3,e.CONTAINER_CLASSNAME=\"_eg-infinitegrid-container_\",e.IGNORE_CLASSNAME=\"_eg-infinitegrid-ignore_\",e.APPEND=!0,e.PREPEND=!1,e.VERTICAL=\"vertical\",e.HORIZONTAL=\"horizontal\",e.CACHE=!0,e.NO_CACHE=!1,e.TRUSTED=!0,e.NO_TRUSTED=!1,e.MULTI=!0,e.SINGLE=!1,e.DUMMY_POSITION=-1e5,e.GROUPKEY_ATT=\"data-groupkey\",e.DEFAULT_OPTIONS={horizontal:!1,margin:0},e.agent=r.toLowerCase()),a=(e.isMobile=/mobi|ios|android/.test(s),e.ALIGN={START:\"start\",CENTER:\"center\",END:\"end\",JUSTIFY:\"justify\"},e.IDLE=0,e.LOADING_APPEND=1,e.LOADING_PREPEND=2,e.PROCESSING=4,/applewebkit\\/([\\d|.]*)/g.exec(s)),u=e.WEBKIT_VERSION=a&&parseInt(a[1],10)||0;e.DEFENSE_BROWSER=u&&u<537},function(t,e,i){\"use strict\";function toArray(t){var e=[];if(t)for(var i=0,n=t.length;i1&&arguments[1]!==undefined&&arguments[1],i=void 0;if(\"string\"==typeof t){if(t.match(/^<([A-z]+)\\s*([^>]*)>/)){var n=o.document.createElement(\"div\");n.innerHTML=t,i=n.childNodes}else i=o.document.querySelectorAll(t);i=e?toArray(i):i&&i.length>0&&i[0]||undefined}else t===o.window?i=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?\"jQuery\"in o.window&&t instanceof o.window.jQuery||t.constructor.prototype.jquery?i=e?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return $(t)}),e||(i=i.length>=1?i[0]:undefined)):i=t;return i}function getStyles(t){return s.SUPPORT_COMPUTEDSTYLE?o.window.getComputedStyle(t):t.currentStyle}function _getSize(t,e){if(t===o.window)return t.document.documentElement[\"client\"+e];if(9===t.nodeType){var i=t.documentElement;return Math.max(t.body[\"scroll\"+e],i[\"scroll\"+e],t.body[\"offset\"+e],i[\"offset\"+e],i[\"client\"+e])}var n=getStyles(t),r=n[e.toLowerCase()];return parseFloat(/auto|%/.test(r)?t[\"offset\"+e]:n[e.toLowerCase()])}e.__esModule=!0,e.STYLE=undefined;var n=Object.assign||function(t){for(var e=1;e=0;--n)i[n]=e;return i},e.$=$,e.addEvent=function(t,e,i,n){if(s.SUPPORT_ADDEVENTLISTENER){var o=n||!1;\"object\"===(void 0===n?\"undefined\":r(n))&&(o=!!s.SUPPORT_PASSIVE&&n),t.addEventListener(e,i,o)}else t.attachEvent?t.attachEvent(\"on\"+e,i):t[\"on\"+e]=i},e.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent(\"on\"+e,i):t[\"on\"+e]=null},e.scroll=function(t,e){var i=\"scroll\"+(e?\"Top\":\"Left\");return t===o.window?o.window[e?\"pageYOffset\":\"pageXOffset\"]||o.document.body[i]||o.document.documentElement[i]:t[i]},e.scrollTo=function(t,e,i){t===o.window?t.scroll(e,i):(t.scrollLeft=e,t.scrollTop=i)},e.scrollBy=function(t,e,i){t===o.window?t.scrollBy(e,i):(t.scrollLeft+=e,t.scrollTop+=i)},e.getStyles=getStyles,e.innerWidth=function(t){return _getSize(t,\"Width\")},e.innerHeight=function(t){return _getSize(t,\"Height\")},e.getStyleNames=function(t){return a[t?s.HORIZONTAL:s.VERTICAL]},e.assignOptions=function(t,e){return n({},s.DEFAULT_OPTIONS,t,e)},e.toZeroArray=function(t){return t&&t.length?t:[0]},e.isWindow=function(t){return t===o.window},e.indexOf=function(t,e){if(!(arguments.length>2&&arguments[2]!==undefined&&arguments[2]))return t.indexOf(e);for(var i=t.length-1;i>=0;--i)if(t[i]===e)return i;return-1};var o=i(2),s=i(0),a=e.STYLE={vertical:{pos1:\"top\",endPos1:\"bottom\",size1:\"height\",pos2:\"left\",endPos2:\"right\",size2:\"width\"},horizontal:{pos1:\"left\",endPos1:\"right\",size1:\"width\",pos2:\"top\",endPos2:\"bottom\",size2:\"height\"}}},function(t,e,i){\"use strict\";e.__esModule=!0;var n=window;e.window=window;e.document=n.document},function(t,e,i){\"use strict\";e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e0&&arguments[0]!==undefined?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,FrameLayout),this.options=(0,s.assignOptions)({itemSize:0,frame:[],frameFill:!0},t);var e=function(t){for(var e=t.length,i=e?t[0].length:0,n=[],r=0;r1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],n=t.length,a=this._style,u=this.options,h=u.margin,c=u.frameFill,l=a.size1,f=a.size2,p=a.pos1,d=a.pos2,_=this._getItemSize(),g=\"object\"===(void 0===_?\"undefined\":r(_)),y=g?_[f]:_,m=g?_[l]:_,v=this._shapes[f],S=this._shapes.shapes,E=S.length,I=(0,s.fill)(v,o.DUMMY_POSITION),w=(0,s.fill)(v,o.DUMMY_POSITION),O=0,P=0,M=-1,z=-1,L=-1,b=-1;if(!E)return{start:e,end:e,startIndex:M,endIndex:z};for(var C=0;CV&&(L=V,M=C+R),b0&&arguments[0]!==undefined&&arguments[0]?\"_getItems\":\"_getVisibleItems\"]()},InfiniteGrid.prototype._getItems=function(){return this._items.pluck(\"items\",0,this._items.size())},InfiniteGrid.prototype._getVisibleItems=function(){return this._items.pluck(\"items\",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._updateEdge=function(){this._status.start=this._items.getEdge(\"start\",this._status.startCursor,this._status.endCursor),this._status.end=this._items.getEdge(\"end\",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._getEdgeOffset=function(t){var e=null;if(!this._status[t]){var i=this._items.getEdge(t);this._status[t]=i}return this._status[t]&&(e=this._status[t].rect,\"start\"===t&&(e.bottom=e.top+this._status[t].size.height,e.right=e.left+this._status[t].size.width)),e},InfiniteGrid.prototype._fit=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:\"after\";if(!this._layout)return 0;var e=this._getEdgeValue(\"start\"),i=this._getLoadingStatus()===c.LOADING_PREPEND&&this._status.loadingSize||0;if(!this.options.useRecycle||c.DEFENSE_BROWSER)return\"before\"===t&&i&&e0&&arguments[0]!==undefined)||arguments[0];if(!this._layout||this._isProcessing())return this;if(!this._items.size())return this._insert((0,l.toArray)(this._renderer.container.children),!0),this;this._process(c.PROCESSING);var i=void 0,n=void 0;return e?(i=this._items.get(this._status.startCursor,this._status.endCursor),this._renderer.resize()&&(this._layout.setSize(this._renderer.getViewportSize()),i.forEach(function(e){i.items=t._renderer.updateSize(e.items)}))):(i=this._items.get(this._status.startCursor,this._items.size()),n=this._items.getOutline(this._status.startCursor,\"start\")),i.length?(this._layout.layout(i,n),e?this._items._data.forEach(function(e,i){t._status.startCursor<=i&&i<=t._status.endCursor||(e.outlines.start=[],e.outlines.end=[])}):i.forEach(function(e){return t._items.set(e,e.groupKey)}),this._onLayoutComplete(i,c.APPEND,c.NO_TRUSTED,!1),a[\"default\"].renderItems(this._getVisibleItems()),e&&this._watcher.setScrollPos(),this):this},InfiniteGrid.prototype.remove=function(t){if(t){var e=this._items.remove(t,this._status.startCursor,this._status.endCursor);if(e)return a[\"default\"].removeElement(t),e}return null},InfiniteGrid.prototype._getNextItems=function(t){var e=[],i=this._items.size();return i>0&&-1!==this._status.startCursor&&-1!==this._status.endCursor&&(t&&i>this._status.endCursor+1?e=this._items.pluck(\"items\",this._status.endCursor+1):!t&&this._status.startCursor>0&&(e=this._items.pluck(\"items\",this._status.startCursor-1))),e},InfiniteGrid.prototype.getGroupKeys=function(t){return(t?this._items.get():this._items.get(this._status.startCursor,this._status.endCursor)).map(function(t){return t.groupKey})},InfiniteGrid.prototype.getStatus=function(){return{options:n({},this.options),_status:n({},this._status),_items:this._items.getStatus(),_renderer:this._renderer.getStatus(),_watcher:this._watcher.getStatus()}},InfiniteGrid.prototype.setStatus=function(t){var e=!(arguments.length>1&&arguments[1]!==undefined)||arguments[1];return t&&t.options&&t._status&&t._renderer&&t._items&&t._watcher?(this._watcher.detachEvent(),n(this.options,t.options),n(this._status,t._status),this._items.setStatus(t._items,this._status.startCursor,this._status.endCursor),this._renderer.setStatus(t._renderer,this._getVisibleItems()),this._watcher.setStatus(t._watcher,e),this._updateEdge(),this._watcher.attachEvent(),this):this},InfiniteGrid.prototype.clear=function(){return this._items.clear(),this._renderer.clear(),this._reset(),this._appendLoadingBar(),this},InfiniteGrid.prototype.setLoadingBar=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=\"object\"===(void 0===t?\"undefined\":r(t))?t:{append:t,prepend:t};this._status.loadingSize=0,this._status.loadingStyle={},this._loadingBar=this._loadingBar||{};var i=this._loadingBar;for(var n in e)i[n]=(0,l.$)(e[n]),i[n].className+=\" \"+c.IGNORE_CLASSNAME;return this._appendLoadingBar(),this},InfiniteGrid.prototype._appendLoadingBar=function(){var t=this._loadingBar,e=this._renderer.container;for(var i in t)e.appendChild(t[i])},InfiniteGrid.prototype.isProcessing=function(){return this._isProcessing()||this._isLoading()},InfiniteGrid.prototype._isProcessing=function(){return(this._status.processingStatus&c.PROCESSING)>0},InfiniteGrid.prototype._isLoading=function(){return this._getLoadingStatus()>0},InfiniteGrid.prototype._getLoadingStatus=function(){return this._status.processingStatus&(c.LOADING_APPEND|c.LOADING_PREPEND)},InfiniteGrid.prototype._process=function(t){!(arguments.length>1&&arguments[1]!==undefined)||arguments[1]?this._status.processingStatus|=t:this._status.processingStatus-=this._status.processingStatus&t},InfiniteGrid.prototype._insert=function(t,e,i){if(!this._isProcessing()&&0!==t.length){var n=void 0===i?(new Date).getTime()+Math.floor(1e3*Math.random()):i,r=s[\"default\"].from((0,l.$)(t,!0),this.options.itemSelector,{isAppend:e,groupKey:n});r.length&&this._postLayout(c.NO_CACHE,r,e,c.NO_TRUSTED)}},InfiniteGrid.prototype._recycle=function(t){var e=[];if(this._status.startCursor!==this._status.endCursor)for(var i=this._status.startCursor;i<=this._status.endCursor;i++)e.push(this._isVisible(i));var n=e.indexOf(t?1:-1),r=e.lastIndexOf(t?1:-1);-1!==e.indexOf(0)&&-1!==n&&-1!==r&&(n=this._status.startCursor+(t?0:n),r=t?this._status.startCursor+r:this._status.endCursor,a[\"default\"].removeItems(this._items.pluck(\"items\",n,r)),t?this._status.startCursor=r+1:this._status.endCursor=n-1)},InfiniteGrid.prototype.getLoadingBar=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._getLoadingStatus()!==c.LOADING_PREPEND;return this._loadingBar[t?\"append\":\"prepend\"]},InfiniteGrid.prototype.startLoading=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{display:\"block\"};if(this._isLoading())return this;var i=t?\"append\":\"prepend\";return this._process(t?c.LOADING_APPEND:c.LOADING_PREPEND),this._loadingBar[i]?(this._renderLoading(e),this._status.loadingStyle=e,t?this._renderer.setContainerSize(this._getEdgeValue(\"end\")+this._status.loadingSize):this._fit(\"before\"),this):this},InfiniteGrid.prototype._renderLoading=function(){var t,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._status.loadingStyle;if(this._isLoading()){var i=this._getLoadingStatus()===c.LOADING_APPEND,r=this._loadingBar[i?\"append\":\"prepend\"];if(r){this._status.loadingSize=this._isVertical?(0,l.innerHeight)(r):(0,l.innerWidth)(r);var o=i?this._getEdgeValue(\"end\"):this._getEdgeValue(\"start\")-this._status.loadingSize,s=n((t={position:\"absolute\"},t[this._isVertical?\"top\":\"left\"]=o+\"px\",t),e);for(var a in s)r.style[a]=s[a]}}},InfiniteGrid.prototype.endLoading=function(){var t,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{display:\"none\"};if(!this._isLoading())return this;var i=this._getLoadingStatus()===c.LOADING_APPEND,r=i?\"append\":\"prepend\",o=this._loadingBar[r],s=this._status.loadingSize;if(this._process(c.LOADING_APPEND|c.LOADING_PREPEND,!1),this._status.loadingSize=0,this._status.loadingStyle={},!o)return this;var u=n((t={},t[this._isVertical?\"top\":\"left\"]=-s+\"px\",t),e);for(var h in u)o.style[h]=u[h];return i||(this._renderer.scrollBy(-s),this._watcher.setScrollPos(),this._items.fit(s,this._isVertical),a[\"default\"].renderItems(this._getVisibleItems()),this._renderer.setContainerSize(this._getEdgeValue(\"end\"))),this._renderer.setContainerSize(this._getEdgeValue(\"end\")),this},InfiniteGrid.prototype._postLayout=function(t,e,i,n){var r=this,o=this._items.getOutline(i?this._status.endCursor:this._status.startCursor,i?\"end\":\"start\");if(t){var s=this._items.getOutline(i?this._status.endCursor+1:this._status.startCursor-1,i?\"start\":\"end\");if(!(o.length!==s.length||!o.every(function(t,e){return t===s[e]})))return this._renderer.createAndInsert(e,i),this._updateCursor(i),this._onLayoutComplete(e,i,n),this}this._process(c.PROCESSING);var h=i?\"append\":\"prepend\";return t&&a[\"default\"].createElements(e),this._renderer[h](e),u[\"default\"].check(e.map(function(t){return t.el}),function(){var s=r._layout[h](r._renderer.updateSize(e),o);t?r._setItems(s):r._insertItems(s,i),r._updateCursor(i),a[\"default\"].renderItems(s.items),r._onLayoutComplete(s.items,i,n)}),this},InfiniteGrid.prototype._isVisible=function(t){var e=Math.min.apply(Math,this._items.getOutline(t,\"start\")),i=Math.max.apply(Math,this._items.getOutline(t,\"end\")),n=this._watcher.getScrollPos();return n+this._renderer.getViewSize()+this.options.thresholdi?1:0},InfiniteGrid.prototype._updateCursor=function(t){this.options.useRecycle?(t?this._status.endCursor++:this._status.startCursor>0?this._status.startCursor--:this._status.endCursor++,this._status.startCursor<0&&(this._status.startCursor=0)):(this._status.startCursor=0,this._status.endCursor=this._items.size()-1)},InfiniteGrid.prototype._setItems=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:t.items&&t.items[0].groupKey||0;t.groupKey=e,this._items.set(t,e)},InfiniteGrid.prototype._insertItems=function(t,e){t.groupKey=t.items[0].groupKey,this._items[e?\"append\":\"prepend\"](t)},InfiniteGrid.prototype._requestAppend=function(){var t=this._getNextItems(c.APPEND);this._isProcessing()||(t.length?this._postLayout(c.CACHE,t,c.APPEND,c.TRUSTED):this.trigger(\"append\",{isTrusted:!0,groupKey:this.getGroupKeys().pop()}))},InfiniteGrid.prototype._requestPrepend=function(){var t=this._getNextItems(c.PREPEND);this._isProcessing()||(t.length?this._postLayout(c.CACHE,t,c.PREPEND,c.TRUSTED):this.trigger(\"prepend\",{isTrusted:!0,groupKey:this.getGroupKeys().shift()}))},InfiniteGrid.prototype._onCheck=function(t){var e=t.isForward,i=t.scrollPos,n=t.horizontal,r=t.orgScrollPos;this.trigger(\"change\",{isForward:e,horizontal:n,scrollPos:i,orgScrollPos:r});var o=this._getEdgeOffset(e?\"end\":\"start\"),s=this.isProcessing();if(o){var a=e?o[n?\"left\":\"top\"]-this._renderer.getViewSize():o[n?\"right\":\"bottom\"];!s&&e?i>=a&&this._requestAppend():i<=a&&(this._fit(\"before\"),this._requestPrepend())}},InfiniteGrid.prototype._onLayoutComplete=function(t,e){var i=arguments.length>2&&arguments[2]!==undefined&&arguments[2],n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:this.options.useRecycle;this._isLoading()&&this._renderLoading(),!e&&this._fit(\"after\"),n&&this._recycle(e);var r=this._getEdgeValue(\"end\");this._updateEdge(),e&&this._renderer.setContainerSize(r+this._status.loadingSize||0),this._process(c.PROCESSING,!1);var o=this._watcher.getScrollPos();this.trigger(\"layoutComplete\",{target:t.concat(),isAppend:e,isTrusted:i,isScroll:this._renderer.getViewSize()=r?this._requestAppend():!e&&o<=this._getEdgeValue(\"start\")&&(this._fit(\"before\"),this._requestPrepend())},InfiniteGrid.prototype._reset=function(){this._status={processingStatus:c.IDLE,loadingSize:0,startCursor:-1,endCursor:-1,start:null,end:null}},InfiniteGrid.prototype.destroy=function(){this.off(),this._watcher.destroy(),this._reset(),this._items.clear(),this._renderer.destroy()},InfiniteGrid}(o[\"default\"]);f.VERSION=\"3.0.0-rc\",e[\"default\"]=f,t.exports=e[\"default\"]},function(t,e,i){!function(e,i){t.exports=i()}(0,function(){return function(t){function __webpack_require__(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}var e={};return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,i){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t[\"default\"]}:function(){return t};return __webpack_require__.d(e,\"a\",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p=\"\",__webpack_require__(__webpack_require__.s=0)}([function(t,e,i){\"use strict\";var n=function(t){return t&&t.__esModule?t:{\"default\":t}}(i(1));n[\"default\"].VERSION=\"2.1.0\",t.exports=n[\"default\"]},function(t,e,i){\"use strict\";e.__esModule=!0;var n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},r=function(){function Component(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,Component),this._eventHandler={},this.options={}}return Component.prototype.trigger=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},i=this._eventHandler[t]||[];if(!(i.length>0))return!0;i=i.concat(),e.eventType=t;var n=!1,r=[e],o=0;e.stop=function(){n=!0},e.currentTarget=this;for(var s=arguments.length,a=Array(s>2?s-2:0),u=2;u=1&&(r=r.concat(a)),o=0;i[o];o++)i[o].apply(this,r);return!n},Component.prototype.once=function(t,e){if(\"object\"===(void 0===t?\"undefined\":n(t))&&void 0===e){var i=t,r=void 0;for(r in i)this.once(r,i[r]);return this}if(\"string\"==typeof t&&\"function\"==typeof e){var o=this;this.on(t,function listener(){for(var i=arguments.length,n=Array(i),r=0;ra||\"end\"===t&&oo?r[o]:null}return null},ItemManager.prototype.getEdgeValue=function(t,e,i){var n=this.pluck(\"outlines\",this.getEdgeIndex(t,e,i)).reduce(function(e,i){return e.concat(i[t])},[]);return n.length?Math[\"start\"===t?\"min\":\"max\"].apply(Math,n):0},ItemManager.prototype.append=function(t){return this._data.push(t),t.items},ItemManager.prototype.prepend=function(t){return this._data.unshift(t),t.items},ItemManager.prototype.clear=function(){this._data=[]},ItemManager.prototype.remove=function(t,e,i){var n=null,o=t.getAttribute(r.GROUPKEY_ATT),s=this.get(e,i).filter(function(t){return String(t.groupKey)===o});if(!s.length)return n;for(var a=(s=s[0]).items.length,u=-1,h=0;h0?ImageLoaded.waitImageLoaded(n,e):setTimeout(function(){e&&e()},0)},ImageLoaded}();e[\"default\"]=o,t.exports=e[\"default\"]},function(t,e,i){\"use strict\";e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e1&&arguments[1]!==undefined)||arguments[1];this._prevPos=t._prevPos,e&&this.scrollTo(t.scrollPos)},Watcher.prototype.scrollTo=function(t){var e=this._renderer.options.isVertical?[0,t]:[t,0];o.scrollTo.apply(undefined,[this._renderer.view].concat(e))},Watcher.prototype.getScrollPos=function(){return this._prevPos},Watcher.prototype.setScrollPos=function(t){var e=t;void 0===t&&(e=this.getOrgScrollPos()),this._prevPos=e-this._renderer.getContainerOffset()},Watcher.prototype.attachEvent=function(){(0,o.addEvent)(this._renderer.view,\"scroll\",this._onCheck),(0,o.addEvent)(window,\"resize\",this._onResize)},Watcher.prototype.getOrgScrollPos=function(){return(0,o.scroll)(this._renderer.view,this._renderer.options.isVertical)},Watcher.prototype.reset=function(){this._prevPos=null},Watcher.prototype._onCheck=function(){var t=this.getScrollPos(),e=this.getOrgScrollPos();this.setScrollPos(e);var i=this.getScrollPos();null===t||r.IS_IOS&&0===e||t===i||this._callback.check&&this._callback.check({isForward:t0&&arguments[0]!==undefined?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,GridLayout),this.options=(0,o.assignOptions)({align:s,itemSize:0},t),this._size=0,this._columnSize=0,this._columnLength=0,this._style=(0,o.getStyleNames)(this.options.horizontal)}return GridLayout.prototype.getPoints=function(t){var e=this.options.horizontal?\"left\":\"top\";return t.map(function(t){return t[e]})},GridLayout.prototype.checkColumn=function(t){var e=this.options.margin,i=this.options.horizontal?\"height\":\"width\",n=this.options.itemSize||t&&t.size[i]||0;this._columnSize=n,this._columnLength=n?Math.max(parseInt((this._size+e)/(n+e),10),1):1},GridLayout.prototype._layout=function(t,e,i){for(var n=t.length,r=this.options.margin,o=this.options.align,s=this._style,c=s.size1,l=s.size2,f=s.pos1,p=s.pos2,d=this._columnSize,_=this._columnLength,g=this._size,y=g-(d+r)*_+r,m=i?\"min\":\"max\",v=e.slice(),S=e.slice(),E=-1,I=-1,w=0;w0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],s=t.map(function(t){return n({},t)}),a=e;this._columnLength||this.checkColumn(t[0]),e.length!==this._columnLength&&(a=(0,o.fill)(this._columnLength,0===e.length?0:Math[i===r.APPEND?\"min\":\"max\"].apply(Math,e)||0));return{items:s,outlines:this._layout(s,a,i)}},GridLayout.prototype.append=function(t,e){return this._insert(t,e,r.APPEND)},GridLayout.prototype.prepend=function(t,e){return this._insert(t,e,r.PREPEND)},GridLayout.prototype.layout=function(){var t=this,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=e.length&&e[0].items.length&&e[0].items[0]||0;this.checkColumn(n);var s=void 0;if(i.length!==this._columnLength){var a=0===i.length?0:Math.min.apply(Math,i);s=(0,o.fill)(this._columnLength,a)}else s=i.slice();return e.forEach(function(e){var i=e.items,n=t._layout(i,s,r.APPEND);e.outlines=n,s=n.end}),this},GridLayout.prototype.setSize=function(t){return this._size=t,this},GridLayout}();e[\"default\"]=c,t.exports=e[\"default\"]},function(t,e,i){\"use strict\";function getColumn(t){if(t.column)return t.column;var e=0;if(t.el){var i=t.el.dataset;e=i?i.column||1:t.el.getAttribute(\"column\")||1}else e=1;return t.column=e,e}e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{\"default\":t}}(i(4)),r=i(1),o=function(t){function SquareLayout(){return function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,SquareLayout),function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(SquareLayout,t),SquareLayout.prototype._checkItemSize=function(){var e=this.options.column;if(e){var i=this.options.margin;this._itemSize=(this._size+i)/e-i}else t.prototype._checkItemSize.call(this)},SquareLayout.prototype._layout=function(e){for(var i,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],o=arguments[2],s=this._getItemSize(),a=this.options.margin,u=this.options.column||parseInt((this._size+a)/(s+a),10)||1,h=e.length,c=function(t,e,i,n){var o=Math[n?\"min\":\"max\"].apply(Math,t)||0;return t.length!==i?(0,r.fill)(i,0):t.map(function(t){return parseInt((t-o)/e,10)})}(n,s,u,o),l=o?\"min\":\"max\",f=[],p=o?1:-1,d=this._style,_=d.pos1,g=d.pos2,y=0;y1){for(var P=1;P=0)&&(o&&c[S+p*P]<=v||!o&&c[S+p*P]>=v);++P)++O;o||(S-=O-1)}E.columnWidth=[u,O],f.push((m={width:O,height:O},m[_]=v-(o?0:O),m[g]=S,m.index=y,m));for(var M=0;M0&&arguments[0]!==undefined?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,PackingLayout),this.options=(0,s.assignOptions)({aspectRatio:1,sizeWeight:1,ratioWeight:1},t),this._size=0,this._style=(0,s.getStyleNames)(this.options.horizontal)}return PackingLayout.prototype._findBestFitArea=function(t,e){if(0===t.getRatio())return t.setOriginWidth(e.getWidth()),t.setOriginHeight(e.getHeight()),t.setWidth(e.getWidth()),void t.setHeight(e.getHeight());var i=null,n=1e7,r=!1,o={width:0,height:0},s={width:0,height:0},a=this.options,u=a.sizeWeight,h=a.ratioWeight;t.innerItem().forEach(function(t){for(var a=getCost(t.getOriginSize(),t.getSize())*u,c=getCost(t.getOriginRatio(),t.getRatio())*h,l=void 0,f=0;f<2;++f){var p=void 0,d=void 0,_=void 0,g=void 0;0===f?(p=t.getWidth(),d=t.getHeight()*(e.getHeight()/(t.getOriginHeight()+e.getHeight())),_=t.getWidth(),g=t.getHeight()-d):(d=t.getHeight(),p=t.getWidth()*(e.getWidth()/(t.getOriginWidth()+e.getWidth())),g=t.getHeight(),_=t.getWidth()-p);var y=p*d,m=p/d,v=_*g,S=g/g;l=getCost(e.getSize(),y)*u,l+=getCost(e.getRatio(),m)*h,l+=getCost(t.getOriginSize(),v)*u-a,(l+=getCost(t.getOriginRatio(),S)*h-c)===Math.min(l,n)&&(n=l,i=t,r=0===f,o.width=p,o.height=d,s.width=_,s.height=g)}}),function(t,e,i,n,r){t.setHeight(i.height),t.setWidth(i.width),e.setHeight(n.height),e.setWidth(n.width),r?(t.setTop(e.getTop()+e.getHeight()),t.setLeft(e.getLeft())):(t.setLeft(e.getLeft()+e.getWidth()),t.setTop(e.getTop()))}(e,i,o,s,r)},PackingLayout.prototype._layout=function(t){var e=this,i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=arguments[2],o=this._style,a=this.options.horizontal,u=this.options.aspectRatio,h=this.options.margin,c=o.pos1,l=o.size1,f=this._size*(a?u:1),p=this._size/(a?1:u),d=a?f:p,_=(0,s.toZeroArray)(i),g=n?Math.max.apply(Math,_):Math.min.apply(Math,_)-d-h,y=g+d+h,m=new r[\"default\"]({}),v=-1,S=-1,E=-1,I=-1;return t.forEach(function(t){var i=new r[\"default\"]({originWidth:t.orgSize.width,originHeight:t.orgSize.height,width:t.orgSize.width,height:t.orgSize.height});e._findBestFitArea(m,i),m.pushItem(i),m.scaleTo(f+h,p+h)}),t.forEach(function(t,e){var i=m.innerItem()[e],n=i.getWidth(),r=i.getHeight(),o=i.getTop(),s=i.getLeft();t.rect={top:o,left:s,width:n-h,height:r-h},t.rect[c]+=g,-1===v&&(v=e,S=e,E=t.rect[c],I=E),E>t.rect[c]&&(E=t.rect[c],v=e),I0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],r=t.map(function(t){return n({},t)});return{items:r,outlines:this._layout(r,e,i)}},PackingLayout.prototype.append=function(t,e){return this._insert(t,e,o.APPEND)},PackingLayout.prototype.prepend=function(t,e){return this._insert(t,e,o.PREPEND)},PackingLayout.prototype.layout=function(){for(var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=t.length,n=e,r=0;r0&&arguments[0]!==undefined?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,JustifiedLayout),this.options=(0,s.assignOptions)({minSize:0,maxSize:0},t),this._style=(0,s.getStyleNames)(this.options.horizontal),this._size=0}return JustifiedLayout.prototype._layout=function(t,e,i){var n=this,o=this._style,s=o.size1,a=o.size2,u=t.length,h=r[\"default\"].find_path(function(e){for(var i={},r=+e.replace(/[^0-9]/g,\"\"),o=u+1,h=r+1;h8);++h){var c=n._getCost(t,r,h,s,a);c<0&&h===o-1&&(c=0),null!==c&&(i[\"node\"+h]=Math.pow(c,2))}return i},\"node0\",\"node\"+u);return this._setStyle(t,h,e,i)},JustifiedLayout.prototype._getSize=function(t,e,i){var n=this.options.margin,r=t.reduce(function(t,n){return t+n.size[i]/n.size[e]},0);return(this._size-n*(t.length-1))/r},JustifiedLayout.prototype._getCost=function(t,e,i,n,r){var o=this._getSize(t.slice(e,i),n,r),s=this.options.minSize||0,a=this.options.maxSize||Infinity;return isFinite(a)?oa?Math.pow(o-a,2)+Math.pow(a,2):Math.min(o-a,s-o):o2&&arguments[2]!==undefined?arguments[2]:[],n=arguments[3],r=this._style,o=r.pos1,s=r.size1,a=r.pos2,u=r.size2,h=e.length,c=this.options.margin,l=i[0]||0,f=l,p=0,d=0;dc)&&(r[f]=c,o.push({value:f,cost:c}),n[f]=a)}if(\"undefined\"==typeof r[i]){var p=[\"Could not find a path from \",e,\" to \",i,\".\"].join(\"\");throw new Error(p)}return n},extract_shortest_path_from_predecessor_list:function(t,e){for(var i=[],n=e;n;)i.push(n),t[n],n=t[n];return i.reverse(),i},find_path:function(t,i,n){var r=e.single_source_shortest_paths(t,i,n);return e.extract_shortest_path_from_predecessor_list(r,n)}};BinaryHeap.prototype={push:function(t){this.content.push(t),this.bubbleUp(this.content.length-1)},pop:function(){var t=this.content[0],e=this.content.pop();return this.content.length>0&&(this.content[0]=e,this.sinkDown(0)),t},remove:function(t){for(var e=this.content.length,i=0;i0;){var i=Math.floor((t+1)/2)-1,n=this.content[i];if(!(this.scoreFunction(e)