{ "version": 3, "sources": ["../../../node_modules/@rails/actioncable/src/adapters.js", "../../../node_modules/@rails/actioncable/src/logger.js", "../../../node_modules/@rails/actioncable/src/connection_monitor.js", "../../../node_modules/@rails/actioncable/src/internal.js", "../../../node_modules/@rails/actioncable/src/connection.js", "../../../node_modules/@rails/actioncable/src/subscription.js", "../../../node_modules/@rails/actioncable/src/subscription_guarantor.js", "../../../node_modules/@rails/actioncable/src/subscriptions.js", "../../../node_modules/@rails/actioncable/src/consumer.js", "../../../node_modules/@rails/actioncable/src/index.js", "../../../node_modules/jquery/dist/jquery.js", "../../../node_modules/jquery-ujs/src/rails.js", "../../../node_modules/underscore/modules/_setup.js", "../../../node_modules/underscore/modules/restArguments.js", "../../../node_modules/underscore/modules/isObject.js", "../../../node_modules/underscore/modules/isNull.js", "../../../node_modules/underscore/modules/isUndefined.js", "../../../node_modules/underscore/modules/isBoolean.js", "../../../node_modules/underscore/modules/isElement.js", "../../../node_modules/underscore/modules/_tagTester.js", "../../../node_modules/underscore/modules/isString.js", "../../../node_modules/underscore/modules/isNumber.js", "../../../node_modules/underscore/modules/isDate.js", "../../../node_modules/underscore/modules/isRegExp.js", "../../../node_modules/underscore/modules/isError.js", "../../../node_modules/underscore/modules/isSymbol.js", "../../../node_modules/underscore/modules/isArrayBuffer.js", "../../../node_modules/underscore/modules/isFunction.js", "../../../node_modules/underscore/modules/_hasObjectTag.js", "../../../node_modules/underscore/modules/_stringTagBug.js", "../../../node_modules/underscore/modules/isDataView.js", "../../../node_modules/underscore/modules/isArray.js", "../../../node_modules/underscore/modules/_has.js", "../../../node_modules/underscore/modules/isArguments.js", "../../../node_modules/underscore/modules/isFinite.js", "../../../node_modules/underscore/modules/isNaN.js", "../../../node_modules/underscore/modules/constant.js", "../../../node_modules/underscore/modules/_createSizePropertyCheck.js", "../../../node_modules/underscore/modules/_shallowProperty.js", "../../../node_modules/underscore/modules/_getByteLength.js", "../../../node_modules/underscore/modules/_isBufferLike.js", "../../../node_modules/underscore/modules/isTypedArray.js", "../../../node_modules/underscore/modules/_getLength.js", "../../../node_modules/underscore/modules/_collectNonEnumProps.js", "../../../node_modules/underscore/modules/keys.js", "../../../node_modules/underscore/modules/isEmpty.js", "../../../node_modules/underscore/modules/isMatch.js", "../../../node_modules/underscore/modules/underscore.js", "../../../node_modules/underscore/modules/_toBufferView.js", "../../../node_modules/underscore/modules/isEqual.js", "../../../node_modules/underscore/modules/allKeys.js", "../../../node_modules/underscore/modules/_methodFingerprint.js", "../../../node_modules/underscore/modules/isMap.js", "../../../node_modules/underscore/modules/isWeakMap.js", "../../../node_modules/underscore/modules/isSet.js", "../../../node_modules/underscore/modules/isWeakSet.js", "../../../node_modules/underscore/modules/values.js", "../../../node_modules/underscore/modules/pairs.js", "../../../node_modules/underscore/modules/invert.js", "../../../node_modules/underscore/modules/functions.js", "../../../node_modules/underscore/modules/_createAssigner.js", "../../../node_modules/underscore/modules/extend.js", "../../../node_modules/underscore/modules/extendOwn.js", "../../../node_modules/underscore/modules/defaults.js", "../../../node_modules/underscore/modules/_baseCreate.js", "../../../node_modules/underscore/modules/create.js", "../../../node_modules/underscore/modules/clone.js", "../../../node_modules/underscore/modules/tap.js", "../../../node_modules/underscore/modules/toPath.js", "../../../node_modules/underscore/modules/_toPath.js", "../../../node_modules/underscore/modules/_deepGet.js", "../../../node_modules/underscore/modules/get.js", "../../../node_modules/underscore/modules/has.js", "../../../node_modules/underscore/modules/identity.js", "../../../node_modules/underscore/modules/matcher.js", "../../../node_modules/underscore/modules/property.js", "../../../node_modules/underscore/modules/_optimizeCb.js", "../../../node_modules/underscore/modules/_baseIteratee.js", "../../../node_modules/underscore/modules/iteratee.js", "../../../node_modules/underscore/modules/_cb.js", "../../../node_modules/underscore/modules/mapObject.js", "../../../node_modules/underscore/modules/noop.js", "../../../node_modules/underscore/modules/propertyOf.js", "../../../node_modules/underscore/modules/times.js", "../../../node_modules/underscore/modules/random.js", "../../../node_modules/underscore/modules/now.js", "../../../node_modules/underscore/modules/_createEscaper.js", "../../../node_modules/underscore/modules/_escapeMap.js", "../../../node_modules/underscore/modules/escape.js", "../../../node_modules/underscore/modules/_unescapeMap.js", "../../../node_modules/underscore/modules/unescape.js", "../../../node_modules/underscore/modules/templateSettings.js", "../../../node_modules/underscore/modules/template.js", "../../../node_modules/underscore/modules/result.js", "../../../node_modules/underscore/modules/uniqueId.js", "../../../node_modules/underscore/modules/chain.js", "../../../node_modules/underscore/modules/_executeBound.js", "../../../node_modules/underscore/modules/partial.js", "../../../node_modules/underscore/modules/bind.js", "../../../node_modules/underscore/modules/_isArrayLike.js", "../../../node_modules/underscore/modules/_flatten.js", "../../../node_modules/underscore/modules/bindAll.js", "../../../node_modules/underscore/modules/memoize.js", "../../../node_modules/underscore/modules/delay.js", "../../../node_modules/underscore/modules/defer.js", "../../../node_modules/underscore/modules/throttle.js", "../../../node_modules/underscore/modules/debounce.js", "../../../node_modules/underscore/modules/wrap.js", "../../../node_modules/underscore/modules/negate.js", "../../../node_modules/underscore/modules/compose.js", "../../../node_modules/underscore/modules/after.js", "../../../node_modules/underscore/modules/before.js", "../../../node_modules/underscore/modules/once.js", "../../../node_modules/underscore/modules/findKey.js", "../../../node_modules/underscore/modules/_createPredicateIndexFinder.js", "../../../node_modules/underscore/modules/findIndex.js", "../../../node_modules/underscore/modules/findLastIndex.js", "../../../node_modules/underscore/modules/sortedIndex.js", "../../../node_modules/underscore/modules/_createIndexFinder.js", "../../../node_modules/underscore/modules/indexOf.js", "../../../node_modules/underscore/modules/lastIndexOf.js", "../../../node_modules/underscore/modules/find.js", "../../../node_modules/underscore/modules/findWhere.js", "../../../node_modules/underscore/modules/each.js", "../../../node_modules/underscore/modules/map.js", "../../../node_modules/underscore/modules/_createReduce.js", "../../../node_modules/underscore/modules/reduce.js", "../../../node_modules/underscore/modules/reduceRight.js", "../../../node_modules/underscore/modules/filter.js", "../../../node_modules/underscore/modules/reject.js", "../../../node_modules/underscore/modules/every.js", "../../../node_modules/underscore/modules/some.js", "../../../node_modules/underscore/modules/contains.js", "../../../node_modules/underscore/modules/invoke.js", "../../../node_modules/underscore/modules/pluck.js", "../../../node_modules/underscore/modules/where.js", "../../../node_modules/underscore/modules/max.js", "../../../node_modules/underscore/modules/min.js", "../../../node_modules/underscore/modules/toArray.js", "../../../node_modules/underscore/modules/sample.js", "../../../node_modules/underscore/modules/shuffle.js", "../../../node_modules/underscore/modules/sortBy.js", "../../../node_modules/underscore/modules/_group.js", "../../../node_modules/underscore/modules/groupBy.js", "../../../node_modules/underscore/modules/indexBy.js", "../../../node_modules/underscore/modules/countBy.js", "../../../node_modules/underscore/modules/partition.js", "../../../node_modules/underscore/modules/size.js", "../../../node_modules/underscore/modules/_keyInObj.js", "../../../node_modules/underscore/modules/pick.js", "../../../node_modules/underscore/modules/omit.js", "../../../node_modules/underscore/modules/initial.js", "../../../node_modules/underscore/modules/first.js", "../../../node_modules/underscore/modules/rest.js", "../../../node_modules/underscore/modules/last.js", "../../../node_modules/underscore/modules/compact.js", "../../../node_modules/underscore/modules/flatten.js", "../../../node_modules/underscore/modules/difference.js", "../../../node_modules/underscore/modules/without.js", "../../../node_modules/underscore/modules/uniq.js", "../../../node_modules/underscore/modules/union.js", "../../../node_modules/underscore/modules/intersection.js", "../../../node_modules/underscore/modules/unzip.js", "../../../node_modules/underscore/modules/zip.js", "../../../node_modules/underscore/modules/object.js", "../../../node_modules/underscore/modules/range.js", "../../../node_modules/underscore/modules/chunk.js", "../../../node_modules/underscore/modules/_chainResult.js", "../../../node_modules/underscore/modules/mixin.js", "../../../node_modules/underscore/modules/underscore-array-methods.js", "../../../node_modules/underscore/modules/index.js", "../../../node_modules/underscore/modules/index-default.js", "../../../node_modules/underscore/modules/index-all.js", "../../../node_modules/moment/moment.js", "../../javascript/CLNDR/clndr.min.js", "../../javascript/jquery.cookie.js", "../../javascript/jquery.magnific-popup.js", "../../../node_modules/bootstrap-tour/build/js/bootstrap-tour.js", "../../javascript/amoment-2.5.1.js", "../../javascript/kendo-ui/split/kendo.calendar.js", "../../javascript/kendo-ui/split/kendo.scheduler.view.js", "../../javascript/kendo-ui/split/kendo.scheduler.dayview.js", "../../javascript/kendo-ui/split/kendo.scheduler.monthview.js", "../../javascript/kendo-ui/split/kendo.scheduler.js", "../../javascript/burbio/base.js", "../../javascript/burbio/group-menu.js", "../../../node_modules/bootstrap-select/js/bootstrap-select.js", "../../javascript/clipboard-js/clipboard.min.js", "../../javascript/common.js", "../../javascript/burbio/calendar-menu.js", "../../javascript/burbio/calendar.js", "../../javascript/burbio/data-store.js", "../../javascript/burbio/controller.js", "../../../node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/snakeize.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/fetch_requests.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/index.js", "../../javascript/jquery.js", "../../javascript/jquery-ui.min.js", "../../javascript/application.js", "../../javascript/jQueryFileUpload/jquery.fileupload.js", "../../javascript/jQueryFileUpload/jquery.iframe-transport.js", "../../javascript/jquery.fs.scroller.min.js", "../../javascript/jquery.fs.selecter.min.js", "../../../node_modules/@hotwired/stimulus/dist/stimulus.js", "../../javascript/controllers/application.js", "../../../node_modules/@popperjs/core/lib/index.js", "../../../node_modules/@popperjs/core/lib/enums.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js", "../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js", "../../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js", "../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js", "../../../node_modules/@popperjs/core/lib/utils/math.js", "../../../node_modules/@popperjs/core/lib/utils/userAgent.js", "../../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/contains.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js", "../../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js", "../../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js", "../../../node_modules/@popperjs/core/lib/utils/within.js", "../../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js", "../../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js", "../../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js", "../../../node_modules/@popperjs/core/lib/modifiers/arrow.js", "../../../node_modules/@popperjs/core/lib/utils/getVariation.js", "../../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js", "../../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js", "../../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js", "../../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js", "../../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js", "../../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js", "../../../node_modules/@popperjs/core/lib/utils/computeOffsets.js", "../../../node_modules/@popperjs/core/lib/utils/detectOverflow.js", "../../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js", "../../../node_modules/@popperjs/core/lib/modifiers/flip.js", "../../../node_modules/@popperjs/core/lib/modifiers/hide.js", "../../../node_modules/@popperjs/core/lib/modifiers/offset.js", "../../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js", "../../../node_modules/@popperjs/core/lib/utils/getAltAxis.js", "../../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js", "../../../node_modules/@popperjs/core/lib/utils/orderModifiers.js", "../../../node_modules/@popperjs/core/lib/utils/debounce.js", "../../../node_modules/@popperjs/core/lib/utils/mergeByName.js", "../../../node_modules/@popperjs/core/lib/createPopper.js", "../../../node_modules/@popperjs/core/lib/popper-lite.js", "../../../node_modules/@popperjs/core/lib/popper.js", "../../../node_modules/bootstrap/js/src/dom/data.js", "../../../node_modules/bootstrap/js/src/util/index.js", "../../../node_modules/bootstrap/js/src/dom/event-handler.js", "../../../node_modules/bootstrap/js/src/dom/manipulator.js", "../../../node_modules/bootstrap/js/src/util/config.js", "../../../node_modules/bootstrap/js/src/base-component.js", "../../../node_modules/bootstrap/js/src/dom/selector-engine.js", "../../../node_modules/bootstrap/js/src/util/component-functions.js", "../../../node_modules/bootstrap/js/src/alert.js", "../../../node_modules/bootstrap/js/src/button.js", "../../../node_modules/bootstrap/js/src/util/swipe.js", "../../../node_modules/bootstrap/js/src/carousel.js", "../../../node_modules/bootstrap/js/src/collapse.js", "../../../node_modules/bootstrap/js/src/dropdown.js", "../../../node_modules/bootstrap/js/src/util/backdrop.js", "../../../node_modules/bootstrap/js/src/util/focustrap.js", "../../../node_modules/bootstrap/js/src/util/scrollbar.js", "../../../node_modules/bootstrap/js/src/modal.js", "../../../node_modules/bootstrap/js/src/offcanvas.js", "../../../node_modules/bootstrap/js/src/util/sanitizer.js", "../../../node_modules/bootstrap/js/src/util/template-factory.js", "../../../node_modules/bootstrap/js/src/tooltip.js", "../../../node_modules/bootstrap/js/src/popover.js", "../../../node_modules/bootstrap/js/src/scrollspy.js", "../../../node_modules/bootstrap/js/src/tab.js", "../../../node_modules/bootstrap/js/src/toast.js", "../../../node_modules/chartkick/dist/chartkick.esm.js", "../../../node_modules/@kurkle/color/dist/color.esm.js", "../../../node_modules/chart.js/src/helpers/helpers.core.ts", "../../../node_modules/chart.js/src/helpers/helpers.math.ts", "../../../node_modules/chart.js/src/helpers/helpers.collection.ts", "../../../node_modules/chart.js/src/helpers/helpers.extras.ts", "../../../node_modules/chart.js/src/helpers/helpers.easing.ts", "../../../node_modules/chart.js/src/helpers/helpers.color.ts", "../../../node_modules/chart.js/src/core/core.animations.defaults.js", "../../../node_modules/chart.js/src/core/core.layouts.defaults.js", "../../../node_modules/chart.js/src/helpers/helpers.intl.ts", "../../../node_modules/chart.js/src/core/core.ticks.js", "../../../node_modules/chart.js/src/core/core.scale.defaults.js", "../../../node_modules/chart.js/src/core/core.defaults.js", "../../../node_modules/chart.js/src/helpers/helpers.canvas.ts", "../../../node_modules/chart.js/src/helpers/helpers.options.ts", "../../../node_modules/chart.js/src/helpers/helpers.config.ts", "../../../node_modules/chart.js/src/helpers/helpers.curve.ts", "../../../node_modules/chart.js/src/helpers/helpers.dom.ts", "../../../node_modules/chart.js/src/helpers/helpers.interpolation.ts", "../../../node_modules/chart.js/src/helpers/helpers.rtl.ts", "../../../node_modules/chart.js/src/helpers/helpers.segment.js", "../../../node_modules/chart.js/src/core/core.animator.js", "../../../node_modules/chart.js/src/core/core.animation.js", "../../../node_modules/chart.js/src/core/core.animations.js", "../../../node_modules/chart.js/src/core/core.datasetController.js", "../../../node_modules/chart.js/src/controllers/controller.bar.js", "../../../node_modules/chart.js/src/controllers/controller.bubble.js", "../../../node_modules/chart.js/src/controllers/controller.doughnut.js", "../../../node_modules/chart.js/src/controllers/controller.line.js", "../../../node_modules/chart.js/src/controllers/controller.polarArea.js", "../../../node_modules/chart.js/src/controllers/controller.pie.js", "../../../node_modules/chart.js/src/controllers/controller.radar.js", "../../../node_modules/chart.js/src/controllers/controller.scatter.js", "../../../node_modules/chart.js/src/core/core.adapters.ts", "../../../node_modules/chart.js/src/core/core.interaction.js", "../../../node_modules/chart.js/src/core/core.layouts.js", "../../../node_modules/chart.js/src/platform/platform.base.js", "../../../node_modules/chart.js/src/platform/platform.basic.js", "../../../node_modules/chart.js/src/platform/platform.dom.js", "../../../node_modules/chart.js/src/platform/index.js", "../../../node_modules/chart.js/src/core/core.element.ts", "../../../node_modules/chart.js/src/core/core.scale.autoskip.js", "../../../node_modules/chart.js/src/core/core.scale.js", "../../../node_modules/chart.js/src/core/core.typedRegistry.js", "../../../node_modules/chart.js/src/core/core.registry.js", "../../../node_modules/chart.js/src/core/core.plugins.js", "../../../node_modules/chart.js/src/core/core.config.js", "../../../node_modules/chart.js/src/core/core.controller.js", "../../../node_modules/chart.js/src/elements/element.arc.ts", "../../../node_modules/chart.js/src/elements/element.line.js", "../../../node_modules/chart.js/src/elements/element.point.ts", "../../../node_modules/chart.js/src/elements/element.bar.js", "../../../node_modules/chart.js/src/plugins/plugin.colors.ts", "../../../node_modules/chart.js/src/plugins/plugin.decimation.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/filler.segment.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/filler.helper.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/filler.options.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/filler.target.stack.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/simpleArc.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/filler.target.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/filler.drawing.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/index.js", "../../../node_modules/chart.js/src/plugins/plugin.legend.js", "../../../node_modules/chart.js/src/plugins/plugin.title.js", "../../../node_modules/chart.js/src/plugins/plugin.subtitle.js", "../../../node_modules/chart.js/src/plugins/plugin.tooltip.js", "../../../node_modules/chart.js/src/scales/scale.category.js", "../../../node_modules/chart.js/src/scales/scale.linearbase.js", "../../../node_modules/chart.js/src/scales/scale.linear.js", "../../../node_modules/chart.js/src/scales/scale.logarithmic.js", "../../../node_modules/chart.js/src/scales/scale.radialLinear.js", "../../../node_modules/chart.js/src/scales/scale.time.js", "../../../node_modules/chart.js/src/scales/scale.timeseries.js", "../../../node_modules/chart.js/src/index.ts", "../../../node_modules/chart.js/auto/auto.js", "../../../node_modules/@babel/runtime/helpers/esm/typeof.js", "../../../node_modules/date-fns/esm/_lib/toInteger/index.js", "../../../node_modules/date-fns/esm/_lib/requiredArgs/index.js", "../../../node_modules/date-fns/esm/toDate/index.js", "../../../node_modules/date-fns/esm/addDays/index.js", "../../../node_modules/date-fns/esm/addMonths/index.js", "../../../node_modules/date-fns/esm/addMilliseconds/index.js", "../../../node_modules/date-fns/esm/addHours/index.js", "../../../node_modules/date-fns/esm/_lib/defaultOptions/index.js", "../../../node_modules/date-fns/esm/startOfWeek/index.js", "../../../node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js", "../../../node_modules/date-fns/esm/startOfDay/index.js", "../../../node_modules/date-fns/esm/differenceInCalendarDays/index.js", "../../../node_modules/date-fns/esm/addMinutes/index.js", "../../../node_modules/date-fns/esm/addQuarters/index.js", "../../../node_modules/date-fns/esm/addSeconds/index.js", "../../../node_modules/date-fns/esm/addWeeks/index.js", "../../../node_modules/date-fns/esm/addYears/index.js", "../../../node_modules/date-fns/esm/compareAsc/index.js", "../../../node_modules/date-fns/esm/constants/index.js", "../../../node_modules/date-fns/esm/isDate/index.js", "../../../node_modules/date-fns/esm/isValid/index.js", "../../../node_modules/date-fns/esm/differenceInCalendarMonths/index.js", "../../../node_modules/date-fns/esm/differenceInCalendarYears/index.js", "../../../node_modules/date-fns/esm/differenceInDays/index.js", "../../../node_modules/date-fns/esm/differenceInMilliseconds/index.js", "../../../node_modules/date-fns/esm/_lib/roundingMethods/index.js", "../../../node_modules/date-fns/esm/differenceInHours/index.js", "../../../node_modules/date-fns/esm/differenceInMinutes/index.js", "../../../node_modules/date-fns/esm/endOfDay/index.js", "../../../node_modules/date-fns/esm/endOfMonth/index.js", "../../../node_modules/date-fns/esm/isLastDayOfMonth/index.js", "../../../node_modules/date-fns/esm/differenceInMonths/index.js", "../../../node_modules/date-fns/esm/differenceInQuarters/index.js", "../../../node_modules/date-fns/esm/differenceInSeconds/index.js", "../../../node_modules/date-fns/esm/differenceInWeeks/index.js", "../../../node_modules/date-fns/esm/differenceInYears/index.js", "../../../node_modules/date-fns/esm/startOfMinute/index.js", "../../../node_modules/date-fns/esm/startOfQuarter/index.js", "../../../node_modules/date-fns/esm/startOfMonth/index.js", "../../../node_modules/date-fns/esm/endOfYear/index.js", "../../../node_modules/date-fns/esm/startOfYear/index.js", "../../../node_modules/date-fns/esm/endOfHour/index.js", "../../../node_modules/date-fns/esm/endOfWeek/index.js", "../../../node_modules/date-fns/esm/endOfMinute/index.js", "../../../node_modules/date-fns/esm/endOfQuarter/index.js", "../../../node_modules/date-fns/esm/endOfSecond/index.js", "../../../node_modules/date-fns/esm/subMilliseconds/index.js", "../../../node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js", "../../../node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js", "../../../node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js", "../../../node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js", "../../../node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js", "../../../node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js", "../../../node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js", "../../../node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js", "../../../node_modules/date-fns/esm/_lib/getUTCWeek/index.js", "../../../node_modules/date-fns/esm/_lib/addLeadingZeros/index.js", "../../../node_modules/date-fns/esm/_lib/format/lightFormatters/index.js", "../../../node_modules/date-fns/esm/_lib/format/formatters/index.js", "../../../node_modules/date-fns/esm/_lib/format/longFormatters/index.js", "../../../node_modules/date-fns/esm/_lib/protectedTokens/index.js", "../../../node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js", "../../../node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js", "../../../node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js", "../../../node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js", "../../../node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js", "../../../node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js", "../../../node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js", "../../../node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js", "../../../node_modules/date-fns/esm/locale/en-US/_lib/match/index.js", "../../../node_modules/date-fns/esm/locale/en-US/index.js", "../../../node_modules/date-fns/esm/_lib/defaultLocale/index.js", "../../../node_modules/date-fns/esm/format/index.js", "../../../node_modules/date-fns/esm/_lib/assign/index.js", "../../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js", "../../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js", "../../../node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js", "../../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js", "../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js", "../../../node_modules/@babel/runtime/helpers/esm/inherits.js", "../../../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js", "../../../node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js", "../../../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js", "../../../node_modules/@babel/runtime/helpers/esm/createSuper.js", "../../../node_modules/@babel/runtime/helpers/esm/classCallCheck.js", "../../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js", "../../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js", "../../../node_modules/@babel/runtime/helpers/esm/createClass.js", "../../../node_modules/@babel/runtime/helpers/esm/defineProperty.js", "../../../node_modules/date-fns/esm/parse/_lib/Setter.js", "../../../node_modules/date-fns/esm/parse/_lib/Parser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/EraParser.js", "../../../node_modules/date-fns/esm/parse/_lib/constants.js", "../../../node_modules/date-fns/esm/parse/_lib/utils.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/YearParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/LocalWeekYearParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/ISOWeekYearParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/ExtendedYearParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/QuarterParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/StandAloneQuarterParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/MonthParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/StandAloneMonthParser.js", "../../../node_modules/date-fns/esm/_lib/setUTCWeek/index.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/LocalWeekParser.js", "../../../node_modules/date-fns/esm/_lib/setUTCISOWeek/index.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/ISOWeekParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/DateParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/DayOfYearParser.js", "../../../node_modules/date-fns/esm/_lib/setUTCDay/index.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/DayParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/LocalDayParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/StandAloneLocalDayParser.js", "../../../node_modules/date-fns/esm/_lib/setUTCISODay/index.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/ISODayParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/AMPMParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/AMPMMidnightParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/DayPeriodParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/Hour1to12Parser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/Hour0to23Parser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/Hour0To11Parser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/Hour1To24Parser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/MinuteParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/SecondParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/FractionOfSecondParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/ISOTimezoneWithZParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/ISOTimezoneParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/TimestampSecondsParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/TimestampMillisecondsParser.js", "../../../node_modules/date-fns/esm/parse/_lib/parsers/index.js", "../../../node_modules/date-fns/esm/parse/index.js", "../../../node_modules/date-fns/esm/startOfHour/index.js", "../../../node_modules/date-fns/esm/startOfSecond/index.js", "../../../node_modules/date-fns/esm/parseISO/index.js", "../../../node_modules/chartjs-adapter-date-fns/dist/chartjs-adapter-date-fns.esm.js", "../../../node_modules/chartkick/chart.js/chart.esm.js", "../../javascript/dfp.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.core.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.router.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.data.odata.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.data.xml.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.data.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.binder.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.fx.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.view.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dom.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.ooxml.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.excel.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.data.signalr.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.color.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.popup.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.html.base.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.html.icon.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.icons.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.drawing.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.validator.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.userevents.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.draganddrop.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.mobile.scroller.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.html.chip.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.chip.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.html.chiplist.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.chiplist.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.groupable.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.reorderable.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.resizable.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.sortable.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.selectable.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.html.button.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.chat.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.badge.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.button.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.togglebutton.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.buttongroup.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.breadcrumb.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.switch.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.pager.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.notification.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.tooltip.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.floatinglabel.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.label.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.actionsheet.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.list.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.calendar.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dateinput.common.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dateinput.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.datepicker.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.drawer.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.multiviewcalendar.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.virtuallist.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.autocomplete.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dropdownlist.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.treeview.draganddrop.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.html.input.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.treeview.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dropdowntree.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.combobox.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.multiselect.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.multicolumncombobox.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.slider.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.textbox.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.numerictextbox.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.colorpicker.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.tabstrip.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.filtermenu.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.menu.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.expansionpanel.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.columnmenu.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.columnsorter.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.toggleinputbase.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.checkbox.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.editable.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.window.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.filtercell.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.pane.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.progressbar.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.pdf.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dialog.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.form.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.button.menu.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.splitbutton.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dropdownbutton.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.toolbar.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.grid.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.listview.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.listbox.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.loader.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.upload.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.filebrowser.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.imagebrowser.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.textarea.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.editor.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.maskedtextbox.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.mediaplayer.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.pivot.common.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.pivotgrid.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.pivot.fieldmenu.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.filter.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.panelbar.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.responsivepanel.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.timepicker.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.datetimepicker.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.daterangepicker.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.scrollview.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.splitter.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.scheduler.view.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.scheduler.dayview.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.scheduler.agendaview.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.scheduler.monthview.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.scheduler.yearview.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.scheduler.recurrence.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.scheduler.timelineview.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.scheduler.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.treelist.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.gantt.data.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.gantt.editors.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.gantt.list.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.touch.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.gantt.timeline.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.gantt.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.timeline.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.spreadsheet.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.pivot.configurator.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.ripple.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.pdfviewer.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.rating.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.angular.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.filemanager.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.stepper.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.tilelayout.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.wizard.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.appbar.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.imageeditor.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.floatingactionbutton.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.inputgroupbase.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.radiobutton.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.radiogroup.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.checkboxgroup.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.bottomnavigation.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.skeletoncontainer.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.taskboard.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.captcha.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.orgchart.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.popover.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.avatar.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dataviz.core.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dataviz.themes.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.circularprogressbar.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.signature.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.timeselector.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.timedurationpicker.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dockmanager.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.web.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dataviz.chart.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dataviz.gauge.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dataviz.barcode.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dataviz.qrcode.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dataviz.stock.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dataviz.sparkline.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dataviz.map.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dataviz.diagram.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dataviz.treemap.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.dataviz.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.mobile.js", "../../../node_modules/@progress/kendo-ui/esm/kendo.all.js", "../../javascript/kendo-ui/split/kendo.core.js", "../../javascript/kendo-ui/split/kendo.progressbar.js", "../../javascript/kendo-ui/split/kendo.data.js", "../../javascript/kendo-ui/split/kendo.popup.js", "../../javascript/kendo-ui/split/kendo.tooltip.js", "../../javascript/kendo-ui/split/kendo.list.js", "../../javascript/kendo-ui/split/kendo.dropdownlist.js", "../../javascript/kendo-ui/split/kendo.datepicker.js", "../../javascript/kendo-ui/split/kendo.timepicker.js", "../../javascript/kendo-ui/split/kendo.datetimepicker.js", "../../javascript/kendo-ui/split/kendo.userevents.js", "../../javascript/kendo-ui/split/kendo.numerictextbox.js", "../../javascript/kendo-ui/split/kendo.validator.js", "../../javascript/kendo-ui/split/kendo.binder.js", "../../javascript/kendo-ui/split/kendo.editable.js", "../../javascript/kendo-ui/split/kendo.multiselect.js", "../../javascript/kendo-ui/split/kendo.draganddrop.js", "../../javascript/kendo-ui/split/kendo.window.js", "../../javascript/kendo-ui/split/kendo.scheduler.recurrence.js", "../../javascript/kendo-ui/split/kendo.scheduler.agendaview.js", "../../javascript/kendo-ui/split/kendo.fx.js", "../../javascript/kendo-ui/split/kendo.mobile.scroller.js", "../../javascript/kendo-ui/split/kendo.view.js", "../../javascript/kendo-ui/split/kendo.mobile.view.js", "../../javascript/kendo-ui/split/kendo.mobile.loader.js", "../../javascript/kendo-ui/split/kendo.mobile.pane.js", "../../javascript/kendo-ui/split/kendo.router.js", "../../javascript/kendo-ui/split/kendo.mobile.application.js", "../../javascript/kendo-ui/split/kendo.mobile.popover.js", "../../javascript/kendo-ui/split/kendo.mobile.shim.js", "../../javascript/kendo-ui/split/kendo.mobile.actionsheet.js", "../../javascript/kendo-ui/split/kendo.autocomplete.js", "../../javascript/kendo-ui/split/kendo.treeview.js", "../../javascript/bootstrap.min.js", "../../javascript/burbio/group-search.js", "../../javascript/burbio/group-search-header.js", "../../javascript/tooltip/bootstrap-tooltip.js", "../../javascript/tracking/tracking-helper.js"], "sourcesContent": ["export default {\n logger: self.console,\n WebSocket: self.WebSocket\n}\n", "import adapters from \"./adapters\"\n\n// The logger is disabled by default. You can enable it with:\n//\n// ActionCable.logger.enabled = true\n//\n// Example:\n//\n// import * as ActionCable from '@rails/actioncable'\n//\n// ActionCable.logger.enabled = true\n// ActionCable.logger.log('Connection Established.')\n//\n\nexport default {\n log(...messages) {\n if (this.enabled) {\n messages.push(Date.now())\n adapters.logger.log(\"[ActionCable]\", ...messages)\n }\n },\n}\n", "import logger from \"./logger\"\n\n// Responsible for ensuring the cable connection is in good health by validating the heartbeat pings sent from the server, and attempting\n// revival reconnections if things go astray. Internal class, not intended for direct user manipulation.\n\nconst now = () => new Date().getTime()\n\nconst secondsSince = time => (now() - time) / 1000\n\nclass ConnectionMonitor {\n constructor(connection) {\n this.visibilityDidChange = this.visibilityDidChange.bind(this)\n this.connection = connection\n this.reconnectAttempts = 0\n }\n\n start() {\n if (!this.isRunning()) {\n this.startedAt = now()\n delete this.stoppedAt\n this.startPolling()\n addEventListener(\"visibilitychange\", this.visibilityDidChange)\n logger.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`)\n }\n }\n\n stop() {\n if (this.isRunning()) {\n this.stoppedAt = now()\n this.stopPolling()\n removeEventListener(\"visibilitychange\", this.visibilityDidChange)\n logger.log(\"ConnectionMonitor stopped\")\n }\n }\n\n isRunning() {\n return this.startedAt && !this.stoppedAt\n }\n\n recordPing() {\n this.pingedAt = now()\n }\n\n recordConnect() {\n this.reconnectAttempts = 0\n this.recordPing()\n delete this.disconnectedAt\n logger.log(\"ConnectionMonitor recorded connect\")\n }\n\n recordDisconnect() {\n this.disconnectedAt = now()\n logger.log(\"ConnectionMonitor recorded disconnect\")\n }\n\n // Private\n\n startPolling() {\n this.stopPolling()\n this.poll()\n }\n\n stopPolling() {\n clearTimeout(this.pollTimeout)\n }\n\n poll() {\n this.pollTimeout = setTimeout(() => {\n this.reconnectIfStale()\n this.poll()\n }\n , this.getPollInterval())\n }\n\n getPollInterval() {\n const { staleThreshold, reconnectionBackoffRate } = this.constructor\n const backoff = Math.pow(1 + reconnectionBackoffRate, Math.min(this.reconnectAttempts, 10))\n const jitterMax = this.reconnectAttempts === 0 ? 1.0 : reconnectionBackoffRate\n const jitter = jitterMax * Math.random()\n return staleThreshold * 1000 * backoff * (1 + jitter)\n }\n\n reconnectIfStale() {\n if (this.connectionIsStale()) {\n logger.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${secondsSince(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`)\n this.reconnectAttempts++\n if (this.disconnectedRecently()) {\n logger.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${secondsSince(this.disconnectedAt)} s`)\n } else {\n logger.log(\"ConnectionMonitor reopening\")\n this.connection.reopen()\n }\n }\n }\n\n get refreshedAt() {\n return this.pingedAt ? this.pingedAt : this.startedAt\n }\n\n connectionIsStale() {\n return secondsSince(this.refreshedAt) > this.constructor.staleThreshold\n }\n\n disconnectedRecently() {\n return this.disconnectedAt && (secondsSince(this.disconnectedAt) < this.constructor.staleThreshold)\n }\n\n visibilityDidChange() {\n if (document.visibilityState === \"visible\") {\n setTimeout(() => {\n if (this.connectionIsStale() || !this.connection.isOpen()) {\n logger.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`)\n this.connection.reopen()\n }\n }\n , 200)\n }\n }\n\n}\n\nConnectionMonitor.staleThreshold = 6 // Server::Connections::BEAT_INTERVAL * 2 (missed two pings)\nConnectionMonitor.reconnectionBackoffRate = 0.15\n\nexport default ConnectionMonitor\n", "export default {\n \"message_types\": {\n \"welcome\": \"welcome\",\n \"disconnect\": \"disconnect\",\n \"ping\": \"ping\",\n \"confirmation\": \"confirm_subscription\",\n \"rejection\": \"reject_subscription\"\n },\n \"disconnect_reasons\": {\n \"unauthorized\": \"unauthorized\",\n \"invalid_request\": \"invalid_request\",\n \"server_restart\": \"server_restart\"\n },\n \"default_mount_path\": \"/cable\",\n \"protocols\": [\n \"actioncable-v1-json\",\n \"actioncable-unsupported\"\n ]\n}\n", "import adapters from \"./adapters\"\nimport ConnectionMonitor from \"./connection_monitor\"\nimport INTERNAL from \"./internal\"\nimport logger from \"./logger\"\n\n// Encapsulate the cable connection held by the consumer. This is an internal class not intended for direct user manipulation.\n\nconst {message_types, protocols} = INTERNAL\nconst supportedProtocols = protocols.slice(0, protocols.length - 1)\n\nconst indexOf = [].indexOf\n\nclass Connection {\n constructor(consumer) {\n this.open = this.open.bind(this)\n this.consumer = consumer\n this.subscriptions = this.consumer.subscriptions\n this.monitor = new ConnectionMonitor(this)\n this.disconnected = true\n }\n\n send(data) {\n if (this.isOpen()) {\n this.webSocket.send(JSON.stringify(data))\n return true\n } else {\n return false\n }\n }\n\n open() {\n if (this.isActive()) {\n logger.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`)\n return false\n } else {\n logger.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${protocols}`)\n if (this.webSocket) { this.uninstallEventHandlers() }\n this.webSocket = new adapters.WebSocket(this.consumer.url, protocols)\n this.installEventHandlers()\n this.monitor.start()\n return true\n }\n }\n\n close({allowReconnect} = {allowReconnect: true}) {\n if (!allowReconnect) { this.monitor.stop() }\n // Avoid closing websockets in a \"connecting\" state due to Safari 15.1+ bug. See: https://github.com/rails/rails/issues/43835#issuecomment-1002288478\n if (this.isOpen()) {\n return this.webSocket.close()\n }\n }\n\n reopen() {\n logger.log(`Reopening WebSocket, current state is ${this.getState()}`)\n if (this.isActive()) {\n try {\n return this.close()\n } catch (error) {\n logger.log(\"Failed to reopen WebSocket\", error)\n }\n finally {\n logger.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`)\n setTimeout(this.open, this.constructor.reopenDelay)\n }\n } else {\n return this.open()\n }\n }\n\n getProtocol() {\n if (this.webSocket) {\n return this.webSocket.protocol\n }\n }\n\n isOpen() {\n return this.isState(\"open\")\n }\n\n isActive() {\n return this.isState(\"open\", \"connecting\")\n }\n\n // Private\n\n isProtocolSupported() {\n return indexOf.call(supportedProtocols, this.getProtocol()) >= 0\n }\n\n isState(...states) {\n return indexOf.call(states, this.getState()) >= 0\n }\n\n getState() {\n if (this.webSocket) {\n for (let state in adapters.WebSocket) {\n if (adapters.WebSocket[state] === this.webSocket.readyState) {\n return state.toLowerCase()\n }\n }\n }\n return null\n }\n\n installEventHandlers() {\n for (let eventName in this.events) {\n const handler = this.events[eventName].bind(this)\n this.webSocket[`on${eventName}`] = handler\n }\n }\n\n uninstallEventHandlers() {\n for (let eventName in this.events) {\n this.webSocket[`on${eventName}`] = function() {}\n }\n }\n\n}\n\nConnection.reopenDelay = 500\n\nConnection.prototype.events = {\n message(event) {\n if (!this.isProtocolSupported()) { return }\n const {identifier, message, reason, reconnect, type} = JSON.parse(event.data)\n switch (type) {\n case message_types.welcome:\n this.monitor.recordConnect()\n return this.subscriptions.reload()\n case message_types.disconnect:\n logger.log(`Disconnecting. Reason: ${reason}`)\n return this.close({allowReconnect: reconnect})\n case message_types.ping:\n return this.monitor.recordPing()\n case message_types.confirmation:\n this.subscriptions.confirmSubscription(identifier)\n return this.subscriptions.notify(identifier, \"connected\")\n case message_types.rejection:\n return this.subscriptions.reject(identifier)\n default:\n return this.subscriptions.notify(identifier, \"received\", message)\n }\n },\n\n open() {\n logger.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`)\n this.disconnected = false\n if (!this.isProtocolSupported()) {\n logger.log(\"Protocol is unsupported. Stopping monitor and disconnecting.\")\n return this.close({allowReconnect: false})\n }\n },\n\n close(event) {\n logger.log(\"WebSocket onclose event\")\n if (this.disconnected) { return }\n this.disconnected = true\n this.monitor.recordDisconnect()\n return this.subscriptions.notifyAll(\"disconnected\", {willAttemptReconnect: this.monitor.isRunning()})\n },\n\n error() {\n logger.log(\"WebSocket onerror event\")\n }\n}\n\nexport default Connection\n", "// A new subscription is created through the ActionCable.Subscriptions instance available on the consumer.\n// It provides a number of callbacks and a method for calling remote procedure calls on the corresponding\n// Channel instance on the server side.\n//\n// An example demonstrates the basic functionality:\n//\n// App.appearance = App.cable.subscriptions.create(\"AppearanceChannel\", {\n// connected() {\n// // Called once the subscription has been successfully completed\n// },\n//\n// disconnected({ willAttemptReconnect: boolean }) {\n// // Called when the client has disconnected with the server.\n// // The object will have an `willAttemptReconnect` property which\n// // says whether the client has the intention of attempting\n// // to reconnect.\n// },\n//\n// appear() {\n// this.perform('appear', {appearing_on: this.appearingOn()})\n// },\n//\n// away() {\n// this.perform('away')\n// },\n//\n// appearingOn() {\n// $('main').data('appearing-on')\n// }\n// })\n//\n// The methods #appear and #away forward their intent to the remote AppearanceChannel instance on the server\n// by calling the `perform` method with the first parameter being the action (which maps to AppearanceChannel#appear/away).\n// The second parameter is a hash that'll get JSON encoded and made available on the server in the data parameter.\n//\n// This is how the server component would look:\n//\n// class AppearanceChannel < ApplicationActionCable::Channel\n// def subscribed\n// current_user.appear\n// end\n//\n// def unsubscribed\n// current_user.disappear\n// end\n//\n// def appear(data)\n// current_user.appear on: data['appearing_on']\n// end\n//\n// def away\n// current_user.away\n// end\n// end\n//\n// The \"AppearanceChannel\" name is automatically mapped between the client-side subscription creation and the server-side Ruby class name.\n// The AppearanceChannel#appear/away public methods are exposed automatically to client-side invocation through the perform method.\n\nconst extend = function(object, properties) {\n if (properties != null) {\n for (let key in properties) {\n const value = properties[key]\n object[key] = value\n }\n }\n return object\n}\n\nexport default class Subscription {\n constructor(consumer, params = {}, mixin) {\n this.consumer = consumer\n this.identifier = JSON.stringify(params)\n extend(this, mixin)\n }\n\n // Perform a channel action with the optional data passed as an attribute\n perform(action, data = {}) {\n data.action = action\n return this.send(data)\n }\n\n send(data) {\n return this.consumer.send({command: \"message\", identifier: this.identifier, data: JSON.stringify(data)})\n }\n\n unsubscribe() {\n return this.consumer.subscriptions.remove(this)\n }\n}\n", "import logger from \"./logger\"\n\n// Responsible for ensuring channel subscribe command is confirmed, retrying until confirmation is received.\n// Internal class, not intended for direct user manipulation.\n\nclass SubscriptionGuarantor {\n constructor(subscriptions) {\n this.subscriptions = subscriptions\n this.pendingSubscriptions = []\n }\n\n guarantee(subscription) {\n if(this.pendingSubscriptions.indexOf(subscription) == -1){ \n logger.log(`SubscriptionGuarantor guaranteeing ${subscription.identifier}`)\n this.pendingSubscriptions.push(subscription) \n }\n else {\n logger.log(`SubscriptionGuarantor already guaranteeing ${subscription.identifier}`)\n }\n this.startGuaranteeing()\n }\n\n forget(subscription) {\n logger.log(`SubscriptionGuarantor forgetting ${subscription.identifier}`)\n this.pendingSubscriptions = (this.pendingSubscriptions.filter((s) => s !== subscription))\n }\n\n startGuaranteeing() {\n this.stopGuaranteeing()\n this.retrySubscribing()\n }\n \n stopGuaranteeing() {\n clearTimeout(this.retryTimeout)\n }\n\n retrySubscribing() {\n this.retryTimeout = setTimeout(() => {\n if (this.subscriptions && typeof(this.subscriptions.subscribe) === \"function\") {\n this.pendingSubscriptions.map((subscription) => {\n logger.log(`SubscriptionGuarantor resubscribing ${subscription.identifier}`)\n this.subscriptions.subscribe(subscription)\n })\n }\n }\n , 500)\n }\n}\n\nexport default SubscriptionGuarantor", "import Subscription from \"./subscription\"\nimport SubscriptionGuarantor from \"./subscription_guarantor\"\nimport logger from \"./logger\"\n\n// Collection class for creating (and internally managing) channel subscriptions.\n// The only method intended to be triggered by the user is ActionCable.Subscriptions#create,\n// and it should be called through the consumer like so:\n//\n// App = {}\n// App.cable = ActionCable.createConsumer(\"ws://example.com/accounts/1\")\n// App.appearance = App.cable.subscriptions.create(\"AppearanceChannel\")\n//\n// For more details on how you'd configure an actual channel subscription, see ActionCable.Subscription.\n\nexport default class Subscriptions {\n constructor(consumer) {\n this.consumer = consumer\n this.guarantor = new SubscriptionGuarantor(this)\n this.subscriptions = []\n }\n\n create(channelName, mixin) {\n const channel = channelName\n const params = typeof channel === \"object\" ? channel : {channel}\n const subscription = new Subscription(this.consumer, params, mixin)\n return this.add(subscription)\n }\n\n // Private\n\n add(subscription) {\n this.subscriptions.push(subscription)\n this.consumer.ensureActiveConnection()\n this.notify(subscription, \"initialized\")\n this.subscribe(subscription)\n return subscription\n }\n\n remove(subscription) {\n this.forget(subscription)\n if (!this.findAll(subscription.identifier).length) {\n this.sendCommand(subscription, \"unsubscribe\")\n }\n return subscription\n }\n\n reject(identifier) {\n return this.findAll(identifier).map((subscription) => {\n this.forget(subscription)\n this.notify(subscription, \"rejected\")\n return subscription\n })\n }\n\n forget(subscription) {\n this.guarantor.forget(subscription)\n this.subscriptions = (this.subscriptions.filter((s) => s !== subscription))\n return subscription\n }\n\n findAll(identifier) {\n return this.subscriptions.filter((s) => s.identifier === identifier)\n }\n\n reload() {\n return this.subscriptions.map((subscription) =>\n this.subscribe(subscription))\n }\n\n notifyAll(callbackName, ...args) {\n return this.subscriptions.map((subscription) =>\n this.notify(subscription, callbackName, ...args))\n }\n\n notify(subscription, callbackName, ...args) {\n let subscriptions\n if (typeof subscription === \"string\") {\n subscriptions = this.findAll(subscription)\n } else {\n subscriptions = [subscription]\n }\n\n return subscriptions.map((subscription) =>\n (typeof subscription[callbackName] === \"function\" ? subscription[callbackName](...args) : undefined))\n }\n\n subscribe(subscription) {\n if (this.sendCommand(subscription, \"subscribe\")) {\n this.guarantor.guarantee(subscription)\n }\n }\n\n confirmSubscription(identifier) {\n logger.log(`Subscription confirmed ${identifier}`)\n this.findAll(identifier).map((subscription) =>\n this.guarantor.forget(subscription))\n }\n\n sendCommand(subscription, command) {\n const {identifier} = subscription\n return this.consumer.send({command, identifier})\n }\n}\n", "import Connection from \"./connection\"\nimport Subscriptions from \"./subscriptions\"\n\n// The ActionCable.Consumer establishes the connection to a server-side Ruby Connection object. Once established,\n// the ActionCable.ConnectionMonitor will ensure that its properly maintained through heartbeats and checking for stale updates.\n// The Consumer instance is also the gateway to establishing subscriptions to desired channels through the #createSubscription\n// method.\n//\n// The following example shows how this can be set up:\n//\n// App = {}\n// App.cable = ActionCable.createConsumer(\"ws://example.com/accounts/1\")\n// App.appearance = App.cable.subscriptions.create(\"AppearanceChannel\")\n//\n// For more details on how you'd configure an actual channel subscription, see ActionCable.Subscription.\n//\n// When a consumer is created, it automatically connects with the server.\n//\n// To disconnect from the server, call\n//\n// App.cable.disconnect()\n//\n// and to restart the connection:\n//\n// App.cable.connect()\n//\n// Any channel subscriptions which existed prior to disconnecting will\n// automatically resubscribe.\n\nexport default class Consumer {\n constructor(url) {\n this._url = url\n this.subscriptions = new Subscriptions(this)\n this.connection = new Connection(this)\n }\n\n get url() {\n return createWebSocketURL(this._url)\n }\n\n send(data) {\n return this.connection.send(data)\n }\n\n connect() {\n return this.connection.open()\n }\n\n disconnect() {\n return this.connection.close({allowReconnect: false})\n }\n\n ensureActiveConnection() {\n if (!this.connection.isActive()) {\n return this.connection.open()\n }\n }\n}\n\nexport function createWebSocketURL(url) {\n if (typeof url === \"function\") {\n url = url()\n }\n\n if (url && !/^wss?:/i.test(url)) {\n const a = document.createElement(\"a\")\n a.href = url\n // Fix populating Location properties in IE. Otherwise, protocol will be blank.\n a.href = a.href\n a.protocol = a.protocol.replace(\"http\", \"ws\")\n return a.href\n } else {\n return url\n }\n}\n", "import Connection from \"./connection\"\nimport ConnectionMonitor from \"./connection_monitor\"\nimport Consumer, { createWebSocketURL } from \"./consumer\"\nimport INTERNAL from \"./internal\"\nimport Subscription from \"./subscription\"\nimport Subscriptions from \"./subscriptions\"\nimport SubscriptionGuarantor from \"./subscription_guarantor\"\nimport adapters from \"./adapters\"\nimport logger from \"./logger\"\n\nexport {\n Connection,\n ConnectionMonitor,\n Consumer,\n INTERNAL,\n Subscription,\n Subscriptions,\n SubscriptionGuarantor,\n adapters,\n createWebSocketURL,\n logger,\n}\n\nexport function createConsumer(url = getConfig(\"url\") || INTERNAL.default_mount_path) {\n return new Consumer(url)\n}\n\nexport function getConfig(name) {\n const element = document.head.querySelector(`meta[name='action-cable-${name}']`)\n if (element) {\n return element.getAttribute(\"content\")\n }\n}\n", "/*!\n * jQuery JavaScript Library v3.7.1\n * https://jquery.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2023-08-28T13:37Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket trac-14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n\t\t// Support: Chrome <=57, Firefox <=52\n\t\t// In some browsers, typeof returns \"function\" for HTML elements\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n\t\t// We don't want to classify *any* DOM node as a function.\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\n\t\t\ttypeof obj.item !== \"function\";\n\t};\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar version = \"3.7.1\",\n\n\trhtmlSuffix = /HTML$/i,\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\n\t// Retrieve the text value of an array of DOM nodes\n\ttext: function( elem ) {\n\t\tvar node,\n\t\t\tret = \"\",\n\t\t\ti = 0,\n\t\t\tnodeType = elem.nodeType;\n\n\t\tif ( !nodeType ) {\n\n\t\t\t// If no nodeType, this is expected to be an array\n\t\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t\t// Do not traverse comment nodes\n\t\t\t\tret += jQuery.text( node );\n\t\t\t}\n\t\t}\n\t\tif ( nodeType === 1 || nodeType === 11 ) {\n\t\t\treturn elem.textContent;\n\t\t}\n\t\tif ( nodeType === 9 ) {\n\t\t\treturn elem.documentElement.textContent;\n\t\t}\n\t\tif ( nodeType === 3 || nodeType === 4 ) {\n\t\t\treturn elem.nodeValue;\n\t\t}\n\n\t\t// Do not include comment or processing instruction nodes\n\n\t\treturn ret;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\tisXMLDoc: function( elem ) {\n\t\tvar namespace = elem && elem.namespaceURI,\n\t\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t\t// Assume HTML when documentElement doesn't yet exist, such as inside\n\t\t// document fragments.\n\t\treturn !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\n\n\nfunction nodeName( elem, name ) {\n\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n}\nvar pop = arr.pop;\n\n\nvar sort = arr.sort;\n\n\nvar splice = arr.splice;\n\n\nvar whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\";\n\n\nvar rtrimCSS = new RegExp(\n\t\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\",\n\t\"g\"\n);\n\n\n\n\n// Note: an element does not contain itself\njQuery.contains = function( a, b ) {\n\tvar bup = b && b.parentNode;\n\n\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE doesn't have `contains` on SVG.\n\t\ta.contains ?\n\t\t\ta.contains( bup ) :\n\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t) );\n};\n\n\n\n\n// CSS string/identifier serialization\n// https://drafts.csswg.org/cssom/#common-serializing-idioms\nvar rcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g;\n\nfunction fcssescape( ch, asCodePoint ) {\n\tif ( asCodePoint ) {\n\n\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\tif ( ch === \"\\0\" ) {\n\t\t\treturn \"\\uFFFD\";\n\t\t}\n\n\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t}\n\n\t// Other potentially-special ASCII characters get backslash-escaped\n\treturn \"\\\\\" + ch;\n}\n\njQuery.escapeSelector = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\n\n\n\nvar preferredDoc = document,\n\tpushNative = push;\n\n( function() {\n\nvar i,\n\tExpr,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\tpush = pushNative,\n\n\t// Local document vars\n\tdocument,\n\tdocumentElement,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\tmatches,\n\n\t// Instance-specific data\n\texpando = jQuery.expando,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|\" +\n\t\t\"loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trleadingCombinator = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" +\n\t\twhitespace + \"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\tID: new RegExp( \"^#(\" + identifier + \")\" ),\n\t\tCLASS: new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\tTAG: new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\tATTR: new RegExp( \"^\" + attributes ),\n\t\tPSEUDO: new RegExp( \"^\" + pseudos ),\n\t\tCHILD: new RegExp(\n\t\t\t\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\tbool: new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\tneedsContext: new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\tif ( nonHex ) {\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\treturn nonHex;\n\t\t}\n\n\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t// Support: IE <=11+\n\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t// surrogate pair\n\t\treturn high < 0 ?\n\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes; see `setDocument`.\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE/Edge.\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && nodeName( elem, \"fieldset\" );\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android <=4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = {\n\t\tapply: function( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t},\n\t\tcall: function( target ) {\n\t\t\tpushNative.apply( target, slice.call( arguments, 1 ) );\n\t\t}\n\t};\n}\n\nfunction find( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tfind.contains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( !nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when\n\t\t\t\t\t// strict-comparing two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( newContext != context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = jQuery.escapeSelector( nid );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrimCSS, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties\n\t\t// (see https://github.com/jquery/sizzle/issues/157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by jQuery selector module\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn nodeName( elem, \"input\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn ( nodeName( elem, \"input\" ) || nodeName( elem, \"button\" ) ) &&\n\t\t\telem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11+\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a jQuery selector context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [node] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nfunction setDocument( node ) {\n\tvar subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocumentElement = document.documentElement;\n\tdocumentIsHTML = !jQuery.isXMLDoc( document );\n\n\t// Support: iOS 7 only, IE 9 - 11+\n\t// Older browsers didn't support unprefixed `matches`.\n\tmatches = documentElement.matches ||\n\t\tdocumentElement.webkitMatchesSelector ||\n\t\tdocumentElement.msMatchesSelector;\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors\n\t// (see trac-13936).\n\t// Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,\n\t// all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.\n\tif ( documentElement.msMatchesSelector &&\n\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tpreferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t\tsubWindow.addEventListener( \"unload\", unloadHandler );\n\t}\n\n\t// Support: IE <10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocumentElement.appendChild( el ).id = jQuery.expando;\n\t\treturn !document.getElementsByName ||\n\t\t\t!document.getElementsByName( jQuery.expando ).length;\n\t} );\n\n\t// Support: IE 9 only\n\t// Check to see if it's possible to do matchesSelector\n\t// on a disconnected node.\n\tsupport.disconnectedMatch = assert( function( el ) {\n\t\treturn matches.call( el, \"*\" );\n\t} );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// IE/Edge don't support the :scope pseudo-class.\n\tsupport.scope = assert( function() {\n\t\treturn document.querySelectorAll( \":scope\" );\n\t} );\n\n\t// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only\n\t// Make sure the `:has()` argument is parsed unforgivingly.\n\t// We include `*` in the test to detect buggy implementations that are\n\t// _selectively_ forgiving (specifically when the list includes at least\n\t// one valid selector).\n\t// Note that we treat complete lack of support for `:has()` as if it were\n\t// spec-compliant support, which is fine because use of `:has()` in such\n\t// environments will fail in the qSA path and fall back to jQuery traversal\n\t// anyway.\n\tsupport.cssHas = assert( function() {\n\t\ttry {\n\t\t\tdocument.querySelector( \":has(*,:jqfake)\" );\n\t\t\treturn false;\n\t\t} catch ( e ) {\n\t\t\treturn true;\n\t\t}\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter.ID = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter.ID = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find.TAG = function( tag, context ) {\n\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t// DocumentFragment nodes don't have gEBTN\n\t\t} else {\n\t\t\treturn context.querySelectorAll( tag );\n\t\t}\n\t};\n\n\t// Class\n\tExpr.find.CLASS = function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\trbuggyQSA = [];\n\n\t// Build QSA regex\n\t// Regex strategy adopted from Diego Perini\n\tassert( function( el ) {\n\n\t\tvar input;\n\n\t\tdocumentElement.appendChild( el ).innerHTML =\n\t\t\t\"\" +\n\t\t\t\"\";\n\n\t\t// Support: iOS <=7 - 8 only\n\t\t// Boolean attributes and \"value\" are not treated correctly in some XML documents\n\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t}\n\n\t\t// Support: iOS <=7 - 8 only\n\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\trbuggyQSA.push( \"~=\" );\n\t\t}\n\n\t\t// Support: iOS 8 only\n\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t}\n\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\trbuggyQSA.push( \":checked\" );\n\t\t}\n\n\t\t// Support: Windows 8 Native Apps\n\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tdocumentElement.appendChild( el ).disabled = true;\n\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t}\n\n\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t// Adding a temporary attribute to the document before the selection works\n\t\t// around the issue.\n\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"name\", \"\" );\n\t\tel.appendChild( input );\n\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t}\n\t} );\n\n\tif ( !support.cssHas ) {\n\n\t\t// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+\n\t\t// Our regular `try-catch` mechanism fails to detect natively-unsupported\n\t\t// pseudo-classes inside `:has()` (such as `:has(:contains(\"Foo\"))`)\n\t\t// in browsers that parse the `:has()` argument as a forgiving selector list.\n\t\t// https://drafts.csswg.org/selectors/#relational now requires the argument\n\t\t// to be parsed unforgivingly, but browsers have not yet fully adjusted.\n\t\trbuggyQSA.push( \":has\" );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = function( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( a === document || a.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, a ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( b === document || b.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, b ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t};\n\n\treturn document;\n}\n\nfind.matches = function( expr, elements ) {\n\treturn find( expr, null, null, elements );\n};\n\nfind.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn find( expr, document, null, [ elem ] ).length > 0;\n};\n\nfind.contains = function( context, elem ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( context.ownerDocument || context ) != document ) {\n\t\tsetDocument( context );\n\t}\n\treturn jQuery.contains( context, elem );\n};\n\n\nfind.attr = function( elem, name ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( elem.ownerDocument || elem ) != document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\n\t\t// Don't get fooled by Object.prototype properties (see trac-13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\tif ( val !== undefined ) {\n\t\treturn val;\n\t}\n\n\treturn elem.getAttribute( name );\n};\n\nfind.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\njQuery.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\t//\n\t// Support: Android <=4.0+\n\t// Testing for detecting duplicates is unpredictable so instead assume we can't\n\t// depend on duplicate detection in all browsers without a stable sort.\n\thasDuplicate = !support.sortStable;\n\tsortInput = !support.sortStable && slice.call( results, 0 );\n\tsort.call( results, sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tsplice.call( results, duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\njQuery.fn.uniqueSort = function() {\n\treturn this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );\n};\n\nExpr = jQuery.expr = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\tATTR: function( match ) {\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || \"\" )\n\t\t\t\t.replace( runescape, funescape );\n\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\tCHILD: function( match ) {\n\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\n\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\n\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[ 3 ] ) {\n\t\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" )\n\t\t\t\t);\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\tPSEUDO: function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\n\n\t\t\tif ( matchExpr.CHILD.test( match[ 0 ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[ 3 ] ) {\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\n\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\tTAG: function( nodeNameSelector ) {\n\t\t\tvar expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() {\n\t\t\t\t\treturn true;\n\t\t\t\t} :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn nodeName( elem, expectedNodeName );\n\t\t\t\t};\n\t\t},\n\n\t\tCLASS: function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace + \")\" + className +\n\t\t\t\t\t\"(\" + whitespace + \"|$)\" ) ) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\tATTR: function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = find.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\tif ( operator === \"=\" ) {\n\t\t\t\t\treturn result === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"!=\" ) {\n\t\t\t\t\treturn result !== check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"^=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) === 0;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"*=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"$=\" ) {\n\t\t\t\t\treturn check && result.slice( -check.length ) === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"~=\" ) {\n\t\t\t\t\treturn ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" )\n\t\t\t\t\t\t.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"|=\" ) {\n\t\t\t\t\treturn result === check || result.slice( 0, check.length + 1 ) === check + \"-\";\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t};\n\t\t},\n\n\t\tCHILD: function( type, what, _argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tvar cache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\t\t\t\t\t\t\touterCache = parent[ expando ] || ( parent[ expando ] = {} );\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\t\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\n\t\t\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\tPSEUDO: function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// https://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tfind.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as jQuery does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf.call( seed, matched[ i ] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\n\t\t// Potentially complex pseudos\n\t\tnot: markFunction( function( selector ) {\n\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrimCSS, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} ) :\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tinput[ 0 ] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\n\t\t\t\t\t// Don't keep the element\n\t\t\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\t\t\tinput[ 0 ] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t} ),\n\n\t\thas: markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn find( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\tcontains: markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t} ),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// https://www.w3.org/TR/selectors/#lang-pseudo\n\t\tlang: markFunction( function( lang ) {\n\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\n\t\t\t\tfind.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t} ),\n\n\t\t// Miscellaneous\n\t\ttarget: function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\troot: function( elem ) {\n\t\t\treturn elem === documentElement;\n\t\t},\n\n\t\tfocus: function( elem ) {\n\t\t\treturn elem === safeActiveElement() &&\n\t\t\t\tdocument.hasFocus() &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\tenabled: createDisabledPseudo( false ),\n\t\tdisabled: createDisabledPseudo( true ),\n\n\t\tchecked: function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\treturn ( nodeName( elem, \"input\" ) && !!elem.checked ) ||\n\t\t\t\t( nodeName( elem, \"option\" ) && !!elem.selected );\n\t\t},\n\n\t\tselected: function( elem ) {\n\n\t\t\t// Support: IE <=11+\n\t\t\t// Accessing the selectedIndex property\n\t\t\t// forces the browser to treat the default option as\n\t\t\t// selected when in an optgroup.\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\tempty: function( elem ) {\n\n\t\t\t// https://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t// but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\tparent: function( elem ) {\n\t\t\treturn !Expr.pseudos.empty( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\theader: function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\tinput: function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\tbutton: function( elem ) {\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"button\" ||\n\t\t\t\tnodeName( elem, \"button\" );\n\t\t},\n\n\t\ttext: function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"text\" &&\n\n\t\t\t\t// Support: IE <10 only\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear\n\t\t\t\t// with elem.type === \"text\"\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\tfirst: createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\tlast: createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\teq: createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\teven: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\todd: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tlt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i;\n\n\t\t\tif ( argument < 0 ) {\n\t\t\t\ti = argument + length;\n\t\t\t} else if ( argument > length ) {\n\t\t\t\ti = length;\n\t\t\t} else {\n\t\t\t\ti = argument;\n\t\t\t}\n\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tgt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} )\n\t}\n};\n\nExpr.pseudos.nth = Expr.pseudos.eq;\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\nfunction tokenize( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\n\t\t\tif ( match ) {\n\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( ( tokens = [] ) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( ( match = rleadingCombinator.exec( soFar ) ) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[ 0 ].replace( rtrimCSS, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\tif ( parseOnly ) {\n\t\treturn soFar.length;\n\t}\n\n\treturn soFar ?\n\t\tfind.error( selector ) :\n\n\t\t// Cache the tokens\n\t\ttokenCache( selector, groups ).slice( 0 );\n}\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[ i ].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\n\t\t\t\t\t\tif ( skip && nodeName( elem, skip ) ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = outerCache[ key ] ) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\touterCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[ 0 ];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tfind( selector, contexts[ i ], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction( function( seed, results, context, xml ) {\n\t\tvar temp, i, elem, matcherOut,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed ||\n\t\t\t\tmultipleContexts( selector || \"*\",\n\t\t\t\t\tcontext.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems;\n\n\t\tif ( matcher ) {\n\n\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter\n\t\t\t// or preexisting results,\n\t\t\tmatcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t[] :\n\n\t\t\t\t// ...otherwise use results directly\n\t\t\t\tresults;\n\n\t\t\t// Find primary matches\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t} else {\n\t\t\tmatcherOut = matcherIn;\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\n\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\n\t\t\t\t\t\t( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {\n\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf.call( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tvar ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (\n\t\t\t\t( checkContext = context ).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\n\t\t\t// Avoid hanging onto element\n\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 )\n\t\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrimCSS, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find.TAG( \"*\", outermost ),\n\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\toutermostContext = context == document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: iOS <=7 - 9 only\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: ) matching\n\t\t\t// elements by id. (see trac-14142)\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tjQuery.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\nfunction compile( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[ i ] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n}\n\n/**\n * A low-level selection function that works with jQuery's compiled\n * selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n * selector function built with jQuery selector compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nfunction select( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\n\t\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find.ID(\n\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\tcontext\n\t\t\t) || [] )[ 0 ];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[ i ];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\n\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( ( seed = find(\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) &&\n\t\t\t\t\t\ttestContext( context.parentNode ) || context\n\t\t\t\t) ) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n}\n\n// One-time assignments\n\n// Support: Android <=4.0 - 4.1+\n// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Android <=4.0 - 4.1+\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert( function( el ) {\n\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\n} );\n\njQuery.find = find;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.unique = jQuery.uniqueSort;\n\n// These have always been private, but they used to be documented as part of\n// Sizzle so let's maintain them for now for backwards compatibility purposes.\nfind.compile = compile;\nfind.select = select;\nfind.setDocument = setDocument;\nfind.tokenize = tokenize;\n\nfind.escape = jQuery.escapeSelector;\nfind.getText = jQuery.text;\nfind.isXML = jQuery.isXMLDoc;\nfind.selectors = jQuery.expr;\nfind.support = jQuery.support;\nfind.uniqueSort = jQuery.uniqueSort;\n\n\t/* eslint-enable */\n\n} )();\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over to avoid XSS via location.hash (trac-9521)\n\t// Strict HTML recognition (trac-11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to jQuery#find\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( elem.contentDocument != null &&\n\n\t\t\t// Support: IE 11+\n\t\t\t// elements with no `data` attribute has an object\n\t\t\t// `contentDocument` with a `null` prototype.\n\t\t\tgetProto( elem.contentDocument ) ) {\n\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.error );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the error, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getErrorHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getErrorHook();\n\n\t\t\t\t\t\t\t\t// The deprecated alias of the above. While the name suggests\n\t\t\t\t\t\t\t\t// returning the stack, not an error instance, jQuery just passes\n\t\t\t\t\t\t\t\t// it directly to `console.warn` so both will work; an instance\n\t\t\t\t\t\t\t\t// just better cooperates with source maps.\n\t\t\t\t\t\t\t\t} else if ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the primary Deferred\n\t\t\tprimary = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tprimary.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( primary.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn primary.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );\n\t\t}\n\n\t\treturn primary.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\n// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error\n// captured before the async barrier to get the original error cause\n// which may otherwise be hidden.\njQuery.Deferred.exceptionHook = function( error, asyncError ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message,\n\t\t\terror.stack, asyncError );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See trac-6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, _key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\t\tvalue :\n\t\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( _all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (trac-9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t// - Node\n\t// - Node.ELEMENT_NODE\n\t// - Node.DOCUMENT_NODE\n\t// - Object\n\t// - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see trac-8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t// 1. No key was specified\n\t\t// 2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t// 1. The entire cache object\n\t\t// 2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t// 1. An object of properties\n\t\t// 2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (trac-14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (trac-11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (trac-14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// Support: IE <=9 only\n\t// IE <=9 replaces \";\n\tsupport.option = !!div.lastChild;\n} )();\n\n\n// We have to close these tags to support XHTML (trac-13200)\nvar wrapMap = {\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting or other required elements.\n\tthead: [ 1, \"\", \"
\" ],\n\tcol: [ 2, \"\", \"
\" ],\n\ttr: [ 2, \"\", \"
\" ],\n\ttd: [ 3, \"\", \"
\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <=9 only\nif ( !support.option ) {\n\twrapMap.optgroup = wrapMap.option = [ 1, \"\" ];\n}\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (trac-12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\nvar rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Only attach events to objects that accept data\n\t\tif ( !acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = Object.create( null );\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\n\t\t\t// Make a writable jQuery.Event from the native event object\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\n\n\t\t\thandlers = (\n\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\n\t\t\t)[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (trac-13208)\n\t\t\t\t// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (trac-13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", true );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, isSetup ) {\n\n\t// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !isSetup ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\tif ( !saved ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tdataPriv.set( this, type, false );\n\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering\n\t\t\t\t// the native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, jQuery.event.trigger(\n\t\t\t\t\tsaved[ 0 ],\n\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\tthis\n\t\t\t\t) );\n\n\t\t\t\t// Abort handling of the native event by all jQuery handlers while allowing\n\t\t\t\t// native handlers on the same element to run. On target, this is achieved\n\t\t\t\t// by stopping immediate propagation just on the jQuery event. However,\n\t\t\t\t// the native event is re-wrapped by a jQuery one on each level of the\n\t\t\t\t// propagation so the only way to stop it for jQuery is to stop it for\n\t\t\t\t// everyone via native `stopPropagation()`. This is not a problem for\n\t\t\t\t// focus/blur which don't bubble, but it does also stop click on checkboxes\n\t\t\t\t// and radios. We accept this limitation.\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tevent.isImmediatePropagationStopped = returnTrue;\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (trac-504, trac-13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\twhich: true\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\n\tfunction focusMappedHandler( nativeEvent ) {\n\t\tif ( document.documentMode ) {\n\n\t\t\t// Support: IE 11+\n\t\t\t// Attach a single focusin/focusout handler on the document while someone wants\n\t\t\t// focus/blur. This is because the former are synchronous in IE while the latter\n\t\t\t// are async. In other browsers, all those handlers are invoked synchronously.\n\n\t\t\t// `handle` from private data would already wrap the event, but we need\n\t\t\t// to change the `type` here.\n\t\t\tvar handle = dataPriv.get( this, \"handle\" ),\n\t\t\t\tevent = jQuery.event.fix( nativeEvent );\n\t\t\tevent.type = nativeEvent.type === \"focusin\" ? \"focus\" : \"blur\";\n\t\t\tevent.isSimulated = true;\n\n\t\t\t// First, handle focusin/focusout\n\t\t\thandle( nativeEvent );\n\n\t\t\t// ...then, handle focus/blur\n\t\t\t//\n\t\t\t// focus/blur don't bubble while focusin/focusout do; simulate the former by only\n\t\t\t// invoking the handler at the lower level.\n\t\t\tif ( event.target === event.currentTarget ) {\n\n\t\t\t\t// The setup part calls `leverageNative`, which, in turn, calls\n\t\t\t\t// `jQuery.event.add`, so event handle will already have been set\n\t\t\t\t// by this point.\n\t\t\t\thandle( event );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// For non-IE browsers, attach a single capturing handler on the document\n\t\t\t// while someone wants focusin/focusout.\n\t\t\tjQuery.event.simulate( delegateType, nativeEvent.target,\n\t\t\t\tjQuery.event.fix( nativeEvent ) );\n\t\t}\n\t}\n\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\tvar attaches;\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, true );\n\n\t\t\tif ( document.documentMode ) {\n\n\t\t\t\t// Support: IE 9 - 11+\n\t\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\t\tattaches = dataPriv.get( this, delegateType );\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t}\n\t\t\t\tdataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );\n\t\t\t} else {\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tvar attaches;\n\n\t\t\tif ( document.documentMode ) {\n\t\t\t\tattaches = dataPriv.get( this, delegateType ) - 1;\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t\tdataPriv.remove( this, delegateType );\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.set( this, delegateType, attaches );\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Return false to indicate standard teardown should be applied\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\n\t\t// Suppress native focus or blur if we're currently inside\n\t\t// a leveraged native-event stack\n\t\t_default: function( event ) {\n\t\t\treturn dataPriv.get( event.target, type );\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n\n\t// Support: Firefox <=44\n\t// Firefox doesn't have focus(in | out) events\n\t// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n\t//\n\t// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n\t// focus(in | out) events fire after focus & blur events,\n\t// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n\t// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\n\t//\n\t// Support: IE 9 - 11+\n\t// To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,\n\t// attach a single handler for both events in IE.\n\tjQuery.event.special[ delegateType ] = {\n\t\tsetup: function() {\n\n\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType );\n\n\t\t\t// Support: IE 9 - 11+\n\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.addEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t}\n\t\t\tdataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );\n\t\t},\n\t\tteardown: function() {\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType ) - 1;\n\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.removeEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( dataHolder, delegateType );\n\t\t\t} else {\n\t\t\t\tdataPriv.set( dataHolder, delegateType, attaches );\n\t\t\t}\n\t\t}\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event ) dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.get( src );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdataPriv.remove( dest, \"handle events\" );\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = flat( args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (trac-8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Re-enable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase() !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t}, doc );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Unwrap a CDATA section containing script contents. This shouldn't be\n\t\t\t\t\t\t\t// needed as in XML documents they're already not visible when\n\t\t\t\t\t\t\t// inspecting element contents and in HTML documents they have no\n\t\t\t\t\t\t\t// meaning but we're preserving that logic for backwards compatibility.\n\t\t\t\t\t\t\t// This will be removed completely in 4.0. See gh-4904.\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html;\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew jQuery#find here for performance reasons:\n\t\t\t// https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar rcustomProp = /^--/;\n\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.call( elem );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (trac-8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t},\n\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\n\t\t// some versions of this test; make sure not to make it pass there!\n\t\t//\n\t\t// Support: Firefox 70+\n\t\t// Only Firefox includes border widths\n\t\t// in computed dimensions. (gh-4529)\n\t\treliableTrDimensions: function() {\n\t\t\tvar table, tr, trChild, trStyle;\n\t\t\tif ( reliableTrDimensionsVal == null ) {\n\t\t\t\ttable = document.createElement( \"table\" );\n\t\t\t\ttr = document.createElement( \"tr\" );\n\t\t\t\ttrChild = document.createElement( \"div\" );\n\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px;border-collapse:separate\";\n\t\t\t\ttr.style.cssText = \"box-sizing:content-box;border:1px solid\";\n\n\t\t\t\t// Support: Chrome 86+\n\t\t\t\t// Height set through cssText does not get applied.\n\t\t\t\t// Computed height then comes back as 0.\n\t\t\t\ttr.style.height = \"1px\";\n\t\t\t\ttrChild.style.height = \"9px\";\n\n\t\t\t\t// Support: Android 8 Chrome 86+\n\t\t\t\t// In our bodyBackground.html iframe,\n\t\t\t\t// display for all div elements is set to \"inline\",\n\t\t\t\t// which causes a problem only in Android 8 Chrome 86.\n\t\t\t\t// Ensuring the div is `display: block`\n\t\t\t\t// gets around this issue.\n\t\t\t\ttrChild.style.display = \"block\";\n\n\t\t\t\tdocumentElement\n\t\t\t\t\t.appendChild( table )\n\t\t\t\t\t.appendChild( tr )\n\t\t\t\t\t.appendChild( trChild );\n\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\n\t\t\t\treliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderTopWidth, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;\n\n\t\t\t\tdocumentElement.removeChild( table );\n\t\t\t}\n\t\t\treturn reliableTrDimensionsVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tisCustomProp = rcustomProp.test( name ),\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t// .css('filter') (IE 9 only, trac-12537)\n\t// .css('--customProperty) (gh-3144)\n\tif ( computed ) {\n\n\t\t// Support: IE <=9 - 11+\n\t\t// IE only supports `\"float\"` in `getPropertyValue`; in computed styles\n\t\t// it's only available as `\"cssFloat\"`. We no longer modify properties\n\t\t// sent to `.css()` apart from camelCasing, so we need to check both.\n\t\t// Normally, this would create difference in behavior: if\n\t\t// `getPropertyValue` returns an empty string, the value returned\n\t\t// by `.css()` would be `undefined`. This is usually the case for\n\t\t// disconnected elements. However, in IE even disconnected elements\n\t\t// with no styles return `\"none\"` for `getPropertyValue( \"float\" )`\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( isCustomProp && ret ) {\n\n\t\t\t// Support: Firefox 105+, Chrome <=105+\n\t\t\t// Spec requires trimming whitespace for custom properties (gh-4926).\n\t\t\t// Firefox only trims leading whitespace. Chrome just collapses\n\t\t\t// both leading & trailing whitespace to a single space.\n\t\t\t//\n\t\t\t// Fall back to `undefined` if empty string returned.\n\t\t\t// This collapses a missing definition with property defined\n\t\t\t// and set to an empty string but there's no standard API\n\t\t\t// allowing us to differentiate them without a performance penalty\n\t\t\t// and returning `undefined` aligns with older jQuery.\n\t\t\t//\n\t\t\t// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED\n\t\t\t// as whitespace while CSS does not, but this is not a problem\n\t\t\t// because CSS preprocessing replaces them with U+000A LINE FEED\n\t\t\t// (which *is* CSS whitespace)\n\t\t\t// https://www.w3.org/TR/css-syntax-3/#input-preprocessing\n\t\t\tret = ret.replace( rtrimCSS, \"$1\" ) || undefined;\n\t\t}\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( _elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0,\n\t\tmarginDelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\t// Count margin delta separately to only add it after scroll gutter adjustment.\n\t\t// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).\n\t\tif ( box === \"margin\" ) {\n\t\t\tmarginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta + marginDelta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Support: IE 9 - 11 only\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\n\t// In those cases, the computed value can be trusted to be border-box.\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\n\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\n\t\tval === \"auto\" ||\n\n\t\t// Support: Android <=4.1 - 4.3 only\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\n\t\t// Make sure the element is visible & connected\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\tanimationIterationCount: true,\n\t\taspectRatio: true,\n\t\tborderImageSlice: true,\n\t\tcolumnCount: true,\n\t\tflexGrow: true,\n\t\tflexShrink: true,\n\t\tfontWeight: true,\n\t\tgridArea: true,\n\t\tgridColumn: true,\n\t\tgridColumnEnd: true,\n\t\tgridColumnStart: true,\n\t\tgridRow: true,\n\t\tgridRowEnd: true,\n\t\tgridRowStart: true,\n\t\tlineHeight: true,\n\t\topacity: true,\n\t\torder: true,\n\t\torphans: true,\n\t\tscale: true,\n\t\twidows: true,\n\t\tzIndex: true,\n\t\tzoom: true,\n\n\t\t// SVG-related\n\t\tfillOpacity: true,\n\t\tfloodOpacity: true,\n\t\tstopOpacity: true,\n\t\tstrokeMiterlimit: true,\n\t\tstrokeOpacity: true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (trac-7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug trac-9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (trac-7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t} ) :\n\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\n\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// Use proper attribute retrieval (trac-12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + className + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += className + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + className + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + className + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar classNames, className, i, self,\n\t\t\ttype = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\treturn this.each( function() {\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\tself = jQuery( this );\n\n\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (trac-14686, trac-14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (trac-2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\nvar location = window.location;\n\nvar nonce = { guid: Date.now() };\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, parserErrorElem;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {}\n\n\tparserErrorElem = xml && xml.getElementsByTagName( \"parsererror\" )[ 0 ];\n\tif ( !xml || parserErrorElem ) {\n\t\tjQuery.error( \"Invalid XML: \" + (\n\t\t\tparserErrorElem ?\n\t\t\t\tjQuery.map( parserErrorElem.childNodes, function( el ) {\n\t\t\t\t\treturn el.textContent;\n\t\t\t\t} ).join( \"\\n\" ) :\n\t\t\t\tdata\n\t\t) );\n\t}\n\treturn xml;\n};\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (trac-9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || Object.create( null ) )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (trac-6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} ).filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} ).map( function( _i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// trac-7653, trac-8125, trac-8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t * - BEFORE asking for a transport\n\t * - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\noriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes trac-9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (trac-10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket trac-12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// trac-9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\n\t\t\t\t\tuncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script but not if jsonp\n\t\t\tif ( !isSuccess &&\n\t\t\t\tjQuery.inArray( \"script\", s.dataTypes ) > -1 &&\n\t\t\t\tjQuery.inArray( \"json\", s.dataTypes ) < 0 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\njQuery.ajaxPrefilter( function( s ) {\n\tvar i;\n\tfor ( i in s.headers ) {\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\n\t\t\ts.contentType = s.headers[ i ] || \"\";\n\t\t}\n\t}\n} );\n\n\njQuery._evalUrl = function( url, options, doc ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (trac-11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options, doc );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// trac-1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see trac-8605, trac-14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\" ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// trac-14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"\n if (!that._wrap) {\n element = element.contents();\n }\n } else {\n element = content;\n if (that._evalTemplate) {\n var result = $(kendo.template($(\"
\").append(element.clone(true)).html(), { useWithBlock: that._useWithBlock })(that.model || {}));\n\n // template uses DOM\n if ($.contains(document, element[0])) {\n element.replaceWith(result);\n }\n\n element = result;\n }\n if (that._wrap) {\n element = element.wrapAll(wrapper).parent();\n }\n }\n\n return element;\n },\n\n _renderSections: function() {\n var that = this;\n\n if (that.options.wrapInSections) {\n that._wrapper();\n that._createContent();\n that._createHeader();\n that._createFooter();\n }\n },\n\n _wrapper: function() {\n var that = this;\n var content = that.content;\n\n if (content.is(roleSelector(\"view\"))) {\n that.wrapper = that.content;\n } else {\n that.wrapper = content\n .wrap('
')\n .parent();\n }\n\n var wrapper = that.wrapper;\n\n wrapper.attr(\"id\", that.id);\n\n wrapper.addClass(classNames.view);\n wrapper.addClass(classNames.widget);\n wrapper.attr(\"role\", \"view\");\n },\n\n _createContent: function() {\n var that = this;\n var wrapper = $(that.wrapper);\n var contentSelector = roleSelector(\"content\");\n\n if (!wrapper.children(contentSelector)[0]) {\n var ccontentElements = wrapper.children().filter(function() {\n var child = $(this);\n if (!child.is(roleSelector(\"header\")) && !child.is(roleSelector(\"footer\"))) {\n return child;\n }\n });\n\n ccontentElements.wrap(\"
');\n }\n\n // use contentElement instead of content as view.content can be a string\n this.contentElement = wrapper.children(roleSelector(\"content\"));\n\n this.contentElement\n .addClass(classNames.stretchedView)\n .addClass(classNames.content);\n },\n\n _createHeader: function() {\n var that = this;\n var wrapper = that.wrapper;\n\n this.header = wrapper.children(roleSelector(\"header\")).addClass(classNames.header);\n },\n\n _createFooter: function() {\n var that = this;\n var wrapper = that.wrapper;\n\n this.footer = wrapper.children(roleSelector(\"footer\")).addClass(classNames.footer);\n }\n });\n\n var ViewClone = kendo.Class.extend({\n init: function(view) {\n $.extend(this, {\n element: view.element.clone(true),\n transition: view.transition,\n id: view.id\n });\n\n view.element.parent().append(this.element);\n },\n\n hideEnd: function() {\n this.element.remove();\n },\n\n beforeTransition: $.noop,\n afterTransition: $.noop\n });\n\n var Layout = View.extend({\n init: function(content, options) {\n View.fn.init.call(this, content, options);\n this.containers = {};\n },\n\n container: function(selector) {\n var container = this.containers[selector];\n\n if (!container) {\n container = this._createContainer(selector);\n this.containers[selector] = container;\n }\n\n return container;\n },\n\n showIn: function(selector, view, transition) {\n this.container(selector).show(view, transition);\n },\n\n _createContainer: function(selector) {\n var root = this.render(),\n element = root.find(selector),\n container;\n\n if (!element.length && root.is(selector)) {\n if (root.is(selector)) {\n element = root;\n } else {\n\n throw new Error(\"can't find a container with the specified \" + selector + \" selector\");\n }\n }\n\n container = new ViewContainer(element);\n\n container.bind(\"accepted\", function(e) {\n e.view.render(element);\n });\n\n return container;\n }\n });\n\n var Fragment = View.extend({\n attach: function(view, placeholder) {\n view.element.find(placeholder).replaceWith(this.render());\n },\n\n detach: function() {\n }\n });\n\n var transitionRegExp = /^(\\w+)(:(\\w+))?( (\\w+))?$/;\n\n function parseTransition(transition) {\n if (!transition) {\n return {};\n }\n\n var matches = transition.match(transitionRegExp) || [];\n\n return {\n type: matches[1],\n direction: matches[3],\n reverse: matches[5] === \"reverse\"\n };\n }\n\n var ViewContainer = Observable.extend({\n init: function(container) {\n Observable.fn.init.call(this);\n this.container = container;\n this.history = [];\n this.view = null;\n this.running = false;\n },\n\n after: function() {\n this.running = false;\n this.trigger(\"complete\", { view: this.view });\n this.trigger(\"after\");\n },\n\n end: function() {\n this.view.showEnd();\n this.previous.hideEnd();\n this.after();\n },\n\n show: function(view, transition, locationID) {\n if (!view.triggerBeforeShow() || (this.view && !this.view.triggerBeforeHide())) {\n this.trigger(\"after\");\n return false;\n }\n\n locationID = locationID || view.id;\n\n var that = this,\n current = (view === that.view) ? view.clone() : that.view,\n history = that.history,\n previousEntry = history[history.length - 2] || {},\n back = previousEntry.id === locationID,\n // If explicit transition is set, it will be with highest priority\n // Next we will try using the history record transition or the view transition configuration\n theTransition = transition || ( back ? history[history.length - 1].transition : view.transition ),\n transitionData = parseTransition(theTransition);\n\n if (that.running) {\n that.effect.stop();\n }\n\n if (theTransition === \"none\") {\n theTransition = null;\n }\n\n that.trigger(\"accepted\", { view: view });\n that.view = view;\n that.previous = current;\n that.running = true;\n\n if (!back) {\n history.push({ id: locationID, transition: theTransition });\n } else {\n history.pop();\n }\n\n if (!current) {\n view.showStart();\n view.showEnd();\n that.after();\n return true;\n }\n\n if (!theTransition || !kendo.effects.enabled) {\n view.showStart();\n that.end();\n } else {\n // hide the view element before init/show - prevents blinks on iPad\n // the replace effect will remove this class\n view.element.addClass(\"k-fx-hidden\");\n view.showStart();\n // do not reverse the explicit transition\n if (back && !transition) {\n transitionData.reverse = !transitionData.reverse;\n }\n\n that.effect = kendo.fx(view.element).replace(current.element, transitionData.type)\n .beforeTransition(function() {\n view.beforeTransition(\"show\");\n current.beforeTransition(\"hide\");\n })\n .afterTransition(function() {\n view.afterTransition(\"show\");\n current.afterTransition(\"hide\");\n })\n .direction(transitionData.direction)\n .setReverse(transitionData.reverse);\n\n that.effect.run().then(function() { that.end(); });\n }\n\n return true;\n },\n\n destroy: function() {\n var that = this;\n var view = that.view;\n\n if (view && view.destroy) {\n view.destroy();\n }\n }\n });\n\n var ViewEngine = Observable.extend({\n init: function(options) {\n var that = this,\n views,\n container;\n\n Observable.fn.init.call(that);\n that.options = options;\n\n $.extend(that, options);\n that.sandbox = $(\"
\");\n container = that.container;\n\n views = that._hideViews(container);\n that.rootView = views.first();\n that.layouts = {};\n\n that.viewContainer = new kendo.ViewContainer(that.container);\n\n that.viewContainer.bind(\"accepted\", function(e) {\n e.view.params = that.params;\n });\n\n that.viewContainer.bind(\"complete\", function(e) {\n that.trigger(VIEW_SHOW, { view: e.view });\n });\n\n that.viewContainer.bind(AFTER, function() {\n that.trigger(AFTER);\n });\n\n this.bind(this.events, options);\n },\n\n events: [\n SHOW_START,\n AFTER,\n VIEW_SHOW,\n LOAD_START,\n LOAD_COMPLETE,\n SAME_VIEW_REQUESTED,\n VIEW_TYPE_DETERMINED\n ],\n\n destroy: function() {\n var that = this;\n var viewContainer = that.viewContainer;\n\n kendo.destroy(that.container);\n\n for (var id in that.layouts) {\n this.layouts[id].destroy();\n }\n\n if (viewContainer) {\n viewContainer.destroy();\n }\n },\n\n view: function() {\n return this.viewContainer.view;\n },\n\n showView: function(url, transition, params) {\n url = url.replace(new RegExp(\"^\" + this.remoteViewURLPrefix), \"\");\n if (url === \"\" && this.remoteViewURLPrefix) {\n url = \"/\";\n }\n\n if (url.replace(/^#/, \"\") === this.url) {\n this.trigger(SAME_VIEW_REQUESTED);\n return false;\n }\n\n this.trigger(SHOW_START);\n\n var that = this,\n element = that._findViewElement(url),\n view = kendo.widgetInstance(element);\n\n that.url = url.replace(/^#/, \"\");\n\n that.params = params;\n\n if (view && view.reload) {\n view.purge();\n element = [];\n }\n\n this.trigger(VIEW_TYPE_DETERMINED, { remote: element.length === 0, url: url });\n\n if (element[0]) {\n if (!view) {\n view = that._createView(element);\n }\n\n return that.viewContainer.show(view, transition, url);\n } else {\n return true;\n }\n },\n\n append: function(html, url) {\n var sandbox = this.sandbox,\n urlPath = (url || \"\").split(\"?\")[0],\n container = this.container,\n views,\n view;\n\n if (bodyRegExp.test(html)) {\n html = RegExp.$1;\n }\n\n sandbox[0].innerHTML = html;\n\n container.append(sandbox.children(\"script, style\"));\n\n views = this._hideViews(sandbox);\n view = views.first();\n\n // Generic HTML content found as remote view - no remote view markers\n if (!view.length) {\n views = view = sandbox.wrapInner(\"
\").children(); // one element\n }\n\n if (urlPath) {\n view.hide().attr(attr(\"url\"), urlPath);\n }\n\n container.append(views);\n\n return this._createView(view);\n },\n\n _locate: function(selectors) {\n return this.$angular ? directiveSelector(selectors) : roleSelector(selectors);\n },\n\n _findViewElement: function(url) {\n var element,\n urlPath = url.split(\"?\")[0];\n\n if (!urlPath) {\n return this.rootView;\n }\n\n element = this.container.children(\"[\" + attr(\"url\") + \"='\" + urlPath + \"']\");\n\n // do not try to search for \"#/foo/bar\" id, jQuery throws error\n if (!element[0] && urlPath.indexOf(\"/\") === -1) {\n element = this.container.children(urlPath.charAt(0) === \"#\" ? urlPath : \"#\" + urlPath);\n }\n\n if (!element[0]) {\n element = this._findViewElementById(url);\n }\n\n return element;\n },\n\n _findViewElementById: function(id) {\n var element = this.container.children(\"[id='\" + id + \"']\");\n return element;\n },\n\n _createView: function(element) {\n //return this._createMobileView(element);\n return this._createSpaView(element);\n },\n\n _createMobileView: function(element) {\n return kendo.initWidget(element, {\n defaultTransition: this.transition,\n loader: this.loader,\n container: this.container,\n getLayout: this.getLayoutProxy,\n modelScope: this.modelScope,\n reload: attrValue(element, \"reload\")\n }, ui.roles);\n },\n\n _createSpaView: function(element) {\n var viewOptions = (this.options || {}).viewOptions || {};\n return new kendo.View(element, {\n renderOnInit: viewOptions.renderOnInit,\n wrap: viewOptions.wrap || false,\n wrapInSections: viewOptions.wrapInSections,\n detachOnHide: viewOptions.detachOnHide,\n detachOnDestroy: viewOptions.detachOnDestroy\n });\n },\n\n _hideViews: function(container) {\n return container.children(this._locate(\"view\")).hide();\n }\n });\n\n kendo.ViewEngine = ViewEngine;\n\n kendo.ViewContainer = ViewContainer;\n kendo.Fragment = Fragment;\n kendo.Layout = Layout;\n kendo.View = View;\n kendo.ViewClone = ViewClone;\n\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.core.js';\n\nvar __meta__ = {\n id: \"dom\",\n name: \"Virtual DOM\",\n category: \"framework\",\n depends: [ \"core\" ],\n advanced: true\n};\n\n(function(kendo) {\n function Node() {\n this.node = null;\n }\n\n Node.prototype = {\n remove: function() {\n if (this.node.parentNode) {\n this.node.parentNode.removeChild(this.node);\n }\n this.attr = {};\n },\n attr: {},\n text: function() {\n return \"\";\n }\n };\n\n function NullNode() {\n }\n\n NullNode.prototype = {\n nodeName: \"#null\",\n attr: { style: {} },\n children: [],\n remove: function() {\n }\n };\n\n var NULL_NODE = new NullNode();\n\n function Element(nodeName, attr, children) {\n this.nodeName = nodeName;\n\n this.attr = attr || {};\n\n this.children = children || [];\n }\n\n Element.prototype = new Node();\n\n Element.prototype.appendTo = function(parent) {\n var node = typeof(this.nodeName) === \"string\" ? document.createElement(this.nodeName) : this.nodeName;\n\n var children = this.children;\n\n for (var index = 0; index < children.length; index++) {\n children[index].render(node, NULL_NODE);\n }\n\n parent.appendChild(node);\n\n return node;\n };\n\n Element.prototype.render = function(parent, cached) {\n var node;\n\n if (cached.nodeName !== this.nodeName) {\n cached.remove();\n\n node = this.appendTo(parent);\n } else {\n node = cached.node;\n\n var index;\n\n var children = this.children;\n\n var length = children.length;\n\n var cachedChildren = cached.children;\n\n var cachedLength = cachedChildren.length;\n\n if (Math.abs(cachedLength - length) > 2) {\n this.render({\n appendChild: function(node) {\n parent.replaceChild(node, cached.node);\n }\n }, NULL_NODE);\n\n return;\n }\n\n for (index = 0; index < length; index++) {\n children[index].render(node, cachedChildren[index] || NULL_NODE);\n }\n\n for (index = length; index < cachedLength; index++) {\n cachedChildren[index].remove();\n }\n }\n\n this.node = node;\n\n this.syncAttributes(cached.attr);\n\n this.removeAttributes(cached.attr);\n };\n\n Element.prototype.syncAttributes = function(cachedAttr) {\n var attr = this.attr;\n\n for (var name in attr) {\n var value = attr[name];\n\n var cachedValue = cachedAttr[name];\n\n if (name === \"style\") {\n this.setStyle(value, cachedValue);\n } else if (value !== cachedValue) {\n this.setAttribute(name, value, cachedValue);\n }\n }\n };\n\n Element.prototype.setStyle = function(style, cachedValue) {\n var node = this.node;\n var key;\n\n if (cachedValue) {\n for (key in style) {\n if (style[key] !== cachedValue[key]) {\n node.style[key] = style[key];\n }\n }\n } else {\n for (key in style) {\n node.style[key] = style[key];\n }\n }\n };\n\n Element.prototype.removeStyle = function(cachedStyle) {\n var style = this.attr.style || {};\n var node = this.node;\n\n for (var key in cachedStyle) {\n if (style[key] === undefined) {\n node.style[key] = \"\";\n }\n }\n };\n\n Element.prototype.removeAttributes = function(cachedAttr) {\n var attr = this.attr;\n\n for (var name in cachedAttr) {\n if (name === \"style\") {\n this.removeStyle(cachedAttr.style);\n } else if (attr[name] === undefined) {\n this.removeAttribute(name);\n }\n }\n };\n\n Element.prototype.removeAttribute = function(name) {\n var node = this.node;\n\n if (name === \"style\") {\n node.style.cssText = \"\";\n } else if (name === \"className\") {\n node.className = \"\";\n } else {\n node.removeAttribute(name);\n }\n };\n\n Element.prototype.setAttribute = function(name, value) {\n var node = this.node;\n\n if (node[name] !== undefined) {\n node[name] = value;\n } else {\n node.setAttribute(name, value);\n }\n };\n\n Element.prototype.text = function() {\n var str = \"\";\n for (var i = 0; i < this.children.length; ++i) {\n str += this.children[i].text();\n }\n return str;\n };\n\n function TextNode(nodeValue, force) {\n this.nodeValue = String(nodeValue);\n this.force = force;\n }\n\n TextNode.prototype = new Node();\n\n TextNode.prototype.nodeName = \"#text\";\n\n TextNode.prototype.render = function(parent, cached) {\n var node;\n\n if (cached.nodeName !== this.nodeName || this.force) {\n cached.remove();\n\n node = document.createTextNode(this.nodeValue);\n\n parent.appendChild(node);\n } else {\n node = cached.node;\n\n if (this.nodeValue !== cached.nodeValue) {\n if (node.parentNode) {\n // sometimes in IE parentNode is null (reason unknown),\n // and IE throws an error when you try to set a\n // parentless' nodeValue, because why not.\n node.nodeValue = this.nodeValue;\n }\n }\n }\n\n this.node = node;\n };\n\n TextNode.prototype.text = function() {\n return this.nodeValue;\n };\n\n function HtmlNode(html, force) {\n this.html = html;\n this.force = force;\n }\n\n HtmlNode.prototype = {\n nodeName: \"#html\",\n attr: {},\n remove: function() {\n for (var index = 0; index < this.nodes.length; index++) {\n var el = this.nodes[index];\n if (el.parentNode) {\n el.parentNode.removeChild(el);\n }\n }\n },\n render: function(parent, cached) {\n if (cached.nodeName !== this.nodeName || cached.html !== this.html || this.force) {\n cached.remove();\n\n var lastChild = parent.lastChild;\n\n insertHtml(parent, this.html);\n\n this.nodes = [];\n\n for (var child = lastChild ? lastChild.nextSibling : parent.firstChild; child; child = child.nextSibling) {\n this.nodes.push(child);\n }\n } else {\n this.nodes = cached.nodes.slice(0);\n }\n }\n };\n\n var HTML_CONTAINER = document.createElement(\"div\");\n\n function insertHtml(node, html) {\n HTML_CONTAINER.innerHTML = html;\n\n while (HTML_CONTAINER.firstChild) {\n node.appendChild(HTML_CONTAINER.firstChild);\n }\n }\n\n function html(value, force) {\n return new HtmlNode(value, force);\n }\n\n function element(nodeName, attrs, children) {\n return new Element(nodeName, attrs, children);\n }\n\n function text(value, force) {\n return new TextNode(value, force);\n }\n\n function Tree(root) {\n this.root = root;\n this.children = [];\n }\n\n Tree.prototype = {\n html: html,\n element: element,\n text: text,\n render: function(children) {\n var cachedChildren = this.children;\n\n var index;\n\n var length;\n\n for (index = 0, length = children.length; index < length; index++) {\n var cached = cachedChildren[index];\n if (!cached) {\n cached = NULL_NODE;\n } else if (!cached.node || !cached.node.parentNode) {\n cached.remove();\n cached = NULL_NODE;\n }\n children[index].render(this.root, cached);\n }\n\n for (index = length; index < cachedChildren.length; index++) {\n cachedChildren[index].remove();\n }\n\n this.children = children;\n }\n };\n\n kendo.dom = {\n html: html,\n text: text,\n element: element,\n Tree: Tree,\n Node: Node\n };\n})(window.kendo);\n", "import './kendo.core.js';\n\n(function () {\n\n/* global JSZip */\n\nkendo.ooxml = kendo.ooxml || {};\n\nkendo.ooxml.createZip = function() {\n if (typeof JSZip === \"undefined\") {\n throw new Error(\"JSZip not found. Check http://docs.telerik.com/kendo-ui/framework/excel/introduction#requirements for more details.\");\n }\n\n return new JSZip();\n};\n\n})();\n\n/***********************************************************************\n * WARNING: this file is auto-generated. If you change it directly,\n * your modifications will eventually be lost. The source code is in\n * `kendo-ooxml` repository, you should make your changes there and\n * run `src-modules/sync.sh` in this repository.\n */\n\n(function($) {\n/* eslint-disable space-before-blocks, space-before-function-paren */\n\nwindow.kendo.ooxml = window.kendo.ooxml || {};\nvar ooxml = kendo.ooxml;\n\nvar map = $.map;\nvar createZip = ooxml.createZip;\n\nvar current = {\n toString: function (value) { return value; }\n};\n\nvar IntlService = kendo.Class.extend({\n\n});\n\nIntlService.register = function(userImplementation) {\n current = userImplementation;\n};\n\nIntlService.toString = function(value, format) {\n return current.toString(value, format);\n};\n\n// date packing utilities from Kendo Spreadsheet\n\n// Julian days algorithms from http://www.hermetic.ch/cal_stud/jdn.htm#comp\nfunction dateToJulianDays(y, m, d) {\n return ((1461 * (y + 4800 + ((m - 13) / 12 | 0))) / 4 | 0) +\n ((367 * (m - 1 - 12 * ((m - 13) / 12 | 0))) / 12 | 0) -\n ((3 * (((y + 4900 + ((m - 13) / 12 | 0)) / 100 | 0))) / 4 | 0) +\n d - 32075;\n}\n\n// This uses the Google Spreadsheet approach: treat 1899-12-31 as day 1, allowing to avoid\n// implementing the \"Leap Year Bug\" yet still be Excel compatible for dates starting 1900-03-01.\nvar BASE_DATE = dateToJulianDays(1900, 0, -1);\n\nfunction packDate(year, month, date) {\n return dateToJulianDays(year, month, date) - BASE_DATE;\n}\n\nfunction packTime(hh, mm, ss, ms) {\n return (hh + (mm + (ss + ms / 1000) / 60) / 60) / 24;\n}\n\nfunction dateToSerial(date) {\n var time = packTime(date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds());\n var serial = packDate(date.getFullYear(),\n date.getMonth(),\n date.getDate());\n return serial < 0 ? serial - 1 + time : serial + time;\n}\n\nvar MIME_TYPE = \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\nvar DATA_URL_PREFIX = \"data:\" + MIME_TYPE + \";base64,\";\nvar DATA_URL_OPTIONS = { compression: \"DEFLATE\", type: \"base64\" };\nvar BLOB_OPTIONS = { compression: \"DEFLATE\", type: \"blob\" };\nvar ARRAYBUFFER_OPTIONS = { compression: \"DEFLATE\", type: \"arraybuffer\" };\n\n/* eslint-disable key-spacing, no-confusing-arrow, no-constant-condition, indent, no-nested-ternary, consistent-return */\n\nfunction toDataURI(content) {\n return DATA_URL_PREFIX + content;\n}\n\nfunction indexOf(thing, array) {\n return array.indexOf(thing);\n}\n\nvar parseJSON = JSON.parse.bind(JSON);\n\nfunction ESC(val) {\n return String(val)\n .replace(/&/g, \"&\")\n .replace(//g, \">\")\n .replace(/\\\"/g, \""\")\n .replace(/\\'/g, \"'\");\n}\n\nfunction repeat(count, func) {\n var str = \"\";\n for (var i = 0; i < count; ++i) {\n str += func(i);\n }\n return str;\n}\n\nfunction foreach(arr, func) {\n var str = \"\";\n if (arr != null) {\n if (Array.isArray(arr)) {\n for (var i = 0; i < arr.length; ++i) {\n str += func(arr[i], i);\n }\n } else if (typeof arr == \"object\") {\n Object.keys(arr).forEach(function (key, i) {\n str += func(arr[key], key, i);\n });\n }\n }\n return str;\n}\n\nvar XMLHEAD = '\\r';\n\nvar RELS = XMLHEAD + \"\\n \\n \\n \\n \\n \";\n\nvar CORE = function (ref) {\n var creator = ref.creator;\n var lastModifiedBy = ref.lastModifiedBy;\n var created = ref.created;\n var modified = ref.modified;\n\n return (XMLHEAD + \"\\n \\n \" + (ESC(creator)) + \"\\n \" + (ESC(lastModifiedBy)) + \"\\n \" + (ESC(created)) + \"\\n \" + (ESC(modified)) + \"\\n\");\n};\n\nvar APP = function (ref) {\n var sheets = ref.sheets;\n\n return (XMLHEAD + \"\\n\\n Microsoft Excel\\n 0\\n false\\n \\n \\n \\n Worksheets\\n \\n \\n \" + (sheets.length) + \"\\n \\n \\n \\n \\n \" + (foreach(sheets, function (sheet, i) { return sheet.options.title\n ? (\"\" + (ESC(sheet.options.title)) + \"\")\n : (\"Sheet\" + (i + 1) + \"\"); }\n )) + \"\\n \\n false\\n false\\n false\\n 14.0300\\n\");\n};\n\nvar CONTENT_TYPES = function (ref) {\n var sheetCount = ref.sheetCount;\n var commentFiles = ref.commentFiles;\n var drawingFiles = ref.drawingFiles;\n\n return (XMLHEAD + \"\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \" + (repeat(sheetCount, function (idx) { return (\"\"); })) + \"\\n \" + (foreach(commentFiles, function (filename) { return (\"\"); })) + \"\\n \" + (foreach(drawingFiles, function (filename) { return (\"\"); })) + \"\\n \\n \\n\");\n};\n\nvar WORKBOOK = function (ref) {\n var sheets = ref.sheets;\n var filterNames = ref.filterNames;\n var userNames = ref.userNames;\n\n return (XMLHEAD + \"\\n\\n \\n \\n \\n \\n \\n \\n \" + (foreach(sheets, function (ref, i) {\n var options = ref.options;\n\n var name = options.name || options.title || (\"Sheet\" + (i + 1));\n return (\"\");\n })) + \"\\n \\n \" + (filterNames.length || userNames.length ? (\"\\n \\n \" + (foreach(filterNames, function (f) { return (\"\\n \"); })) + \"\\n \" + (foreach(userNames, function (f) { return (\"\\n \"); })) + \"\\n \") : '') + \"\\n \\n\");\n};\n\nvar WORKSHEET = function (ref$1) {\n var frozenColumns = ref$1.frozenColumns;\n var frozenRows = ref$1.frozenRows;\n var columns = ref$1.columns;\n var defaults = ref$1.defaults;\n var data = ref$1.data;\n var index = ref$1.index;\n var mergeCells = ref$1.mergeCells;\n var autoFilter = ref$1.autoFilter;\n var filter = ref$1.filter;\n var showGridLines = ref$1.showGridLines;\n var hyperlinks = ref$1.hyperlinks;\n var validations = ref$1.validations;\n var defaultCellStyleId = ref$1.defaultCellStyleId;\n var rtl = ref$1.rtl;\n var legacyDrawing = ref$1.legacyDrawing;\n var drawing = ref$1.drawing;\n var lastRow = ref$1.lastRow;\n var lastCol = ref$1.lastCol;\n\n return (XMLHEAD + \"\\n\\n \" + (lastRow && lastCol ? (\"\") : \"\") + \"\\n\\n \\n \\n \" + (frozenRows || frozenColumns ? (\"\\n \") : '') + \"\\n \\n \\n\\n \\n\\n \" + (defaultCellStyleId != null || (columns && columns.length > 0) ? (\"\\n \\n \" + (!columns || !columns.length ? (\"\\n \") : '') + \"\\n \" + (foreach(columns, function (column, ci) {\n var columnIndex = typeof column.index === \"number\" ? column.index + 1 : (ci + 1);\n if (column.width === 0) {\n return (\"\");\n }\n return (\"\");\n })) + \"\\n \") : '') + \"\\n\\n \\n \" + (foreach(data, function (row, ri) {\n var rowIndex = typeof row.index === \"number\" ? row.index + 1 : (ri + 1);\n return (\"\\n \\n \" + (foreach(row.data, function (cell) { return (\"\\n \\n \" + (cell.formula != null ? writeFormula(cell.formula) : '') + \"\\n \" + (cell.value != null ? (\"\" + (ESC(cell.value)) + \"\") : '') + \"\\n \"); })) + \"\\n \\n \");})) + \"\\n \\n\\n \" + (autoFilter ? (\"\")\n : filter ? spreadsheetFilters(filter) : '') + \"\\n\\n \" + (mergeCells.length ? (\"\\n \\n \" + (foreach(mergeCells, function (ref) { return (\"\"); })) + \"\\n \") : '') + \"\\n\\n \" + (validations.length ? (\"\\n \\n \" + (foreach(validations, function (val) { return (\"\\n \\n \" + (val.formula1 ? (\"\" + (ESC(val.formula1)) + \"\") : '') + \"\\n \" + (val.formula2 ? (\"\" + (ESC(val.formula2)) + \"\") : '') + \"\\n \"); })) + \"\\n \") : '') + \"\\n\\n \" + (hyperlinks.length ? (\"\\n \\n \" + (foreach(hyperlinks, function (link) { return (\"\\n \"); })) + \"\\n \") : '') + \"\\n\\n \\n \" + (drawing ? (\"\") : '') + \"\\n \" + (legacyDrawing ? (\"\") : '') + \"\\n\");\n};\n\nvar WORKBOOK_RELS = function (ref) {\n var count = ref.count;\n\n return (XMLHEAD + \"\\n\\n \" + (repeat(count, function (idx) { return (\"\\n \"); })) + \"\\n \\n \\n\");\n};\n\nvar WORKSHEET_RELS = function (ref) {\n var hyperlinks = ref.hyperlinks;\n var comments = ref.comments;\n var sheetIndex = ref.sheetIndex;\n var drawings = ref.drawings;\n\n return (XMLHEAD + \"\\n\\n \" + (foreach(hyperlinks, function (link) { return (\"\\n \"); })) + \"\\n \" + (!comments.length ? '' : (\"\\n \\n \")) + \"\\n \" + (!drawings.length ? '' : (\"\\n \")) + \"\\n\");\n};\n\nvar COMMENTS_XML = function (ref) {\n var comments = ref.comments;\n\n return (XMLHEAD + \"\\n\\n \\n \\n \\n \\n \" + (foreach(comments, function (comment) { return (\"\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \" + (ESC(comment.text)) + \"\\n \\n \\n \"); })) + \"\\n \\n\");\n};\n\nvar LEGACY_DRAWING = function (ref) {\n var comments = ref.comments;\n\n return (\"\\n \\n \\n \\n \\n \" + (foreach(comments, function (comment) { return (\"\\n \\n \\n \\n \\n \\n \" + (comment.anchor) + \"\\n False\\n \" + (comment.row) + \"\\n \" + (comment.col) + \"\\n \\n \"); })) + \"\\n\");\n};\n\nvar DRAWINGS_XML = function (drawings) { return (XMLHEAD + \"\\n\\n \" + (foreach(drawings, function (drawing, index) { return (\"\\n \\n \\n \" + (drawing.col) + \"\\n \" + (drawing.colOffset) + \"\\n \" + (drawing.row) + \"\\n \" + (drawing.rowOffset) + \"\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \"); })) + \"\\n\"); };\n\nvar DRAWINGS_RELS_XML = function (rels) { return (XMLHEAD + \"\\n\\n \" + (foreach(rels, function (rel) { return (\"\\n \"); })) + \"\\n\"); };\n\nvar SHARED_STRINGS = function (ref) {\n var count = ref.count;\n var uniqueCount = ref.uniqueCount;\n var indexes = ref.indexes;\n\n return (XMLHEAD + \"\\n\\n \" + (foreach(Object.keys(indexes), function (index) { return (\"\\n \" + (ESC(index.substring(1))) + \"\"); })) + \"\\n\");\n};\n\nvar STYLES = function (ref) {\n var formats = ref.formats;\n var fonts = ref.fonts;\n var fills = ref.fills;\n var borders = ref.borders;\n var styles = ref.styles;\n\n return (XMLHEAD + \"\\n\\n \\n \" + (foreach(formats, function (format, fi) { return (\"\\n \"); })) + \"\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \" + (foreach(fonts, function (font) { return (\"\\n \\n \" + (font.bold ? '' : '') + \"\\n \" + (font.italic ? '' : '') + \"\\n \" + (font.underline ? '' : '') + \"\\n \\n \" + (font.color ? (\"\") : '') + \"\\n \" + (font.fontFamily ? (\"\\n \\n \\n \") : \"\\n \\n \\n \\n \") + \"\\n \"); })) + \"\\n \\n \\n \\n \\n \" + (foreach(fills, function (fill) { return (\"\\n \" + (fill.background ? (\"\\n \\n \\n \\n \\n \\n \") : '')); })) + \"\\n \\n \\n \\n \" + (foreach(borders, borderTemplate)) + \"\\n \\n \\n \\n \\n \\n \\n \" + (foreach(styles, function (style) { return (\"\\n \\n \" + (style.textAlign || style.verticalAlign || style.wrap ? (\"\\n \\n \") : '') + \"\\n \\n \"); })) + \"\\n \\n \\n \\n \\n \\n \\n\");\n};\n\nfunction writeFormula(formula) {\n if (typeof formula == \"string\") {\n return (\"\" + (ESC(formula)) + \"\");\n }\n // array formulas\n return (\"\" + (ESC(formula.src)) + \"\");\n}\n\nfunction numChar(colIndex) {\n var letter = Math.floor(colIndex / 26) - 1;\n\n return (letter >= 0 ? numChar(letter) : \"\") + String.fromCharCode(65 + (colIndex % 26));\n}\n\nfunction ref(rowIndex, colIndex) {\n return numChar(colIndex) + (rowIndex + 1);\n}\n\nfunction $ref(rowIndex, colIndex) {\n return \"$\" + numChar(colIndex) + \"$\" + (rowIndex + 1);\n}\n\nfunction filterRowIndex(options) {\n var frozenRows = options.frozenRows || (options.freezePane || {}).rowSplit || 1;\n return frozenRows - 1;\n}\n\nfunction toWidth(px) {\n var maximumDigitWidth = 7;\n return (px / maximumDigitWidth) - (Math.floor(128 / maximumDigitWidth) / 256);\n}\n\nfunction toHeight(px) {\n return px * 0.75;\n}\n\nfunction stripFunnyChars(value) {\n return String(value)\n .replace(/[\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F]/g, \"\") // leave CRLF in\n .replace(/\\r?\\n/g, \"\\r\\n\"); // make sure LF is preceded by CR\n}\n\nvar Worksheet = kendo.Class.extend({\n init: function(options, sharedStrings, styles, borders) {\n this.options = options;\n this._strings = sharedStrings;\n this._styles = styles;\n this._borders = borders;\n this._validations = {};\n this._comments = [];\n this._drawings = options.drawings || [];\n this._hyperlinks = (this.options.hyperlinks || []).map(\n function (link, i) { return $.extend({}, link, { rId: (\"link\" + i) }); });\n },\n\n relsToXML: function() {\n var hyperlinks = this._hyperlinks;\n var comments = this._comments;\n var drawings = this._drawings;\n\n if (hyperlinks.length || comments.length || drawings.length) {\n return WORKSHEET_RELS({\n hyperlinks : hyperlinks,\n comments : comments,\n sheetIndex : this.options.sheetIndex,\n drawings : drawings\n });\n }\n },\n\n toXML: function(index) {\n var this$1$1 = this;\n\n var mergeCells = this.options.mergedCells || [];\n var rows = this.options.rows || [];\n var data = inflate(rows, mergeCells);\n\n this._readCells(data);\n\n var autoFilter = this.options.filter;\n var filter;\n if (autoFilter && (typeof autoFilter.from === \"number\") && (typeof autoFilter.to === \"number\")) {\n // Grid enables auto filter\n autoFilter = {\n from: ref(filterRowIndex(this.options), autoFilter.from),\n to: ref(filterRowIndex(this.options), autoFilter.to)\n };\n } else if (autoFilter && autoFilter.ref && autoFilter.columns) {\n // this is probably from the Spreadsheet\n filter = autoFilter;\n autoFilter = null;\n }\n\n var validations = [];\n for (var i in this._validations) {\n if (Object.prototype.hasOwnProperty.call(this$1$1._validations, i)) {\n validations.push(this$1$1._validations[i]);\n }\n }\n\n var defaultCellStyleId = null;\n if (this.options.defaultCellStyle) {\n defaultCellStyleId = this._lookupStyle(this.options.defaultCellStyle);\n }\n\n var freezePane = this.options.freezePane || {};\n var defaults = this.options.defaults || {};\n var lastRow = this.options.rows ? this._getLastRow() : 1;\n var lastCol = this.options.rows ? this._getLastCol() : 1;\n\n return WORKSHEET({\n frozenColumns: this.options.frozenColumns || freezePane.colSplit,\n frozenRows: this.options.frozenRows || freezePane.rowSplit,\n columns: this.options.columns,\n defaults: defaults,\n data: data,\n index: index,\n mergeCells: mergeCells,\n autoFilter: autoFilter,\n filter: filter,\n showGridLines: this.options.showGridLines,\n hyperlinks: this._hyperlinks,\n validations: validations,\n defaultCellStyleId: defaultCellStyleId,\n rtl: this.options.rtl !== undefined ? this.options.rtl : defaults.rtl,\n legacyDrawing: this._comments.length ? (\"vml\" + (this.options.sheetIndex)) : null,\n drawing: this._drawings.length ? (\"drw\" + (this.options.sheetIndex)) : null,\n lastRow: lastRow,\n lastCol: lastCol\n });\n },\n\n commentsXML: function() {\n if (this._comments.length) {\n return COMMENTS_XML({ comments: this._comments });\n }\n },\n\n drawingsXML: function(images) {\n if (this._drawings.length) {\n var rels = {};\n var main = this._drawings.map(function (drw) {\n var ref = parseRef(drw.topLeftCell);\n var img = rels[drw.image];\n if (!img) {\n img = rels[drw.image] = {\n rId: (\"img\" + (drw.image)),\n target: images[drw.image].target\n };\n }\n return {\n col : ref.col,\n colOffset : pixelsToExcel(drw.offsetX),\n row : ref.row,\n rowOffset : pixelsToExcel(drw.offsetY),\n width : pixelsToExcel(drw.width),\n height : pixelsToExcel(drw.height),\n imageId : img.rId\n };\n });\n return {\n main: DRAWINGS_XML(main),\n rels: DRAWINGS_RELS_XML(rels)\n };\n }\n },\n\n legacyDrawing: function() {\n if (this._comments.length) {\n return LEGACY_DRAWING({ comments: this._comments });\n }\n },\n\n _lookupString: function(value) {\n var key = \"$\" + value;\n var index = this._strings.indexes[key];\n var result;\n\n if (index !== undefined) {\n result = index;\n } else {\n result = this._strings.indexes[key] = this._strings.uniqueCount;\n this._strings.uniqueCount ++;\n }\n\n this._strings.count ++;\n\n return result;\n },\n\n _lookupStyle: function(style) {\n var json = JSON.stringify(style);\n\n if (json === \"{}\") {\n return 0;\n }\n\n var index = indexOf(json, this._styles);\n\n if (index < 0) {\n index = this._styles.push(json) - 1;\n }\n\n // There is one default style\n return index + 1;\n },\n\n _lookupBorder: function(border) {\n var json = JSON.stringify(border);\n if (json === \"{}\") {\n return;\n }\n\n var index = indexOf(json, this._borders);\n if (index < 0) {\n index = this._borders.push(json) - 1;\n }\n\n // There is one default border\n return index + 1;\n },\n\n _readCells: function(rowData) {\n var this$1$1 = this;\n\n for (var i = 0; i < rowData.length; i++) {\n var row = rowData[i];\n var cells = row.cells;\n\n row.data = [];\n\n for (var j = 0; j < cells.length; j++) {\n var cellData = this$1$1._cell(cells[j], row.index, j);\n if (cellData) {\n row.data.push(cellData);\n }\n }\n }\n },\n\n _cell: function(data, rowIndex, cellIndex) {\n if (!data || data === EMPTY_CELL) {\n return null;\n }\n\n var value = data.value;\n\n var border = {};\n\n if (data.borderLeft) {\n border.left = data.borderLeft;\n }\n\n if (data.borderRight) {\n border.right = data.borderRight;\n }\n\n if (data.borderTop) {\n border.top = data.borderTop;\n }\n\n if (data.borderBottom) {\n border.bottom = data.borderBottom;\n }\n\n if (data.dBorders) {\n border.diagonal = data.dBorders;\n }\n\n border = this._lookupBorder(border);\n\n var defStyle = this.options.defaultCellStyle || {};\n var style = { borderId: border };\n\n (function(add) {\n add(\"color\");\n add(\"background\");\n add(\"bold\");\n add(\"italic\");\n add(\"underline\");\n if (!add(\"fontFamily\")) { add(\"fontName\", \"fontFamily\"); }\n add(\"fontSize\");\n add(\"format\");\n if (!add(\"textAlign\")) { add(\"hAlign\", \"textAlign\"); }\n if (!add(\"verticalAlign\")) { add(\"vAlign\", \"verticalAlign\"); }\n add(\"wrap\");\n add(\"indent\");\n })(\n function(prop, target) {\n var val = data[prop];\n if (val === undefined) {\n val = defStyle[prop];\n }\n if (val !== undefined) {\n style[target || prop] = val;\n return true;\n }\n }\n );\n\n var columns = this.options.columns || [];\n\n var column = columns[cellIndex];\n var type = typeof value;\n\n if (column && column.autoWidth && (!data.colSpan || data.colSpan === 1)) {\n var displayValue = value;\n\n // XXX: let's not bring kendo.toString in only for this.\n // better wait until the spreadsheet engine is available as a separate\n // component, then we can use a real Excel-like formatter.\n //\n if (type === \"number\") {\n // kendo.toString will not behave exactly like the Excel format\n // Still, it's the best we have available for estimating the character count.\n displayValue = IntlService.toString(value, data.format);\n }\n\n column.width = Math.max(column.width || 0, String(displayValue).length);\n }\n\n if (type === \"string\") {\n value = stripFunnyChars(value);\n value = this._lookupString(value);\n type = \"s\";\n } else if (type === \"number\") {\n type = \"n\";\n } else if (type === \"boolean\") {\n type = \"b\";\n value = Number(value);\n } else if (value && value.getTime) {\n type = null;\n value = dateToSerial(value);\n if (!style.format) {\n style.format = \"mm-dd-yy\";\n }\n } else {\n type = null;\n value = null;\n }\n\n style = this._lookupStyle(style);\n\n var cellName = ref(rowIndex, cellIndex);\n\n if (data.validation) {\n this._addValidation(data.validation, cellName);\n }\n\n if (data.comment) {\n var anchor = [\n cellIndex + 1, // start column\n 15, // start column offset\n rowIndex, // start row\n 10, // start row offset\n cellIndex + 3, // end column\n 15, // end column offset\n rowIndex + 3, // end row\n 4 // end row offset\n ];\n this._comments.push({\n ref : cellName,\n text : data.comment,\n row : rowIndex,\n col : cellIndex,\n anchor : anchor.join(\", \")\n });\n }\n\n return {\n value: value,\n formula: data.formula,\n type: type,\n style: style,\n ref: cellName\n };\n },\n\n _addValidation: function(v, ref) {\n var tmp = {\n showErrorMessage : v.type === \"reject\" ? 1 : 0,\n formula1 : v.from,\n formula2 : v.to,\n type : MAP_EXCEL_TYPE[v.dataType] || v.dataType,\n operator : MAP_EXCEL_OPERATOR[v.comparerType] || v.comparerType,\n allowBlank : v.allowNulls ? 1 : 0,\n showDropDown : v.showButton ? 0 : 1, // LOL, Excel!\n error : v.messageTemplate,\n errorTitle : v.titleTemplate\n };\n var json = JSON.stringify(tmp);\n if (!this._validations[json]) {\n this._validations[json] = tmp;\n tmp.sqref = [];\n }\n this._validations[json].sqref.push(ref);\n },\n\n _getLastRow: function() {\n return countData(this.options.rows);\n },\n\n _getLastCol: function() {\n var last = 0;\n this.options.rows.forEach(function(row) {\n if (row.cells) {\n last = Math.max(last, countData(row.cells));\n }\n });\n return last;\n }\n});\n\nfunction countData(data) {\n var last = data.length;\n data.forEach(function(el) {\n if (el.index && el.index >= last) {\n last = el.index + 1;\n }\n });\n return last;\n}\n\nvar MAP_EXCEL_OPERATOR = {\n // includes only what differs; key is our operator, value is Excel\n // operator.\n greaterThanOrEqualTo : \"greaterThanOrEqual\",\n lessThanOrEqualTo : \"lessThanOrEqual\"\n};\n\nvar MAP_EXCEL_TYPE = {\n // eslint-disable-next-line id-denylist\n number: \"decimal\"\n};\n\nvar defaultFormats = {\n \"General\": 0,\n \"0\": 1,\n \"0.00\": 2,\n \"#,##0\": 3,\n \"#,##0.00\": 4,\n \"0%\": 9,\n \"0.00%\": 10,\n \"0.00E+00\": 11,\n \"# ?/?\": 12,\n \"# ??/??\": 13,\n \"mm-dd-yy\": 14,\n \"d-mmm-yy\": 15,\n \"d-mmm\": 16,\n \"mmm-yy\": 17,\n \"h:mm AM/PM\": 18,\n \"h:mm:ss AM/PM\": 19,\n \"h:mm\": 20,\n \"h:mm:ss\": 21,\n \"m/d/yy h:mm\": 22,\n \"#,##0 ;(#,##0)\": 37,\n \"#,##0 ;[Red](#,##0)\": 38,\n \"#,##0.00;(#,##0.00)\": 39,\n \"#,##0.00;[Red](#,##0.00)\": 40,\n \"mm:ss\": 45,\n \"[h]:mm:ss\": 46,\n \"mmss.0\": 47,\n \"##0.0E+0\": 48,\n \"@\": 49,\n \"[$-404]e/m/d\": 27,\n \"m/d/yy\": 30,\n \"t0\": 59,\n \"t0.00\": 60,\n \"t#,##0\": 61,\n \"t#,##0.00\": 62,\n \"t0%\": 67,\n \"t0.00%\": 68,\n \"t# ?/?\": 69,\n \"t# ??/??\": 70\n};\n\nfunction maybeRGB(value) {\n function hex(val) {\n var x = parseInt(val, 10).toString(16);\n return x.length < 2 ? \"0\" + x : x;\n }\n\n var m = /^rgba?\\((\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*([0-9.]+)\\s*)?\\)/i.exec(value.trim());\n if (m) {\n var opacity = (m[4] ? parseFloat(m[4]) : 1) * 255 | 0;\n return \"#\" + hex(opacity) + hex(m[1]) + hex(m[2]) + hex(m[3]);\n }\n return value;\n}\n\nfunction convertColor(value) {\n var color = maybeRGB(value);\n if (color.length < 6) {\n color = color.replace(/(\\w)/g, function($0, $1) {\n return $1 + $1;\n });\n }\n\n color = color.substring(1).toUpperCase();\n\n if (color.length < 8) {\n color = \"FF\" + color;\n }\n\n return color;\n}\n\nvar Workbook = kendo.Class.extend({\n init: function(options) {\n var this$1$1 = this;\n\n this.options = options || {};\n this._strings = {\n indexes: {},\n count: 0,\n uniqueCount: 0\n };\n this._styles = [];\n this._borders = [];\n this._images = this.options.images;\n this._imgId = 0;\n\n this._sheets = map(this.options.sheets || [], function (options, i) {\n options.defaults = this$1$1.options;\n options.sheetIndex = i + 1;\n return new Worksheet(options, this$1$1._strings, this$1$1._styles, this$1$1._borders);\n });\n },\n\n imageFilename: function(mimeType) {\n var id = ++this._imgId;\n switch (mimeType) {\n case \"image/jpg\":\n case \"image/jpeg\":\n return (\"image\" + id + \".jpg\");\n case \"image/png\":\n return (\"image\" + id + \".png\");\n case \"image/gif\":\n return (\"image\" + id + \".gif\");\n default:\n return (\"image\" + id + \".bin\"); // XXX: anything better to do here?\n }\n },\n\n toZIP: function() {\n var this$1$1 = this;\n\n var zip = createZip();\n\n var docProps = zip.folder(\"docProps\");\n\n docProps.file(\"core.xml\", CORE({\n creator: this.options.creator || \"Kendo UI\",\n lastModifiedBy: this.options.creator || \"Kendo UI\",\n created: this.options.date || new Date().toJSON(),\n modified: this.options.date || new Date().toJSON()\n }));\n\n var sheetCount = this._sheets.length;\n\n docProps.file(\"app.xml\", APP({ sheets: this._sheets }));\n\n var rels = zip.folder(\"_rels\");\n rels.file(\".rels\", RELS);\n\n var xl = zip.folder(\"xl\");\n\n var xlRels = xl.folder(\"_rels\");\n xlRels.file(\"workbook.xml.rels\", WORKBOOK_RELS({ count: sheetCount }));\n\n if (this._images) {\n var media = xl.folder(\"media\");\n Object.keys(this._images).forEach(function (id) {\n var img = this$1$1._images[id];\n var filename = this$1$1.imageFilename(img.type);\n media.file(filename, img.data);\n img.target = \"../media/\" + filename;\n });\n }\n\n var sheetIds = {};\n xl.file(\"workbook.xml\", WORKBOOK({\n sheets: this._sheets,\n filterNames: map(this._sheets, function(sheet, index) {\n var options = sheet.options;\n var sheetName = (options.name || options.title || \"Sheet\" + (index + 1));\n sheetIds[sheetName.toLowerCase()] = index;\n var filter = options.filter;\n if (filter) {\n if (filter.ref) {\n // spreadsheet provides `ref`\n var a = filter.ref.split(\":\");\n var from = parseRef(a[0]);\n var to = parseRef(a[1]);\n return {\n localSheetId: index,\n name: sheetName,\n from: $ref(from.row, from.col),\n to: $ref(to.row, to.col)\n };\n } else if (typeof filter.from !== \"undefined\" && typeof filter.to !== \"undefined\") {\n // grid does this\n return {\n localSheetId: index,\n name: sheetName,\n from: $ref(filterRowIndex(options), filter.from),\n to: $ref(filterRowIndex(options), filter.to)\n };\n }\n }\n }),\n userNames: map(this.options.names || [], function(def) {\n return {\n name: def.localName,\n localSheetId: def.sheet ? sheetIds[def.sheet.toLowerCase()] : null,\n value: def.value,\n hidden: def.hidden\n };\n })\n }));\n\n var worksheets = xl.folder(\"worksheets\");\n var drawings = xl.folder(\"drawings\");\n var drawingsRels = drawings.folder(\"_rels\");\n var sheetRels = worksheets.folder(\"_rels\");\n var commentFiles = [];\n var drawingFiles = [];\n\n for (var idx = 0; idx < sheetCount; idx++) {\n var sheet = this$1$1._sheets[idx];\n var sheetName = \"sheet\" + (idx + 1) + \".xml\";\n var sheetXML = sheet.toXML(idx); // must be called before relsToXML\n var relsXML = sheet.relsToXML();\n var commentsXML = sheet.commentsXML();\n var legacyDrawing = sheet.legacyDrawing();\n var drawingsXML = sheet.drawingsXML(this$1$1._images);\n\n if (relsXML) {\n sheetRels.file(sheetName + \".rels\", relsXML);\n }\n if (commentsXML) {\n var name = \"comments\" + (sheet.options.sheetIndex) + \".xml\";\n xl.file(name, commentsXML);\n commentFiles.push(name);\n }\n if (legacyDrawing) {\n drawings.file((\"vmlDrawing\" + (sheet.options.sheetIndex) + \".vml\"), legacyDrawing);\n }\n if (drawingsXML) {\n var name$1 = \"drawing\" + (sheet.options.sheetIndex) + \".xml\";\n drawings.file(name$1, drawingsXML.main);\n drawingsRels.file((name$1 + \".rels\"), drawingsXML.rels);\n drawingFiles.push(name$1);\n }\n\n worksheets.file(sheetName, sheetXML);\n }\n\n var borders = map(this._borders, parseJSON);\n\n var styles = map(this._styles, parseJSON);\n\n var hasFont = function(style) {\n return style.underline || style.bold || style.italic || style.color || style.fontFamily || style.fontSize;\n };\n\n var convertFontSize = function(value) {\n var fontInPx = Number(value);\n var fontInPt;\n\n if (fontInPx) {\n fontInPt = fontInPx * 3 / 4;\n }\n\n return fontInPt;\n };\n\n var fonts = map(styles, function(style) {\n if (style.fontSize) {\n style.fontSize = convertFontSize(style.fontSize);\n }\n\n if (style.color) {\n style.color = convertColor(style.color);\n }\n\n if (hasFont(style)) {\n return style;\n }\n });\n\n var formats = map(styles, function(style) {\n if (style.format && defaultFormats[style.format] === undefined) {\n return style;\n }\n });\n\n var fills = map(styles, function(style) {\n if (style.background) {\n style.background = convertColor(style.background);\n return style;\n }\n });\n\n xl.file(\"styles.xml\", STYLES({\n fonts: fonts,\n fills: fills,\n formats: formats,\n borders: borders,\n styles: map(styles, function(style) {\n var result = {};\n\n if (hasFont(style)) {\n result.fontId = indexOf(style, fonts) + 1;\n }\n\n if (style.background) {\n result.fillId = indexOf(style, fills) + 2;\n }\n\n result.textAlign = style.textAlign;\n result.indent = style.indent;\n result.verticalAlign = style.verticalAlign;\n result.wrap = style.wrap;\n result.borderId = style.borderId;\n\n if (style.format) {\n if (defaultFormats[style.format] !== undefined) {\n result.numFmtId = defaultFormats[style.format];\n } else {\n result.numFmtId = 165 + indexOf(style, formats);\n }\n }\n\n return result;\n })\n }));\n\n xl.file(\"sharedStrings.xml\", SHARED_STRINGS(this._strings));\n\n zip.file(\"[Content_Types].xml\", CONTENT_TYPES({\n sheetCount: sheetCount,\n commentFiles: commentFiles,\n drawingFiles: drawingFiles\n }));\n\n return zip;\n },\n\n toDataURL: function() {\n var zip = this.toZIP();\n\n return zip.generateAsync ? zip.generateAsync(DATA_URL_OPTIONS).then(toDataURI) : toDataURI(zip.generate(DATA_URL_OPTIONS));\n },\n\n toBlob: function() {\n var zip = this.toZIP();\n if (zip.generateAsync) {\n return zip.generateAsync(BLOB_OPTIONS);\n }\n return new Blob([ zip.generate(ARRAYBUFFER_OPTIONS) ], { type: MIME_TYPE });\n }\n});\n\nfunction borderStyle(width) {\n var alias = \"thin\";\n\n if (width === 2) {\n alias = \"medium\";\n } else if (width === 3) {\n alias = \"thick\";\n }\n\n return alias;\n}\n\nfunction borderSideTemplate(name, style) {\n var result = \"\";\n\n if (style) {\n result += \"<\" + name + \" style=\\\"\" + borderStyle(style.size) + \"\\\">\";\n if (style.color) {\n result += \"\";\n }\n result += \"\";\n }\n\n return result;\n}\n\nfunction borderTemplate(border) {\n var diag = border.diagonal ? border.diagonal.type : 0;\n return (\"\\n \" + (borderSideTemplate(\"left\", border.left)) + \"\\n \" + (borderSideTemplate(\"right\", border.right)) + \"\\n \" + (borderSideTemplate(\"top\", border.top)) + \"\\n \" + (borderSideTemplate(\"bottom\", border.bottom)) + \"\\n \" + (borderSideTemplate(\"diagonal\", border.diagonal)) + \"\\n \");\n}\n\nvar EMPTY_CELL = {};\nfunction inflate(rows, mergedCells) {\n var rowData = [];\n var rowsByIndex = [];\n\n indexRows(rows, function(row, index) {\n var data = {\n _source: row,\n index: index,\n height: row.height,\n level: row.level,\n cells: []\n };\n\n rowData.push(data);\n rowsByIndex[index] = data;\n });\n\n var sorted = sortByIndex(rowData).slice(0);\n var ctx = {\n rowData: rowData,\n rowsByIndex: rowsByIndex,\n mergedCells: mergedCells\n };\n\n for (var i = 0; i < sorted.length; i++) {\n fillCells(sorted[i], ctx);\n delete sorted[i]._source;\n }\n\n return sortByIndex(rowData);\n}\n\nfunction indexRows(rows, callback) {\n for (var i = 0; i < rows.length; i++) {\n var row = rows[i];\n if (!row) {\n continue;\n }\n\n var index = row.index;\n if (typeof index !== \"number\") {\n index = i;\n }\n\n callback(row, index);\n }\n}\n\nfunction sortByIndex(items) {\n return items.sort(function(a, b) {\n return a.index - b.index;\n });\n}\n\nfunction pushUnique(array, el) {\n if (array.indexOf(el) < 0) {\n array.push(el);\n }\n}\n\nfunction getSpan(mergedCells, ref) {\n for (var i = 0; i < mergedCells.length; ++i) {\n var range = mergedCells[i];\n var a = range.split(\":\");\n var topLeft = a[0];\n if (topLeft === ref) {\n var bottomRight = a[1];\n topLeft = parseRef(topLeft);\n bottomRight = parseRef(bottomRight);\n return {\n rowSpan: bottomRight.row - topLeft.row + 1,\n colSpan: bottomRight.col - topLeft.col + 1\n };\n }\n }\n}\n\nfunction parseRef(ref) {\n function getcol(str) {\n var upperStr = str.toUpperCase();\n var col = 0;\n for (var i = 0; i < upperStr.length; ++i) {\n col = col * 26 + upperStr.charCodeAt(i) - 64;\n }\n return col - 1;\n }\n\n function getrow(str) {\n return parseInt(str, 10) - 1;\n }\n\n var m = /^([a-z]+)(\\d+)$/i.exec(ref);\n return {\n row: getrow(m[2]),\n col: getcol(m[1])\n };\n}\n\nfunction pixelsToExcel(px) {\n return Math.round(px * 9525);\n}\n\nfunction fillCells(data, ctx) {\n var row = data._source;\n var rowIndex = data.index;\n var cells = row.cells;\n var cellData = data.cells;\n\n if (!cells) {\n return;\n }\n\n for (var i = 0; i < cells.length; i++) {\n var cell = cells[i] || EMPTY_CELL;\n\n var rowSpan = cell.rowSpan || 1;\n var colSpan = cell.colSpan || 1;\n\n var cellIndex = insertCell(cellData, cell);\n var topLeftRef = ref(rowIndex, cellIndex);\n\n if (rowSpan === 1 && colSpan === 1) {\n // could still be merged: the spreadsheet does not send\n // rowSpan/colSpan, but mergedCells is already populated.\n // https://github.com/telerik/kendo-ui-core/issues/2401\n var tmp = getSpan(ctx.mergedCells, topLeftRef);\n if (tmp) {\n colSpan = tmp.colSpan;\n rowSpan = tmp.rowSpan;\n }\n }\n\n spanCell(cell, cellData, cellIndex, colSpan);\n\n if (rowSpan > 1 || colSpan > 1) {\n pushUnique(ctx.mergedCells,\n topLeftRef + \":\" + ref(rowIndex + rowSpan - 1,\n cellIndex + colSpan - 1));\n }\n\n if (rowSpan > 1) {\n for (var ri = rowIndex + 1; ri < rowIndex + rowSpan; ri++) {\n var nextRow = ctx.rowsByIndex[ri];\n if (!nextRow) {\n nextRow = ctx.rowsByIndex[ri] = { index: ri, cells: [] };\n ctx.rowData.push(nextRow);\n }\n\n spanCell(cell, nextRow.cells, cellIndex - 1, colSpan + 1);\n }\n }\n }\n}\n\nfunction insertCell(data, cell) {\n var index;\n\n if (typeof cell.index === \"number\") {\n index = cell.index;\n insertCellAt(data, cell, cell.index);\n } else {\n index = appendCell(data, cell);\n }\n\n return index;\n}\n\nfunction insertCellAt(data, cell, index) {\n data[index] = cell;\n}\n\nfunction appendCell(data, cell) {\n var index = data.length;\n\n for (var i = 0; i < data.length + 1; i++) {\n if (!data[i]) {\n data[i] = cell;\n index = i;\n break;\n }\n }\n\n return index;\n}\n\nfunction spanCell(cell, row, startIndex, colSpan) {\n for (var i = 1; i < colSpan; i++) {\n var tmp = {\n borderTop : cell.borderTop,\n borderRight : cell.borderRight,\n borderBottom : cell.borderBottom,\n borderLeft : cell.borderLeft\n };\n insertCellAt(row, tmp, startIndex + i);\n }\n}\n\nvar SPREADSHEET_FILTERS = function (ref$1) {\n var ref = ref$1.ref;\n var columns = ref$1.columns;\n var generators = ref$1.generators;\n\n return (\"\\n\\n \" + (foreach(columns, function (col) { return (\"\\n \\n \" + (generators[col.filter](col)) + \"\\n \\n \"); })) + \"\\n\");\n};\n\nvar SPREADSHEET_CUSTOM_FILTER = function (ref) {\n var logic = ref.logic;\n var criteria = ref.criteria;\n\n return (\"\\n\\n\" + (foreach(criteria, function (f) {\n var op = spreadsheetFilters.customOperator(f);\n var val = spreadsheetFilters.customValue(f);\n return (\"\");\n})) + \"\\n\");\n};\n\nvar SPREADSHEET_DYNAMIC_FILTER = function (ref) {\n var type = ref.type;\n\n return (\"\");\n};\n\nvar SPREADSHEET_TOP_FILTER = function (ref) {\n var type = ref.type;\n var value = ref.value;\n\n return (\"\");\n};\n\nvar SPREADSHEET_VALUE_FILTER = function (ref) {\n var blanks = ref.blanks;\n var values = ref.values;\n\n return (\"\\n \" + (foreach(values, function (value) { return (\"\\n \"); })) + \"\\n \");\n};\n\nfunction spreadsheetFilters(filter) {\n return SPREADSHEET_FILTERS({\n ref: filter.ref,\n columns: filter.columns,\n generators: {\n custom : SPREADSHEET_CUSTOM_FILTER,\n dynamic : SPREADSHEET_DYNAMIC_FILTER,\n top : SPREADSHEET_TOP_FILTER,\n value : SPREADSHEET_VALUE_FILTER\n }\n });\n}\n\nspreadsheetFilters.customOperator = function(f) {\n return {\n eq : \"equal\",\n gt : \"greaterThan\",\n gte : \"greaterThanOrEqual\",\n lt : \"lessThan\",\n lte : \"lessThanOrEqual\",\n ne : \"notEqual\",\n\n // These are not in the spec, but seems to be how Excel does\n // it (see customValue below). For the non-negated versions,\n // the operator attribute is missing completely.\n doesnotstartwith: \"notEqual\",\n doesnotendwith: \"notEqual\",\n doesnotcontain: \"notEqual\",\n doesnotmatch: \"notEqual\"\n }[f.operator.toLowerCase()];\n};\n\nfunction quoteSheet(name) {\n if (/^\\'/.test(name)) { // assume already quoted, the Spreadsheet does it.\n return name;\n }\n if (/^[a-z_][a-z0-9_]*$/i.test(name)) {\n return name; // no need to quote it\n }\n return \"'\" + name.replace(/\\x27/g, \"\\\\'\") + \"'\";\n}\n\nspreadsheetFilters.customValue = function(f) {\n function esc(str) {\n return str.replace(/([*?])/g, \"~$1\");\n }\n\n switch (f.operator.toLowerCase()) {\n case \"startswith\":\n case \"doesnotstartwith\":\n return esc(f.value) + \"*\";\n\n case \"endswith\":\n case \"doesnotendwith\":\n return \"*\" + esc(f.value);\n\n case \"contains\":\n case \"doesnotcontain\":\n return \"*\" + esc(f.value) + \"*\";\n\n default:\n return f.value;\n }\n};\n\nspreadsheetFilters.dynamicFilterType = function(type) {\n return {\n quarter1 : \"Q1\",\n quarter2 : \"Q2\",\n quarter3 : \"Q3\",\n quarter4 : \"Q4\",\n january : \"M1\",\n february : \"M2\",\n march : \"M3\",\n april : \"M4\",\n may : \"M5\",\n june : \"M6\",\n july : \"M7\",\n august : \"M8\",\n september : \"M9\",\n october : \"M10\",\n november : \"M11\",\n december : \"M12\"\n }[type.toLowerCase()] || type;\n};\n\nkendo.deepExtend(kendo.ooxml, {\n IntlService: IntlService,\n Workbook: Workbook,\n Worksheet: Worksheet\n});\n\n})(window.kendo.jQuery);\n\n(function ($) {\n\nvar Workbook = kendo.ooxml.Workbook;\n\nkendo.ooxml.IntlService.register({\n toString: kendo.toString\n});\n\nkendo.ooxml.Workbook = Workbook.extend({\n toDataURL: function() {\n var result = Workbook.fn.toDataURL.call(this);\n if (typeof result !== 'string') {\n throw new Error('The toDataURL method can be used only with jsZip 2. Either include jsZip 2 or use the toDataURLAsync method.');\n }\n\n return result;\n },\n\n toDataURLAsync: function() {\n var deferred = $.Deferred();\n var result = Workbook.fn.toDataURL.call(this);\n if (typeof result === 'string') {\n result = deferred.resolve(result);\n } else if (result && result.then){\n result.then(function(dataURI) {\n deferred.resolve(dataURI);\n }, function() {\n deferred.reject();\n });\n }\n\n return deferred.promise();\n }\n});\n\n})(window.kendo.jQuery);\n\nvar __meta__ = {\n id: \"ooxml\",\n name: \"XLSX generation\",\n category: \"framework\",\n advanced: true,\n depends: [ \"core\" ]\n};\n", "import './kendo.core.js';\nimport './kendo.data.js';\nimport './kendo.ooxml.js';\n\n/***********************************************************************\n * WARNING: this file is auto-generated. If you change it directly,\n * your modifications will eventually be lost. The source code is in\n * `kendo-ooxml` repository, you should make your changes there and\n * run `src-modules/sync.sh` in this repository.\n */\n\n(function($) {\n/* eslint-disable space-before-blocks, space-before-function-paren */\n\nwindow.kendo.excel = window.kendo.excel || {};\n\nvar getter = kendo.getter;\nvar map = $.map;\n\nvar current = {\n compile: function(template) {\n return template;\n }\n};\n\nvar TemplateService = kendo.Class.extend({\n\n});\n\nTemplateService.register = function(userImplementation) {\n current = userImplementation;\n};\n\nTemplateService.compile = function(template) {\n return current.compile(template);\n};\n\nfunction defaultGroupHeaderTemplate(data) {\n return ((data.title) + \": \" + (data.value));\n}\n\nfunction createArray(length, callback) {\n var result = [];\n\n for (var idx = 0; idx < length; idx++) {\n result.push(callback(idx));\n }\n\n return result;\n}\n\nfunction defaultItemId(item) {\n return item.id;\n}\n\nvar ExcelExporter = kendo.Class.extend({\n init: function(options) {\n options.columns = this._trimColumns(options.columns || []);\n\n this.allColumns = map(this._leafColumns(options.columns || []), this._prepareColumn);\n\n this.columns = this._visibleColumns(this.allColumns);\n\n this.options = options;\n this.data = options.data || [];\n this.aggregates = options.aggregates || {};\n this.groups = [].concat(options.groups || []);\n this.hasGroups = this.groups.length > 0;\n this.hierarchy = options.hierarchy;\n this.hasGroupHeaderColumn = this.columns.some(function (column) { return column.groupHeaderColumnTemplate; });\n this.collapsible = this.options.collapsible;\n },\n\n workbook: function() {\n var workbook = {\n sheets: [ {\n columns: this._columns(),\n rows: this.hierarchy ? this._hierarchyRows() : this._rows(),\n freezePane: this._freezePane(),\n filter: this._filter()\n } ]\n };\n\n return workbook;\n },\n\n _trimColumns: function(columns) {\n var this$1$1 = this;\n\n return columns.filter(function (column) {\n var result = Boolean(column.field);\n\n if (!result && column.columns) {\n result = this$1$1._trimColumns(column.columns).length > 0;\n }\n\n return result;\n });\n },\n\n _leafColumns: function(columns) {\n var this$1$1 = this;\n\n var result = [];\n\n for (var idx = 0; idx < columns.length; idx++) {\n if (!columns[idx].columns) {\n result.push(columns[idx]);\n } else {\n result = result.concat(this$1$1._leafColumns(columns[idx].columns));\n }\n }\n\n return result;\n },\n\n _prepareColumn: function(column) {\n if (!column.field) {\n return null;\n }\n\n var value = function(dataItem) {\n return getter(column.field, true)(dataItem);\n };\n\n var values = null;\n\n if (column.values) {\n values = {};\n\n column.values.forEach(function(item) {\n values[item.value] = item.text;\n });\n\n value = function(dataItem) {\n return values[getter(column.field, true)(dataItem)];\n };\n }\n\n return $.extend({}, column, {\n value: value,\n values: values,\n groupHeaderTemplate: column.groupHeaderTemplate ? TemplateService.compile(column.groupHeaderTemplate) : defaultGroupHeaderTemplate,\n groupHeaderColumnTemplate: column.groupHeaderColumnTemplate ? TemplateService.compile(column.groupHeaderColumnTemplate) : null,\n groupFooterTemplate: column.groupFooterTemplate ? TemplateService.compile(column.groupFooterTemplate) : null,\n footerTemplate: column.footerTemplate ? TemplateService.compile(column.footerTemplate) : null\n });\n },\n\n _filter: function() {\n if (!this.options.filterable) {\n return null;\n }\n\n var depth = this._depth();\n\n return {\n from: depth,\n to: depth + this.columns.length - 1\n };\n },\n\n _createPaddingCells: function(length) {\n var this$1$1 = this;\n\n return createArray(length, function () { return $.extend({\n background: \"#dfdfdf\",\n color: \"#333\"\n }, this$1$1.options.paddingCellOptions); });\n },\n\n _dataRow: function(dataItem, level, depth) {\n var this$1$1 = this;\n\n var cells = this._createPaddingCells(level);\n\n // grouped\n if (this.hasGroups && depth && dataItem.items) {\n cells = cells.concat(this._groupHeaderCells(dataItem, level, depth));\n var rows = this._dataRows(dataItem.items, level + 1);\n\n rows.unshift({\n type: \"group-header\",\n cells: cells,\n level: this.collapsible ? level : null\n });\n\n return rows.concat(this._footer(dataItem, level));\n }\n\n var dataCells = [];\n\n for (var cellIdx = 0; cellIdx < this.columns.length; cellIdx++) {\n dataCells[cellIdx] = this$1$1._cell(dataItem, this$1$1.columns[cellIdx]);\n }\n\n if (this.hierarchy) {\n dataCells[0].colSpan = depth - level + 1;\n }\n\n return [ {\n type: \"data\",\n cells: cells.concat(dataCells),\n level: this.collapsible ? level : null\n } ];\n },\n\n _groupHeaderCells: function(dataItem, level, depth) {\n var cells = [];\n\n var column = this.allColumns.filter(function(column) {\n return column.field === dataItem.field;\n })[0] || {};\n\n var title = column && column.title ? column.title : dataItem.field;\n var template = column ? column.groupHeaderTemplate || column.groupHeaderColumnTemplate : null;\n var group = $.extend({\n title: title,\n field: dataItem.field,\n value: column && column.values ? column.values[dataItem.value] : dataItem.value,\n aggregates: dataItem.aggregates,\n items: dataItem.items\n }, dataItem.aggregates[dataItem.field]);\n\n var value = template ? template(group) : (title + \": \" + (dataItem.value));\n\n cells.push($.extend({\n value: value,\n background: \"#dfdfdf\",\n color: \"#333\",\n colSpan: (this.hasGroupHeaderColumn ? 1 : this.columns.length) + depth - level\n }, column.groupHeaderCellOptions));\n\n if (this.hasGroupHeaderColumn) {\n this.columns.forEach(function(column, index) {\n if (index > 0) {\n cells.push($.extend({\n background: \"#dfdfdf\",\n color: \"#333\",\n value: column.groupHeaderColumnTemplate ?\n column.groupHeaderColumnTemplate($.extend({ group: group }, group, dataItem.aggregates[column.field])) :\n undefined\n }, column.groupHeaderCellOptions));\n }\n });\n }\n\n return cells;\n },\n\n _dataRows: function(dataItems, level) {\n var this$1$1 = this;\n\n var depth = this._depth();\n var rows = [];\n\n for (var idx = 0; idx < dataItems.length; idx++) {\n rows.push.apply(rows, this$1$1._dataRow(dataItems[idx], level, depth));\n }\n\n return rows;\n },\n\n _hierarchyRows: function() {\n var this$1$1 = this;\n\n var depth = this._depth();\n var data = this.data;\n var itemLevel = this.hierarchy.itemLevel;\n var itemId = this.hierarchy.itemId || defaultItemId;\n var hasFooter = this._hasFooterTemplate();\n var rows = [];\n var parents = [];\n var previousLevel = 0;\n var previousItemId;\n\n if (!hasFooter) {\n this.collapsible = false;\n }\n\n for (var idx = 0; idx < data.length; idx++) {\n var item = data[idx];\n var level = itemLevel(item, idx);\n\n if (hasFooter) {\n if (level > previousLevel) {\n parents.push({ id: previousItemId, level: previousLevel });\n } else if (level < previousLevel) {\n rows.push.apply(rows, this$1$1._hierarchyFooterRows(parents, level, depth));\n }\n\n previousLevel = level;\n previousItemId = itemId(item, idx);\n }\n\n rows.push.apply(rows, this$1$1._dataRow(item, level + 1, depth));\n }\n\n if (hasFooter) {\n rows.push.apply(rows, this._hierarchyFooterRows(parents, 0, depth));\n\n var rootAggregate = data.length ? this.aggregates[data[0].parentId] : {};\n rows.push(this._hierarchyFooter(rootAggregate, 0, depth));\n }\n\n this._prependHeaderRows(rows);\n\n return rows;\n },\n\n _hierarchyFooterRows: function(parents, currentLevel, depth) {\n var this$1$1 = this;\n\n var rows = [];\n while (parents.length && parents[parents.length - 1].level >= currentLevel) {\n var parent = parents.pop();\n rows.push(this$1$1._hierarchyFooter(this$1$1.aggregates[parent.id], parent.level + 1, depth));\n }\n\n return rows;\n },\n\n _hasFooterTemplate: function() {\n var columns = this.columns;\n for (var idx = 0; idx < columns.length; idx++) {\n if (columns[idx].footerTemplate) {\n return true;\n }\n }\n },\n\n _hierarchyFooter: function(aggregates, level, depth) {\n var cells = this.columns.map(function(column, index) {\n var colSpan = index ? 1 : depth - level + 1;\n if (column.footerTemplate) {\n var fieldAggregates = (aggregates || {})[column.field];\n return $.extend({\n background: \"#dfdfdf\",\n color: \"#333\",\n colSpan: colSpan,\n value: column.footerTemplate($.extend({ aggregates: aggregates }, fieldAggregates))\n }, column.footerCellOptions);\n }\n\n return $.extend({\n background: \"#dfdfdf\",\n color: \"#333\",\n colSpan: colSpan\n }, column.footerCellOptions);\n });\n\n return {\n type: \"footer\",\n cells: this._createPaddingCells(level).concat(cells),\n level: this.collapsible ? level : null\n };\n },\n\n _footer: function(dataItem, level) {\n var rows = [];\n var footer = this.columns.some(function (column) { return column.groupFooterTemplate; });\n\n var templateData, group;\n if (footer) {\n group = {\n group: { items: dataItem.items,\n field: dataItem.field,\n value: dataItem.value }\n };\n templateData = {};\n Object.keys(dataItem.aggregates).forEach(function (key) {\n templateData[key] = $.extend({}, dataItem.aggregates[key], group);\n });\n }\n\n var cells = this.columns.map(function (column) {\n if (column.groupFooterTemplate) {\n var data = $.extend({}, templateData, dataItem.aggregates[column.field], group);\n return $.extend({\n background: \"#dfdfdf\",\n color: \"#333\",\n value: column.groupFooterTemplate(data)\n }, column.groupFooterCellOptions);\n }\n\n return $.extend({\n background: \"#dfdfdf\",\n color: \"#333\"\n }, column.groupFooterCellOptions);\n });\n\n if (footer) {\n rows.push({\n type: \"group-footer\",\n cells: this._createPaddingCells(this.groups.length).concat(cells),\n level: this.collapsible ? level : null\n });\n }\n\n return rows;\n },\n\n _isColumnVisible: function(column) {\n return this._visibleColumns([ column ]).length > 0 && (column.field || column.columns);\n },\n\n _visibleColumns: function(columns) {\n var this$1$1 = this;\n\n return columns.filter(function (column) {\n var exportable = column.exportable;\n if (typeof exportable === 'object') {\n exportable = column.exportable.excel;\n }\n\n var visibleInExport = !column.hidden && exportable !== false;\n var visibleInExportOnly = column.hidden && exportable === true;\n var visible = visibleInExport || visibleInExportOnly;\n if (visible && column.columns) {\n visible = this$1$1._visibleColumns(column.columns).length > 0;\n }\n return visible;\n });\n },\n\n _headerRow: function(row, groups) {\n var this$1$1 = this;\n\n var headers = row.cells.map(function(cell) {\n return $.extend(cell, {\n colSpan: cell.colSpan > 1 ? cell.colSpan : 1,\n rowSpan: row.rowSpan > 1 && !cell.colSpan ? row.rowSpan : 1\n });\n });\n\n if (this.hierarchy && headers[0].firstCell) {\n headers[0].colSpan += this._depth();\n }\n\n return {\n type: \"header\",\n cells: createArray(groups.length, function () { return $.extend({\n background: \"#7a7a7a\",\n color: \"#fff\"\n }, this$1$1.options.headerPaddingCellOptions); }).concat(headers)\n };\n },\n\n _prependHeaderRows: function(rows) {\n var this$1$1 = this;\n\n var groups = this.groups;\n\n var headerRows = [ { rowSpan: 1, cells: [], index: 0 } ];\n\n this._prepareHeaderRows(headerRows, this.options.columns);\n\n for (var idx = headerRows.length - 1; idx >= 0; idx--) {\n rows.unshift(this$1$1._headerRow(headerRows[idx], groups));\n }\n },\n\n _prepareHeaderRows: function(rows, columns, parentCell, parentRow) {\n var this$1$1 = this;\n\n var row = parentRow || rows[rows.length - 1];\n var childRow = rows[row.index + 1];\n var totalColSpan = 0;\n\n for (var idx = 0; idx < columns.length; idx++) {\n var column = columns[idx];\n if (this$1$1._isColumnVisible(column)) {\n\n var cell = $.extend({\n background: \"#7a7a7a\",\n color: \"#fff\",\n value: column.title || column.field,\n colSpan: 0,\n firstCell: idx === 0 && (!parentCell || parentCell.firstCell)\n }, column.headerCellOptions);\n row.cells.push(cell);\n\n if (column.columns && column.columns.length) {\n if (!childRow) {\n childRow = { rowSpan: 0, cells: [], index: rows.length };\n rows.push(childRow);\n }\n cell.colSpan = this$1$1._trimColumns(this$1$1._visibleColumns(column.columns)).length;\n this$1$1._prepareHeaderRows(rows, column.columns, cell, childRow);\n totalColSpan += cell.colSpan - 1;\n row.rowSpan = rows.length - row.index;\n }\n }\n }\n\n if (parentCell) {\n parentCell.colSpan += totalColSpan;\n }\n },\n\n _rows: function() {\n var this$1$1 = this;\n\n var rows = this._dataRows(this.data, 0);\n\n if (this.columns.length) {\n this._prependHeaderRows(rows);\n var footer = false;\n\n var cells = this.columns.map(function (column) {\n if (column.footerTemplate) {\n footer = true;\n\n return $.extend({\n background: \"#dfdfdf\",\n color: \"#333\",\n value: column.footerTemplate($.extend({}, this$1$1.aggregates, this$1$1.aggregates[column.field]))\n }, column.footerCellOptions);\n }\n\n return $.extend({\n background: \"#dfdfdf\",\n color: \"#333\"\n }, column.footerCellOptions);\n });\n\n if (footer) {\n rows.push({\n type: \"footer\",\n cells: this._createPaddingCells(this.groups.length).concat(cells)\n });\n }\n }\n\n return rows;\n },\n\n _headerDepth: function(columns) {\n var this$1$1 = this;\n\n var result = 1;\n var max = 0;\n\n for (var idx = 0; idx < columns.length; idx++) {\n if (columns[idx].columns) {\n var temp = this$1$1._headerDepth(columns[idx].columns);\n if (temp > max) {\n max = temp;\n }\n }\n }\n return result + max;\n },\n\n _freezePane: function() {\n var columns = this._visibleColumns(this.options.columns || []);\n\n var colSplit = this._visibleColumns(this._trimColumns(this._leafColumns(columns.filter(function(column) {\n return column.locked;\n })))).length;\n\n return {\n rowSplit: this._headerDepth(columns),\n colSplit: colSplit ? colSplit + this.groups.length : 0\n };\n },\n\n _cell: function(dataItem, column) {\n return $.extend({\n value: column.value(dataItem)\n }, column.cellOptions);\n },\n\n _depth: function() {\n var depth = 0;\n\n if (this.hierarchy) {\n depth = this.hierarchy.depth;\n } else {\n depth = this.groups.length;\n }\n\n return depth;\n },\n\n _columns: function() {\n var depth = this._depth();\n var columns = createArray(depth, function () { return ({ width: 20 }); });\n\n return columns.concat(this.columns.map(function(column) {\n return {\n width: parseInt(column.width, 10),\n autoWidth: column.width ? false : true\n };\n }));\n }\n});\n\nkendo.deepExtend(kendo.excel, {\n ExcelExporter: ExcelExporter,\n TemplateService: TemplateService\n});\n\n})(window.kendo.jQuery);\n\n(function($, kendo) {\n\n var ExcelExporter = kendo.excel.ExcelExporter;\n\n var extend = $.extend;\n\n kendo.excel.TemplateService.register({\n compile: kendo.template\n });\n\n kendo.ExcelExporter = kendo.Class.extend({\n init: function(options) {\n this.options = options;\n var dataSource = options.dataSource;\n\n if (dataSource instanceof kendo.data.DataSource) {\n\n if (!dataSource.filter()) {\n dataSource.options.filter = undefined;\n }\n\n this.dataSource = new dataSource.constructor(extend(\n {},\n dataSource.options,\n {\n page: options.allPages ? 0 : dataSource.page(),\n filter: dataSource.filter(),\n pageSize: options.allPages ? dataSource.total() : dataSource.pageSize() || dataSource.total(),\n sort: dataSource.sort(),\n group: dataSource.group(),\n aggregate: dataSource.aggregate()\n }));\n\n var data = dataSource.data();\n\n if (data.length > 0) {\n if (options.hierarchy) {\n for (var i = 0; i < data.length; i++) {\n if (data[i].expanded === false || data[i].expanded === undefined) {\n data[i].expanded = true;\n }\n }\n }\n // Avoid toJSON() for perf and avoid data() to prevent reparenting.\n this.dataSource._data = data;\n\n var transport = this.dataSource.transport;\n if (dataSource._isServerGrouped() && transport.options && transport.options.data) { // clear the transport data when using aspnet-mvc transport\n transport.options.data = null;\n }\n }\n\n } else {\n this.dataSource = kendo.data.DataSource.create(dataSource);\n }\n },\n\n _hierarchy: function() {\n var hierarchy = this.options.hierarchy;\n var dataSource = this.dataSource;\n\n if (hierarchy && dataSource.level) {\n hierarchy = {\n itemLevel: function(item) {\n return dataSource.level(item);\n }\n };\n\n var view = dataSource.view();\n var depth = 0;\n var level;\n\n for (var idx = 0; idx < view.length; idx++) {\n level = dataSource.level(view[idx]);\n\n if (level > depth) {\n depth = level;\n }\n }\n\n hierarchy.depth = depth + 1;\n } else {\n hierarchy = false;\n }\n\n return {\n hierarchy: hierarchy\n };\n },\n\n workbook: function() {\n return $.Deferred((function(d) {\n this.dataSource.fetch()\n .then((function() {\n\n var workbook = new ExcelExporter(extend({}, this.options, this._hierarchy(), {\n data: this.dataSource.view(),\n groups: this.dataSource.group(),\n aggregates: this.dataSource.aggregates()\n })).workbook();\n\n d.resolve(workbook, this.dataSource.view());\n }).bind(this));\n }).bind(this)).promise();\n }\n });\n\n\n})(kendo.jQuery, kendo);\n\n(function($, kendo) {\n\n\nkendo.ExcelMixin = {\n extend: function(proto) {\n proto.events.push(\"excelExport\");\n proto.options.excel = $.extend(proto.options.excel, this.options);\n proto.saveAsExcel = this.saveAsExcel;\n },\n options: {\n proxyURL: \"\",\n allPages: false,\n filterable: false,\n fileName: \"Export.xlsx\",\n collapsible: false\n },\n saveAsExcel: function() {\n var excel = this.options.excel || {};\n\n var exporter = new kendo.ExcelExporter({\n columns: this.columns,\n dataSource: this.dataSource,\n allPages: excel.allPages,\n filterable: excel.filterable,\n hierarchy: excel.hierarchy,\n collapsible: excel.collapsible\n });\n\n exporter.workbook().then((function(book, data) {\n if (!this.trigger(\"excelExport\", { workbook: book, data: data })) {\n var workbook = new kendo.ooxml.Workbook(book);\n\n if (!workbook.options) {\n workbook.options = {};\n }\n workbook.options.skipCustomHeight = true;\n\n workbook.toDataURLAsync().then(function(dataURI) {\n kendo.saveAs({\n dataURI: dataURI,\n fileName: book.fileName || excel.fileName,\n proxyURL: excel.proxyURL,\n forceProxy: excel.forceProxy\n });\n });\n\n }\n }).bind(this));\n }\n};\n\n})(kendo.jQuery, kendo);\n\nvar __meta__ = {\n id: \"excel\",\n name: \"Excel export\",\n category: \"framework\",\n advanced: true,\n mixin: true,\n depends: [ \"data\", \"ooxml\" ]\n};\n", "import './kendo.data.js';\n\nvar __meta__ = {\n id: \"data.signalr\",\n name: \"SignalR\",\n category: \"framework\",\n depends: [ \"data\" ],\n hidden: true\n};\n\n(function($) {\n var kendo = window.kendo;\n var isFunction = kendo.isFunction;\n\n function isJQueryPromise(promise) {\n return promise && isFunction(promise.done) && isFunction(promise.fail);\n }\n\n function isNativePromise(promise) {\n return promise && isFunction(promise.then) && isFunction(promise.catch);\n }\n\n var transport = kendo.data.RemoteTransport.extend({\n init: function(options) {\n var signalr = options && options.signalr ? options.signalr : {};\n\n var promise = signalr.promise;\n\n if (!promise) {\n throw new Error('The \"promise\" option must be set.');\n }\n\n if (!isJQueryPromise(promise) && !isNativePromise(promise)) {\n throw new Error('The \"promise\" option must be a Promise.');\n }\n\n this.promise = promise;\n\n var hub = signalr.hub;\n\n if (!hub) {\n throw new Error('The \"hub\" option must be set.');\n }\n\n if (typeof hub.on != \"function\" || typeof hub.invoke != \"function\") {\n throw new Error('The \"hub\" option is not a valid SignalR hub proxy.');\n }\n\n this.hub = hub;\n\n kendo.data.RemoteTransport.fn.init.call(this, options);\n },\n\n push: function(callbacks) {\n var client = this.options.signalr.client || {};\n\n if (client.create) {\n this.hub.on(client.create, callbacks.pushCreate);\n }\n\n if (client.update) {\n this.hub.on(client.update, callbacks.pushUpdate);\n }\n\n if (client.destroy) {\n this.hub.on(client.destroy, callbacks.pushDestroy);\n }\n },\n\n _crud: function(options, type) {\n var hub = this.hub;\n var promise = this.promise;\n var server = this.options.signalr.server;\n\n if (!server || !server[type]) {\n throw new Error(kendo.format('The \"server.{0}\" option must be set.', type));\n }\n\n var args = [server[type]];\n\n var data = this.parameterMap(options.data, type);\n\n if (!$.isEmptyObject(data)) {\n args.push(data);\n }\n\n if (isJQueryPromise(promise)) {\n promise.done(function() {\n hub.invoke.apply(hub, args)\n .done(options.success)\n .fail(options.error);\n });\n } else if (isNativePromise(promise)) {\n promise.then(function() {\n hub.invoke.apply(hub, args)\n .then(options.success)\n .catch(options.error);\n });\n }\n },\n\n read: function(options) {\n this._crud(options, \"read\");\n },\n\n create: function(options) {\n this._crud(options, \"create\");\n },\n\n update: function(options) {\n this._crud(options, \"update\");\n },\n\n destroy: function(options) {\n this._crud(options, \"destroy\");\n }\n });\n\n $.extend(true, kendo.data, {\n transports: {\n signalr: transport\n }\n });\n\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.core.js';\n\n/***********************************************************************\n * WARNING: this file is auto-generated. If you change it directly,\n * your modifications will eventually be lost. The source code is in\n * `kendo-drawing` repository, you should make your changes there and\n * run `src-modules/sync.sh` in this repository.\n */\n/* eslint-disable space-before-blocks, space-before-function-paren, no-multi-spaces */\n\n var __meta__ = {\n id: \"color\",\n name: \"Color utils\",\n category: \"framework\",\n advanced: true,\n description: \"Color utilities used across components\",\n depends: [ \"core\" ]\n };\n\nwindow.kendo = window.kendo || {};\n\nvar Class = kendo.Class;\nvar support = kendo.support;\n\nvar namedColors = {\n aliceblue: \"f0f8ff\", antiquewhite: \"faebd7\", aqua: \"00ffff\",\n aquamarine: \"7fffd4\", azure: \"f0ffff\", beige: \"f5f5dc\",\n bisque: \"ffe4c4\", black: \"000000\", blanchedalmond: \"ffebcd\",\n blue: \"0000ff\", blueviolet: \"8a2be2\", brown: \"a52a2a\",\n burlywood: \"deb887\", cadetblue: \"5f9ea0\", chartreuse: \"7fff00\",\n chocolate: \"d2691e\", coral: \"ff7f50\", cornflowerblue: \"6495ed\",\n cornsilk: \"fff8dc\", crimson: \"dc143c\", cyan: \"00ffff\",\n darkblue: \"00008b\", darkcyan: \"008b8b\", darkgoldenrod: \"b8860b\",\n darkgray: \"a9a9a9\", darkgrey: \"a9a9a9\", darkgreen: \"006400\",\n darkkhaki: \"bdb76b\", darkmagenta: \"8b008b\", darkolivegreen: \"556b2f\",\n darkorange: \"ff8c00\", darkorchid: \"9932cc\", darkred: \"8b0000\",\n darksalmon: \"e9967a\", darkseagreen: \"8fbc8f\", darkslateblue: \"483d8b\",\n darkslategray: \"2f4f4f\", darkslategrey: \"2f4f4f\", darkturquoise: \"00ced1\",\n darkviolet: \"9400d3\", deeppink: \"ff1493\", deepskyblue: \"00bfff\",\n dimgray: \"696969\", dimgrey: \"696969\", dodgerblue: \"1e90ff\",\n firebrick: \"b22222\", floralwhite: \"fffaf0\", forestgreen: \"228b22\",\n fuchsia: \"ff00ff\", gainsboro: \"dcdcdc\", ghostwhite: \"f8f8ff\",\n gold: \"ffd700\", goldenrod: \"daa520\", gray: \"808080\",\n grey: \"808080\", green: \"008000\", greenyellow: \"adff2f\",\n honeydew: \"f0fff0\", hotpink: \"ff69b4\", indianred: \"cd5c5c\",\n indigo: \"4b0082\", ivory: \"fffff0\", khaki: \"f0e68c\",\n lavender: \"e6e6fa\", lavenderblush: \"fff0f5\", lawngreen: \"7cfc00\",\n lemonchiffon: \"fffacd\", lightblue: \"add8e6\", lightcoral: \"f08080\",\n lightcyan: \"e0ffff\", lightgoldenrodyellow: \"fafad2\", lightgray: \"d3d3d3\",\n lightgrey: \"d3d3d3\", lightgreen: \"90ee90\", lightpink: \"ffb6c1\",\n lightsalmon: \"ffa07a\", lightseagreen: \"20b2aa\", lightskyblue: \"87cefa\",\n lightslategray: \"778899\", lightslategrey: \"778899\", lightsteelblue: \"b0c4de\",\n lightyellow: \"ffffe0\", lime: \"00ff00\", limegreen: \"32cd32\",\n linen: \"faf0e6\", magenta: \"ff00ff\", maroon: \"800000\",\n mediumaquamarine: \"66cdaa\", mediumblue: \"0000cd\", mediumorchid: \"ba55d3\",\n mediumpurple: \"9370d8\", mediumseagreen: \"3cb371\", mediumslateblue: \"7b68ee\",\n mediumspringgreen: \"00fa9a\", mediumturquoise: \"48d1cc\", mediumvioletred: \"c71585\",\n midnightblue: \"191970\", mintcream: \"f5fffa\", mistyrose: \"ffe4e1\",\n moccasin: \"ffe4b5\", navajowhite: \"ffdead\", navy: \"000080\",\n oldlace: \"fdf5e6\", olive: \"808000\", olivedrab: \"6b8e23\",\n orange: \"ffa500\", orangered: \"ff4500\", orchid: \"da70d6\",\n palegoldenrod: \"eee8aa\", palegreen: \"98fb98\", paleturquoise: \"afeeee\",\n palevioletred: \"d87093\", papayawhip: \"ffefd5\", peachpuff: \"ffdab9\",\n peru: \"cd853f\", pink: \"ffc0cb\", plum: \"dda0dd\",\n powderblue: \"b0e0e6\", purple: \"800080\", red: \"ff0000\",\n rosybrown: \"bc8f8f\", royalblue: \"4169e1\", saddlebrown: \"8b4513\",\n salmon: \"fa8072\", sandybrown: \"f4a460\", seagreen: \"2e8b57\",\n seashell: \"fff5ee\", sienna: \"a0522d\", silver: \"c0c0c0\",\n skyblue: \"87ceeb\", slateblue: \"6a5acd\", slategray: \"708090\",\n slategrey: \"708090\", snow: \"fffafa\", springgreen: \"00ff7f\",\n steelblue: \"4682b4\", tan: \"d2b48c\", teal: \"008080\",\n thistle: \"d8bfd8\", tomato: \"ff6347\", turquoise: \"40e0d0\",\n violet: \"ee82ee\", wheat: \"f5deb3\", white: \"ffffff\",\n whitesmoke: \"f5f5f5\", yellow: \"ffff00\", yellowgreen: \"9acd32\"\n};\n\nvar browser = support.browser;\n\nvar matchNamedColor = function (color) {\n var colorNames = Object.keys(namedColors);\n colorNames.push(\"transparent\");\n\n var regexp = new RegExp(\"^(\" + colorNames.join(\"|\") + \")(\\\\W|$)\", \"i\");\n matchNamedColor = function (color) { return regexp.exec(color); };\n\n return regexp.exec(color);\n};\n\nvar BaseColor = Class.extend({\n init: function() { },\n\n toHSV: function() { return this; },\n\n toRGB: function() { return this; },\n\n toHex: function(options) { return this.toBytes().toHex(options); },\n\n toBytes: function() { return this; },\n\n toCss: function(options) { return \"#\" + this.toHex(options); },\n\n toCssRgba: function() {\n var rgb = this.toBytes();\n return (\"rgba(\" + (rgb.r) + \", \" + (rgb.g) + \", \" + (rgb.b) + \", \" + (parseFloat((Number(this.a)).toFixed(3))) + \")\");\n },\n\n toDisplay: function() {\n if (browser.msie && browser.version < 9) {\n return this.toCss(); // no RGBA support; does it support any opacity in colors?\n }\n return this.toCssRgba();\n },\n\n equals: function(c) {\n return c === this || ((c !== null && c !== undefined) && this.toCssRgba() === parseColor(c).toCssRgba());\n },\n\n diff: function(other) {\n if (other === null) {\n return NaN;\n }\n\n var c1 = this.toBytes();\n var c2 = other.toBytes();\n\n return Math.sqrt(Math.pow((c1.r - c2.r) * 0.30, 2) +\n Math.pow((c1.g - c2.g) * 0.59, 2) +\n Math.pow((c1.b - c2.b) * 0.11, 2));\n },\n\n clone: function() {\n var c = this.toBytes();\n if (c === this) {\n c = new Bytes(c.r, c.g, c.b, c.a);\n }\n\n return c;\n }\n});\n\nvar RGB = BaseColor.extend({\n init: function(r, g, b, a) {\n BaseColor.fn.init.call(this);\n\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n },\n\n toHSV: function() {\n var ref = this;\n var r = ref.r;\n var g = ref.g;\n var b = ref.b;\n var min = Math.min(r, g, b);\n var max = Math.max(r, g, b);\n var delta = max - min;\n var v = max;\n var h, s;\n\n if (delta === 0) {\n return new HSV(0, 0, v, this.a);\n }\n\n if (max !== 0) {\n s = delta / max;\n if (r === max) {\n h = (g - b) / delta;\n } else if (g === max) {\n h = 2 + (b - r) / delta;\n } else {\n h = 4 + (r - g) / delta;\n }\n\n h *= 60;\n if (h < 0) {\n h += 360;\n }\n } else {\n s = 0;\n h = -1;\n }\n\n return new HSV(h, s, v, this.a);\n },\n\n toHSL: function() {\n var ref = this;\n var r = ref.r;\n var g = ref.g;\n var b = ref.b;\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h, s, l = (max + min) / 2;\n\n if (max === min) {\n h = s = 0;\n } else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r: h = (g - b) / d + (g < b ? 6 : 0); break;\n case g: h = (b - r) / d + 2; break;\n case b: h = (r - g) / d + 4; break;\n default: break;\n }\n }\n\n return new HSL(h * 60, s * 100, l * 100, this.a);\n },\n\n toBytes: function() {\n return new Bytes(this.r * 255, this.g * 255, this.b * 255, this.a);\n }\n});\n\nvar Bytes = RGB.extend({\n init: function(r, g, b, a) {\n RGB.fn.init.call(this, Math.round(r), Math.round(g), Math.round(b), a);\n },\n\n toRGB: function() {\n return new RGB(this.r / 255, this.g / 255, this.b / 255, this.a);\n },\n\n toHSV: function() {\n return this.toRGB().toHSV();\n },\n\n toHSL: function() {\n return this.toRGB().toHSL();\n },\n\n toHex: function(options) {\n var value = hex(this.r, 2) + hex(this.g, 2) + hex(this.b, 2);\n\n if (options && options.alpha) {\n value += hex(Math.round(this.a * 255), 2);\n }\n\n return value;\n },\n\n toBytes: function() {\n return this;\n }\n});\n\nfunction hex(n, width, pad) {\n if (pad === void 0) { pad = \"0\"; }\n\n var result = n.toString(16);\n while (width > result.length) {\n result = pad + result;\n }\n\n return result;\n}\n\nvar HSV = BaseColor.extend({\n init: function(h, s, v, a) {\n BaseColor.fn.init.call(this);\n\n this.h = h;\n this.s = s;\n this.v = v;\n this.a = a;\n },\n\n toRGB: function() {\n var ref = this;\n var h = ref.h;\n var s = ref.s;\n var v = ref.v;\n var r, g, b;\n\n if (s === 0) {\n r = g = b = v;\n } else {\n h /= 60;\n\n var i = Math.floor(h);\n var f = h - i;\n var p = v * (1 - s);\n var q = v * (1 - s * f);\n var t = v * (1 - s * (1 - f));\n\n switch (i) {\n case 0: r = v; g = t; b = p; break;\n case 1: r = q; g = v; b = p; break;\n case 2: r = p; g = v; b = t; break;\n case 3: r = p; g = q; b = v; break;\n case 4: r = t; g = p; b = v; break;\n default: r = v; g = p; b = q; break;\n }\n }\n\n return new RGB(r, g, b, this.a);\n },\n\n toHSL: function() {\n return this.toRGB().toHSL();\n },\n\n toBytes: function() {\n return this.toRGB().toBytes();\n }\n});\n\nvar HSL = BaseColor.extend({\n init: function(h, s, l, a) {\n BaseColor.fn.init.call(this);\n\n this.h = h;\n this.s = s;\n this.l = l;\n this.a = a;\n },\n\n toRGB: function() {\n var h = this.h / 360;\n var s = this.s / 100;\n var l = this.l / 100;\n var r, g, b;\n\n if (s === 0) {\n r = g = b = l; // achromatic\n } else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n\n return new RGB(r, g, b, this.a);\n },\n\n toHSV: function() {\n return this.toRGB().toHSV();\n },\n\n toBytes: function() {\n return this.toRGB().toBytes();\n }\n});\n\nfunction hue2rgb(p, q, s) {\n var t = s;\n\n if (t < 0) {\n t += 1;\n }\n\n if (t > 1) {\n t -= 1;\n }\n\n if (t < 1 / 6) {\n return p + (q - p) * 6 * t;\n }\n\n if (t < 1 / 2) {\n return q;\n }\n\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n\n return p;\n}\n\nfunction alphaFromHex(a) {\n return parseFloat(parseFloat(parseInt(a, 16) / 255 ).toFixed(3));\n}\n\nfunction parseColor(value, safe) {\n var m, ret;\n\n if (value == null || value === \"none\") {\n return null;\n }\n\n if (value instanceof BaseColor) {\n return value;\n }\n\n var color = value.toLowerCase();\n if ((m = matchNamedColor(color))) {\n if (m[1] === \"transparent\") {\n color = new RGB(1, 1, 1, 0);\n } else {\n color = parseColor(namedColors[m[1]], safe);\n }\n color.match = [ m[1] ];\n return color;\n }\n if ((m = /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\\b/i.exec(color))) {\n ret = new Bytes(parseInt(m[1], 16),\n parseInt(m[2], 16),\n parseInt(m[3], 16), 1);\n } else if ((m = /^#?([0-9a-f])([0-9a-f])([0-9a-f])\\b/i.exec(color))) {\n ret = new Bytes(parseInt(m[1] + m[1], 16),\n parseInt(m[2] + m[2], 16),\n parseInt(m[3] + m[3], 16), 1);\n } else if ((m = /^#?([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])\\b/i.exec(color))) { // Parse 4 digit hex color\n ret = new Bytes(parseInt(m[1] + m[1], 16),\n parseInt(m[2] + m[2], 16),\n parseInt(m[3] + m[3], 16),\n alphaFromHex(m[4] + m[4]));\n } else if ((m = /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\\b/i.exec(color))) { // Parse 8 digit hex color\n ret = new Bytes(parseInt(m[1], 16),\n parseInt(m[2], 16),\n parseInt(m[3], 16),\n alphaFromHex(m[4]));\n } else if ((m = /^rgb\\(\\s*([0-9]+)\\s*,\\s*([0-9]+)\\s*,\\s*([0-9]+)\\s*\\)/.exec(color))) {\n ret = new Bytes(parseInt(m[1], 10),\n parseInt(m[2], 10),\n parseInt(m[3], 10), 1);\n } else if ((m = /^rgba\\(\\s*([0-9]+)\\s*,\\s*([0-9]+)\\s*,\\s*([0-9]+)\\s*,\\s*([0-9.]+)\\s*\\)/.exec(color))) {\n ret = new Bytes(parseInt(m[1], 10),\n parseInt(m[2], 10),\n parseInt(m[3], 10), parseFloat(m[4]));\n } else if ((m = /^rgb\\(\\s*([0-9]*\\.?[0-9]+)%\\s*,\\s*([0-9]*\\.?[0-9]+)%\\s*,\\s*([0-9]*\\.?[0-9]+)%\\s*\\)/.exec(color))) {\n ret = new RGB(parseFloat(m[1]) / 100,\n parseFloat(m[2]) / 100,\n parseFloat(m[3]) / 100, 1);\n } else if ((m = /^rgba\\(\\s*([0-9]*\\.?[0-9]+)%\\s*,\\s*([0-9]*\\.?[0-9]+)%\\s*,\\s*([0-9]*\\.?[0-9]+)%\\s*,\\s*([0-9.]+)\\s*\\)/.exec(color))) {\n ret = new RGB(parseFloat(m[1]) / 100,\n parseFloat(m[2]) / 100,\n parseFloat(m[3]) / 100, parseFloat(m[4]));\n }\n\n if (ret) {\n ret.match = m;\n } else if (!safe) {\n throw new Error(\"Cannot parse color: \" + color);\n }\n\n return ret;\n}\n\nvar DARK_TRESHOLD = 180;\n\nvar Color = Class.extend({\n init: function(value) {\n var this$1$1 = this;\n\n if (arguments.length === 1) {\n var formats = Color.formats;\n var resolvedColor = this.resolveColor(value);\n\n for (var idx = 0; idx < formats.length; idx++) {\n var formatRegex = formats[idx].re;\n var processor = formats[idx].process;\n var parts = formatRegex.exec(resolvedColor);\n\n if (parts) {\n var channels = processor(parts);\n this$1$1.r = channels[0];\n this$1$1.g = channels[1];\n this$1$1.b = channels[2];\n }\n }\n } else {\n this.r = arguments[0];\n this.g = arguments[1];\n this.b = arguments[2];\n }\n\n this.r = this.normalizeByte(this.r);\n this.g = this.normalizeByte(this.g);\n this.b = this.normalizeByte(this.b);\n },\n\n toHex: function() {\n var pad = this.padDigit;\n var r = this.r.toString(16);\n var g = this.g.toString(16);\n var b = this.b.toString(16);\n\n return \"#\" + pad(r) + pad(g) + pad(b);\n },\n\n resolveColor: function(value) {\n var color = value || \"black\";\n\n if (color.charAt(0) === \"#\") {\n color = color.substr(1, 6);\n }\n\n color = color.replace(/ /g, \"\");\n color = color.toLowerCase();\n color = Color.namedColors[color] || color;\n\n return color;\n },\n\n normalizeByte: function(value) {\n if (value < 0 || isNaN(value)) {\n return 0;\n }\n\n return value > 255 ? 255 : value;\n },\n\n padDigit: function(value) {\n return (value.length === 1) ? \"0\" + value : value;\n },\n\n brightness: function(value) {\n var round = Math.round;\n\n this.r = round(this.normalizeByte(this.r * value));\n this.g = round(this.normalizeByte(this.g * value));\n this.b = round(this.normalizeByte(this.b * value));\n\n return this;\n },\n\n percBrightness: function() {\n return Math.sqrt(0.241 * this.r * this.r + 0.691 * this.g * this.g + 0.068 * this.b * this.b);\n },\n\n isDark: function() {\n return this.percBrightness() < DARK_TRESHOLD;\n }\n});\n\nColor.fromBytes = function(r, g, b, a) {\n return new Bytes(r, g, b, a != null ? a : 1);\n};\n\nColor.fromRGB = function(r, g, b, a) {\n return new RGB(r, g, b, a != null ? a : 1);\n};\n\nColor.fromHSV = function(h, s, v, a) {\n return new HSV(h, s, v, a != null ? a : 1);\n};\n\nColor.fromHSL = function(h, s, l, a) {\n return new HSL(h, s, l, a != null ? a : 1);\n};\n\nColor.formats = [ {\n re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n process: function(parts) {\n return [\n parseInt(parts[1], 10), parseInt(parts[2], 10), parseInt(parts[3], 10)\n ];\n }\n}, {\n re: /^(\\w{2})(\\w{2})(\\w{2})$/,\n process: function(parts) {\n return [\n parseInt(parts[1], 16), parseInt(parts[2], 16), parseInt(parts[3], 16)\n ];\n }\n}, {\n re: /^(\\w{1})(\\w{1})(\\w{1})$/,\n process: function(parts) {\n return [\n parseInt(parts[1] + parts[1], 16),\n parseInt(parts[2] + parts[2], 16),\n parseInt(parts[3] + parts[3], 16)\n ];\n }\n} ];\n\nColor.namedColors = namedColors;\n\nkendo.deepExtend(kendo, {\n parseColor: parseColor,\n namedColors: namedColors,\n Color: Color\n});\n", "import './kendo.core.js';\n\nvar __meta__ = {\n id: \"popup\",\n name: \"Pop-up\",\n category: \"framework\",\n depends: [ \"core\" ],\n advanced: true\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n ui = kendo.ui,\n Widget = ui.Widget,\n Class = kendo.Class,\n support = kendo.support,\n getOffset = kendo.getOffset,\n outerWidth = kendo._outerWidth,\n outerHeight = kendo._outerHeight,\n OPEN = \"open\",\n CLOSE = \"close\",\n DEACTIVATE = \"deactivate\",\n ACTIVATE = \"activate\",\n CENTER = \"center\",\n LEFT = \"left\",\n RIGHT = \"right\",\n TOP = \"top\",\n BOTTOM = \"bottom\",\n ABSOLUTE = \"absolute\",\n HIDDEN = \"hidden\",\n BODY = \"body\",\n LOCATION = \"location\",\n POSITION = \"position\",\n VISIBLE = \"visible\",\n EFFECTS = \"effects\",\n ACTIVE = \"k-active\",\n ACTIVEBORDER = \"k-state-border\",\n ACTIVEBORDERREGEXP = /k-state-border-(\\w+)/,\n ACTIVECHILDREN = \".k-picker-wrap, .k-dropdown-wrap, .k-link\",\n MOUSEDOWN = \"down\",\n DOCUMENT_ELEMENT = $(document.documentElement),\n WINDOW = $(window),\n SCROLL = \"scroll\",\n cssPrefix = support.transitions.css,\n TRANSFORM = cssPrefix + \"transform\",\n extend = $.extend,\n NS = \".kendoPopup\",\n styles = [\"font-size\",\n \"font-family\",\n \"font-stretch\",\n \"font-style\",\n \"font-weight\",\n \"line-height\"];\n\n function contains(container, target) {\n if (!container || !target) {\n return false;\n }\n return container === target || $.contains(container, target);\n }\n\n var Popup = Widget.extend({\n init: function(element, options) {\n var that = this, parentPopup;\n\n options = options || {};\n\n if (options.isRtl) {\n options.origin = options.origin || BOTTOM + \" \" + RIGHT;\n options.position = options.position || TOP + \" \" + RIGHT;\n }\n\n Widget.fn.init.call(that, element, options);\n\n element = that.element;\n options = that.options;\n\n that.collisions = options.collision ? options.collision.split(\" \") : [];\n that.downEvent = kendo.applyEventMap(MOUSEDOWN, kendo.guid());\n\n if (that.collisions.length === 1) {\n that.collisions.push(that.collisions[0]);\n }\n\n parentPopup = $(that.options.anchor).closest(\".k-popup,.k-group\").filter(\":not([class^=km-])\"); // When popup is in another popup, make it relative.\n\n options.appendTo = $($(options.appendTo)[0] || parentPopup[0] || document.body);\n\n that.element.hide()\n .addClass(\"k-popup\")\n .toggleClass(\"k-rtl\", !!options.isRtl)\n .appendTo(options.appendTo)\n .attr(\"aria-hidden\", true)\n .on(\"mouseenter\" + NS, function() {\n that._hovered = true;\n })\n .on(\"wheel\" + NS, function(e) {\n var list = $(e.target).find(\".k-list\");\n var scrollArea = list.parent();\n if (list.length && list.is(\":visible\") && ((scrollArea.scrollTop() === 0 && e.originalEvent.deltaY < 0) ||\n (scrollArea.scrollTop() === scrollArea.prop('scrollHeight') - scrollArea.prop('offsetHeight') && e.originalEvent.deltaY > 0))) {\n e.preventDefault();\n }\n })\n .on(\"mouseleave\" + NS, function() {\n that._hovered = false;\n });\n\n that.wrapper = $();\n\n if (options.animation === false) {\n options.animation = { open: { effects: {} }, close: { hide: true, effects: {} } };\n }\n\n extend(options.animation.open, {\n complete: function() {\n that.wrapper.addClass(\"k-animation-container-shown\"); // Forcing refresh causes flickering in mobile.\n that.wrapper.css(\"overflow\",\"\");\n that._activated = true;\n that._trigger(ACTIVATE);\n }\n });\n\n extend(options.animation.close, {\n complete: function() {\n that._animationClose();\n }\n });\n\n that._mousedownProxy = function(e) {\n that._mousedown(e);\n };\n\n if (support.mobileOS.android) {\n that._resizeProxy = function(e) {\n setTimeout(function() {\n that._resize(e);\n }, 600); //Logic from kendo.onResize\n };\n } else {\n that._resizeProxy = function(e) {\n that._resize(e);\n };\n }\n\n if (options.toggleTarget) {\n $(options.toggleTarget).on(options.toggleEvent + NS, that.toggle.bind(that));\n }\n },\n\n events: [\n OPEN,\n ACTIVATE,\n CLOSE,\n DEACTIVATE\n ],\n\n options: {\n name: \"Popup\",\n toggleEvent: \"click\",\n origin: BOTTOM + \" \" + LEFT,\n position: TOP + \" \" + LEFT,\n anchor: BODY,\n appendTo: null,\n collision: \"flip fit\",\n viewport: window,\n copyAnchorStyles: true,\n autosize: false,\n modal: false,\n adjustSize: {\n width: 0,\n height: 0\n },\n animation: {\n open: {\n effects: \"slideIn:down\",\n transition: true,\n duration: 200\n },\n close: { // if close animation effects are defined, they will be used instead of open.reverse\n duration: 100,\n hide: true\n }\n },\n omitOriginOffsets: false\n },\n\n _animationClose: function() {\n var that = this;\n var location = that.wrapper.data(LOCATION);\n\n that.wrapper.hide();\n\n if (location) {\n that.wrapper.css(location);\n }\n\n if (that.options.anchor != BODY) {\n that._hideDirClass();\n }\n\n that._closing = false;\n that._trigger(DEACTIVATE);\n },\n\n destroy: function() {\n var that = this,\n options = that.options,\n element = that.element.off(NS),\n parent;\n\n Widget.fn.destroy.call(that);\n\n if (options.toggleTarget) {\n $(options.toggleTarget).off(NS);\n }\n\n if (!options.modal) {\n DOCUMENT_ELEMENT.off(that.downEvent, that._mousedownProxy);\n that._toggleResize(false);\n }\n\n kendo.destroy(that.element.children());\n element.removeData();\n\n if (options.appendTo[0] === document.body) {\n parent = element.closest(\".k-animation-container\");\n\n if (parent[0]) {\n parent.remove();\n } else {\n element.remove();\n }\n }\n },\n\n open: function(x, y) {\n var that = this,\n fixed = { isFixed: !isNaN(parseInt(y,10)), x: x, y: y },\n element = that.element,\n options = that.options,\n animation, wrapper,\n anchor = $(options.anchor),\n mobile = element[0] && element.hasClass(\"km-widget\"),\n listbox = element.find(\"[role='listbox']\"),\n parent;\n\n if (!that.visible()) {\n if (options.copyAnchorStyles) {\n if (mobile && styles[0] == \"font-size\") {\n styles.shift();\n }\n element.css(kendo.getComputedStyles(anchor[0], styles));\n }\n\n if (that.element.parent().data(\"animating\") || that._trigger(OPEN)) {\n return;\n }\n\n that._activated = false;\n\n if (!options.modal) {\n DOCUMENT_ELEMENT.off(that.downEvent, that._mousedownProxy)\n .on(that.downEvent, that._mousedownProxy);\n\n // this binding hangs iOS in editor\n // all elements in IE7/8 fire resize event, causing mayhem\n that._toggleResize(false);\n that._toggleResize(true);\n }\n\n that.wrapper = wrapper = kendo.wrap(element, options.autosize, options._resizeOnWrap)\n .css({\n overflow: HIDDEN,\n display: \"block\",\n position: ABSOLUTE\n })\n .attr(\"aria-hidden\", false);\n\n parent = element.parent();\n\n if (listbox.attr(\"aria-label\")) {\n wrapper.attr(\"aria-label\", listbox.attr(\"aria-label\"));\n } else if (listbox.attr(\"aria-labelledby\")) {\n wrapper.attr(\"aria-labelledby\", listbox.attr(\"aria-labelledby\"));\n }\n\n if (support.mobileOS.android) {\n parent.css(TRANSFORM, \"translatez(0)\"); // Android is VERY slow otherwise. Should be tested in other droids as well since it may cause blur.\n }\n\n wrapper.css(POSITION);\n\n if ($(options.appendTo)[0] == document.body) {\n wrapper.css(TOP, \"-10000px\");\n }\n\n that.flipped = that._position(fixed);\n animation = that._openAnimation();\n\n if (options.anchor != BODY && !that.element.hasClass(\"k-tooltip\")) {\n that._showDirClass(animation);\n }\n\n parent.hide();\n element.show();\n that.wrapper.show();\n\n parent.data(EFFECTS, animation.effects)\n .kendoStop(true)\n .kendoAnimate(animation);\n\n\n element.attr(\"aria-hidden\", false);\n }\n },\n\n _location: function(isFixed) {\n var that = this,\n element = that.element,\n options = that.options,\n wrapper,\n anchor = $(options.anchor),\n mobile = element[0] && element.hasClass(\"km-widget\");\n\n if (options.copyAnchorStyles) {\n if (mobile && styles[0] == \"font-size\") {\n styles.shift();\n }\n element.css(kendo.getComputedStyles(anchor[0], styles));\n }\n\n that.wrapper = wrapper = kendo.wrap(element, options.autosize)\n .css({\n overflow: HIDDEN,\n display: \"block\",\n position: ABSOLUTE\n });\n\n if (support.mobileOS.android) {\n wrapper.css(TRANSFORM, \"translatez(0)\"); // Android is VERY slow otherwise. Should be tested in other droids as well since it may cause blur.\n }\n\n wrapper.css(POSITION);\n\n if ($(options.appendTo)[0] == document.body) {\n wrapper.css(TOP, \"-10000px\");\n }\n\n that._position(isFixed || {});\n\n var offset = wrapper.offset();\n return {\n width: kendo._outerWidth(wrapper),\n height: kendo._outerHeight(wrapper),\n left: offset.left,\n top: offset.top\n };\n },\n\n _openAnimation: function() {\n var animation = extend(true, {}, this.options.animation.open);\n animation.effects = kendo.parseEffects(animation.effects, this.flipped);\n\n return animation;\n },\n\n _hideDirClass: function() {\n var anchor = $(this.options.anchor);\n var direction = ((anchor.attr(\"class\") || \"\").match(ACTIVEBORDERREGEXP) || [\"\", \"down\"])[1];\n var dirClass = ACTIVEBORDER + \"-\" + direction;\n\n anchor\n .removeClass(dirClass)\n .children(ACTIVECHILDREN)\n .removeClass(ACTIVE)\n .removeClass(dirClass);\n\n this.element.removeClass(ACTIVEBORDER + \"-\" + kendo.directions[direction].reverse);\n },\n\n _showDirClass: function(animation) {\n var direction = animation.effects.slideIn ? animation.effects.slideIn.direction : \"down\";\n var dirClass = ACTIVEBORDER + \"-\" + direction;\n\n $(this.options.anchor)\n .addClass(dirClass)\n .children(ACTIVECHILDREN)\n .addClass(ACTIVE)\n .addClass(dirClass);\n },\n\n position: function() {\n if (this.visible()) {\n this.flipped = this._position();\n //this._hideDirClass();\n //this._showDirClass(this._openAnimation());\n }\n },\n\n toggle: function() {\n var that = this;\n\n that[that.visible() ? CLOSE : OPEN]();\n },\n\n visible: function() {\n return this.wrapper.is(\":\" + VISIBLE) && this.element.is(\":\" + VISIBLE);\n },\n\n close: function(skipEffects) {\n var that = this,\n parent = that.element.parent(),\n options = that.options, wrap,\n animation, openEffects, closeEffects;\n\n if (that.visible()) {\n wrap = (that.wrapper[0] ? that.wrapper : kendo.wrap(that.element).hide());\n\n that.wrapper.removeClass(\"k-animation-container-shown\");\n that._toggleResize(false);\n\n if (that._closing || that._trigger(CLOSE)) {\n that._toggleResize(true);\n return;\n }\n\n // Close all inclusive popups.\n that.element.find(\".k-popup\").each(function() {\n var that = $(this),\n popup = that.data(\"kendoPopup\");\n\n if (popup) {\n popup.close(skipEffects);\n }\n });\n\n DOCUMENT_ELEMENT.off(that.downEvent, that._mousedownProxy);\n\n if (skipEffects) {\n animation = { hide: true, effects: {} };\n } else {\n animation = extend(true, {}, options.animation.close);\n openEffects = parent.data(EFFECTS);\n closeEffects = animation.effects;\n\n if (!closeEffects && !kendo.size(closeEffects) && openEffects && kendo.size(openEffects)) {\n animation.effects = openEffects;\n animation.reverse = true;\n }\n\n that._closing = true;\n }\n\n parent.kendoStop(true);\n that.element.attr(\"aria-hidden\", true);\n wrap\n .css({ overflow: HIDDEN }) // stop callback will remove hidden overflow\n .attr(\"aria-hidden\", true);\n parent.kendoAnimate(animation);\n\n if (skipEffects) {\n that._animationClose();\n }\n }\n },\n\n _trigger: function(ev) {\n return this.trigger(ev, { type: ev });\n },\n\n _resize: function(e) {\n var that = this;\n\n if (support.resize.indexOf(e.type) !== -1) {\n clearTimeout(that._resizeTimeout);\n that._resizeTimeout = setTimeout(function() {\n that._position();\n that._resizeTimeout = null;\n }, 50);\n } else {\n if (!that._hovered || (that._activated && that.element.find(\".k-list\").length > 0)) {\n that.close();\n }\n }\n },\n\n _toggleResize: function(toggle) {\n var method = toggle ? \"on\" : \"off\";\n var eventNames = support.resize;\n\n if (!(support.mobileOS.ios || support.mobileOS.android || support.browser.safari)) {\n eventNames += \" \" + SCROLL;\n }\n\n if (toggle && !this.scrollableParents) {\n this.scrollableParents = this._scrollableParents();\n }\n\n if (this.scrollableParents && this.scrollableParents.length) {\n this.scrollableParents[method](SCROLL, this._resizeProxy);\n }\n\n WINDOW[method](eventNames, this._resizeProxy);\n },\n\n _mousedown: function(e) {\n var that = this,\n container = that.element[0],\n options = that.options,\n anchor = $(options.anchor)[0],\n toggleTarget = options.toggleTarget,\n target = kendo.eventTarget(e),\n popup = $(target).closest(\".k-popup\"),\n mobile = popup.parent().parent(\".km-shim\").length;\n\n popup = popup[0];\n if (!mobile && popup && popup !== that.element[0]) {\n return;\n }\n\n // This MAY result in popup not closing in certain cases.\n if ($(e.target).closest(\"a\").data(\"rel\") === \"popover\") {\n return;\n }\n\n if (!contains(container, target) && !contains(anchor, target) && !(toggleTarget && contains($(toggleTarget)[0], target))) {\n that.close();\n }\n },\n\n _fit: function(position, size, viewPortSize) {\n var output = 0;\n\n if (position + size > viewPortSize) {\n output = viewPortSize - (position + size);\n }\n\n if (position < 0) {\n output = -position;\n }\n\n return output;\n },\n\n _flip: function(offset, size, anchorSize, viewPortSize, origin, position, boxSize) {\n var output = 0;\n boxSize = boxSize || size;\n\n if (position !== origin && position !== CENTER && origin !== CENTER) {\n if (offset + boxSize > viewPortSize) {\n output += -(anchorSize + size);\n }\n\n if (offset + output < 0) {\n output += anchorSize + size;\n }\n }\n return output;\n },\n\n _scrollableParents: function() {\n return $(this.options.anchor)\n .parentsUntil(\"body\")\n .filter(function(index, element) {\n return kendo.isScrollable(element);\n });\n },\n\n _position: function(fixed) {\n var that = this,\n //element = that.element.css(POSITION, \"\"), /* fixes telerik/kendo-ui-core#790, comes from telerik/kendo#615 */\n element = that.element,\n wrapper = that.wrapper,\n options = that.options,\n viewport = $(options.viewport),\n zoomLevel = support.zoomLevel(),\n isWindow = !!((viewport[0] == window) && window.innerWidth && (zoomLevel <= 1.02)),\n anchor = $(options.anchor),\n origins = options.origin.toLowerCase().split(\" \"),\n positions = options.position.toLowerCase().split(\" \"),\n collisions = that.collisions,\n siblingContainer, parents,\n parentZIndex, zIndex = 10002,\n idx = 0,\n docEl = document.documentElement,\n length, viewportOffset, viewportWidth, viewportHeight;\n\n if (options.viewport === window) {\n viewportOffset = {\n top: (window.pageYOffset || document.documentElement.scrollTop || 0),\n left: (window.pageXOffset || document.documentElement.scrollLeft || 0)\n };\n } else {\n viewportOffset = viewport.offset();\n }\n\n if (isWindow) {\n viewportWidth = window.innerWidth;\n viewportHeight = window.innerHeight;\n } else {\n viewportWidth = viewport.width();\n viewportHeight = viewport.height();\n }\n\n if (isWindow && docEl.scrollHeight - docEl.clientHeight > 0) {\n var sign = options.isRtl ? -1 : 1;\n\n viewportWidth -= sign * kendo.support.scrollbar();\n }\n\n siblingContainer = anchor.parents().filter(wrapper.siblings());\n\n if (siblingContainer[0]) {\n parentZIndex = Math.max(Number(siblingContainer.css(\"zIndex\")), 0);\n\n // set z-index to be more than that of the container/sibling\n // compensate with more units for window z-stack\n if (parentZIndex) {\n zIndex = parentZIndex + 10;\n } else {\n parents = anchor.parentsUntil(siblingContainer);\n for (length = parents.length; idx < length; idx++) {\n parentZIndex = Number($(parents[idx]).css(\"zIndex\"));\n if (parentZIndex && zIndex < parentZIndex) {\n zIndex = parentZIndex + 10;\n }\n }\n }\n }\n\n wrapper.css(\"zIndex\", zIndex);\n\n if (fixed && fixed.isFixed) {\n wrapper.css({ left: fixed.x, top: fixed.y });\n } else {\n wrapper.css(that._align(origins, positions));\n }\n\n var pos = getOffset(wrapper, POSITION, anchor[0] === wrapper.offsetParent()[0]),\n offset = getOffset(wrapper),\n anchorParent = anchor.offsetParent().parent(\".k-animation-container,.k-popup,.k-group\"); // If the parent is positioned, get the current positions\n\n if (anchorParent.length) {\n pos = getOffset(wrapper, POSITION, true);\n offset = getOffset(wrapper);\n }\n\n offset.top -= viewportOffset.top;\n offset.left -= viewportOffset.left;\n\n if (!that.wrapper.data(LOCATION)) { // Needed to reset the popup location after every closure - fixes the resize bugs.\n wrapper.data(LOCATION, extend({}, pos));\n }\n\n var offsets = extend({}, offset),\n location = extend({}, pos),\n adjustSize = options.adjustSize;\n\n if (collisions[0] === \"fit\") {\n location.top += that._fit(offsets.top, outerHeight(wrapper) + adjustSize.height, viewportHeight / zoomLevel);\n }\n\n if (collisions[1] === \"fit\") {\n location.left += that._fit(offsets.left, outerWidth(wrapper) + adjustSize.width, viewportWidth / zoomLevel);\n }\n\n var flipPos = extend({}, location);\n var elementHeight = outerHeight(element);\n var wrapperHeight = outerHeight(wrapper);\n\n if (!wrapper.height() && elementHeight) {\n wrapperHeight = wrapperHeight + elementHeight;\n }\n\n if (collisions[0] === \"flip\") {\n location.top += that._flip(offsets.top, elementHeight, outerHeight(anchor), viewportHeight / zoomLevel, origins[0], positions[0], wrapperHeight);\n }\n\n if (collisions[1] === \"flip\") {\n location.left += that._flip(offsets.left, outerWidth(element), outerWidth(anchor), viewportWidth / zoomLevel, origins[1], positions[1], outerWidth(wrapper));\n }\n\n wrapper.css(location);\n\n return (location.left != flipPos.left || location.top != flipPos.top);\n },\n\n _align: function(origin, position) {\n var that = this,\n element = that.wrapper,\n anchor = $(that.options.anchor),\n verticalOrigin = origin[0],\n horizontalOrigin = origin[1],\n verticalPosition = position[0],\n horizontalPosition = position[1],\n anchorOffset = getOffset(anchor),\n appendTo = $(that.options.appendTo),\n appendToOffset,\n width = outerWidth(element),\n height = outerHeight(element) || outerHeight(element.find(\".k-child-animation-container\").children().first()),\n anchorWidth = outerWidth(anchor),\n anchorHeight = outerHeight(anchor),\n top = that.options.omitOriginOffsets ? 0 : anchorOffset.top,\n left = that.options.omitOriginOffsets ? 0 : anchorOffset.left,\n round = Math.round;\n\n if (appendTo[0] != document.body) {\n appendToOffset = getOffset(appendTo);\n top -= appendToOffset.top;\n left -= appendToOffset.left;\n }\n\n\n if (verticalOrigin === BOTTOM) {\n top += anchorHeight;\n }\n\n if (verticalOrigin === CENTER) {\n top += round(anchorHeight / 2);\n }\n\n if (verticalPosition === BOTTOM) {\n top -= height;\n }\n\n if (verticalPosition === CENTER) {\n top -= round(height / 2);\n }\n\n if (horizontalOrigin === RIGHT) {\n left += anchorWidth;\n }\n\n if (horizontalOrigin === CENTER) {\n left += round(anchorWidth / 2);\n }\n\n if (horizontalPosition === RIGHT) {\n left -= width;\n }\n\n if (horizontalPosition === CENTER) {\n left -= round(width / 2);\n }\n\n return {\n top: top,\n left: left\n };\n }\n });\n\n ui.plugin(Popup);\n\n var stableSort = kendo.support.stableSort;\n var tabKeyTrapNS = \"kendoTabKeyTrap\";\n var focusableNodesSelector = \"a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], *[contenteditable]\";\n var TabKeyTrap = Class.extend({\n init: function(element, options) {\n this.element = $(element);\n this.element.autoApplyNS(tabKeyTrapNS);\n },\n\n trap: function() {\n this.element.on(\"keydown\", this._keepInTrap.bind(this));\n },\n\n removeTrap: function() {\n this.element.kendoDestroy(tabKeyTrapNS);\n },\n\n destroy: function() {\n this.element.kendoDestroy(tabKeyTrapNS);\n this.element = undefined$1;\n },\n\n shouldTrap: function() {\n return true;\n },\n\n _keepInTrap: function(e) {\n if (e.which !== 9 || !this.shouldTrap() || e.isDefaultPrevented()) {\n return;\n }\n\n var elements = this._focusableElements();\n var sortedElements = this._sortFocusableElements(elements);\n var next = this._nextFocusable(e, sortedElements);\n\n if (next) {\n this._focus(next);\n }\n\n e.preventDefault();\n },\n _focusableElements: function() {\n var elements = this.element.find(focusableNodesSelector).filter(function(i, item) {\n return item.tabIndex >= 0 && $(item).is(':visible') && !$(item).is('[disabled]');\n });\n\n if (this.element.is(\"[tabindex]\")) {\n elements.push(this.element[0]);\n }\n\n return elements;\n },\n _sortFocusableElements: function(elements) {\n var sortedElements;\n\n if (stableSort) {\n sortedElements = elements.sort(function(prev, next) {\n return prev.tabIndex - next.tabIndex;\n });\n } else {\n var attrName = \"__k_index\";\n elements.each(function(i, item) {\n item.setAttribute(attrName, i);\n });\n\n sortedElements = elements.sort(function(prev, next) {\n return prev.tabIndex === next.tabIndex ?\n parseInt(prev.getAttribute(attrName), 10) - parseInt(next.getAttribute(attrName), 10) :\n prev.tabIndex - next.tabIndex;\n });\n\n elements.removeAttr(attrName);\n }\n\n return sortedElements;\n },\n _nextFocusable: function(e, elements) {\n var count = elements.length;\n var current = elements.index(e.target);\n\n return elements.get((current + (e.shiftKey ? -1 : 1)) % count);\n },\n _focus: function(element) {\n if (element.nodeName == \"IFRAME\") {\n element.contentWindow.document.body.focus();\n return;\n }\n\n element.focus();\n\n if (element.nodeName == \"INPUT\" && element.setSelectionRange && this._haveSelectionRange(element)) {\n element.setSelectionRange(0, element.value.length);\n }\n },\n _haveSelectionRange: function(element) {\n var elementType = element.type.toLowerCase();\n\n return elementType === \"text\" || elementType === \"search\" ||\n elementType === \"url\" || elementType === \"tel\" ||\n elementType === \"password\";\n }\n });\n ui.Popup.TabKeyTrap = TabKeyTrap;\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.core.js';\n\nvar __meta__ = {\n id: \"html.base\",\n name: \"Html.Base\",\n category: \"web\",\n description: \"\",\n depends: [\"core\"],\n features: []\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n Class = kendo.Class;\n\n kendo.html = kendo.html || {};\n\n var HTMLBase = Class.extend({\n init: function(element, options) {\n var that = this;\n that.element = $(element);\n options = options || {};\n delete options.name;\n that._initOptions(options);\n },\n options: {\n stylingOptions: []\n },\n _addClasses: function() {\n var that = this,\n options = that.options,\n stylingOptions = options.stylingOptions,\n previouslyAddedClasses = that.wrapper.data(\"added-classes\");\n\n stylingOptions = stylingOptions.map(function(option) {\n var validFill;\n\n if (option === \"themeColor\") {\n validFill = kendo.cssProperties.getValidClass({\n widget: options.name,\n propName: \"fillMode\",\n value: options.fillMode\n });\n\n if (!validFill || validFill.length === 0) {\n return \"\";\n }\n }\n\n return kendo.cssProperties.getValidClass({\n widget: options.name,\n propName: option,\n value: options[option],\n fill: options.fillMode\n });\n });\n\n if (previouslyAddedClasses) {\n that.wrapper.removeClass(previouslyAddedClasses.join(\" \"));\n }\n\n that.wrapper.data(\"added-classes\", stylingOptions);\n that.wrapper.addClass(stylingOptions.join(\" \"));\n },\n html: function() {\n var that = this;\n\n return that.wrapper[0].outerHTML;\n }\n });\n\n $.extend(kendo.html, {\n HTMLBase: HTMLBase\n });\n\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.html.base.js';\n\nvar __meta__ = {\n id: \"html.icon\",\n name: \"Html.Icon\",\n category: \"web\",\n description: \"HTML font icon rendering utility for Kendo UI for jQuery.\",\n depends: [\"html.base\"]\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n extend = $.extend,\n HTMLBase = kendo.html.HTMLBase;\n\n var KFONTICON = 'k-icon k-font-icon';\n var KI_PREFFIX = 'k-i-';\n var KSVGICON = 'k-icon k-svg-icon';\n var KSVG_PREFFIX = 'k-svg-i-';\n\n var FLIP_PREFIX = 'k-flip-';\n var FLIP_HORIZONTAL = `${FLIP_PREFIX}h`;\n var FLIP_VERTICAL = `${FLIP_PREFIX}v`;\n\n var THEME_COLOR_PREFIX = 'k-color-';\n\n var ICON_TYPES = {\n 'svg': (element, options) => new HTMLSvgIcon(element, options),\n 'font': (element, options) => new HTMLFontIcon(element, options)\n };\n\n var FLIP_CLASSES = {\n default: '',\n horizontal: FLIP_HORIZONTAL,\n vertical: FLIP_VERTICAL,\n both: `${FLIP_HORIZONTAL} ${FLIP_VERTICAL}`\n };\n\n var renderIcon = function(element, options) {\n if (!element || $.isPlainObject(element) || kendo.isString(element)) {\n options = element;\n element = $(\"\");\n }\n\n if (kendo.isString(options)) {\n options = {\n icon: options\n };\n }\n\n if (!kendo.isPresent(options.type)) {\n options.type = kendo.defaults.iconType ? kendo.defaults.iconType : 'svg';\n }\n\n if (kendo.isFunction(options.type)) {\n return options.type(element, options);\n }\n\n if (!kendo.isFunction(ICON_TYPES[options.type])) {\n return null;\n }\n\n return (ICON_TYPES[options.type](element, options)).html();\n };\n\n var HTMLBaseIcon = HTMLBase.extend({\n init: function(element, options) {\n var that = this;\n HTMLBase.fn.init.call(that, element, options);\n that._wrapper();\n },\n options: {\n name: 'HTMLIcon',\n size: 'none',\n themeColor: 'none',\n flip: 'default',\n iconClass: '',\n stylingOptions: [ 'size', 'themeColor', 'fill' ]\n },\n _wrapper: function() {\n var that = this;\n\n that._addClasses();\n },\n _addClasses: function() {\n var that = this,\n options = that.options,\n stylingOptions = options.stylingOptions,\n previouslyAddedClasses = that.wrapper.data(\"added-classes\");\n\n stylingOptions = stylingOptions.map(function(option) {\n if (option === 'themeColor') {\n return kendo.cssProperties.getValidClass({\n widget: options.name,\n propName: option,\n value: options[option],\n prefix: THEME_COLOR_PREFIX\n });\n }\n\n if (option === 'fill') {\n return FLIP_CLASSES[options.flip];\n }\n\n return kendo.cssProperties.getValidClass({\n widget: options.name,\n propName: option,\n value: options[option],\n fill: options.fillMode\n });\n });\n\n if (previouslyAddedClasses) {\n that.wrapper.removeClass(previouslyAddedClasses.filter(x => x !== that._className).join(\" \"));\n }\n\n that.wrapper.data(\"added-classes\", stylingOptions.concat([that._className]));\n that.wrapper.addClass(stylingOptions.join(\" \"));\n }\n });\n\n var HTMLFontIcon = HTMLBaseIcon.extend({\n init: function(element, options) {\n HTMLBaseIcon.fn.init.call(this, element, options);\n },\n options: extend({}, HTMLBaseIcon.fn.options, {\n name: 'HTMLFontIcon',\n icon: null\n }),\n _wrapper: function() {\n var that = this,\n // Find if there is an existing k-i- class appended to the element.\n currentIconClass = that.element[0].className.split(\" \").find(x => x.includes(KI_PREFFIX)),\n className = that.options.icon ? `${that.options.icon.startsWith(KI_PREFFIX) ? \"\" : KI_PREFFIX}${that.options.icon}` : \"\";\n\n that._className = className;\n that.wrapper = that.element\n .addClass(KFONTICON)\n .removeClass(currentIconClass) // Remove any existing icons.\n .addClass(className)\n .addClass(that.options.iconClass || '');\n\n HTMLBaseIcon.fn._wrapper.call(this);\n }\n });\n\n var HTMLSvgIcon = HTMLBaseIcon.extend({\n init: function(element, options) {\n // Ensure that the inner contents of the wrapping span element are always removed for re-rendering purposes.\n element.empty();\n HTMLBaseIcon.fn.init.call(this, element, options);\n },\n options: extend({}, HTMLBaseIcon.fn.options, {\n name: 'HTMLSVGIcon',\n icon: null\n }),\n _wrapper: function() {\n var that = this,\n icon = that.options.icon,\n iconClass = that.options.iconClass,\n // Find if there is an existing k-svg-i- class appended to the element.\n currentIconClass = that.element[0].className.split(\" \").find(x => x.includes(KSVG_PREFFIX)),\n svgElm = $(''),\n className;\n\n if (!icon && iconClass) {\n // match k-i-(some-icon-name)\n const regex = /k-i-(\\w+(?:-\\w+)*)/;\n let iconNameMatch = iconClass.match(regex);\n if (iconNameMatch) {\n icon = iconNameMatch[1];\n iconClass = iconClass.replace(iconNameMatch[0], \"\");\n }\n }\n\n if (kendo.isString(icon)) {\n // remove k-i- and convert kebab-case-icon to camelCaseIcon\n icon = icon.replace('k-i-', '').replace(/-./g, x=>x[1].toUpperCase());\n icon = kendo.ui.svgIcons[icon] || kendo.ui.svgIcons[`${icon}Icon`];\n }\n\n className = icon && icon.name ? `${KSVG_PREFFIX}${icon.name}` : '';\n that._className = className;\n\n that.wrapper = that.element\n .addClass(KSVGICON)\n .removeClass(currentIconClass) // Remove any existing icons.\n .addClass(className)\n .addClass(iconClass || '')\n .attr(\"aria-hidden\", true);\n\n if ($.isPlainObject(icon)) {\n svgElm.attr('viewBox', icon.viewBox || '')\n .attr({\n 'viewBox': icon.viewBox || '',\n 'focusable': 'false',\n 'xmlns': 'http://www.w3.org/2000/svg'\n })\n .html(icon.content || '');\n\n that.wrapper.append(svgElm[0].outerHTML);\n }\n\n HTMLBaseIcon.fn._wrapper.call(this);\n }\n });\n\n $.extend(kendo.html, {\n renderIcon: renderIcon,\n HTMLFontIcon: HTMLFontIcon,\n HTMLSvgIcon: HTMLSvgIcon,\n getIconRenderer: (type) => ICON_TYPES[type]\n });\n\n kendo.cssProperties.registerPrefix(\"HTMLFontIcon\", \"k-icon-\");\n\n kendo.cssProperties.registerValues(\"HTMLFontIcon\", [{\n prop: \"size\",\n values: kendo.cssProperties.sizeValues.concat([['xsmall', 'xs'], ['xlarge', 'xl'], ['xxlarge', 'xxl'], ['xxxlarge', 'xxxl']])\n }, {\n prop: \"themeColor\",\n values: ['primary', 'secondary', 'tertiary', 'inherit', 'info', 'success', 'warning', 'error', 'dark', 'light', 'inverse']\n }]);\n\n kendo.cssProperties.registerPrefix(\"HTMLSVGIcon\", \"k-icon-\");\n\n kendo.cssProperties.registerValues(\"HTMLSVGIcon\", [{\n prop: \"size\",\n values: kendo.cssProperties.sizeValues.concat([['xsmall', 'xs'], ['xlarge', 'xl'], ['xxlarge', 'xxl'], ['xxxlarge', 'xxxl']])\n }, {\n prop: \"themeColor\",\n values: ['primary', 'secondary', 'tertiary', 'inherit', 'info', 'success', 'warning', 'error', 'dark', 'light', 'inverse']\n }]);\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.html.icon.js';\n\nconst caretTrIcon = {\n name: 'caret-tr',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst caretBrIcon = {\n name: 'caret-br',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst caretBlIcon = {\n name: 'caret-bl',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst caretTlIcon = {\n name: 'caret-tl',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst caretAltUpIcon = {\n name: 'caret-alt-up',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst caretAltRightIcon = {\n name: 'caret-alt-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst caretAltDownIcon = {\n name: 'caret-alt-down',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst caretAltLeftIcon = {\n name: 'caret-alt-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst caretAltToTopIcon = {\n name: 'caret-alt-to-top',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst caretAltToRightIcon = {\n name: 'caret-alt-to-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst caretAltToBottomIcon = {\n name: 'caret-alt-to-bottom',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst caretAltToLeftIcon = {\n name: 'caret-alt-to-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst caretDoubleAltUpIcon = {\n name: 'caret-double-alt-up',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst caretDoubleAltRightIcon = {\n name: 'caret-double-alt-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst caretDoubleAltDownIcon = {\n name: 'caret-double-alt-down',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst caretDoubleAltLeftIcon = {\n name: 'caret-double-alt-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst caretAltExpandIcon = {\n name: 'caret-alt-expand',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst arrowsNoChangeIcon = {\n name: 'arrows-no-change',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst arrowOverflowDownIcon = {\n name: 'arrow-overflow-down',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chevronUpIcon = {\n name: 'chevron-up',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chevronRightIcon = {\n name: 'chevron-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chevronDownIcon = {\n name: 'chevron-down',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chevronLeftIcon = {\n name: 'chevron-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst arrowUpIcon = {\n name: 'arrow-up',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst arrowRightIcon = {\n name: 'arrow-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst arrowDownIcon = {\n name: 'arrow-down',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst arrowLeftIcon = {\n name: 'arrow-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst levelDownIcon = {\n name: 'level-down',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst levelUpIcon = {\n name: 'level-up',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst levelToTopIcon = {\n name: 'level-to-top',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst colResizeIcon = {\n name: 'col-resize',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst arrowsAxesIcon = {\n name: 'arrows-axes',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst arrowsSwapIcon = {\n name: 'arrows-swap',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst dragAndDropIcon = {\n name: 'drag-and-drop',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst categorizeIcon = {\n name: 'categorize',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst gridIcon = {\n name: 'grid',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst gridLayoutIcon = {\n name: 'grid-layout',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst groupIcon = {\n name: 'group',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst ungroupIcon = {\n name: 'ungroup',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst handleDragIcon = {\n name: 'handle-drag',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst layoutIcon = {\n name: 'layout',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst layout1By4Icon = {\n name: 'layout-1-by-4',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst layout2By2Icon = {\n name: 'layout-2-by-2',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst layoutSideBySideIcon = {\n name: 'layout-side-by-side',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst layoutStackedIcon = {\n name: 'layout-stacked',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst columnsIcon = {\n name: 'columns',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst rowsIcon = {\n name: 'rows',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst reorderIcon = {\n name: 'reorder',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst menuIcon = {\n name: 'menu',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst moreVerticalIcon = {\n name: 'more-vertical',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst moreHorizontalIcon = {\n name: 'more-horizontal',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst overlapIcon = {\n name: 'overlap',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst homeIcon = {\n name: 'home',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst arrowsLeftRightIcon = {\n name: 'arrows-left-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst arrowsTopBottomIcon = {\n name: 'arrows-top-bottom',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst borderRadiusBottomLeftIcon = {\n name: 'border-radius-bottom-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst borderRadiusBottomRightIcon = {\n name: 'border-radius-bottom-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst borderRadiusTopLeftIcon = {\n name: 'border-radius-top-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst borderRadiusTopRightIcon = {\n name: 'border-radius-top-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst borderRadiusIcon = {\n name: 'border-radius',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst borderStyleBottomIcon = {\n name: 'border-style-bottom',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst borderStyleLeftIcon = {\n name: 'border-style-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst borderStyleRightIcon = {\n name: 'border-style-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst borderStyleTopIcon = {\n name: 'border-style-top',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst borderStyleIcon = {\n name: 'border-style',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst boxSizingIcon = {\n name: 'box-sizing',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chevronDoubleDownIcon = {\n name: 'chevron-double-down',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chevronDoubleLeftIcon = {\n name: 'chevron-double-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chevronDoubleRightIcon = {\n name: 'chevron-double-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chevronDoubleUpIcon = {\n name: 'chevron-double-up',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst dataOdsIcon = {\n name: 'data-ods',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst nonRecurrenceIcon = {\n name: 'non-recurrence',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst displayBlockIcon = {\n name: 'display-block',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst displayFlexIcon = {\n name: 'display-flex',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst displayInlineFlexIcon = {\n name: 'display-inline-flex',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst dropletSliderIcon = {\n name: 'droplet-slider',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileReportIcon = {\n name: 'file-report',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst gapColumnIcon = {\n name: 'gap-column',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst gapRowIcon = {\n name: 'gap-row',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst handleResizeAltIcon = {\n name: 'handle-resize-alt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst handleResizeIcon = {\n name: 'handle-resize',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst imagesIcon = {\n name: 'images',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst letterSpaceIcon = {\n name: 'letter-space',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst lineHeightIcon = {\n name: 'line-height',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst listLatinBigIcon = {\n name: 'list-latin-big',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst listLatinSmallIcon = {\n name: 'list-latin-small',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst listRomanBigIcon = {\n name: 'list-roman-big',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst listRomanSmallIcon = {\n name: 'list-roman-small',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst listUnorderedOutlineIcon = {\n name: 'list-unordered-outline',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst listUnorderedSquareIcon = {\n name: 'list-unordered-square',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst maxHeightIcon = {\n name: 'max-height',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst maxWidthIcon = {\n name: 'max-width',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst minHeightIcon = {\n name: 'min-height',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst minWidthIcon = {\n name: 'min-width',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst outlineOffsetIcon = {\n name: 'outline-offset',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst outlineWidthIcon = {\n name: 'outline-width',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst paddingBottomIcon = {\n name: 'padding-bottom',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst paddingLeftIcon = {\n name: 'padding-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst paddingRightIcon = {\n name: 'padding-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst paddingTopIcon = {\n name: 'padding-top',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst paddingIcon = {\n name: 'padding',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst positionBottomIcon = {\n name: 'position-bottom',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst positionLeftIcon = {\n name: 'position-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst positionRightIcon = {\n name: 'position-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst positionTopIcon = {\n name: 'position-top',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst regularExpressionIcon = {\n name: 'regular-expression',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst replaceAllIcon = {\n name: 'replace-all',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst replaceSingleIcon = {\n name: 'replace-single',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst reportElementIcon = {\n name: 'report-element',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst rightDoubleQuotesIcon = {\n name: 'right-double-quotes',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst wholeWordIcon = {\n name: 'whole-word',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst dataSdsIcon = {\n name: 'data-sds',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst downloadLightIcon = {\n name: 'download-light',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst eyeSlashIcon = {\n name: 'eye-slash',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst displayInlineBlockIcon = {\n name: 'display-inline-block',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst paperPlaneIcon = {\n name: 'paper-plane',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst gaugeLinearIcon = {\n name: 'gauge-linear',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst gaugeRadialIcon = {\n name: 'gauge-radial',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst envelopeBoxIcon = {\n name: 'envelope-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst envelopeLinkIcon = {\n name: 'envelope-link',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst envelopeIcon = {\n name: 'envelope',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst warningCircleIcon = {\n name: 'warning-circle',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst warningTriangleIcon = {\n name: 'warning-triangle',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fontGrowIcon = {\n name: 'font-grow',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fontShrinkIcon = {\n name: 'font-shrink',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst textOverflowIcon = {\n name: 'text-overflow',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst textWrapArrowIcon = {\n name: 'text-wrap-arrow',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst textTruncateIcon = {\n name: 'text-truncate',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst textClipIcon = {\n name: 'text-clip',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst borderColorIcon = {\n name: 'border-color',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst borderTypeIcon = {\n name: 'border-type',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst undoIcon = {\n name: 'undo',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst redoIcon = {\n name: 'redo',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst arrowRotateCcwIcon = {\n name: 'arrow-rotate-ccw',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst arrowRotateCwIcon = {\n name: 'arrow-rotate-cw',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst arrowsNoRepeatIcon = {\n name: 'arrows-no-repeat',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst arrowRotateCcwSmallIcon = {\n name: 'arrow-rotate-ccw-small',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst arrowRotateCwSmallIcon = {\n name: 'arrow-rotate-cw-small',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst clockIcon = {\n name: 'clock',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst calendarIcon = {\n name: 'calendar',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst saveIcon = {\n name: 'save',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst printIcon = {\n name: 'print',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst pencilIcon = {\n name: 'pencil',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst trashIcon = {\n name: 'trash',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst paperclipIcon = {\n name: 'paperclip',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst paperclipAltIcon = {\n name: 'paperclip-alt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst linkIcon = {\n name: 'link',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst unlinkIcon = {\n name: 'unlink',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst linkVerticalIcon = {\n name: 'link-vertical',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst unlinkVerticalIcon = {\n name: 'unlink-vertical',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst lockIcon = {\n name: 'lock',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst unlockIcon = {\n name: 'unlock',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst cancelIcon = {\n name: 'cancel',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst cancelOutlineIcon = {\n name: 'cancel-outline',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst cancelCircleIcon = {\n name: 'cancel-circle',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst checkIcon = {\n name: 'check',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst checkOutlineIcon = {\n name: 'check-outline',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst checkCircleIcon = {\n name: 'check-circle',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst xIcon = {\n name: 'x',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst xOutlineIcon = {\n name: 'x-outline',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst xCircleIcon = {\n name: 'x-circle',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst plusIcon = {\n name: 'plus',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst plusOutlineIcon = {\n name: 'plus-outline',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst plusCircleIcon = {\n name: 'plus-circle',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst minusIcon = {\n name: 'minus',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst minusOutlineIcon = {\n name: 'minus-outline',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst minusCircleIcon = {\n name: 'minus-circle',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst sortAscIcon = {\n name: 'sort-asc',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst sortDescIcon = {\n name: 'sort-desc',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst sortClearIcon = {\n name: 'sort-clear',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst sortAscSmallIcon = {\n name: 'sort-asc-small',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst sortDescSmallIcon = {\n name: 'sort-desc-small',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst filterIcon = {\n name: 'filter',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst filterClearIcon = {\n name: 'filter-clear',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst filterSmallIcon = {\n name: 'filter-small',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst filterSortAscSmallIcon = {\n name: 'filter-sort-asc-small',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst filterSortDescSmallIcon = {\n name: 'filter-sort-desc-small',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst filterAddExpressionIcon = {\n name: 'filter-add-expression',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst filterAddGroupIcon = {\n name: 'filter-add-group',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst loginIcon = {\n name: 'login',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst logoutIcon = {\n name: 'logout',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst downloadIcon = {\n name: 'download',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst uploadIcon = {\n name: 'upload',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst hyperlinkOpenIcon = {\n name: 'hyperlink-open',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst hyperlinkOpenSmIcon = {\n name: 'hyperlink-open-sm',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst launchIcon = {\n name: 'launch',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst windowIcon = {\n name: 'window',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst windowRestoreIcon = {\n name: 'window-restore',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst windowMinimizeIcon = {\n name: 'window-minimize',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst gearIcon = {\n name: 'gear',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst gearsIcon = {\n name: 'gears',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst wrenchIcon = {\n name: 'wrench',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst eyeIcon = {\n name: 'eye',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst searchIcon = {\n name: 'search',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst zoomInIcon = {\n name: 'zoom-in',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst zoomOutIcon = {\n name: 'zoom-out',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst arrowsMoveIcon = {\n name: 'arrows-move',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst calculatorIcon = {\n name: 'calculator',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst cartIcon = {\n name: 'cart',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst connectorIcon = {\n name: 'connector',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst plusSmIcon = {\n name: 'plus-sm',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst minusSmIcon = {\n name: 'minus-sm',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst kpiStatusDenyIcon = {\n name: 'kpi-status-deny',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst kpiStatusHoldIcon = {\n name: 'kpi-status-hold',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst kpiStatusOpenIcon = {\n name: 'kpi-status-open',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst equalIcon = {\n name: 'equal',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst notEqualIcon = {\n name: 'not-equal',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst lessOrEqualIcon = {\n name: 'less-or-equal',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst greaterOrEqualIcon = {\n name: 'greater-or-equal',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst divideIcon = {\n name: 'divide',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst accessibilityIcon = {\n name: 'accessibility',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst barcodeOutlineIcon = {\n name: 'barcode-outline',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst barcodeIcon = {\n name: 'barcode',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst barcodeScannerIcon = {\n name: 'barcode-scanner',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst qrCodeOutlineIcon = {\n name: 'qr-code-outline',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst qrCodeIcon = {\n name: 'qr-code',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst qrCodeScannerIcon = {\n name: 'qr-code-scanner',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst barcodeQrCodeScannerIcon = {\n name: 'barcode-qr-code-scanner',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst signatureIcon = {\n name: 'signature',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst handIcon = {\n name: 'hand',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst pointerIcon = {\n name: 'pointer',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst stickIcon = {\n name: 'stick',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst unstickIcon = {\n name: 'unstick',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst setColumnPositionIcon = {\n name: 'set-column-position',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst clockArrowRotateIcon = {\n name: 'clock-arrow-rotate',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst playIcon = {\n name: 'play',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst pauseIcon = {\n name: 'pause',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst stopIcon = {\n name: 'stop',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst rewindIcon = {\n name: 'rewind',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst forwardIcon = {\n name: 'forward',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst volumeDownIcon = {\n name: 'volume-down',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst volumeUpIcon = {\n name: 'volume-up',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst volumeMuteIcon = {\n name: 'volume-mute',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst hdIcon = {\n name: 'hd',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst closedCaptionsIcon = {\n name: 'closed-captions',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst playlistIcon = {\n name: 'playlist',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst musicNotesIcon = {\n name: 'music-notes',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst playSmIcon = {\n name: 'play-sm',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst pauseSmIcon = {\n name: 'pause-sm',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst stopSmIcon = {\n name: 'stop-sm',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst heartOutlineIcon = {\n name: 'heart-outline',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst heartIcon = {\n name: 'heart',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst starOutlineIcon = {\n name: 'star-outline',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst starIcon = {\n name: 'star',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst checkboxIcon = {\n name: 'checkbox',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst checkboxCheckedIcon = {\n name: 'checkbox-checked',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst checkboxIndeterminateIcon = {\n name: 'checkbox-indeterminate',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst checkboxNullIcon = {\n name: 'checkbox-null',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst circleIcon = {\n name: 'circle',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst radiobuttonIcon = {\n name: 'radiobutton',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst radiobuttonCheckedIcon = {\n name: 'radiobutton-checked',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst bellIcon = {\n name: 'bell',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst infoCircleIcon = {\n name: 'info-circle',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst questionCircleIcon = {\n name: 'question-circle',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst exclamationCircleIcon = {\n name: 'exclamation-circle',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst cameraIcon = {\n name: 'camera',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst imageIcon = {\n name: 'image',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst imageExportIcon = {\n name: 'image-export',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst zoomActualSizeIcon = {\n name: 'zoom-actual-size',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst zoomBestFitIcon = {\n name: 'zoom-best-fit',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst imageResizeIcon = {\n name: 'image-resize',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst cropIcon = {\n name: 'crop',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst mirrorIcon = {\n name: 'mirror',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst flipHorizontalIcon = {\n name: 'flip-horizontal',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst flipVerticalIcon = {\n name: 'flip-vertical',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst rotateIcon = {\n name: 'rotate',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst rotateRightIcon = {\n name: 'rotate-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst rotateLeftIcon = {\n name: 'rotate-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst brushIcon = {\n name: 'brush',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst paletteIcon = {\n name: 'palette',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst dropletIcon = {\n name: 'droplet',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst shapeLineIcon = {\n name: 'shape-line',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst brightnessContrastIcon = {\n name: 'brightness-contrast',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst slidersIcon = {\n name: 'sliders',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst invertColorsIcon = {\n name: 'invert-colors',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst transparencyIcon = {\n name: 'transparency',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst grayscaleIcon = {\n name: 'grayscale',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst blurIcon = {\n name: 'blur',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst sharpenIcon = {\n name: 'sharpen',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst shapesIcon = {\n name: 'shapes',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst roundCornersIcon = {\n name: 'round-corners',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst bringToFrontIcon = {\n name: 'bring-to-front',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst bringToBackIcon = {\n name: 'bring-to-back',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst bringForwardIcon = {\n name: 'bring-forward',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst bringBackwardIcon = {\n name: 'bring-backward',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignSelfStartIcon = {\n name: 'align-self-start',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignSelfCenterIcon = {\n name: 'align-self-center',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignSelfEndIcon = {\n name: 'align-self-end',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignSelfStartAltIcon = {\n name: 'align-self-start-alt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignSelfCenterAltIcon = {\n name: 'align-self-center-alt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignSelfEndAltIcon = {\n name: 'align-self-end-alt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst thumbnailsUpIcon = {\n name: 'thumbnails-up',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst thumbnailsRightIcon = {\n name: 'thumbnails-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst thumbnailsDownIcon = {\n name: 'thumbnails-down',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst thumbnailsLeftIcon = {\n name: 'thumbnails-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fullscreenIcon = {\n name: 'fullscreen',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fullscreenExitIcon = {\n name: 'fullscreen-exit',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst dropletSlashIcon = {\n name: 'droplet-slash',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst photosIcon = {\n name: 'photos',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignToGridIcon = {\n name: 'align-to-grid',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst sizeToGridIcon = {\n name: 'size-to-grid',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst makeSameSizeIcon = {\n name: 'make-same-size',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst makeSameWidthIcon = {\n name: 'make-same-width',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst makeSameHeightIcon = {\n name: 'make-same-height',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst makeHorizontalSpacingEqualIcon = {\n name: 'make-horizontal-spacing-equal',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst increaseHorizontalSpacingIcon = {\n name: 'increase-horizontal-spacing',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst decreaseHorizontalSpacingIcon = {\n name: 'decrease-horizontal-spacing',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst removeHorizontalSpacingIcon = {\n name: 'remove-horizontal-spacing',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst makeVerticalSpacingEqualIcon = {\n name: 'make-vertical-spacing-equal',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst increaseVerticalSpacingIcon = {\n name: 'increase-vertical-spacing',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst decreaseVerticalSpacingIcon = {\n name: 'decrease-vertical-spacing',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst removeVerticalSpacingIcon = {\n name: 'remove-vertical-spacing',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst eyedropperIcon = {\n name: 'eyedropper',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst snapGridIcon = {\n name: 'snap-grid',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst snapToGridlinesIcon = {\n name: 'snap-to-gridlines',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst snapToSnaplinesIcon = {\n name: 'snap-to-snaplines',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst dimensionsIcon = {\n name: 'dimensions',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignSelfStretchIcon = {\n name: 'align-self-stretch',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignSelfStretchAltIcon = {\n name: 'align-self-stretch-alt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignItemsStartIcon = {\n name: 'align-items-start',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignItemsCenterIcon = {\n name: 'align-items-center',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignItemsEndIcon = {\n name: 'align-items-end',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignItemsStretchIcon = {\n name: 'align-items-stretch',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignItemsBaselineIcon = {\n name: 'align-items-baseline',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignItemsStartAltIcon = {\n name: 'align-items-start-alt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignItemsCenterAltIcon = {\n name: 'align-items-center-alt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignItemsEndAltIcon = {\n name: 'align-items-end-alt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignItemsStretchAltIcon = {\n name: 'align-items-stretch-alt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignItemsBaselineAltIcon = {\n name: 'align-items-baseline-alt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst justifyContentStartIcon = {\n name: 'justify-content-start',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst justifyContentCenterIcon = {\n name: 'justify-content-center',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst justifyContentEndIcon = {\n name: 'justify-content-end',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst justifyContentBetweenIcon = {\n name: 'justify-content-between',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst justifyContentAroundIcon = {\n name: 'justify-content-around',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst justifyContentStartAltIcon = {\n name: 'justify-content-start-alt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst justifyContentCenterAltIcon = {\n name: 'justify-content-center-alt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst justifyContentEndAltIcon = {\n name: 'justify-content-end-alt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst justifyContentBetweenAltIcon = {\n name: 'justify-content-between-alt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst justifyContentAroundAltIcon = {\n name: 'justify-content-around-alt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileWrenchIcon = {\n name: 'file-wrench',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst boldIcon = {\n name: 'bold',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst italicIcon = {\n name: 'italic',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst underlineIcon = {\n name: 'underline',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fontFamilyIcon = {\n name: 'font-family',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst foregroundColorIcon = {\n name: 'foreground-color',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst convertLowercaseIcon = {\n name: 'convert-lowercase',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst convertUppercaseIcon = {\n name: 'convert-uppercase',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst strikethroughIcon = {\n name: 'strikethrough',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst subscriptIcon = {\n name: 'subscript',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst supscriptIcon = {\n name: 'supscript',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst divIcon = {\n name: 'div',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst allIcon = {\n name: 'all',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst h1Icon = {\n name: 'h1',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst h2Icon = {\n name: 'h2',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst h3Icon = {\n name: 'h3',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst h4Icon = {\n name: 'h4',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst h5Icon = {\n name: 'h5',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst h6Icon = {\n name: 'h6',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst listOrderedIcon = {\n name: 'list-ordered',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst listUnorderedIcon = {\n name: 'list-unordered',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst indentIcon = {\n name: 'indent',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst outdentIcon = {\n name: 'outdent',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst insertTopIcon = {\n name: 'insert-top',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst insertMiddleIcon = {\n name: 'insert-middle',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst insertBottomIcon = {\n name: 'insert-bottom',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignTopIcon = {\n name: 'align-top',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignMiddleIcon = {\n name: 'align-middle',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignBottomIcon = {\n name: 'align-bottom',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignLeftIcon = {\n name: 'align-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignCenterIcon = {\n name: 'align-center',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignRightIcon = {\n name: 'align-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignJustifyIcon = {\n name: 'align-justify',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst alignRemoveIcon = {\n name: 'align-remove',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst textWrapIcon = {\n name: 'text-wrap',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst horizontalRuleIcon = {\n name: 'horizontal-rule',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableAlignTopLeftIcon = {\n name: 'table-align-top-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableAlignTopCenterIcon = {\n name: 'table-align-top-center',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableAlignTopRightIcon = {\n name: 'table-align-top-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableAlignMiddleLeftIcon = {\n name: 'table-align-middle-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableAlignMiddleCenterIcon = {\n name: 'table-align-middle-center',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableAlignMiddleRightIcon = {\n name: 'table-align-middle-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableAlignBottomLeftIcon = {\n name: 'table-align-bottom-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableAlignBottomCenterIcon = {\n name: 'table-align-bottom-center',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableAlignBottomRightIcon = {\n name: 'table-align-bottom-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableAlignRemoveIcon = {\n name: 'table-align-remove',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst bordersAllIcon = {\n name: 'borders-all',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst bordersOutsideIcon = {\n name: 'borders-outside',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst bordersInsideIcon = {\n name: 'borders-inside',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst bordersInsideHorizontalIcon = {\n name: 'borders-inside-horizontal',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst bordersInsideVerticalIcon = {\n name: 'borders-inside-vertical',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst borderTopIcon = {\n name: 'border-top',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst borderBottomIcon = {\n name: 'border-bottom',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst borderLeftIcon = {\n name: 'border-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst borderRightIcon = {\n name: 'border-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst bordersNoneIcon = {\n name: 'borders-none',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst bordersShowHideIcon = {\n name: 'borders-show-hide',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst formIcon = {\n name: 'form',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst formElementIcon = {\n name: 'form-element',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst codeSnippetIcon = {\n name: 'code-snippet',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst selectAllIcon = {\n name: 'select-all',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst buttonIcon = {\n name: 'button',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst selectBoxIcon = {\n name: 'select-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst calendarDateIcon = {\n name: 'calendar-date',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst groupBoxIcon = {\n name: 'group-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst textareaIcon = {\n name: 'textarea',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst textboxIcon = {\n name: 'textbox',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst textboxHiddenIcon = {\n name: 'textbox-hidden',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst passwordIcon = {\n name: 'password',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst paragraphAddIcon = {\n name: 'paragraph-add',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst editToolsIcon = {\n name: 'edit-tools',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst templateManagerIcon = {\n name: 'template-manager',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst changeManuallyIcon = {\n name: 'change-manually',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst trackChangesIcon = {\n name: 'track-changes',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst trackChangesEnableIcon = {\n name: 'track-changes-enable',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst trackChangesAcceptIcon = {\n name: 'track-changes-accept',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst trackChangesAcceptAllIcon = {\n name: 'track-changes-accept-all',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst trackChangesRejectIcon = {\n name: 'track-changes-reject',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst trackChangesRejectAllIcon = {\n name: 'track-changes-reject-all',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst documentManagerIcon = {\n name: 'document-manager',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst customIconIcon = {\n name: 'custom-icon',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst bookIcon = {\n name: 'book',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst imageAddIcon = {\n name: 'image-add',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst imageEditIcon = {\n name: 'image-edit',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst imageMapEditorIcon = {\n name: 'image-map-editor',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst commentIcon = {\n name: 'comment',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst commentRemoveIcon = {\n name: 'comment-remove',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst commentsRemoveIcon = {\n name: 'comments-remove',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst silverlightIcon = {\n name: 'silverlight',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst mediaManagerIcon = {\n name: 'media-manager',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst videoExternalIcon = {\n name: 'video-external',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst flashManagerIcon = {\n name: 'flash-manager',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst binocularsIcon = {\n name: 'binoculars',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst copyIcon = {\n name: 'copy',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst cutIcon = {\n name: 'cut',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst clipboardIcon = {\n name: 'clipboard',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst clipboardCodeIcon = {\n name: 'clipboard-code',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst clipboardWordIcon = {\n name: 'clipboard-word',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst clipboardWordAltIcon = {\n name: 'clipboard-word-alt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst clipboardHtmlIcon = {\n name: 'clipboard-html',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst clipboardMarkdownIcon = {\n name: 'clipboard-markdown',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst clipboardTextIcon = {\n name: 'clipboard-text',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst applyFormatIcon = {\n name: 'apply-format',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst clearCssIcon = {\n name: 'clear-css',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst copyFormatIcon = {\n name: 'copy-format',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst stripAllFormattingIcon = {\n name: 'strip-all-formatting',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst stripCssFormatIcon = {\n name: 'strip-css-format',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst stripFontElementsIcon = {\n name: 'strip-font-elements',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst stripSpanElementsIcon = {\n name: 'strip-span-elements',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst stripWordFormattingIcon = {\n name: 'strip-word-formatting',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst formatCodeBlockIcon = {\n name: 'format-code-block',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst buildingBlocksIcon = {\n name: 'building-blocks',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst puzzlePieceIcon = {\n name: 'puzzle-piece',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst linkAddIcon = {\n name: 'link-add',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst globeLinkIcon = {\n name: 'globe-link',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst globeUnlinkIcon = {\n name: 'globe-unlink',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst envelopLinkIcon = {\n name: 'envelop-link',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst anchorIcon = {\n name: 'anchor',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableAddIcon = {\n name: 'table-add',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableIcon = {\n name: 'table',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tablePropertiesIcon = {\n name: 'table-properties',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableCellIcon = {\n name: 'table-cell',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableCellPropertiesIcon = {\n name: 'table-cell-properties',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableColumnInsertLeftIcon = {\n name: 'table-column-insert-left',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableColumnInsertRightIcon = {\n name: 'table-column-insert-right',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableRowInsertAboveIcon = {\n name: 'table-row-insert-above',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableRowInsertBelowIcon = {\n name: 'table-row-insert-below',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableColumnDeleteIcon = {\n name: 'table-column-delete',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableRowDeleteIcon = {\n name: 'table-row-delete',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableCellDeleteIcon = {\n name: 'table-cell-delete',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableDeleteIcon = {\n name: 'table-delete',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst cellsMergeIcon = {\n name: 'cells-merge',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst cellsMergeHorizontallyIcon = {\n name: 'cells-merge-horizontally',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst cellsMergeVerticallyIcon = {\n name: 'cells-merge-vertically',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst cellSplitHorizontallyIcon = {\n name: 'cell-split-horizontally',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst cellSplitVerticallyIcon = {\n name: 'cell-split-vertically',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableUnmergeIcon = {\n name: 'table-unmerge',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst paneFreezeIcon = {\n name: 'pane-freeze',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst rowFreezeIcon = {\n name: 'row-freeze',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst columnFreezeIcon = {\n name: 'column-freeze',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst toolbarFloatIcon = {\n name: 'toolbar-float',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst spellCheckerIcon = {\n name: 'spell-checker',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst validationXhtmlIcon = {\n name: 'validation-xhtml',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst validationDataIcon = {\n name: 'validation-data',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst toggleFullScreenModeIcon = {\n name: 'toggle-full-screen-mode',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst formulaFxIcon = {\n name: 'formula-fx',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst sumIcon = {\n name: 'sum',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst symbolIcon = {\n name: 'symbol',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst dollarIcon = {\n name: 'dollar',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst percentIcon = {\n name: 'percent',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst customFormatIcon = {\n name: 'custom-format',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst decimalIncreaseIcon = {\n name: 'decimal-increase',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst decimalDecreaseIcon = {\n name: 'decimal-decrease',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fontSizeIcon = {\n name: 'font-size',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst imageAbsolutePositionIcon = {\n name: 'image-absolute-position',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableWizardIcon = {\n name: 'table-wizard',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst crosstabIcon = {\n name: 'crosstab',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst crosstabWizardIcon = {\n name: 'crosstab-wizard',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableBodyIcon = {\n name: 'table-body',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableColumnGroupsIcon = {\n name: 'table-column-groups',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableCornerIcon = {\n name: 'table-corner',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tableRowGroupsIcon = {\n name: 'table-row-groups',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst globeOutlineIcon = {\n name: 'globe-outline',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst globeIcon = {\n name: 'globe',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst mapMarkerIcon = {\n name: 'map-marker',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst mapMarkerTargetIcon = {\n name: 'map-marker-target',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst pinIcon = {\n name: 'pin',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst unpinIcon = {\n name: 'unpin',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst shareIcon = {\n name: 'share',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst userIcon = {\n name: 'user',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst inboxIcon = {\n name: 'inbox',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst bloggerIcon = {\n name: 'blogger',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst bloggerBoxIcon = {\n name: 'blogger-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst deliciousIcon = {\n name: 'delicious',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst deliciousBoxIcon = {\n name: 'delicious-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst diggIcon = {\n name: 'digg',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst diggBoxIcon = {\n name: 'digg-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst envelopIcon = {\n name: 'envelop',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst envelopBoxIcon = {\n name: 'envelop-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst facebookIcon = {\n name: 'facebook',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst facebookBoxIcon = {\n name: 'facebook-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst googleIcon = {\n name: 'google',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst googleBoxIcon = {\n name: 'google-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst googlePlusIcon = {\n name: 'google-plus',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst googlePlusBoxIcon = {\n name: 'google-plus-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst linkedinIcon = {\n name: 'linkedin',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst linkedinBoxIcon = {\n name: 'linkedin-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst myspaceIcon = {\n name: 'myspace',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst myspaceBoxIcon = {\n name: 'myspace-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst pinterestIcon = {\n name: 'pinterest',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst pinterestBoxIcon = {\n name: 'pinterest-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst redditIcon = {\n name: 'reddit',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst redditBoxIcon = {\n name: 'reddit-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst stumbleUponIcon = {\n name: 'stumble-upon',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst stumbleUponBoxIcon = {\n name: 'stumble-upon-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tellAFriendIcon = {\n name: 'tell-a-friend',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tellAFriendBoxIcon = {\n name: 'tell-a-friend-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tumblrIcon = {\n name: 'tumblr',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tumblrBoxIcon = {\n name: 'tumblr-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst twitterIcon = {\n name: 'twitter',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst twitterBoxIcon = {\n name: 'twitter-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst yammerIcon = {\n name: 'yammer',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst yammerBoxIcon = {\n name: 'yammer-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst behanceIcon = {\n name: 'behance',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst behanceBoxIcon = {\n name: 'behance-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst dribbbleIcon = {\n name: 'dribbble',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst dribbbleBoxIcon = {\n name: 'dribbble-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst rssIcon = {\n name: 'rss',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst rssBoxIcon = {\n name: 'rss-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst vimeoIcon = {\n name: 'vimeo',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst vimeoBoxIcon = {\n name: 'vimeo-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst youtubeIcon = {\n name: 'youtube',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst youtubeBoxIcon = {\n name: 'youtube-box',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst folderIcon = {\n name: 'folder',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst folderOpenIcon = {\n name: 'folder-open',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst folderAddIcon = {\n name: 'folder-add',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst folderUpIcon = {\n name: 'folder-up',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst folderMoreIcon = {\n name: 'folder-more',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst aggregateFieldsIcon = {\n name: 'aggregate-fields',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileIcon = {\n name: 'file',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileAddIcon = {\n name: 'file-add',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileTxtIcon = {\n name: 'file-txt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileCsvIcon = {\n name: 'file-csv',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileExcelIcon = {\n name: 'file-excel',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileWordIcon = {\n name: 'file-word',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileMdbIcon = {\n name: 'file-mdb',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst filePptIcon = {\n name: 'file-ppt',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst filePdfIcon = {\n name: 'file-pdf',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst filePsdIcon = {\n name: 'file-psd',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileFlashIcon = {\n name: 'file-flash',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileConfigIcon = {\n name: 'file-config',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileAscxIcon = {\n name: 'file-ascx',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileBacIcon = {\n name: 'file-bac',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileZipIcon = {\n name: 'file-zip',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst filmIcon = {\n name: 'film',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst css3Icon = {\n name: 'css3',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst html5Icon = {\n name: 'html5',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst codeIcon = {\n name: 'code',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst cssIcon = {\n name: 'css',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst jsIcon = {\n name: 'js',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst exeIcon = {\n name: 'exe',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst csprojIcon = {\n name: 'csproj',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst vbprojIcon = {\n name: 'vbproj',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst csIcon = {\n name: 'cs',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst vbIcon = {\n name: 'vb',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst slnIcon = {\n name: 'sln',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst cloudIcon = {\n name: 'cloud',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileHorizontalIcon = {\n name: 'file-horizontal',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst subreportIcon = {\n name: 'subreport',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst dataIcon = {\n name: 'data',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileHeaderIcon = {\n name: 'file-header',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileFooterIcon = {\n name: 'file-footer',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst groupHeaderSectionIcon = {\n name: 'group-header-section',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst groupFooterSectionIcon = {\n name: 'group-footer-section',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst pageHeaderSectionIcon = {\n name: 'page-header-section',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst pageFooterSectionIcon = {\n name: 'page-footer-section',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst detailSectionIcon = {\n name: 'detail-section',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tocSectionIcon = {\n name: 'toc-section',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst groupSectionIcon = {\n name: 'group-section',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst parametersIcon = {\n name: 'parameters',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst dataCsvIcon = {\n name: 'data-csv',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst dataJsonIcon = {\n name: 'data-json',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst dataSqlIcon = {\n name: 'data-sql',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst dataWebIcon = {\n name: 'data-web',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst groupCollectionIcon = {\n name: 'group-collection',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst parameterBooleanIcon = {\n name: 'parameter-boolean',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst parameterDateTimeIcon = {\n name: 'parameter-date-time',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst parameterFloatIcon = {\n name: 'parameter-float',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst parameterIntegerIcon = {\n name: 'parameter-integer',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst parameterStringIcon = {\n name: 'parameter-string',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tocSectionLevelIcon = {\n name: 'toc-section-level',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst inheritedIcon = {\n name: 'inherited',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileVideoIcon = {\n name: 'file-video',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileAudioIcon = {\n name: 'file-audio',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileImageIcon = {\n name: 'file-image',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst filePresentationIcon = {\n name: 'file-presentation',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileDataIcon = {\n name: 'file-data',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileDiscImageIcon = {\n name: 'file-disc-image',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileProgrammingIcon = {\n name: 'file-programming',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst parametersByteArrayIcon = {\n name: 'parameters-byte-array',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst parametersUnknownIcon = {\n name: 'parameters-unknown',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileErrorIcon = {\n name: 'file-error',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst filesErrorIcon = {\n name: 'files-error',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst dataRestIcon = {\n name: 'data-rest',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst fileTypescriptIcon = {\n name: 'file-typescript',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tablePositionStartIcon = {\n name: 'table-position-start',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tablePositionCenterIcon = {\n name: 'table-position-center',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst tablePositionEndIcon = {\n name: 'table-position-end',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst listRomanUpperIcon = {\n name: 'list-roman-upper',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst listRomanLowerIcon = {\n name: 'list-roman-lower',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst importIcon = {\n name: 'import',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst exportIcon = {\n name: 'export',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst graphIcon = {\n name: 'graph',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartColumnClusteredIcon = {\n name: 'chart-column-clustered',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartColumnStackedIcon = {\n name: 'chart-column-stacked',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartColumnStacked100Icon = {\n name: 'chart-column-stacked100',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartColumnRangeIcon = {\n name: 'chart-column-range',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartBarClusteredIcon = {\n name: 'chart-bar-clustered',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartBarStackedIcon = {\n name: 'chart-bar-stacked',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartBarStacked100Icon = {\n name: 'chart-bar-stacked100',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartBarRangeIcon = {\n name: 'chart-bar-range',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartAreaClusteredIcon = {\n name: 'chart-area-clustered',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartAreaStackedIcon = {\n name: 'chart-area-stacked',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartAreaStacked100Icon = {\n name: 'chart-area-stacked100',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartAreaRangeIcon = {\n name: 'chart-area-range',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartLineIcon = {\n name: 'chart-line',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartLineStackedIcon = {\n name: 'chart-line-stacked',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartLineStacked100Icon = {\n name: 'chart-line-stacked100',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartLineMarkersIcon = {\n name: 'chart-line-markers',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartLineStackedMarkersIcon = {\n name: 'chart-line-stacked-markers',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartLineStacked100MarkersIcon = {\n name: 'chart-line-stacked100-markers',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartPieIcon = {\n name: 'chart-pie',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartDoughnutIcon = {\n name: 'chart-doughnut',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartScatterIcon = {\n name: 'chart-scatter',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartScatterSmoothLinesMarkersIcon = {\n name: 'chart-scatter-smooth-lines-markers',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartScatterSmoothLinesIcon = {\n name: 'chart-scatter-smooth-lines',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartScatterStraightLinesMarkersIcon = {\n name: 'chart-scatter-straight-lines-markers',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartScatterStraightLinesIcon = {\n name: 'chart-scatter-straight-lines',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartBubbleIcon = {\n name: 'chart-bubble',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartCandlestickIcon = {\n name: 'chart-candlestick',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartOhlcIcon = {\n name: 'chart-ohlc',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartRadarIcon = {\n name: 'chart-radar',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartRadarMarkersIcon = {\n name: 'chart-radar-markers',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartRadarFilledIcon = {\n name: 'chart-radar-filled',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartRoseIcon = {\n name: 'chart-rose',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nconst chartChoroplethIcon = {\n name: 'chart-choropleth',\n content: '',\n viewBox: '0 0 512 512'\n};\n\nvar svgIcons = /*#__PURE__*/Object.freeze({\n __proto__: null,\n accessibilityIcon: accessibilityIcon,\n aggregateFieldsIcon: aggregateFieldsIcon,\n alignBottomIcon: alignBottomIcon,\n alignCenterIcon: alignCenterIcon,\n alignItemsBaselineAltIcon: alignItemsBaselineAltIcon,\n alignItemsBaselineIcon: alignItemsBaselineIcon,\n alignItemsCenterAltIcon: alignItemsCenterAltIcon,\n alignItemsCenterIcon: alignItemsCenterIcon,\n alignItemsEndAltIcon: alignItemsEndAltIcon,\n alignItemsEndIcon: alignItemsEndIcon,\n alignItemsStartAltIcon: alignItemsStartAltIcon,\n alignItemsStartIcon: alignItemsStartIcon,\n alignItemsStretchAltIcon: alignItemsStretchAltIcon,\n alignItemsStretchIcon: alignItemsStretchIcon,\n alignJustifyIcon: alignJustifyIcon,\n alignLeftIcon: alignLeftIcon,\n alignMiddleIcon: alignMiddleIcon,\n alignRemoveIcon: alignRemoveIcon,\n alignRightIcon: alignRightIcon,\n alignSelfCenterAltIcon: alignSelfCenterAltIcon,\n alignSelfCenterIcon: alignSelfCenterIcon,\n alignSelfEndAltIcon: alignSelfEndAltIcon,\n alignSelfEndIcon: alignSelfEndIcon,\n alignSelfStartAltIcon: alignSelfStartAltIcon,\n alignSelfStartIcon: alignSelfStartIcon,\n alignSelfStretchAltIcon: alignSelfStretchAltIcon,\n alignSelfStretchIcon: alignSelfStretchIcon,\n alignToGridIcon: alignToGridIcon,\n alignTopIcon: alignTopIcon,\n allIcon: allIcon,\n anchorIcon: anchorIcon,\n applyFormatIcon: applyFormatIcon,\n arrowDownIcon: arrowDownIcon,\n arrowLeftIcon: arrowLeftIcon,\n arrowOverflowDownIcon: arrowOverflowDownIcon,\n arrowRightIcon: arrowRightIcon,\n arrowRotateCcwIcon: arrowRotateCcwIcon,\n arrowRotateCcwSmallIcon: arrowRotateCcwSmallIcon,\n arrowRotateCwIcon: arrowRotateCwIcon,\n arrowRotateCwSmallIcon: arrowRotateCwSmallIcon,\n arrowUpIcon: arrowUpIcon,\n arrowsAxesIcon: arrowsAxesIcon,\n arrowsLeftRightIcon: arrowsLeftRightIcon,\n arrowsMoveIcon: arrowsMoveIcon,\n arrowsNoChangeIcon: arrowsNoChangeIcon,\n arrowsNoRepeatIcon: arrowsNoRepeatIcon,\n arrowsSwapIcon: arrowsSwapIcon,\n arrowsTopBottomIcon: arrowsTopBottomIcon,\n barcodeIcon: barcodeIcon,\n barcodeOutlineIcon: barcodeOutlineIcon,\n barcodeQrCodeScannerIcon: barcodeQrCodeScannerIcon,\n barcodeScannerIcon: barcodeScannerIcon,\n behanceBoxIcon: behanceBoxIcon,\n behanceIcon: behanceIcon,\n bellIcon: bellIcon,\n binocularsIcon: binocularsIcon,\n bloggerBoxIcon: bloggerBoxIcon,\n bloggerIcon: bloggerIcon,\n blurIcon: blurIcon,\n boldIcon: boldIcon,\n bookIcon: bookIcon,\n borderBottomIcon: borderBottomIcon,\n borderColorIcon: borderColorIcon,\n borderLeftIcon: borderLeftIcon,\n borderRadiusBottomLeftIcon: borderRadiusBottomLeftIcon,\n borderRadiusBottomRightIcon: borderRadiusBottomRightIcon,\n borderRadiusIcon: borderRadiusIcon,\n borderRadiusTopLeftIcon: borderRadiusTopLeftIcon,\n borderRadiusTopRightIcon: borderRadiusTopRightIcon,\n borderRightIcon: borderRightIcon,\n borderStyleBottomIcon: borderStyleBottomIcon,\n borderStyleIcon: borderStyleIcon,\n borderStyleLeftIcon: borderStyleLeftIcon,\n borderStyleRightIcon: borderStyleRightIcon,\n borderStyleTopIcon: borderStyleTopIcon,\n borderTopIcon: borderTopIcon,\n borderTypeIcon: borderTypeIcon,\n bordersAllIcon: bordersAllIcon,\n bordersInsideHorizontalIcon: bordersInsideHorizontalIcon,\n bordersInsideIcon: bordersInsideIcon,\n bordersInsideVerticalIcon: bordersInsideVerticalIcon,\n bordersNoneIcon: bordersNoneIcon,\n bordersOutsideIcon: bordersOutsideIcon,\n bordersShowHideIcon: bordersShowHideIcon,\n boxSizingIcon: boxSizingIcon,\n brightnessContrastIcon: brightnessContrastIcon,\n bringBackwardIcon: bringBackwardIcon,\n bringForwardIcon: bringForwardIcon,\n bringToBackIcon: bringToBackIcon,\n bringToFrontIcon: bringToFrontIcon,\n brushIcon: brushIcon,\n buildingBlocksIcon: buildingBlocksIcon,\n buttonIcon: buttonIcon,\n calculatorIcon: calculatorIcon,\n calendarDateIcon: calendarDateIcon,\n calendarIcon: calendarIcon,\n cameraIcon: cameraIcon,\n cancelCircleIcon: cancelCircleIcon,\n cancelIcon: cancelIcon,\n cancelOutlineIcon: cancelOutlineIcon,\n caretAltDownIcon: caretAltDownIcon,\n caretAltExpandIcon: caretAltExpandIcon,\n caretAltLeftIcon: caretAltLeftIcon,\n caretAltRightIcon: caretAltRightIcon,\n caretAltToBottomIcon: caretAltToBottomIcon,\n caretAltToLeftIcon: caretAltToLeftIcon,\n caretAltToRightIcon: caretAltToRightIcon,\n caretAltToTopIcon: caretAltToTopIcon,\n caretAltUpIcon: caretAltUpIcon,\n caretBlIcon: caretBlIcon,\n caretBrIcon: caretBrIcon,\n caretDoubleAltDownIcon: caretDoubleAltDownIcon,\n caretDoubleAltLeftIcon: caretDoubleAltLeftIcon,\n caretDoubleAltRightIcon: caretDoubleAltRightIcon,\n caretDoubleAltUpIcon: caretDoubleAltUpIcon,\n caretTlIcon: caretTlIcon,\n caretTrIcon: caretTrIcon,\n cartIcon: cartIcon,\n categorizeIcon: categorizeIcon,\n cellSplitHorizontallyIcon: cellSplitHorizontallyIcon,\n cellSplitVerticallyIcon: cellSplitVerticallyIcon,\n cellsMergeHorizontallyIcon: cellsMergeHorizontallyIcon,\n cellsMergeIcon: cellsMergeIcon,\n cellsMergeVerticallyIcon: cellsMergeVerticallyIcon,\n changeManuallyIcon: changeManuallyIcon,\n chartAreaClusteredIcon: chartAreaClusteredIcon,\n chartAreaRangeIcon: chartAreaRangeIcon,\n chartAreaStacked100Icon: chartAreaStacked100Icon,\n chartAreaStackedIcon: chartAreaStackedIcon,\n chartBarClusteredIcon: chartBarClusteredIcon,\n chartBarRangeIcon: chartBarRangeIcon,\n chartBarStacked100Icon: chartBarStacked100Icon,\n chartBarStackedIcon: chartBarStackedIcon,\n chartBubbleIcon: chartBubbleIcon,\n chartCandlestickIcon: chartCandlestickIcon,\n chartChoroplethIcon: chartChoroplethIcon,\n chartColumnClusteredIcon: chartColumnClusteredIcon,\n chartColumnRangeIcon: chartColumnRangeIcon,\n chartColumnStacked100Icon: chartColumnStacked100Icon,\n chartColumnStackedIcon: chartColumnStackedIcon,\n chartDoughnutIcon: chartDoughnutIcon,\n chartLineIcon: chartLineIcon,\n chartLineMarkersIcon: chartLineMarkersIcon,\n chartLineStacked100Icon: chartLineStacked100Icon,\n chartLineStacked100MarkersIcon: chartLineStacked100MarkersIcon,\n chartLineStackedIcon: chartLineStackedIcon,\n chartLineStackedMarkersIcon: chartLineStackedMarkersIcon,\n chartOhlcIcon: chartOhlcIcon,\n chartPieIcon: chartPieIcon,\n chartRadarFilledIcon: chartRadarFilledIcon,\n chartRadarIcon: chartRadarIcon,\n chartRadarMarkersIcon: chartRadarMarkersIcon,\n chartRoseIcon: chartRoseIcon,\n chartScatterIcon: chartScatterIcon,\n chartScatterSmoothLinesIcon: chartScatterSmoothLinesIcon,\n chartScatterSmoothLinesMarkersIcon: chartScatterSmoothLinesMarkersIcon,\n chartScatterStraightLinesIcon: chartScatterStraightLinesIcon,\n chartScatterStraightLinesMarkersIcon: chartScatterStraightLinesMarkersIcon,\n checkCircleIcon: checkCircleIcon,\n checkIcon: checkIcon,\n checkOutlineIcon: checkOutlineIcon,\n checkboxCheckedIcon: checkboxCheckedIcon,\n checkboxIcon: checkboxIcon,\n checkboxIndeterminateIcon: checkboxIndeterminateIcon,\n checkboxNullIcon: checkboxNullIcon,\n chevronDoubleDownIcon: chevronDoubleDownIcon,\n chevronDoubleLeftIcon: chevronDoubleLeftIcon,\n chevronDoubleRightIcon: chevronDoubleRightIcon,\n chevronDoubleUpIcon: chevronDoubleUpIcon,\n chevronDownIcon: chevronDownIcon,\n chevronLeftIcon: chevronLeftIcon,\n chevronRightIcon: chevronRightIcon,\n chevronUpIcon: chevronUpIcon,\n circleIcon: circleIcon,\n clearCssIcon: clearCssIcon,\n clipboardCodeIcon: clipboardCodeIcon,\n clipboardHtmlIcon: clipboardHtmlIcon,\n clipboardIcon: clipboardIcon,\n clipboardMarkdownIcon: clipboardMarkdownIcon,\n clipboardTextIcon: clipboardTextIcon,\n clipboardWordAltIcon: clipboardWordAltIcon,\n clipboardWordIcon: clipboardWordIcon,\n clockArrowRotateIcon: clockArrowRotateIcon,\n clockIcon: clockIcon,\n closedCaptionsIcon: closedCaptionsIcon,\n cloudIcon: cloudIcon,\n codeIcon: codeIcon,\n codeSnippetIcon: codeSnippetIcon,\n colResizeIcon: colResizeIcon,\n columnFreezeIcon: columnFreezeIcon,\n columnsIcon: columnsIcon,\n commentIcon: commentIcon,\n commentRemoveIcon: commentRemoveIcon,\n commentsRemoveIcon: commentsRemoveIcon,\n connectorIcon: connectorIcon,\n convertLowercaseIcon: convertLowercaseIcon,\n convertUppercaseIcon: convertUppercaseIcon,\n copyFormatIcon: copyFormatIcon,\n copyIcon: copyIcon,\n cropIcon: cropIcon,\n crosstabIcon: crosstabIcon,\n crosstabWizardIcon: crosstabWizardIcon,\n csIcon: csIcon,\n csprojIcon: csprojIcon,\n css3Icon: css3Icon,\n cssIcon: cssIcon,\n customFormatIcon: customFormatIcon,\n customIconIcon: customIconIcon,\n cutIcon: cutIcon,\n dataCsvIcon: dataCsvIcon,\n dataIcon: dataIcon,\n dataJsonIcon: dataJsonIcon,\n dataOdsIcon: dataOdsIcon,\n dataRestIcon: dataRestIcon,\n dataSdsIcon: dataSdsIcon,\n dataSqlIcon: dataSqlIcon,\n dataWebIcon: dataWebIcon,\n decimalDecreaseIcon: decimalDecreaseIcon,\n decimalIncreaseIcon: decimalIncreaseIcon,\n decreaseHorizontalSpacingIcon: decreaseHorizontalSpacingIcon,\n decreaseVerticalSpacingIcon: decreaseVerticalSpacingIcon,\n deliciousBoxIcon: deliciousBoxIcon,\n deliciousIcon: deliciousIcon,\n detailSectionIcon: detailSectionIcon,\n diggBoxIcon: diggBoxIcon,\n diggIcon: diggIcon,\n dimensionsIcon: dimensionsIcon,\n displayBlockIcon: displayBlockIcon,\n displayFlexIcon: displayFlexIcon,\n displayInlineBlockIcon: displayInlineBlockIcon,\n displayInlineFlexIcon: displayInlineFlexIcon,\n divIcon: divIcon,\n divideIcon: divideIcon,\n documentManagerIcon: documentManagerIcon,\n dollarIcon: dollarIcon,\n downloadIcon: downloadIcon,\n downloadLightIcon: downloadLightIcon,\n dragAndDropIcon: dragAndDropIcon,\n dribbbleBoxIcon: dribbbleBoxIcon,\n dribbbleIcon: dribbbleIcon,\n dropletIcon: dropletIcon,\n dropletSlashIcon: dropletSlashIcon,\n dropletSliderIcon: dropletSliderIcon,\n editToolsIcon: editToolsIcon,\n envelopBoxIcon: envelopBoxIcon,\n envelopIcon: envelopIcon,\n envelopLinkIcon: envelopLinkIcon,\n envelopeBoxIcon: envelopeBoxIcon,\n envelopeIcon: envelopeIcon,\n envelopeLinkIcon: envelopeLinkIcon,\n equalIcon: equalIcon,\n exclamationCircleIcon: exclamationCircleIcon,\n exeIcon: exeIcon,\n exportIcon: exportIcon,\n eyeIcon: eyeIcon,\n eyeSlashIcon: eyeSlashIcon,\n eyedropperIcon: eyedropperIcon,\n facebookBoxIcon: facebookBoxIcon,\n facebookIcon: facebookIcon,\n fileAddIcon: fileAddIcon,\n fileAscxIcon: fileAscxIcon,\n fileAudioIcon: fileAudioIcon,\n fileBacIcon: fileBacIcon,\n fileConfigIcon: fileConfigIcon,\n fileCsvIcon: fileCsvIcon,\n fileDataIcon: fileDataIcon,\n fileDiscImageIcon: fileDiscImageIcon,\n fileErrorIcon: fileErrorIcon,\n fileExcelIcon: fileExcelIcon,\n fileFlashIcon: fileFlashIcon,\n fileFooterIcon: fileFooterIcon,\n fileHeaderIcon: fileHeaderIcon,\n fileHorizontalIcon: fileHorizontalIcon,\n fileIcon: fileIcon,\n fileImageIcon: fileImageIcon,\n fileMdbIcon: fileMdbIcon,\n filePdfIcon: filePdfIcon,\n filePptIcon: filePptIcon,\n filePresentationIcon: filePresentationIcon,\n fileProgrammingIcon: fileProgrammingIcon,\n filePsdIcon: filePsdIcon,\n fileReportIcon: fileReportIcon,\n fileTxtIcon: fileTxtIcon,\n fileTypescriptIcon: fileTypescriptIcon,\n fileVideoIcon: fileVideoIcon,\n fileWordIcon: fileWordIcon,\n fileWrenchIcon: fileWrenchIcon,\n fileZipIcon: fileZipIcon,\n filesErrorIcon: filesErrorIcon,\n filmIcon: filmIcon,\n filterAddExpressionIcon: filterAddExpressionIcon,\n filterAddGroupIcon: filterAddGroupIcon,\n filterClearIcon: filterClearIcon,\n filterIcon: filterIcon,\n filterSmallIcon: filterSmallIcon,\n filterSortAscSmallIcon: filterSortAscSmallIcon,\n filterSortDescSmallIcon: filterSortDescSmallIcon,\n flashManagerIcon: flashManagerIcon,\n flipHorizontalIcon: flipHorizontalIcon,\n flipVerticalIcon: flipVerticalIcon,\n folderAddIcon: folderAddIcon,\n folderIcon: folderIcon,\n folderMoreIcon: folderMoreIcon,\n folderOpenIcon: folderOpenIcon,\n folderUpIcon: folderUpIcon,\n fontFamilyIcon: fontFamilyIcon,\n fontGrowIcon: fontGrowIcon,\n fontShrinkIcon: fontShrinkIcon,\n fontSizeIcon: fontSizeIcon,\n foregroundColorIcon: foregroundColorIcon,\n formElementIcon: formElementIcon,\n formIcon: formIcon,\n formatCodeBlockIcon: formatCodeBlockIcon,\n formulaFxIcon: formulaFxIcon,\n forwardIcon: forwardIcon,\n fullscreenExitIcon: fullscreenExitIcon,\n fullscreenIcon: fullscreenIcon,\n gapColumnIcon: gapColumnIcon,\n gapRowIcon: gapRowIcon,\n gaugeLinearIcon: gaugeLinearIcon,\n gaugeRadialIcon: gaugeRadialIcon,\n gearIcon: gearIcon,\n gearsIcon: gearsIcon,\n globeIcon: globeIcon,\n globeLinkIcon: globeLinkIcon,\n globeOutlineIcon: globeOutlineIcon,\n globeUnlinkIcon: globeUnlinkIcon,\n googleBoxIcon: googleBoxIcon,\n googleIcon: googleIcon,\n googlePlusBoxIcon: googlePlusBoxIcon,\n googlePlusIcon: googlePlusIcon,\n graphIcon: graphIcon,\n grayscaleIcon: grayscaleIcon,\n greaterOrEqualIcon: greaterOrEqualIcon,\n gridIcon: gridIcon,\n gridLayoutIcon: gridLayoutIcon,\n groupBoxIcon: groupBoxIcon,\n groupCollectionIcon: groupCollectionIcon,\n groupFooterSectionIcon: groupFooterSectionIcon,\n groupHeaderSectionIcon: groupHeaderSectionIcon,\n groupIcon: groupIcon,\n groupSectionIcon: groupSectionIcon,\n h1Icon: h1Icon,\n h2Icon: h2Icon,\n h3Icon: h3Icon,\n h4Icon: h4Icon,\n h5Icon: h5Icon,\n h6Icon: h6Icon,\n handIcon: handIcon,\n handleDragIcon: handleDragIcon,\n handleResizeAltIcon: handleResizeAltIcon,\n handleResizeIcon: handleResizeIcon,\n hdIcon: hdIcon,\n heartIcon: heartIcon,\n heartOutlineIcon: heartOutlineIcon,\n homeIcon: homeIcon,\n horizontalRuleIcon: horizontalRuleIcon,\n html5Icon: html5Icon,\n hyperlinkOpenIcon: hyperlinkOpenIcon,\n hyperlinkOpenSmIcon: hyperlinkOpenSmIcon,\n imageAbsolutePositionIcon: imageAbsolutePositionIcon,\n imageAddIcon: imageAddIcon,\n imageEditIcon: imageEditIcon,\n imageExportIcon: imageExportIcon,\n imageIcon: imageIcon,\n imageMapEditorIcon: imageMapEditorIcon,\n imageResizeIcon: imageResizeIcon,\n imagesIcon: imagesIcon,\n importIcon: importIcon,\n inboxIcon: inboxIcon,\n increaseHorizontalSpacingIcon: increaseHorizontalSpacingIcon,\n increaseVerticalSpacingIcon: increaseVerticalSpacingIcon,\n indentIcon: indentIcon,\n infoCircleIcon: infoCircleIcon,\n inheritedIcon: inheritedIcon,\n insertBottomIcon: insertBottomIcon,\n insertMiddleIcon: insertMiddleIcon,\n insertTopIcon: insertTopIcon,\n invertColorsIcon: invertColorsIcon,\n italicIcon: italicIcon,\n jsIcon: jsIcon,\n justifyContentAroundAltIcon: justifyContentAroundAltIcon,\n justifyContentAroundIcon: justifyContentAroundIcon,\n justifyContentBetweenAltIcon: justifyContentBetweenAltIcon,\n justifyContentBetweenIcon: justifyContentBetweenIcon,\n justifyContentCenterAltIcon: justifyContentCenterAltIcon,\n justifyContentCenterIcon: justifyContentCenterIcon,\n justifyContentEndAltIcon: justifyContentEndAltIcon,\n justifyContentEndIcon: justifyContentEndIcon,\n justifyContentStartAltIcon: justifyContentStartAltIcon,\n justifyContentStartIcon: justifyContentStartIcon,\n kpiStatusDenyIcon: kpiStatusDenyIcon,\n kpiStatusHoldIcon: kpiStatusHoldIcon,\n kpiStatusOpenIcon: kpiStatusOpenIcon,\n launchIcon: launchIcon,\n layout1By4Icon: layout1By4Icon,\n layout2By2Icon: layout2By2Icon,\n layoutIcon: layoutIcon,\n layoutSideBySideIcon: layoutSideBySideIcon,\n layoutStackedIcon: layoutStackedIcon,\n lessOrEqualIcon: lessOrEqualIcon,\n letterSpaceIcon: letterSpaceIcon,\n levelDownIcon: levelDownIcon,\n levelToTopIcon: levelToTopIcon,\n levelUpIcon: levelUpIcon,\n lineHeightIcon: lineHeightIcon,\n linkAddIcon: linkAddIcon,\n linkIcon: linkIcon,\n linkVerticalIcon: linkVerticalIcon,\n linkedinBoxIcon: linkedinBoxIcon,\n linkedinIcon: linkedinIcon,\n listLatinBigIcon: listLatinBigIcon,\n listLatinSmallIcon: listLatinSmallIcon,\n listOrderedIcon: listOrderedIcon,\n listRomanBigIcon: listRomanBigIcon,\n listRomanLowerIcon: listRomanLowerIcon,\n listRomanSmallIcon: listRomanSmallIcon,\n listRomanUpperIcon: listRomanUpperIcon,\n listUnorderedIcon: listUnorderedIcon,\n listUnorderedOutlineIcon: listUnorderedOutlineIcon,\n listUnorderedSquareIcon: listUnorderedSquareIcon,\n lockIcon: lockIcon,\n loginIcon: loginIcon,\n logoutIcon: logoutIcon,\n makeHorizontalSpacingEqualIcon: makeHorizontalSpacingEqualIcon,\n makeSameHeightIcon: makeSameHeightIcon,\n makeSameSizeIcon: makeSameSizeIcon,\n makeSameWidthIcon: makeSameWidthIcon,\n makeVerticalSpacingEqualIcon: makeVerticalSpacingEqualIcon,\n mapMarkerIcon: mapMarkerIcon,\n mapMarkerTargetIcon: mapMarkerTargetIcon,\n maxHeightIcon: maxHeightIcon,\n maxWidthIcon: maxWidthIcon,\n mediaManagerIcon: mediaManagerIcon,\n menuIcon: menuIcon,\n minHeightIcon: minHeightIcon,\n minWidthIcon: minWidthIcon,\n minusCircleIcon: minusCircleIcon,\n minusIcon: minusIcon,\n minusOutlineIcon: minusOutlineIcon,\n minusSmIcon: minusSmIcon,\n mirrorIcon: mirrorIcon,\n moreHorizontalIcon: moreHorizontalIcon,\n moreVerticalIcon: moreVerticalIcon,\n musicNotesIcon: musicNotesIcon,\n myspaceBoxIcon: myspaceBoxIcon,\n myspaceIcon: myspaceIcon,\n nonRecurrenceIcon: nonRecurrenceIcon,\n notEqualIcon: notEqualIcon,\n outdentIcon: outdentIcon,\n outlineOffsetIcon: outlineOffsetIcon,\n outlineWidthIcon: outlineWidthIcon,\n overlapIcon: overlapIcon,\n paddingBottomIcon: paddingBottomIcon,\n paddingIcon: paddingIcon,\n paddingLeftIcon: paddingLeftIcon,\n paddingRightIcon: paddingRightIcon,\n paddingTopIcon: paddingTopIcon,\n pageFooterSectionIcon: pageFooterSectionIcon,\n pageHeaderSectionIcon: pageHeaderSectionIcon,\n paletteIcon: paletteIcon,\n paneFreezeIcon: paneFreezeIcon,\n paperPlaneIcon: paperPlaneIcon,\n paperclipAltIcon: paperclipAltIcon,\n paperclipIcon: paperclipIcon,\n paragraphAddIcon: paragraphAddIcon,\n parameterBooleanIcon: parameterBooleanIcon,\n parameterDateTimeIcon: parameterDateTimeIcon,\n parameterFloatIcon: parameterFloatIcon,\n parameterIntegerIcon: parameterIntegerIcon,\n parameterStringIcon: parameterStringIcon,\n parametersByteArrayIcon: parametersByteArrayIcon,\n parametersIcon: parametersIcon,\n parametersUnknownIcon: parametersUnknownIcon,\n passwordIcon: passwordIcon,\n pauseIcon: pauseIcon,\n pauseSmIcon: pauseSmIcon,\n pencilIcon: pencilIcon,\n percentIcon: percentIcon,\n photosIcon: photosIcon,\n pinIcon: pinIcon,\n pinterestBoxIcon: pinterestBoxIcon,\n pinterestIcon: pinterestIcon,\n playIcon: playIcon,\n playSmIcon: playSmIcon,\n playlistIcon: playlistIcon,\n plusCircleIcon: plusCircleIcon,\n plusIcon: plusIcon,\n plusOutlineIcon: plusOutlineIcon,\n plusSmIcon: plusSmIcon,\n pointerIcon: pointerIcon,\n positionBottomIcon: positionBottomIcon,\n positionLeftIcon: positionLeftIcon,\n positionRightIcon: positionRightIcon,\n positionTopIcon: positionTopIcon,\n printIcon: printIcon,\n puzzlePieceIcon: puzzlePieceIcon,\n qrCodeIcon: qrCodeIcon,\n qrCodeOutlineIcon: qrCodeOutlineIcon,\n qrCodeScannerIcon: qrCodeScannerIcon,\n questionCircleIcon: questionCircleIcon,\n radiobuttonCheckedIcon: radiobuttonCheckedIcon,\n radiobuttonIcon: radiobuttonIcon,\n redditBoxIcon: redditBoxIcon,\n redditIcon: redditIcon,\n redoIcon: redoIcon,\n regularExpressionIcon: regularExpressionIcon,\n removeHorizontalSpacingIcon: removeHorizontalSpacingIcon,\n removeVerticalSpacingIcon: removeVerticalSpacingIcon,\n reorderIcon: reorderIcon,\n replaceAllIcon: replaceAllIcon,\n replaceSingleIcon: replaceSingleIcon,\n reportElementIcon: reportElementIcon,\n rewindIcon: rewindIcon,\n rightDoubleQuotesIcon: rightDoubleQuotesIcon,\n rotateIcon: rotateIcon,\n rotateLeftIcon: rotateLeftIcon,\n rotateRightIcon: rotateRightIcon,\n roundCornersIcon: roundCornersIcon,\n rowFreezeIcon: rowFreezeIcon,\n rowsIcon: rowsIcon,\n rssBoxIcon: rssBoxIcon,\n rssIcon: rssIcon,\n saveIcon: saveIcon,\n searchIcon: searchIcon,\n selectAllIcon: selectAllIcon,\n selectBoxIcon: selectBoxIcon,\n setColumnPositionIcon: setColumnPositionIcon,\n shapeLineIcon: shapeLineIcon,\n shapesIcon: shapesIcon,\n shareIcon: shareIcon,\n sharpenIcon: sharpenIcon,\n signatureIcon: signatureIcon,\n silverlightIcon: silverlightIcon,\n sizeToGridIcon: sizeToGridIcon,\n slidersIcon: slidersIcon,\n slnIcon: slnIcon,\n snapGridIcon: snapGridIcon,\n snapToGridlinesIcon: snapToGridlinesIcon,\n snapToSnaplinesIcon: snapToSnaplinesIcon,\n sortAscIcon: sortAscIcon,\n sortAscSmallIcon: sortAscSmallIcon,\n sortClearIcon: sortClearIcon,\n sortDescIcon: sortDescIcon,\n sortDescSmallIcon: sortDescSmallIcon,\n spellCheckerIcon: spellCheckerIcon,\n starIcon: starIcon,\n starOutlineIcon: starOutlineIcon,\n stickIcon: stickIcon,\n stopIcon: stopIcon,\n stopSmIcon: stopSmIcon,\n strikethroughIcon: strikethroughIcon,\n stripAllFormattingIcon: stripAllFormattingIcon,\n stripCssFormatIcon: stripCssFormatIcon,\n stripFontElementsIcon: stripFontElementsIcon,\n stripSpanElementsIcon: stripSpanElementsIcon,\n stripWordFormattingIcon: stripWordFormattingIcon,\n stumbleUponBoxIcon: stumbleUponBoxIcon,\n stumbleUponIcon: stumbleUponIcon,\n subreportIcon: subreportIcon,\n subscriptIcon: subscriptIcon,\n sumIcon: sumIcon,\n supscriptIcon: supscriptIcon,\n symbolIcon: symbolIcon,\n tableAddIcon: tableAddIcon,\n tableAlignBottomCenterIcon: tableAlignBottomCenterIcon,\n tableAlignBottomLeftIcon: tableAlignBottomLeftIcon,\n tableAlignBottomRightIcon: tableAlignBottomRightIcon,\n tableAlignMiddleCenterIcon: tableAlignMiddleCenterIcon,\n tableAlignMiddleLeftIcon: tableAlignMiddleLeftIcon,\n tableAlignMiddleRightIcon: tableAlignMiddleRightIcon,\n tableAlignRemoveIcon: tableAlignRemoveIcon,\n tableAlignTopCenterIcon: tableAlignTopCenterIcon,\n tableAlignTopLeftIcon: tableAlignTopLeftIcon,\n tableAlignTopRightIcon: tableAlignTopRightIcon,\n tableBodyIcon: tableBodyIcon,\n tableCellDeleteIcon: tableCellDeleteIcon,\n tableCellIcon: tableCellIcon,\n tableCellPropertiesIcon: tableCellPropertiesIcon,\n tableColumnDeleteIcon: tableColumnDeleteIcon,\n tableColumnGroupsIcon: tableColumnGroupsIcon,\n tableColumnInsertLeftIcon: tableColumnInsertLeftIcon,\n tableColumnInsertRightIcon: tableColumnInsertRightIcon,\n tableCornerIcon: tableCornerIcon,\n tableDeleteIcon: tableDeleteIcon,\n tableIcon: tableIcon,\n tablePositionCenterIcon: tablePositionCenterIcon,\n tablePositionEndIcon: tablePositionEndIcon,\n tablePositionStartIcon: tablePositionStartIcon,\n tablePropertiesIcon: tablePropertiesIcon,\n tableRowDeleteIcon: tableRowDeleteIcon,\n tableRowGroupsIcon: tableRowGroupsIcon,\n tableRowInsertAboveIcon: tableRowInsertAboveIcon,\n tableRowInsertBelowIcon: tableRowInsertBelowIcon,\n tableUnmergeIcon: tableUnmergeIcon,\n tableWizardIcon: tableWizardIcon,\n tellAFriendBoxIcon: tellAFriendBoxIcon,\n tellAFriendIcon: tellAFriendIcon,\n templateManagerIcon: templateManagerIcon,\n textClipIcon: textClipIcon,\n textOverflowIcon: textOverflowIcon,\n textTruncateIcon: textTruncateIcon,\n textWrapArrowIcon: textWrapArrowIcon,\n textWrapIcon: textWrapIcon,\n textareaIcon: textareaIcon,\n textboxHiddenIcon: textboxHiddenIcon,\n textboxIcon: textboxIcon,\n thumbnailsDownIcon: thumbnailsDownIcon,\n thumbnailsLeftIcon: thumbnailsLeftIcon,\n thumbnailsRightIcon: thumbnailsRightIcon,\n thumbnailsUpIcon: thumbnailsUpIcon,\n tocSectionIcon: tocSectionIcon,\n tocSectionLevelIcon: tocSectionLevelIcon,\n toggleFullScreenModeIcon: toggleFullScreenModeIcon,\n toolbarFloatIcon: toolbarFloatIcon,\n trackChangesAcceptAllIcon: trackChangesAcceptAllIcon,\n trackChangesAcceptIcon: trackChangesAcceptIcon,\n trackChangesEnableIcon: trackChangesEnableIcon,\n trackChangesIcon: trackChangesIcon,\n trackChangesRejectAllIcon: trackChangesRejectAllIcon,\n trackChangesRejectIcon: trackChangesRejectIcon,\n transparencyIcon: transparencyIcon,\n trashIcon: trashIcon,\n tumblrBoxIcon: tumblrBoxIcon,\n tumblrIcon: tumblrIcon,\n twitterBoxIcon: twitterBoxIcon,\n twitterIcon: twitterIcon,\n underlineIcon: underlineIcon,\n undoIcon: undoIcon,\n ungroupIcon: ungroupIcon,\n unlinkIcon: unlinkIcon,\n unlinkVerticalIcon: unlinkVerticalIcon,\n unlockIcon: unlockIcon,\n unpinIcon: unpinIcon,\n unstickIcon: unstickIcon,\n uploadIcon: uploadIcon,\n userIcon: userIcon,\n validationDataIcon: validationDataIcon,\n validationXhtmlIcon: validationXhtmlIcon,\n vbIcon: vbIcon,\n vbprojIcon: vbprojIcon,\n videoExternalIcon: videoExternalIcon,\n vimeoBoxIcon: vimeoBoxIcon,\n vimeoIcon: vimeoIcon,\n volumeDownIcon: volumeDownIcon,\n volumeMuteIcon: volumeMuteIcon,\n volumeUpIcon: volumeUpIcon,\n warningCircleIcon: warningCircleIcon,\n warningTriangleIcon: warningTriangleIcon,\n wholeWordIcon: wholeWordIcon,\n windowIcon: windowIcon,\n windowMinimizeIcon: windowMinimizeIcon,\n windowRestoreIcon: windowRestoreIcon,\n wrenchIcon: wrenchIcon,\n xCircleIcon: xCircleIcon,\n xIcon: xIcon,\n xOutlineIcon: xOutlineIcon,\n yammerBoxIcon: yammerBoxIcon,\n yammerIcon: yammerIcon,\n youtubeBoxIcon: youtubeBoxIcon,\n youtubeIcon: youtubeIcon,\n zoomActualSizeIcon: zoomActualSizeIcon,\n zoomBestFitIcon: zoomBestFitIcon,\n zoomInIcon: zoomInIcon,\n zoomOutIcon: zoomOutIcon\n});\n\nvar __meta__ = {\n id: \"icons\",\n name: \"Icons\",\n category: \"web\",\n description: \"The Icons set provides both FontIcon and SvgIcon components along with the SVG icons collection from @progress/kendo-svg-icons\",\n depends: [\"core\", \"html.icon\"]\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n html = kendo.html,\n ui = kendo.ui,\n Widget = ui.Widget,\n extend = $.extend;\n\n var FontIcon = Widget.extend({\n init: function(element, options) {\n var that = this;\n Widget.fn.init.call(that, element, options);\n\n delete options.name;\n that._icon = new html.HTMLFontIcon(element, $.extend({}, options));\n that.element = that.wrapper = that._icon.element;\n\n kendo.notify(that);\n },\n options: extend({}, html.HTMLFontIcon.fn.options, {\n name: 'FontIcon'\n }),\n setOptions: function(options) {\n var that = this;\n\n Widget.fn.setOptions.call(that, options);\n\n that._icon = new html.HTMLFontIcon(that.element, $.extend({}, that.options));\n }\n });\n\n var SvgIcon = Widget.extend({\n init: function(element, options) {\n var that = this;\n Widget.fn.init.call(that, element, options);\n\n delete options.name;\n that._icon = new html.HTMLSvgIcon(element, $.extend({}, options));\n that.element = that.wrapper = that._icon.element;\n\n kendo.notify(that);\n },\n options: extend({}, html.HTMLSvgIcon.fn.options, {\n name: 'SvgIcon'\n }),\n setOptions: function(options) {\n var that = this;\n\n Widget.fn.setOptions.call(that, options);\n\n if (options.icon) {\n this.element.html('');\n }\n\n that._icon = new html.HTMLSvgIcon(that.element, $.extend({}, that.options));\n }\n });\n\n kendo.ui.plugin(FontIcon);\n kendo.ui.plugin(SvgIcon);\n\n kendo.setDefaults('iconType', 'svg');\n kendo.ui.svgIcons = svgIcons;\n kendo.ui.icon = html.renderIcon;\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.core.js';\nimport './kendo.color.js';\nimport './kendo.popup.js';\nimport './kendo.icons.js';\n\n(function($) {\n\n function createPromise() {\n return $.Deferred();\n }\n\n function promiseAll(promises) {\n return $.when.apply($, promises);\n }\n\n function extendStatic(dest, src) {\n if (!src) {\n return;\n }\n\n if (typeof src.__proto__ === 'function') {\n dest.__proto__ = src;\n } else {\n for (var member in src) {\n if (src.hasOwnProperty(member)) {\n dest[member] = src[member];\n }\n }\n }\n }\n\n kendo.drawing.util = kendo.drawing.util || {};\n kendo.deepExtend(kendo.drawing.util, {\n createPromise: createPromise,\n promiseAll: promiseAll,\n extendStatic: extendStatic\n });\n\n})(window.kendo.jQuery);\n\n/***********************************************************************\n * WARNING: this file is auto-generated. If you change it directly,\n * your modifications will eventually be lost. The source code is in\n * `kendo-drawing` repository, you should make your changes there and\n * run `src-modules/sync.sh` in this repository.\n */\n\n(function($) {\n/* eslint-disable space-before-blocks, space-before-function-paren */\n\nwindow.kendo.util = window.kendo.util || {};\n\nvar LRUCache = kendo.Class.extend({\n init: function(size) {\n\n this._size = size;\n this._length = 0;\n this._map = {};\n },\n\n put: function(key, value) {\n var map = this._map;\n var entry = { key: key, value: value };\n\n map[key] = entry;\n\n if (!this._head) {\n this._head = this._tail = entry;\n } else {\n this._tail.newer = entry;\n entry.older = this._tail;\n this._tail = entry;\n }\n\n if (this._length >= this._size) {\n map[this._head.key] = null;\n this._head = this._head.newer;\n this._head.older = null;\n } else {\n this._length++;\n }\n },\n\n get: function(key) {\n var entry = this._map[key];\n\n if (entry) {\n if (entry === this._head && entry !== this._tail) {\n this._head = entry.newer;\n this._head.older = null;\n }\n\n if (entry !== this._tail) {\n if (entry.older) {\n entry.older.newer = entry.newer;\n entry.newer.older = entry.older;\n }\n\n entry.older = this._tail;\n entry.newer = null;\n\n this._tail.newer = entry;\n this._tail = entry;\n }\n\n return entry.value;\n }\n }\n});\n\nvar REPLACE_REGEX = /\\r?\\n|\\r|\\t/g;\nvar SPACE = ' ';\n\nfunction normalizeText(text) {\n return String(text).replace(REPLACE_REGEX, SPACE);\n}\n\nfunction objectKey(object) {\n var parts = [];\n for (var key in object) {\n parts.push(key + object[key]);\n }\n\n return parts.sort().join(\"\");\n}\n\n// Computes FNV-1 hash\n// See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function\nfunction hashKey(str) {\n // 32-bit FNV-1 offset basis\n // See http://isthe.com/chongo/tech/comp/fnv/#FNV-param\n var hash = 0x811C9DC5;\n\n for (var i = 0; i < str.length; ++i) {\n hash += (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) + (hash << 24);\n hash ^= str.charCodeAt(i);\n }\n\n return hash >>> 0;\n}\n\nfunction zeroSize() {\n return { width: 0, height: 0, baseline: 0 };\n}\n\nvar DEFAULT_OPTIONS = {\n baselineMarkerSize: 1\n};\n\nvar defaultMeasureBox;\n\nif (typeof document !== \"undefined\") {\n defaultMeasureBox = document.createElement(\"div\");\n defaultMeasureBox.style.cssText = \"position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;\" +\n \"padding: 0 !important; margin: 0 !important; border: 0 !important;\" +\n \"line-height: normal !important; visibility: hidden !important; white-space: pre!important;\";\n}\n\nvar TextMetrics = kendo.Class.extend({\n init: function(options) {\n\n this._cache = new LRUCache(1000);\n this.options = $.extend({}, DEFAULT_OPTIONS, options);\n },\n\n measure: function(text, style, options) {\n if (options === void 0) { options = {}; }\n\n if (typeof text === 'undefined' || text === null) {\n return zeroSize();\n }\n\n var styleKey = objectKey(style);\n var cacheKey = hashKey(text + styleKey);\n var cachedResult = this._cache.get(cacheKey);\n\n if (cachedResult) {\n return cachedResult;\n }\n\n var size = zeroSize();\n var measureBox = options.box || defaultMeasureBox;\n var baselineMarker = this._baselineMarker().cloneNode(false);\n\n for (var key in style) {\n var value = style[key];\n if (typeof value !== \"undefined\") {\n measureBox.style[key] = value;\n }\n }\n\n var textStr = options.normalizeText !== false ? normalizeText(text) : String(text);\n\n measureBox.textContent = textStr;\n measureBox.appendChild(baselineMarker);\n document.body.appendChild(measureBox);\n\n if (textStr.length) {\n size.width = measureBox.offsetWidth - this.options.baselineMarkerSize;\n size.height = measureBox.offsetHeight;\n size.baseline = baselineMarker.offsetTop + this.options.baselineMarkerSize;\n }\n\n if (size.width > 0 && size.height > 0) {\n this._cache.put(cacheKey, size);\n }\n\n measureBox.parentNode.removeChild(measureBox);\n\n return size;\n },\n\n _baselineMarker: function() {\n var marker = document.createElement(\"div\");\n marker.style.cssText = \"display: inline-block; vertical-align: baseline;width: \" +\n this.options.baselineMarkerSize + \"px; height: \" + this.options.baselineMarkerSize + \"px;overflow: hidden;\";\n\n return marker;\n }\n});\n\nTextMetrics.current = new TextMetrics();\n\nfunction measureText(text, style, measureBox) {\n return TextMetrics.current.measure(text, style, measureBox);\n}\n\nkendo.deepExtend(kendo.util, {\n LRUCache: LRUCache,\n TextMetrics: TextMetrics,\n measureText: measureText,\n objectKey: objectKey,\n hashKey: hashKey,\n normalizeText: normalizeText\n});\n\n})(window.kendo.jQuery);\n\n/***********************************************************************\n * WARNING: this file is auto-generated. If you change it directly,\n * your modifications will eventually be lost. The source code is in\n * `kendo-drawing` repository, you should make your changes there and\n * run `src-modules/sync.sh` in this repository.\n */\n\n(function($) {\n/* eslint-disable space-before-blocks, space-before-function-paren */\n\nwindow.kendo = window.kendo || {};\nvar kendoDrawing = kendo.drawing;\nvar kendoDrawingUtil = kendoDrawing.util;\nvar extendStatic = kendoDrawingUtil.extendStatic;\nvar Class = kendo.Class;\nvar kendoUtil = kendo.util;\nvar support = kendo.support;\nvar supportBrowser = support.browser;\n\nvar createPromise = kendoDrawingUtil.createPromise;\nvar promiseAll = kendoDrawingUtil.promiseAll;\n\nvar HasObservers = (function (Class$$1) {\n function HasObservers () {\n Class$$1.apply(this, arguments);\n }\n\n extendStatic(HasObservers, Class$$1);\n HasObservers.prototype = Object.create( Class$$1 && Class$$1.prototype );\n HasObservers.prototype.constructor = HasObservers;\n HasObservers.fn = HasObservers.prototype;\n HasObservers.fn.init = HasObservers.fn.constructor;\n\n HasObservers.prototype.observers = function observers () {\n this._observers = this._observers || [];\n return this._observers;\n };\n\n HasObservers.prototype.addObserver = function addObserver (element) {\n if (!this._observers) {\n this._observers = [ element ];\n } else {\n this._observers.push(element);\n }\n return this;\n };\n\n HasObservers.prototype.removeObserver = function removeObserver (element) {\n var observers = this.observers();\n var index = observers.indexOf(element);\n if (index !== -1) {\n observers.splice(index, 1);\n }\n return this;\n };\n\n HasObservers.prototype.trigger = function trigger (methodName, event) {\n var observers = this._observers;\n\n if (observers && !this._suspended) {\n for (var idx = 0; idx < observers.length; idx++) {\n var observer = observers[idx];\n if (observer[methodName]) {\n observer[methodName](event);\n }\n }\n }\n return this;\n };\n\n HasObservers.prototype.optionsChange = function optionsChange (e) {\n if (e === void 0) { e = {}; }\n\n e.element = this;\n this.trigger(\"optionsChange\", e);\n };\n\n HasObservers.prototype.geometryChange = function geometryChange () {\n this.trigger(\"geometryChange\", {\n element: this\n });\n };\n\n HasObservers.prototype.suspend = function suspend () {\n this._suspended = (this._suspended || 0) + 1;\n return this;\n };\n\n HasObservers.prototype.resume = function resume () {\n this._suspended = Math.max((this._suspended || 0) - 1, 0);\n return this;\n };\n\n HasObservers.prototype._observerField = function _observerField (field, value) {\n if (this[field]) {\n this[field].removeObserver(this);\n }\n this[field] = value;\n value.addObserver(this);\n };\n\n return HasObservers;\n}(Class));\n\nfunction append$1$1(first, second) {\n first.push.apply(first, second);\n return first;\n}\n\n/* eslint-disable key-spacing,no-multi-spaces,no-param-reassign */\n\nvar literals = {\n 1 : \"i\", 10 : \"x\", 100 : \"c\",\n 2 : \"ii\", 20 : \"xx\", 200 : \"cc\",\n 3 : \"iii\", 30 : \"xxx\", 300 : \"ccc\",\n 4 : \"iv\", 40 : \"xl\", 400 : \"cd\",\n 5 : \"v\", 50 : \"l\", 500 : \"d\",\n 6 : \"vi\", 60 : \"lx\", 600 : \"dc\",\n 7 : \"vii\", 70 : \"lxx\", 700 : \"dcc\",\n 8 : \"viii\", 80 : \"lxxx\", 800 : \"dccc\",\n 9 : \"ix\", 90 : \"xc\", 900 : \"cm\",\n 1000 : \"m\"\n};\n\nfunction arabicToRoman(n) {\n var values = [ 1000,\n 900 , 800, 700, 600, 500, 400, 300, 200, 100,\n 90 , 80 , 70 , 60 , 50 , 40 , 30 , 20 , 10 ,\n 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1 ];\n\n var roman = \"\";\n while (n > 0) {\n if (n < values[0]) {\n values.shift();\n } else {\n roman += literals[values[0]];\n n -= values[0];\n }\n }\n return roman;\n}\n\nvar UNDEFINED = \"undefined\";\n\nfunction defined(value) {\n return typeof value !== UNDEFINED;\n}\n\nvar defId = 1;\n\nfunction definitionId() {\n return \"kdef\" + defId++;\n}\n\nvar DEG_TO_RAD = Math.PI / 180;\nvar MAX_NUM = Number.MAX_VALUE;\nvar MIN_NUM = -Number.MAX_VALUE;\n\nfunction deg(radians) {\n return radians / DEG_TO_RAD;\n}\n\nvar fromCharCode = String.fromCharCode;\n\n// Encodes a string as UTF-8\nfunction encodeUTF8(input) {\n var output = \"\";\n\n for (var i = 0; i < input.length; i++) {\n var code = input.charCodeAt(i);\n\n if (0xD800 <= code && code <= 0xDBFF) {\n var hi = code;\n var low = input.charCodeAt(++i);\n\n if (!isNaN(low)) {\n // Combine high and low surrogate\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt\n code = (hi - 0xD800) * 0x400 +\n (low - 0xDC00) + 0x10000;\n }\n }\n\n if (code < 0x80) {\n // One byte\n output += fromCharCode(code);\n } else if (code < 0x800) {\n // Two bytes\n output += fromCharCode(0xC0 | (code >>> 6));\n output += fromCharCode(0x80 | (code & 0x3f));\n } else if (code < 0x10000) {\n // Three bytes\n output += fromCharCode(0xE0 | (code >>> 12));\n output += fromCharCode(0x80 | (code >>> 6 & 0x3f));\n output += fromCharCode(0x80 | (code & 0x3f));\n } else if (code < 0x10FFFF) {\n // Four bytes\n output += fromCharCode(0xF0 | (code >>> 18));\n output += fromCharCode(0x80 | (code >>> 12 & 0x3f));\n output += fromCharCode(0x80 | (code >>> 6 & 0x3f));\n output += fromCharCode(0x80 | (code & 0x3f));\n }\n }\n\n return output;\n}\n\n// Encodes a string as UTF-16 big-endian\n\nvar KEY_STR = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\nfunction encodeBase64(input) {\n var output = \"\";\n var i = 0;\n\n var utfInput = encodeUTF8(input);\n\n while (i < utfInput.length) {\n var chr1 = utfInput.charCodeAt(i++);\n var chr2 = utfInput.charCodeAt(i++);\n var chr3 = utfInput.charCodeAt(i++);\n\n var enc1 = chr1 >> 2;\n var enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n var enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n var enc4 = chr3 & 63;\n\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n\n output = output +\n KEY_STR.charAt(enc1) + KEY_STR.charAt(enc2) +\n KEY_STR.charAt(enc3) + KEY_STR.charAt(enc4);\n }\n\n return output;\n}\n\nfunction eventCoordinates(e) {\n if (defined((e.x || {}).location)) {\n return {\n x: e.x.location,\n y: e.y.location\n };\n }\n\n return {\n x: e.pageX || e.clientX || 0,\n y: e.pageY || e.clientY || 0\n };\n}\n\nfunction eventElement(e) {\n if (e === void 0) { e = {}; }\n\n return e.touch ? e.touch.initialTouch : e.target;\n}\n\nfunction isTransparent(color) {\n return color === \"\" || color === null || color === \"none\" || color === \"transparent\" || !defined(color);\n}\n\nfunction last(array) {\n if (array) {\n return array[array.length - 1];\n }\n}\n\nfunction limitValue(value, min, max) {\n return Math.max(Math.min(value, max), min);\n}\n\n/* eslint-disable no-multi-spaces, key-spacing, indent, camelcase, space-before-blocks, eqeqeq, brace-style */\n/* eslint-disable space-infix-ops, space-before-function-paren, array-bracket-spacing, object-curly-spacing */\n/* eslint-disable no-nested-ternary, max-params, default-case, no-else-return, no-empty */\n/* eslint-disable no-param-reassign, no-var, block-scoped-var */\n\n// mergeSort is stable.\nfunction mergeSort(a, cmp) {\n if (a.length < 2) {\n return a.slice();\n }\n function merge(a, b) {\n var r = [], ai = 0, bi = 0, i = 0;\n while (ai < a.length && bi < b.length) {\n if (cmp(a[ai], b[bi]) <= 0) {\n r[i++] = a[ai++];\n } else {\n r[i++] = b[bi++];\n }\n }\n if (ai < a.length) {\n r.push.apply(r, a.slice(ai));\n }\n if (bi < b.length) {\n r.push.apply(r, b.slice(bi));\n }\n return r;\n }\n return (function sort(a) {\n if (a.length <= 1) {\n return a;\n }\n var m = Math.floor(a.length / 2);\n var left = a.slice(0, m);\n var right = a.slice(m);\n left = sort(left);\n right = sort(right);\n return merge(left, right);\n })(a);\n}\n\nvar now = Date.now || function() {\n return new Date().getTime();\n};\n\nfunction rad(degrees) {\n return degrees * DEG_TO_RAD;\n}\n\nfunction pow(p) {\n if (p) {\n return Math.pow(10, p);\n }\n\n return 1;\n}\n\nfunction round(value, precision) {\n var power = pow(precision);\n return Math.round(value * power) / power;\n}\n\nfunction valueOrDefault(value, defaultValue) {\n return defined(value) ? value : defaultValue;\n}\n\nfunction bindEvents(element, events) {\n for (var eventName in events) {\n var eventNames = eventName.trim().split(\" \");\n for (var idx = 0; idx < eventNames.length; idx++) {\n element.addEventListener(eventNames[idx], events[eventName], false);\n }\n }\n}\n\nfunction elementOffset(element) {\n var box = element.getBoundingClientRect();\n\n var documentElement = document.documentElement;\n\n return {\n top: box.top + (window.pageYOffset || documentElement.scrollTop) - (documentElement.clientTop || 0),\n left: box.left + (window.pageXOffset || documentElement.scrollLeft) - (documentElement.clientLeft || 0)\n };\n}\n\nfunction elementStyles(element, styles) {\n var result = {};\n var style = window.getComputedStyle(element) || {};\n var stylesArray = Array.isArray(styles) ? styles : [ styles ];\n\n for (var idx = 0; idx < stylesArray.length; idx++) {\n var field = stylesArray[idx];\n result[field] = style[field];\n }\n\n return result;\n}\n\nfunction getPixels(value) {\n if (isNaN(value)) {\n return value;\n }\n return value + \"px\";\n}\n\nfunction elementSize(element, size) {\n if (size) {\n var width = size.width;\n var height = size.height;\n\n if (defined(width)) {\n element.style.width = getPixels(width);\n }\n\n if (defined(height)) {\n element.style.height = getPixels(height);\n }\n\n } else {\n var size$1 = elementStyles(element, [ 'width', 'height' ]);\n\n return {\n width: parseInt(size$1.width, 10),\n height: parseInt(size$1.height, 10)\n };\n }\n}\n\nfunction unbindEvents(element, events) {\n if (events === void 0) { events = {}; }\n\n for (var name in events) {\n var eventNames = name.trim().split(\" \");\n for (var idx = 0; idx < eventNames.length; idx++) {\n element.removeEventListener(eventNames[idx], events[name], false);\n }\n }\n}\n\nfunction elementPadding(element) {\n var ref = elementStyles(element, [ \"paddingLeft\", \"paddingTop\" ]);\n var paddingLeft = ref.paddingLeft;\n var paddingTop = ref.paddingTop;\n return {\n top: parseFloat(paddingTop),\n left: parseFloat(paddingLeft)\n };\n}\n\nvar Matrix = (function (Class$$1) {\n function Matrix(a, b, c, d, e, f) {\n if (a === void 0) { a = 0; }\n if (b === void 0) { b = 0; }\n if (c === void 0) { c = 0; }\n if (d === void 0) { d = 0; }\n if (e === void 0) { e = 0; }\n if (f === void 0) { f = 0; }\n\n Class$$1.call(this);\n\n this.a = a;\n this.b = b;\n this.c = c;\n this.d = d;\n this.e = e;\n this.f = f;\n }\n\n extendStatic(Matrix, Class$$1);\n Matrix.prototype = Object.create( Class$$1 && Class$$1.prototype );\n Matrix.prototype.constructor = Matrix;\n Matrix.fn = Matrix.prototype;\n Matrix.fn.init = Matrix.fn.constructor;\n\n Matrix.prototype.multiplyCopy = function multiplyCopy (matrix) {\n return new Matrix(\n this.a * matrix.a + this.c * matrix.b,\n this.b * matrix.a + this.d * matrix.b,\n this.a * matrix.c + this.c * matrix.d,\n this.b * matrix.c + this.d * matrix.d,\n this.a * matrix.e + this.c * matrix.f + this.e,\n this.b * matrix.e + this.d * matrix.f + this.f\n );\n };\n\n Matrix.prototype.invert = function invert () {\n var ref = this;\n var a = ref.a;\n var b = ref.b;\n var d = ref.c;\n var e = ref.d;\n var g = ref.e;\n var h = ref.f;\n var det = a * e - b * d;\n\n if (det === 0) {\n return null;\n }\n\n return new Matrix(e / det, -b / det, -d / det, a / det,\n (d * h - e * g) / det, (b * g - a * h) / det);\n };\n\n Matrix.prototype.clone = function clone () {\n return new Matrix(this.a, this.b, this.c, this.d, this.e, this.f);\n };\n\n Matrix.prototype.equals = function equals (other) {\n if (!other) {\n return false;\n }\n\n return this.a === other.a && this.b === other.b &&\n this.c === other.c && this.d === other.d &&\n this.e === other.e && this.f === other.f;\n };\n\n Matrix.prototype.round = function round$1 (precision) {\n this.a = round(this.a, precision);\n this.b = round(this.b, precision);\n this.c = round(this.c, precision);\n this.d = round(this.d, precision);\n this.e = round(this.e, precision);\n this.f = round(this.f, precision);\n\n return this;\n };\n\n Matrix.prototype.toArray = function toArray (precision) {\n var result = [ this.a, this.b, this.c, this.d, this.e, this.f ];\n\n if (defined(precision)) {\n for (var i = 0; i < result.length; i++) {\n result[i] = round(result[i], precision);\n }\n }\n\n return result;\n };\n\n Matrix.prototype.toString = function toString (precision, separator) {\n if (separator === void 0) { separator = \",\"; }\n\n return this.toArray(precision).join(separator);\n };\n\n Matrix.translate = function translate (x, y) {\n return new Matrix(1, 0, 0, 1, x, y);\n };\n\n Matrix.unit = function unit () {\n return new Matrix(1, 0, 0, 1, 0, 0);\n };\n\n Matrix.rotate = function rotate (angle, x, y) {\n var matrix = new Matrix();\n matrix.a = Math.cos(rad(angle));\n matrix.b = Math.sin(rad(angle));\n matrix.c = -matrix.b;\n matrix.d = matrix.a;\n matrix.e = (x - x * matrix.a + y * matrix.b) || 0;\n matrix.f = (y - y * matrix.a - x * matrix.b) || 0;\n\n return matrix;\n };\n\n Matrix.scale = function scale (scaleX, scaleY) {\n return new Matrix(scaleX, 0, 0, scaleY, 0, 0);\n };\n\n return Matrix;\n}(Class));\n\nMatrix.IDENTITY = Matrix.unit();\n\nvar matrixRegexp = /matrix\\((.*)\\)/;\n\nfunction parseMatrix(matrixString) {\n var match = matrixString.match(matrixRegexp);\n if (match === null || match.length !== 2) {\n return Matrix.unit();\n }\n\n var members = match[1].split(',').map(function (x) { return parseFloat(x); });\n return new (Function.prototype.bind.apply( Matrix, [ null ].concat( members) ));\n}\n\nfunction transformMatrix(element) {\n var transform = getComputedStyle(element).transform;\n\n if (transform === 'none') {\n return Matrix.unit();\n }\n\n return parseMatrix(transform);\n}\n\nfunction elementScale(element) {\n if (!element) {\n return Matrix.unit();\n }\n\n var matrix = transformMatrix(element);\n var parent = element.parentElement;\n while (parent) {\n var parentMatrix = transformMatrix(parent);\n matrix = matrix.multiplyCopy(parentMatrix);\n parent = parent.parentElement;\n }\n\n matrix.b = matrix.c = matrix.e = matrix.f = 0;\n return matrix;\n}\n\nvar util = {\n\tappend: append$1$1,\n\tarabicToRoman: arabicToRoman,\n\tcreatePromise: createPromise,\n\tdefined: defined,\n\tdefinitionId: definitionId,\n\tdeg: deg,\n\tencodeBase64: encodeBase64,\n\teventCoordinates: eventCoordinates,\n\teventElement: eventElement,\n\tisTransparent: isTransparent,\n\tlast: last,\n\tlimitValue: limitValue,\n\tmergeSort: mergeSort,\n\tnow: now,\n\tpromiseAll: promiseAll,\n\trad: rad,\n\tround: round,\n\tvalueOrDefault: valueOrDefault,\n\tbindEvents: bindEvents,\n\telementOffset: elementOffset,\n\telementSize: elementSize,\n\telementStyles: elementStyles,\n\tunbindEvents: unbindEvents,\n\telementPadding: elementPadding,\n\telementScale: elementScale,\n\tDEG_TO_RAD: DEG_TO_RAD,\n\tMAX_NUM: MAX_NUM,\n\tMIN_NUM: MIN_NUM\n};\n\nvar toString$1 = {}.toString;\n\nvar OptionsStore = (function (HasObservers$$1) {\n function OptionsStore(options, prefix) {\n var this$1$1 = this;\n if (prefix === void 0) { prefix = \"\"; }\n\n HasObservers$$1.call(this);\n\n this.prefix = prefix;\n\n for (var field in options) {\n var member = options[field];\n member = this$1$1._wrap(member, field);\n this$1$1[field] = member;\n }\n }\n\n extendStatic(OptionsStore, HasObservers$$1);\n OptionsStore.prototype = Object.create( HasObservers$$1 && HasObservers$$1.prototype );\n OptionsStore.prototype.constructor = OptionsStore;\n OptionsStore.fn = OptionsStore.prototype;\n OptionsStore.fn.init = OptionsStore.fn.constructor;\n\n OptionsStore.prototype.get = function get (field) {\n var parts = field.split(\".\");\n var result = this;\n\n while (parts.length && result) {\n var part = parts.shift();\n result = result[part];\n }\n\n return result;\n };\n\n OptionsStore.prototype.set = function set (field, value) {\n var current = this.get(field);\n\n if (current !== value) {\n this._set(field, this._wrap(value, field));\n this.optionsChange({\n field: this.prefix + field,\n value: value\n });\n }\n };\n\n OptionsStore.prototype._set = function _set (field, value) {\n var this$1$1 = this;\n\n var composite = field.indexOf(\".\") >= 0;\n var parentObj = this;\n var fieldName = field;\n\n if (composite) {\n var parts = fieldName.split(\".\");\n var prefix = this.prefix;\n\n while (parts.length > 1) {\n fieldName = parts.shift();\n prefix += fieldName + \".\";\n\n var obj = parentObj[fieldName];\n\n if (!obj) {\n obj = new OptionsStore({}, prefix);\n obj.addObserver(this$1$1);\n parentObj[fieldName] = obj;\n }\n parentObj = obj;\n }\n fieldName = parts[0];\n }\n\n parentObj._clear(fieldName);\n parentObj[fieldName] = value;\n };\n\n OptionsStore.prototype._clear = function _clear (field) {\n var current = this[field];\n if (current && current.removeObserver) {\n current.removeObserver(this);\n }\n };\n\n OptionsStore.prototype._wrap = function _wrap (object, field) {\n var type = toString$1.call(object);\n var wrapped = object;\n\n if (wrapped !== null && defined(wrapped) && type === \"[object Object]\") {\n if (!(object instanceof OptionsStore) && !(object instanceof Class)) {\n wrapped = new OptionsStore(wrapped, this.prefix + field + \".\");\n }\n\n wrapped.addObserver(this);\n }\n\n return wrapped;\n };\n\n return OptionsStore;\n}(HasObservers));\n\nfunction setAccessor(field) {\n return function(value) {\n if (this[field] !== value) {\n this[field] = value;\n this.geometryChange();\n }\n\n return this;\n };\n}\n\nfunction getAccessor(field) {\n return function() {\n return this[field];\n };\n}\n\nfunction defineAccessors(fn, fields) {\n for (var i = 0; i < fields.length; i++) {\n var name = fields[i];\n var capitalized = name.charAt(0).toUpperCase() +\n name.substring(1, name.length);\n\n fn[\"set\" + capitalized] = setAccessor(name);\n fn[\"get\" + capitalized] = getAccessor(name);\n }\n}\n\nvar withAccessors = function (TBase, names) {\n var result = (function (TBase) {\n function result () {\n TBase.apply(this, arguments);\n }extendStatic(result, TBase);\n result.prototype = Object.create( TBase && TBase.prototype );\n result.prototype.constructor = result;\n result.fn = result.prototype;\n result.fn.init = result.fn.constructor;\n\n return result;\n }(TBase));\n defineAccessors(result.prototype, names);\n\n return result;\n};\n\nfunction toMatrix(transformation) {\n if (transformation && typeof transformation.matrix === \"function\") {\n return transformation.matrix();\n }\n\n return transformation;\n}\n\nvar Point = (function (superclass) {\n function Point(x, y) {\n superclass.call(this);\n\n this.x = x || 0;\n this.y = y || 0;\n }\n\n extendStatic(Point, superclass);\n Point.prototype = Object.create( superclass && superclass.prototype );\n Point.prototype.constructor = Point;\n Point.fn = Point.prototype;\n Point.fn.init = Point.fn.constructor;\n\n var staticAccessors = { ZERO: {} };\n\n Point.prototype.equals = function equals (other) {\n return other && other.x === this.x && other.y === this.y;\n };\n\n Point.prototype.clone = function clone () {\n return new Point(this.x, this.y);\n };\n\n Point.prototype.rotate = function rotate (angle, origin) {\n var originPoint = Point.create(origin) || Point.ZERO;\n\n return this.transform(Matrix.rotate(angle, originPoint.x, originPoint.y));\n };\n\n Point.prototype.translate = function translate (x, y) {\n this.x += x;\n this.y += y;\n\n this.geometryChange();\n\n return this;\n };\n\n Point.prototype.translateWith = function translateWith (point) {\n return this.translate(point.x, point.y);\n };\n\n Point.prototype.move = function move (x, y) {\n this.x = this.y = 0;\n return this.translate(x, y);\n };\n\n Point.prototype.scale = function scale (scaleX, scaleY) {\n if (scaleY === void 0) { scaleY = scaleX; }\n\n this.x *= scaleX;\n this.y *= scaleY;\n\n this.geometryChange();\n\n return this;\n };\n\n Point.prototype.scaleCopy = function scaleCopy (scaleX, scaleY) {\n return this.clone().scale(scaleX, scaleY);\n };\n\n Point.prototype.transform = function transform (transformation) {\n var matrix = toMatrix(transformation);\n var ref = this;\n var x = ref.x;\n var y = ref.y;\n\n this.x = matrix.a * x + matrix.c * y + matrix.e;\n this.y = matrix.b * x + matrix.d * y + matrix.f;\n\n this.geometryChange();\n\n return this;\n };\n\n Point.prototype.transformCopy = function transformCopy (transformation) {\n var point = this.clone();\n\n if (transformation) {\n point.transform(transformation);\n }\n\n return point;\n };\n\n Point.prototype.distanceTo = function distanceTo (point) {\n var dx = this.x - point.x;\n var dy = this.y - point.y;\n\n return Math.sqrt(dx * dx + dy * dy);\n };\n\n Point.prototype.round = function round$1 (digits) {\n this.x = round(this.x, digits);\n this.y = round(this.y, digits);\n\n this.geometryChange();\n\n return this;\n };\n\n Point.prototype.toArray = function toArray (digits) {\n var doRound = defined(digits);\n var x = doRound ? round(this.x, digits) : this.x;\n var y = doRound ? round(this.y, digits) : this.y;\n\n return [ x, y ];\n };\n\n Point.prototype.toString = function toString (digits, separator) {\n if (separator === void 0) { separator = \" \"; }\n\n var ref = this;\n var x = ref.x;\n var y = ref.y;\n\n if (defined(digits)) {\n x = round(x, digits);\n y = round(y, digits);\n }\n\n return x + separator + y;\n };\n\n Point.create = function create (arg0, arg1) {\n if (defined(arg0)) {\n if (arg0 instanceof Point) {\n return arg0;\n } else if (arguments.length === 1 && arg0.length === 2) {\n return new Point(arg0[0], arg0[1]);\n }\n\n return new Point(arg0, arg1);\n }\n };\n\n Point.min = function min () {\n var arguments$1 = arguments;\n\n var minX = MAX_NUM;\n var minY = MAX_NUM;\n\n for (var i = 0; i < arguments.length; i++) {\n var point = arguments$1[i];\n minX = Math.min(point.x, minX);\n minY = Math.min(point.y, minY);\n }\n\n return new Point(minX, minY);\n };\n\n Point.max = function max () {\n var arguments$1 = arguments;\n\n var maxX = MIN_NUM;\n var maxY = MIN_NUM;\n\n for (var i = 0; i < arguments.length; i++) {\n var point = arguments$1[i];\n maxX = Math.max(point.x, maxX);\n maxY = Math.max(point.y, maxY);\n }\n\n return new Point(maxX, maxY);\n };\n\n Point.minPoint = function minPoint () {\n return new Point(MIN_NUM, MIN_NUM);\n };\n\n Point.maxPoint = function maxPoint () {\n return new Point(MAX_NUM, MAX_NUM);\n };\n\n staticAccessors.ZERO.get = function () {\n return new Point(0, 0);\n };\n\n Object.defineProperties( Point, staticAccessors );\n\n return Point;\n}(withAccessors(HasObservers, [ \"x\", \"y\" ])));\n\nvar Size = (function (superclass) {\n function Size(width, height) {\n superclass.call(this);\n\n this.width = width || 0;\n this.height = height || 0;\n }\n\n extendStatic(Size, superclass);\n Size.prototype = Object.create( superclass && superclass.prototype );\n Size.prototype.constructor = Size;\n Size.fn = Size.prototype;\n Size.fn.init = Size.fn.constructor;\n\n var staticAccessors = { ZERO: {} };\n\n Size.prototype.equals = function equals (other) {\n return other && other.width === this.width && other.height === this.height;\n };\n\n Size.prototype.clone = function clone () {\n return new Size(this.width, this.height);\n };\n\n Size.prototype.toArray = function toArray (digits) {\n var doRound = defined(digits);\n var width = doRound ? round(this.width, digits) : this.width;\n var height = doRound ? round(this.height, digits) : this.height;\n\n return [ width, height ];\n };\n\n Size.create = function create (arg0, arg1) {\n if (defined(arg0)) {\n if (arg0 instanceof Size) {\n return arg0;\n } else if (arguments.length === 1 && arg0.length === 2) {\n return new Size(arg0[0], arg0[1]);\n }\n\n return new Size(arg0, arg1);\n }\n };\n\n staticAccessors.ZERO.get = function () {\n return new Size(0, 0);\n };\n\n Object.defineProperties( Size, staticAccessors );\n\n return Size;\n}(withAccessors(HasObservers, [ \"width\", \"height\" ])));\n\nvar Rect = (function (HasObservers$$1) {\n function Rect(origin, size, cornerRadius) {\n if (origin === void 0) { origin = new Point(); }\n if (size === void 0) { size = new Size(); }\n if (cornerRadius === void 0) { cornerRadius = 0; }\n\n HasObservers$$1.call(this);\n\n this.setOrigin(origin);\n this.setSize(size);\n this.setCornerRadius(cornerRadius);\n }\n\n extendStatic(Rect, HasObservers$$1);\n Rect.prototype = Object.create( HasObservers$$1 && HasObservers$$1.prototype );\n Rect.prototype.constructor = Rect;\n Rect.fn = Rect.prototype;\n Rect.fn.init = Rect.fn.constructor;\n\n Rect.prototype.clone = function clone () {\n return new Rect(\n this.origin.clone(),\n this.size.clone()\n );\n };\n\n Rect.prototype.equals = function equals (other) {\n return other &&\n other.origin.equals(this.origin) &&\n other.size.equals(this.size);\n };\n\n Rect.prototype.setOrigin = function setOrigin (value) {\n this._observerField(\"origin\", Point.create(value));\n this.geometryChange();\n return this;\n };\n\n Rect.prototype.getOrigin = function getOrigin () {\n return this.origin;\n };\n\n Rect.prototype.setCornerRadius = function setCornerRadius (radius) {\n this.cornerRadius = Array.isArray(radius) ? radius : [ radius, radius ];\n\n this.geometryChange();\n return this;\n };\n\n Rect.prototype.getCornerRadius = function getCornerRadius () {\n return this.cornerRadius;\n };\n\n Rect.prototype.setSize = function setSize (value) {\n this._observerField(\"size\", Size.create(value));\n this.geometryChange();\n return this;\n };\n\n Rect.prototype.getSize = function getSize () {\n return this.size;\n };\n\n Rect.prototype.width = function width () {\n return this.size.width;\n };\n\n Rect.prototype.height = function height () {\n return this.size.height;\n };\n\n Rect.prototype.topLeft = function topLeft () {\n return this.origin.clone();\n };\n\n Rect.prototype.bottomRight = function bottomRight () {\n return this.origin.clone().translate(this.width(), this.height());\n };\n\n Rect.prototype.topRight = function topRight () {\n return this.origin.clone().translate(this.width(), 0);\n };\n\n Rect.prototype.bottomLeft = function bottomLeft () {\n return this.origin.clone().translate(0, this.height());\n };\n\n Rect.prototype.center = function center () {\n return this.origin.clone().translate(this.width() / 2, this.height() / 2);\n };\n\n Rect.prototype.bbox = function bbox (matrix) {\n var tl = this.topLeft().transformCopy(matrix);\n var tr = this.topRight().transformCopy(matrix);\n var br = this.bottomRight().transformCopy(matrix);\n var bl = this.bottomLeft().transformCopy(matrix);\n\n return Rect.fromPoints(tl, tr, br, bl);\n };\n\n Rect.prototype.transformCopy = function transformCopy (m) {\n return Rect.fromPoints(\n this.topLeft().transform(m),\n this.bottomRight().transform(m)\n );\n };\n\n Rect.prototype.expand = function expand (x, y) {\n if (y === void 0) { y = x; }\n\n this.size.width += 2 * x;\n this.size.height += 2 * y;\n\n this.origin.translate(-x, -y);\n\n return this;\n };\n\n Rect.prototype.expandCopy = function expandCopy (x, y) {\n return this.clone().expand(x, y);\n };\n\n Rect.prototype.containsPoint = function containsPoint (point) {\n var origin = this.origin;\n var bottomRight = this.bottomRight();\n return !(point.x < origin.x || point.y < origin.y || bottomRight.x < point.x || bottomRight.y < point.y);\n };\n\n Rect.prototype._isOnPath = function _isOnPath (point, width) {\n var rectOuter = this.expandCopy(width, width);\n var rectInner = this.expandCopy(-width, -width);\n\n return rectOuter.containsPoint(point) && !rectInner.containsPoint(point);\n };\n\n Rect.fromPoints = function fromPoints () {\n var topLeft = Point.min.apply(null, arguments);\n var bottomRight = Point.max.apply(null, arguments);\n var size = new Size(\n bottomRight.x - topLeft.x,\n bottomRight.y - topLeft.y\n );\n\n return new Rect(topLeft, size);\n };\n\n Rect.union = function union (a, b) {\n return Rect.fromPoints(\n Point.min(a.topLeft(), b.topLeft()),\n Point.max(a.bottomRight(), b.bottomRight())\n );\n };\n\n Rect.intersect = function intersect (a, b) {\n var rect1 = {\n left: a.topLeft().x,\n top: a.topLeft().y,\n right: a.bottomRight().x,\n bottom: a.bottomRight().y\n };\n\n var rect2 = {\n left: b.topLeft().x,\n top: b.topLeft().y,\n right: b.bottomRight().x,\n bottom: b.bottomRight().y\n };\n\n if (rect1.left <= rect2.right &&\n rect2.left <= rect1.right &&\n rect1.top <= rect2.bottom &&\n rect2.top <= rect1.bottom) {\n return Rect.fromPoints(\n new Point(Math.max(rect1.left, rect2.left), Math.max(rect1.top, rect2.top)),\n new Point(Math.min(rect1.right, rect2.right), Math.min(rect1.bottom, rect2.bottom))\n );\n }\n };\n\n return Rect;\n}(HasObservers));\n\nvar Transformation = (function (HasObservers$$1) {\n function Transformation(matrix) {\n if (matrix === void 0) { matrix = Matrix.unit(); }\n\n HasObservers$$1.call(this);\n\n this._matrix = matrix;\n }\n\n extendStatic(Transformation, HasObservers$$1);\n Transformation.prototype = Object.create( HasObservers$$1 && HasObservers$$1.prototype );\n Transformation.prototype.constructor = Transformation;\n Transformation.fn = Transformation.prototype;\n Transformation.fn.init = Transformation.fn.constructor;\n\n Transformation.prototype.clone = function clone () {\n return new Transformation(\n this._matrix.clone()\n );\n };\n\n Transformation.prototype.equals = function equals (other) {\n return other &&\n other._matrix.equals(this._matrix);\n };\n\n Transformation.prototype.translate = function translate (x, y) {\n this._matrix = this._matrix.multiplyCopy(Matrix.translate(x, y));\n\n this._optionsChange();\n return this;\n };\n\n Transformation.prototype.scale = function scale (scaleX, scaleY, origin) {\n if (scaleY === void 0) { scaleY = scaleX; }\n if (origin === void 0) { origin = null; }\n\n var originPoint = origin;\n\n if (originPoint) {\n originPoint = Point.create(originPoint);\n this._matrix = this._matrix.multiplyCopy(Matrix.translate(originPoint.x, originPoint.y));\n }\n\n this._matrix = this._matrix.multiplyCopy(Matrix.scale(scaleX, scaleY));\n\n if (originPoint) {\n this._matrix = this._matrix.multiplyCopy(Matrix.translate(-originPoint.x, -originPoint.y));\n }\n\n this._optionsChange();\n return this;\n };\n\n Transformation.prototype.rotate = function rotate (angle, origin) {\n var originPoint = Point.create(origin) || Point.ZERO;\n\n this._matrix = this._matrix.multiplyCopy(Matrix.rotate(angle, originPoint.x, originPoint.y));\n\n this._optionsChange();\n return this;\n };\n\n Transformation.prototype.multiply = function multiply (transformation) {\n var matrix = toMatrix(transformation);\n\n this._matrix = this._matrix.multiplyCopy(matrix);\n\n this._optionsChange();\n return this;\n };\n\n Transformation.prototype.matrix = function matrix (value) {\n if (value) {\n this._matrix = value;\n this._optionsChange();\n return this;\n }\n\n return this._matrix;\n };\n\n Transformation.prototype._optionsChange = function _optionsChange () {\n this.optionsChange({\n field: \"transform\",\n value: this\n });\n };\n\n return Transformation;\n}(HasObservers));\n\nfunction transform$1(matrix) {\n if (matrix === null) {\n return null;\n }\n\n if (matrix instanceof Transformation) {\n return matrix;\n }\n\n return new Transformation(matrix);\n}\n\nvar Element$1 = (function (HasObservers$$1) {\n function Element(options) {\n HasObservers$$1.call(this);\n\n this._initOptions(options);\n }\n\n extendStatic(Element, HasObservers$$1);\n Element.prototype = Object.create( HasObservers$$1 && HasObservers$$1.prototype );\n Element.prototype.constructor = Element;\n Element.fn = Element.prototype;\n Element.fn.init = Element.fn.constructor;\n\n var prototypeAccessors = { nodeType: {} };\n\n prototypeAccessors.nodeType.get = function () {\n return \"Rect\";\n };\n\n Element.prototype._initOptions = function _initOptions (options) {\n if (options === void 0) { options = {}; }\n\n var clip = options.clip;\n var transform = options.transform;\n\n if (transform) {\n options.transform = transform$1(transform);\n }\n\n if (clip && !clip.id) {\n clip.id = definitionId();\n }\n\n this.options = new OptionsStore(options);\n this.options.addObserver(this);\n };\n\n Element.prototype.transform = function transform (value) {\n if (defined(value)) {\n this.options.set(\"transform\", transform$1(value));\n } else {\n return this.options.get(\"transform\");\n }\n };\n\n Element.prototype.parentTransform = function parentTransform () {\n var element = this;\n var parentMatrix;\n\n while (element.parent) {\n element = element.parent;\n var transformation = element.transform();\n if (transformation) {\n parentMatrix = transformation.matrix().multiplyCopy(parentMatrix || Matrix.unit());\n }\n }\n\n if (parentMatrix) {\n return transform$1(parentMatrix);\n }\n };\n\n Element.prototype.currentTransform = function currentTransform (parentTransform) {\n if (parentTransform === void 0) { parentTransform = this.parentTransform(); }\n\n var elementTransform = this.transform();\n var elementMatrix = toMatrix(elementTransform);\n\n var parentMatrix = toMatrix(parentTransform);\n var combinedMatrix;\n\n if (elementMatrix && parentMatrix) {\n combinedMatrix = parentMatrix.multiplyCopy(elementMatrix);\n } else {\n combinedMatrix = elementMatrix || parentMatrix;\n }\n\n if (combinedMatrix) {\n return transform$1(combinedMatrix);\n }\n };\n\n Element.prototype.visible = function visible (value) {\n if (defined(value)) {\n this.options.set(\"visible\", value);\n return this;\n }\n\n return this.options.get(\"visible\") !== false;\n };\n\n Element.prototype.clip = function clip (value) {\n var options = this.options;\n if (defined(value)) {\n if (value && !value.id) {\n value.id = definitionId();\n }\n options.set(\"clip\", value);\n return this;\n }\n\n return options.get(\"clip\");\n };\n\n Element.prototype.opacity = function opacity (value) {\n if (defined(value)) {\n this.options.set(\"opacity\", value);\n return this;\n }\n\n return valueOrDefault(this.options.get(\"opacity\"), 1);\n };\n\n Element.prototype.className = function className (value) {\n if (defined(value)) {\n this.options.set(\"className\", value);\n return this;\n }\n\n return this.options.get(\"className\");\n };\n\n Element.prototype.clippedBBox = function clippedBBox (transformation) {\n var bbox = this._clippedBBox(transformation);\n if (bbox) {\n var clip = this.clip();\n return clip ? Rect.intersect(bbox, clip.bbox(transformation)) : bbox;\n }\n };\n\n Element.prototype.containsPoint = function containsPoint (point, parentTransform) {\n if (this.visible()) {\n var transform = this.currentTransform(parentTransform);\n var transformedPoint = point;\n if (transform) {\n transformedPoint = point.transformCopy(transform.matrix().invert());\n }\n return (this._hasFill() && this._containsPoint(transformedPoint)) || (this._isOnPath && this._hasStroke() && this._isOnPath(transformedPoint));\n }\n return false;\n };\n\n Element.prototype._hasFill = function _hasFill () {\n var fill = this.options.fill;\n return fill && !isTransparent(fill.color);\n };\n\n Element.prototype._hasStroke = function _hasStroke () {\n var stroke = this.options.stroke;\n return stroke && stroke.width > 0 && !isTransparent(stroke.color);\n };\n\n Element.prototype._clippedBBox = function _clippedBBox (transformation) {\n return this.bbox(transformation);\n };\n\n Object.defineProperties( Element.prototype, prototypeAccessors );\n\n return Element;\n}(HasObservers));\n\nfunction ellipseExtremeAngles(center, rx, ry, matrix) {\n var extremeX = 0;\n var extremeY = 0;\n\n if (matrix) {\n extremeX = Math.atan2(matrix.c * ry, matrix.a * rx);\n if (matrix.b !== 0) {\n extremeY = Math.atan2(matrix.d * ry, matrix.b * rx);\n }\n }\n\n return {\n x: extremeX,\n y: extremeY\n };\n}\n\nvar PI_DIV_2 = Math.PI / 2;\n\nvar Circle$2 = (function (superclass) {\n function Circle(center, radius) {\n if (center === void 0) { center = new Point(); }\n if (radius === void 0) { radius = 0; }\n\n superclass.call(this);\n\n this.setCenter(center);\n this.setRadius(radius);\n }\n\n extendStatic(Circle, superclass);\n Circle.prototype = Object.create( superclass && superclass.prototype );\n Circle.prototype.constructor = Circle;\n Circle.fn = Circle.prototype;\n Circle.fn.init = Circle.fn.constructor;\n\n Circle.prototype.setCenter = function setCenter (value) {\n this._observerField(\"center\", Point.create(value));\n this.geometryChange();\n return this;\n };\n\n Circle.prototype.getCenter = function getCenter () {\n return this.center;\n };\n\n Circle.prototype.equals = function equals (other) {\n return other &&\n other.center.equals(this.center) &&\n other.radius === this.radius;\n };\n\n Circle.prototype.clone = function clone () {\n return new Circle(this.center.clone(), this.radius);\n };\n\n Circle.prototype.pointAt = function pointAt (angle) {\n return this._pointAt(rad(angle));\n };\n\n Circle.prototype.bbox = function bbox (matrix) {\n var this$1$1 = this;\n\n var extremeAngles = ellipseExtremeAngles(this.center, this.radius, this.radius, matrix);\n var minPoint = Point.maxPoint();\n var maxPoint = Point.minPoint();\n\n for (var i = 0; i < 4; i++) {\n var currentPointX = this$1$1._pointAt(extremeAngles.x + i * PI_DIV_2).transformCopy(matrix);\n var currentPointY = this$1$1._pointAt(extremeAngles.y + i * PI_DIV_2).transformCopy(matrix);\n var currentPoint = new Point(currentPointX.x, currentPointY.y);\n\n minPoint = Point.min(minPoint, currentPoint);\n maxPoint = Point.max(maxPoint, currentPoint);\n }\n\n return Rect.fromPoints(minPoint, maxPoint);\n };\n\n Circle.prototype._pointAt = function _pointAt (angle) {\n var ref = this;\n var center = ref.center;\n var radius = ref.radius;\n\n return new Point(\n center.x + radius * Math.cos(angle),\n center.y + radius * Math.sin(angle)\n );\n };\n\n Circle.prototype.containsPoint = function containsPoint (point) {\n var ref = this;\n var center = ref.center;\n var radius = ref.radius;\n var inCircle = Math.pow(point.x - center.x, 2) +\n Math.pow(point.y - center.y, 2) <= Math.pow(radius, 2);\n return inCircle;\n };\n\n Circle.prototype._isOnPath = function _isOnPath (point, width) {\n var ref = this;\n var center = ref.center;\n var radius = ref.radius;\n var pointDistance = center.distanceTo(point);\n\n return radius - width <= pointDistance && pointDistance <= radius + width;\n };\n\n return Circle;\n}(withAccessors(HasObservers, [ \"radius\" ])));\n\nvar GRADIENT = \"Gradient\";\n\nvar paintable = function (TBase) { return (\n (function (TBase) {\n function anonymous () {\n TBase.apply(this, arguments);\n }\n\n extendStatic(anonymous, TBase);\n anonymous.prototype = Object.create( TBase && TBase.prototype );\n anonymous.prototype.constructor = anonymous;\n anonymous.fn = anonymous.prototype;\n anonymous.fn.init = anonymous.fn.constructor;\n\n anonymous.prototype.fill = function fill (color, opacity) {\n var options = this.options;\n\n if (defined(color)) {\n if (color && color.nodeType !== GRADIENT) {\n var newFill = {\n color: color\n };\n if (defined(opacity)) {\n newFill.opacity = opacity;\n }\n options.set(\"fill\", newFill);\n } else {\n options.set(\"fill\", color);\n }\n\n return this;\n }\n\n return options.get(\"fill\");\n };\n\n anonymous.prototype.stroke = function stroke (color, width, opacity) {\n if (defined(color)) {\n this.options.set(\"stroke.color\", color);\n\n if (defined(width)) {\n this.options.set(\"stroke.width\", width);\n }\n\n if (defined(opacity)) {\n this.options.set(\"stroke.opacity\", opacity);\n }\n\n return this;\n }\n\n return this.options.get(\"stroke\");\n };\n\n return anonymous;\n }(TBase))\n); };\n\nvar IDENTITY_MATRIX_HASH = Matrix.IDENTITY.toString();\n\nvar measurable = function (TBase) { return (\n (function (TBase) {\n function anonymous () {\n TBase.apply(this, arguments);\n }\n\n extendStatic(anonymous, TBase);\n anonymous.prototype = Object.create( TBase && TBase.prototype );\n anonymous.prototype.constructor = anonymous;\n anonymous.fn = anonymous.prototype;\n anonymous.fn.init = anonymous.fn.constructor;\n\n anonymous.prototype.bbox = function bbox (transformation) {\n var combinedMatrix = toMatrix(this.currentTransform(transformation));\n var matrixHash = combinedMatrix ? combinedMatrix.toString() : IDENTITY_MATRIX_HASH;\n var bbox;\n\n if (this._bboxCache && this._matrixHash === matrixHash) {\n bbox = this._bboxCache.clone();\n } else {\n bbox = this._bbox(combinedMatrix);\n this._bboxCache = bbox ? bbox.clone() : null;\n this._matrixHash = matrixHash;\n }\n\n var strokeWidth = this.options.get(\"stroke.width\");\n if (strokeWidth && bbox) {\n bbox.expand(strokeWidth / 2);\n }\n\n return bbox;\n };\n\n anonymous.prototype.geometryChange = function geometryChange () {\n delete this._bboxCache;\n this.trigger(\"geometryChange\", {\n element: this\n });\n };\n\n return anonymous;\n }(TBase))\n); };\n\nfunction geometryAccessor(name) {\n var fieldName = \"_\" + name;\n return function(value) {\n if (defined(value)) {\n this._observerField(fieldName, value);\n this.geometryChange();\n return this;\n }\n\n return this[fieldName];\n };\n}\n\nfunction defineGeometryAccessors(fn, names) {\n for (var i = 0; i < names.length; i++) {\n fn[names[i]] = geometryAccessor(names[i]);\n }\n}\n\nvar withGeometry = function (TBase, names) {\n if (names === void 0) { names = [ \"geometry\" ]; }\n\n var result = (function (TBase) {\n function result () {\n TBase.apply(this, arguments);\n }extendStatic(result, TBase);\n result.prototype = Object.create( TBase && TBase.prototype );\n result.prototype.constructor = result;\n result.fn = result.prototype;\n result.fn.init = result.fn.constructor;\n\n return result;\n }(TBase));\n defineGeometryAccessors(result.prototype, names);\n\n return result;\n};\n\nvar DEFAULT_STROKE = \"#000\";\n\nvar Circle = (function (superclass) {\n function Circle(geometry, options) {\n if (geometry === void 0) { geometry = new Circle$2(); }\n if (options === void 0) { options = {}; }\n\n superclass.call(this, options);\n\n this.geometry(geometry);\n\n if (!defined(this.options.stroke)) {\n this.stroke(DEFAULT_STROKE);\n }\n }\n\n extendStatic(Circle, superclass);\n Circle.prototype = Object.create( superclass && superclass.prototype );\n Circle.prototype.constructor = Circle;\n Circle.fn = Circle.prototype;\n Circle.fn.init = Circle.fn.constructor;\n\n var prototypeAccessors = { nodeType: {} };\n\n prototypeAccessors.nodeType.get = function () {\n return \"Circle\";\n };\n\n Circle.prototype.rawBBox = function rawBBox () {\n return this._geometry.bbox();\n };\n\n Circle.prototype._bbox = function _bbox (matrix) {\n return this._geometry.bbox(matrix);\n };\n\n Circle.prototype._containsPoint = function _containsPoint (point) {\n return this.geometry().containsPoint(point);\n };\n\n Circle.prototype._isOnPath = function _isOnPath (point) {\n return this.geometry()._isOnPath(point, this.options.stroke.width / 2);\n };\n\n Object.defineProperties( Circle.prototype, prototypeAccessors );\n\n return Circle;\n}(paintable(measurable(withGeometry(Element$1)))));\n\nvar PRECISION = 10;\n\nfunction close$1(a, b, tolerance) {\n if (tolerance === void 0) { tolerance = PRECISION; }\n\n return round(Math.abs(a - b), tolerance) === 0;\n}\n\nfunction closeOrLess(a, b, tolerance) {\n return a < b || close$1(a, b, tolerance);\n}\n\nfunction lineIntersection(p0, p1, p2, p3) {\n var s1x = p1.x - p0.x;\n var s2x = p3.x - p2.x;\n var s1y = p1.y - p0.y;\n var s2y = p3.y - p2.y;\n var nx = p0.x - p2.x;\n var ny = p0.y - p2.y;\n var d = s1x * s2y - s2x * s1y;\n var s = (s1x * ny - s1y * nx) / d;\n var t = (s2x * ny - s2y * nx) / d;\n\n if (s >= 0 && s <= 1 && t >= 0 && t <= 1) {\n return new Point(p0.x + t * s1x, p0.y + t * s1y);\n }\n}\n\nvar MAX_INTERVAL = 45;\nvar pow$1 = Math.pow;\nvar accessors = [ \"radiusX\", \"radiusY\", \"startAngle\", \"endAngle\", \"anticlockwise\" ];\n\nvar Arc$2 = (function (superclass) {\n function Arc(center, options) {\n if (center === void 0) { center = new Point(); }\n if (options === void 0) { options = {}; }\n\n superclass.call(this);\n\n this.setCenter(center);\n\n this.radiusX = options.radiusX;\n this.radiusY = options.radiusY || options.radiusX;\n this.startAngle = options.startAngle;\n this.endAngle = options.endAngle;\n this.anticlockwise = options.anticlockwise || false;\n this.xRotation = options.xRotation;\n }\n\n extendStatic(Arc, superclass);\n Arc.prototype = Object.create( superclass && superclass.prototype );\n Arc.prototype.constructor = Arc;\n Arc.fn = Arc.prototype;\n Arc.fn.init = Arc.fn.constructor;\n\n Arc.prototype.clone = function clone () {\n return new Arc(this.center, {\n radiusX: this.radiusX,\n radiusY: this.radiusY,\n startAngle: this.startAngle,\n endAngle: this.endAngle,\n anticlockwise: this.anticlockwise\n });\n };\n\n Arc.prototype.setCenter = function setCenter (value) {\n this._observerField(\"center\", Point.create(value));\n this.geometryChange();\n return this;\n };\n\n Arc.prototype.getCenter = function getCenter () {\n return this.center;\n };\n\n Arc.prototype.pointAt = function pointAt (angle) {\n var center = this.center;\n var radian = rad(angle);\n\n return new Point(\n center.x + this.radiusX * Math.cos(radian),\n center.y + this.radiusY * Math.sin(radian)\n );\n };\n\n Arc.prototype.curvePoints = function curvePoints () {\n var this$1$1 = this;\n\n var startAngle = this.startAngle;\n var dir = this.anticlockwise ? -1 : 1;\n var curvePoints = [ this.pointAt(startAngle) ];\n var interval = this._arcInterval();\n var intervalAngle = interval.endAngle - interval.startAngle;\n var subIntervalsCount = Math.ceil(intervalAngle / MAX_INTERVAL);\n var subIntervalAngle = intervalAngle / subIntervalsCount;\n var currentAngle = startAngle;\n var transformation;\n if (this.xRotation) {\n transformation = transform$1().rotate(this.xRotation, this.center);\n }\n\n for (var i = 1; i <= subIntervalsCount; i++) {\n var nextAngle = currentAngle + dir * subIntervalAngle;\n var points = this$1$1._intervalCurvePoints(currentAngle, nextAngle, transformation);\n\n curvePoints.push(points.cp1, points.cp2, points.p2);\n currentAngle = nextAngle;\n }\n\n return curvePoints;\n };\n\n Arc.prototype.bbox = function bbox (matrix) {\n var this$1$1 = this;\n\n var interval = this._arcInterval();\n var startAngle = interval.startAngle;\n var endAngle = interval.endAngle;\n var extremeAngles = ellipseExtremeAngles(this.center, this.radiusX, this.radiusY, matrix);\n var extremeX = deg(extremeAngles.x);\n var extremeY = deg(extremeAngles.y);\n var endPoint = this.pointAt(endAngle).transformCopy(matrix);\n var currentAngleX = bboxStartAngle(extremeX, startAngle);\n var currentAngleY = bboxStartAngle(extremeY, startAngle);\n var currentPoint = this.pointAt(startAngle).transformCopy(matrix);\n var minPoint = Point.min(currentPoint, endPoint);\n var maxPoint = Point.max(currentPoint, endPoint);\n\n while (currentAngleX < endAngle || currentAngleY < endAngle) {\n var currentPointX = (void 0);\n if (currentAngleX < endAngle) {\n currentPointX = this$1$1.pointAt(currentAngleX).transformCopy(matrix);\n currentAngleX += 90;\n }\n\n var currentPointY = (void 0);\n if (currentAngleY < endAngle) {\n currentPointY = this$1$1.pointAt(currentAngleY).transformCopy(matrix);\n currentAngleY += 90;\n }\n\n currentPoint = new Point(currentPointX.x, currentPointY.y);\n minPoint = Point.min(minPoint, currentPoint);\n maxPoint = Point.max(maxPoint, currentPoint);\n }\n\n return Rect.fromPoints(minPoint, maxPoint);\n };\n\n Arc.prototype._arcInterval = function _arcInterval () {\n var ref = this;\n var startAngle = ref.startAngle;\n var endAngle = ref.endAngle;\n var anticlockwise = ref.anticlockwise;\n\n if (anticlockwise) {\n var oldStart = startAngle;\n startAngle = endAngle;\n endAngle = oldStart;\n }\n\n if (startAngle > endAngle || (anticlockwise && startAngle === endAngle)) {\n endAngle += 360;\n }\n\n return {\n startAngle: startAngle,\n endAngle: endAngle\n };\n };\n\n Arc.prototype._intervalCurvePoints = function _intervalCurvePoints (startAngle, endAngle, transformation) {\n var p1 = this.pointAt(startAngle);\n var p2 = this.pointAt(endAngle);\n var p1Derivative = this._derivativeAt(startAngle);\n var p2Derivative = this._derivativeAt(endAngle);\n var t = (rad(endAngle) - rad(startAngle)) / 3;\n var cp1 = new Point(p1.x + t * p1Derivative.x, p1.y + t * p1Derivative.y);\n var cp2 = new Point(p2.x - t * p2Derivative.x, p2.y - t * p2Derivative.y);\n if (transformation) {\n p1.transform(transformation);\n p2.transform(transformation);\n cp1.transform(transformation);\n cp2.transform(transformation);\n }\n\n return {\n p1: p1,\n cp1: cp1,\n cp2: cp2,\n p2: p2\n };\n };\n\n Arc.prototype._derivativeAt = function _derivativeAt (angle) {\n var radian = rad(angle);\n\n return new Point(-this.radiusX * Math.sin(radian), this.radiusY * Math.cos(radian));\n };\n\n Arc.prototype.containsPoint = function containsPoint (point) {\n var interval = this._arcInterval();\n var intervalAngle = interval.endAngle - interval.startAngle;\n var ref = this;\n var center = ref.center;\n var radiusX = ref.radiusX;\n var radiusY = ref.radiusY;\n var distance = center.distanceTo(point);\n var angleRad = Math.atan2(point.y - center.y, point.x - center.x);\n var pointRadius = (radiusX * radiusY) /\n Math.sqrt(pow$1(radiusX, 2) * pow$1(Math.sin(angleRad), 2) + pow$1(radiusY, 2) * pow$1(Math.cos(angleRad), 2));\n var startPoint = this.pointAt(this.startAngle).round(PRECISION);\n var endPoint = this.pointAt(this.endAngle).round(PRECISION);\n var intersection = lineIntersection(center, point.round(PRECISION), startPoint, endPoint);\n var containsPoint;\n\n if (intervalAngle < 180) {\n containsPoint = intersection && closeOrLess(center.distanceTo(intersection), distance) && closeOrLess(distance, pointRadius);\n } else {\n var angle = calculateAngle(center.x, center.y, radiusX, radiusY, point.x, point.y);\n if (angle !== 360) {\n angle = (360 + angle) % 360;\n }\n\n var inAngleRange = interval.startAngle <= angle && angle <= interval.endAngle;\n containsPoint = (inAngleRange && closeOrLess(distance, pointRadius)) || (!inAngleRange && (!intersection || intersection.equals(point)));\n }\n return containsPoint;\n };\n\n Arc.prototype._isOnPath = function _isOnPath (point, width) {\n var interval = this._arcInterval();\n var center = this.center;\n var angle = calculateAngle(center.x, center.y, this.radiusX, this.radiusY, point.x, point.y);\n if (angle !== 360) {\n angle = (360 + angle) % 360;\n }\n\n var inAngleRange = interval.startAngle <= angle && angle <= interval.endAngle;\n\n return inAngleRange && this.pointAt(angle).distanceTo(point) <= width;\n };\n\n Arc.fromPoints = function fromPoints (start, end, rx, ry, largeArc, swipe, rotation) {// eslint-disable-line max-params\n var arcParameters = normalizeArcParameters({\n x1: start.x,\n y1: start.y,\n x2: end.x,\n y2: end.y,\n rx: rx,\n ry: ry,\n largeArc: largeArc,\n swipe: swipe,\n rotation: rotation\n });\n\n return new Arc(arcParameters.center, {\n startAngle: arcParameters.startAngle,\n endAngle: arcParameters.endAngle,\n radiusX: arcParameters.radiusX,\n radiusY: arcParameters.radiusY,\n xRotation: arcParameters.xRotation,\n anticlockwise: swipe === 0\n });\n };\n\n return Arc;\n}(withAccessors(HasObservers, accessors)));\n\nfunction calculateAngle(cx, cy, rx, ry, x, y) {\n var cos = round((x - cx) / rx, 3);\n var sin = round((y - cy) / ry, 3);\n\n return round(deg(Math.atan2(sin, cos)));\n}\n\nfunction normalizeArcParameters(parameters) {\n var x1 = parameters.x1;\n var y1 = parameters.y1;\n var x2 = parameters.x2;\n var y2 = parameters.y2;\n var rx = parameters.rx;\n var ry = parameters.ry;\n var largeArc = parameters.largeArc;\n var swipe = parameters.swipe;\n var rotation = parameters.rotation; if (rotation === void 0) { rotation = 0; }\n\n var radians = rad(rotation);\n var cosine = Math.cos(radians);\n var sine = Math.sin(radians);\n\n var xT = cosine * (x1 - x2) / 2 + sine * (y1 - y2) / 2;\n var yT = -sine * (x1 - x2) / 2 + cosine * (y1 - y2) / 2;\n\n var sign = largeArc !== swipe ? 1 : -1;\n\n var xt2 = Math.pow(xT, 2);\n var yt2 = Math.pow(yT, 2);\n var rx2 = Math.pow(rx, 2);\n var ry2 = Math.pow(ry, 2);\n\n var delta = xt2 / rx2 + yt2 / ry2;\n\n if (delta > 1) {\n delta = Math.sqrt(xt2 / rx2 + yt2 / ry2);\n rx = delta * rx;\n rx2 = Math.pow(rx, 2);\n\n ry = delta * ry;\n ry2 = Math.pow(ry, 2);\n }\n\n var constT = sign * Math.sqrt((rx2 * ry2 - rx2 * yt2 - ry2 * xt2) / (rx2 * yt2 + ry2 * xt2));\n // due to rounding errors the value could become NaN even after radii correction\n if (isNaN(constT)) {\n constT = 0;\n }\n\n var cxT = constT * (rx * yT) / ry;\n var cyT = - constT * (ry * xT) / rx;\n\n var cx = cosine * cxT - sine * cyT + (x1 + x2) / 2;\n var cy = sine * cxT + cosine * cyT + (y1 + y2) / 2;\n\n var uX = (xT - cxT) / rx;\n var uY = (yT - cyT) / ry;\n var vX = -(xT + cxT) / rx;\n var vY = -(yT + cyT) / ry;\n\n var startAngle = (uY >= 0 ? 1 : -1) * deg(Math.acos(uX / Math.sqrt(uX * uX + uY * uY)));\n\n var angleCosine = round((uX * vX + uY * vY) / (Math.sqrt(uX * uX + uY * uY) * Math.sqrt(vX * vX + vY * vY)), 10);\n var angle = (uX * vY - uY * vX >= 0 ? 1 : -1) * deg(Math.acos(angleCosine));\n\n if (!swipe && angle > 0) {\n angle -= 360;\n }\n\n if (swipe && angle < 0) {\n angle += 360;\n }\n var endAngle = startAngle + angle;\n var signEndAngle = endAngle >= 0 ? 1 : -1;\n endAngle = (Math.abs(endAngle) % 360) * signEndAngle;\n\n return {\n center: new Point(cx, cy),\n startAngle: startAngle,\n endAngle: endAngle,\n radiusX: rx,\n radiusY: ry,\n xRotation: rotation\n };\n}\n\nfunction bboxStartAngle(angle, start) {\n var startAngle = angle;\n\n while (startAngle < start) {\n startAngle += 90;\n }\n\n return startAngle;\n}\n\nvar push = [].push;\nvar pop = [].pop;\nvar splice = [].splice;\nvar shift = [].shift;\nvar slice = [].slice;\nvar unshift = [].unshift;\n\nvar ElementsArray = (function (HasObservers$$1) {\n function ElementsArray(array) {\n if (array === void 0) { array = []; }\n\n HasObservers$$1.call(this);\n\n this.length = 0;\n this._splice(0, array.length, array);\n }\n\n extendStatic(ElementsArray, HasObservers$$1);\n ElementsArray.prototype = Object.create( HasObservers$$1 && HasObservers$$1.prototype );\n ElementsArray.prototype.constructor = ElementsArray;\n ElementsArray.fn = ElementsArray.prototype;\n ElementsArray.fn.init = ElementsArray.fn.constructor;\n\n ElementsArray.prototype.elements = function elements (value) {\n if (value) {\n this._splice(0, this.length, value);\n\n this._change();\n return this;\n }\n\n return this.slice(0);\n };\n\n ElementsArray.prototype.push = function push$1 () {\n var elements = arguments;\n var result = push.apply(this, elements);\n\n this._add(elements);\n\n return result;\n };\n\n ElementsArray.prototype.slice = function slice$1 () {\n return slice.call(this);\n };\n\n ElementsArray.prototype.pop = function pop$1 () {\n var length = this.length;\n var result = pop.apply(this);\n\n if (length) {\n this._remove([ result ]);\n }\n\n return result;\n };\n\n ElementsArray.prototype.splice = function splice$1 (index, howMany) {\n var elements = slice.call(arguments, 2);\n var result = this._splice(index, howMany, elements);\n\n this._change();\n\n return result;\n };\n\n ElementsArray.prototype.shift = function shift$1 () {\n var length = this.length;\n var result = shift.apply(this);\n\n if (length) {\n this._remove([ result ]);\n }\n\n return result;\n };\n\n ElementsArray.prototype.unshift = function unshift$1 () {\n var elements = arguments;\n var result = unshift.apply(this, elements);\n\n this._add(elements);\n\n return result;\n };\n\n ElementsArray.prototype.indexOf = function indexOf (element) {\n var this$1$1 = this;\n\n var length = this.length;\n\n for (var idx = 0; idx < length; idx++) {\n if (this$1$1[idx] === element) {\n return idx;\n }\n }\n return -1;\n };\n\n ElementsArray.prototype._splice = function _splice (index, howMany, elements) {\n var result = splice.apply(this, [ index, howMany ].concat(elements));\n\n this._clearObserver(result);\n this._setObserver(elements);\n\n return result;\n };\n\n ElementsArray.prototype._add = function _add (elements) {\n this._setObserver(elements);\n this._change();\n };\n\n ElementsArray.prototype._remove = function _remove (elements) {\n this._clearObserver(elements);\n this._change();\n };\n\n ElementsArray.prototype._setObserver = function _setObserver (elements) {\n var this$1$1 = this;\n\n for (var idx = 0; idx < elements.length; idx++) {\n elements[idx].addObserver(this$1$1);\n }\n };\n\n ElementsArray.prototype._clearObserver = function _clearObserver (elements) {\n var this$1$1 = this;\n\n for (var idx = 0; idx < elements.length; idx++) {\n elements[idx].removeObserver(this$1$1);\n }\n };\n\n ElementsArray.prototype._change = function _change () {};\n\n return ElementsArray;\n}(HasObservers));\n\nvar GeometryElementsArray = (function (ElementsArray$$1) {\n function GeometryElementsArray () {\n ElementsArray$$1.apply(this, arguments);\n }\n\n extendStatic(GeometryElementsArray, ElementsArray$$1);\n GeometryElementsArray.prototype = Object.create( ElementsArray$$1 && ElementsArray$$1.prototype );\n GeometryElementsArray.prototype.constructor = GeometryElementsArray;\n GeometryElementsArray.fn = GeometryElementsArray.prototype;\n GeometryElementsArray.fn.init = GeometryElementsArray.fn.constructor;\n\n GeometryElementsArray.prototype._change = function _change () {\n this.geometryChange();\n };\n\n return GeometryElementsArray;\n}(ElementsArray));\n\nfunction isOutOfEndPoint(endPoint, controlPoint, point) {\n var angle = deg(Math.atan2(controlPoint.y - endPoint.y, controlPoint.x - endPoint.x));\n var rotatedPoint = point.transformCopy(transform$1().rotate(-angle, endPoint));\n\n return rotatedPoint.x < endPoint.x;\n}\n\nfunction calculateCurveAt(t, field, points) {\n var t1 = 1 - t;\n return Math.pow(t1, 3) * points[0][field] +\n 3 * Math.pow(t1, 2) * t * points[1][field] +\n 3 * Math.pow(t, 2) * t1 * points[2][field] +\n Math.pow(t, 3) * points[3][field];\n}\n\nfunction toCubicPolynomial(points, field) {\n return [ -points[0][field] + 3 * points[1][field] - 3 * points[2][field] + points[3][field],\n 3 * (points[0][field] - 2 * points[1][field] + points[2][field]),\n 3 * (-points[0][field] + points[1][field]),\n points[0][field]\n ];\n}\n\nvar ComplexNumber = (function (Class$$1) {\n function ComplexNumber(real, img) {\n if (real === void 0) { real = 0; }\n if (img === void 0) { img = 0; }\n\n Class$$1.call(this);\n\n this.real = real;\n this.img = img;\n }\n\n extendStatic(ComplexNumber, Class$$1);\n ComplexNumber.prototype = Object.create( Class$$1 && Class$$1.prototype );\n ComplexNumber.prototype.constructor = ComplexNumber;\n ComplexNumber.fn = ComplexNumber.prototype;\n ComplexNumber.fn.init = ComplexNumber.fn.constructor;\n\n ComplexNumber.prototype.add = function add (cNumber) {\n return new ComplexNumber(round(this.real + cNumber.real, PRECISION), round(this.img + cNumber.img, PRECISION));\n };\n\n ComplexNumber.prototype.addConstant = function addConstant (value) {\n return new ComplexNumber(this.real + value, this.img);\n };\n\n ComplexNumber.prototype.negate = function negate () {\n return new ComplexNumber(-this.real, -this.img);\n };\n\n ComplexNumber.prototype.multiply = function multiply (cNumber) {\n return new ComplexNumber(this.real * cNumber.real - this.img * cNumber.img,\n this.real * cNumber.img + this.img * cNumber.real);\n };\n\n ComplexNumber.prototype.multiplyConstant = function multiplyConstant (value) {\n return new ComplexNumber(this.real * value, this.img * value);\n };\n\n ComplexNumber.prototype.nthRoot = function nthRoot (n) {\n var rad$$1 = Math.atan2(this.img, this.real);\n var r = Math.sqrt(Math.pow(this.img, 2) + Math.pow(this.real, 2));\n var nthR = Math.pow(r, 1 / n);\n\n return new ComplexNumber(nthR * Math.cos(rad$$1 / n), nthR * Math.sin(rad$$1 / n)); //Moivre's formula\n };\n\n ComplexNumber.prototype.equals = function equals (cNumber) {\n return this.real === cNumber.real && this.img === cNumber.img;\n };\n\n ComplexNumber.prototype.isReal = function isReal () {\n return this.img === 0;\n };\n\n return ComplexNumber;\n}(Class));\n\nfunction numberSign$1(x) {\n return x < 0 ? -1 : 1;\n}\n\nfunction solveQuadraticEquation(a, b, c) {\n var squareRoot = Math.sqrt(Math.pow(b, 2) - 4 * a * c);\n return [\n (-b + squareRoot) / (2 * a),\n (-b - squareRoot) / (2 * a)\n ];\n}\n\n//Cardano's formula\nfunction solveCubicEquation(a, b, c, d) {\n if (a === 0) {\n return solveQuadraticEquation(b, c, d);\n }\n\n var p = (3 * a * c - Math.pow(b, 2)) / (3 * Math.pow(a, 2));\n var q = (2 * Math.pow(b, 3) - 9 * a * b * c + 27 * Math.pow(a, 2) * d) / (27 * Math.pow(a, 3));\n var Q = Math.pow(p / 3, 3) + Math.pow(q / 2, 2);\n var i = new ComplexNumber(0,1);\n var b3a = -b / (3 * a);\n var x1, x2, y1, y2, y3, z1, z2;\n\n if (Q < 0) {\n x1 = new ComplexNumber(-q / 2, Math.sqrt(-Q)).nthRoot(3);\n x2 = new ComplexNumber(-q / 2, - Math.sqrt(-Q)).nthRoot(3);\n } else {\n x1 = -q / 2 + Math.sqrt(Q);\n x1 = new ComplexNumber(numberSign$1(x1) * Math.pow(Math.abs(x1), 1 / 3));\n x2 = -q / 2 - Math.sqrt(Q);\n x2 = new ComplexNumber(numberSign$1(x2) * Math.pow(Math.abs(x2), 1 / 3));\n }\n\n y1 = x1.add(x2);\n\n z1 = x1.add(x2).multiplyConstant(-1 / 2);\n z2 = x1.add(x2.negate()).multiplyConstant(Math.sqrt(3) / 2);\n\n y2 = z1.add(i.multiply(z2));\n y3 = z1.add(i.negate().multiply(z2));\n\n var result = [];\n\n if (y1.isReal()) {\n result.push(round(y1.real + b3a, PRECISION));\n }\n if (y2.isReal()) {\n result.push(round(y2.real + b3a, PRECISION));\n }\n if (y3.isReal()) {\n result.push(round(y3.real + b3a, PRECISION));\n }\n\n return result;\n}\n\nfunction hasRootsInRange(points, point, field, rootField, range) {\n var polynomial = toCubicPolynomial(points, rootField);\n var roots = solveCubicEquation(polynomial[0], polynomial[1], polynomial[2], polynomial[3] - point[rootField]);\n var intersection;\n\n for (var idx = 0; idx < roots.length; idx++) {\n if (0 <= roots[idx] && roots[idx] <= 1) {\n intersection = calculateCurveAt(roots[idx], field, points);\n if (Math.abs(intersection - point[field]) <= range) {\n return true;\n }\n }\n }\n}\n\nfunction curveIntersectionsCount(points, point, bbox) {\n var polynomial = toCubicPolynomial(points, \"x\");\n var roots = solveCubicEquation(polynomial[0], polynomial[1], polynomial[2], polynomial[3] - point.x);\n var rayIntersection, intersectsRay;\n var count = 0;\n for (var i = 0; i < roots.length; i++) {\n rayIntersection = calculateCurveAt(roots[i], \"y\", points);\n intersectsRay = close$1(rayIntersection, point.y) || rayIntersection > point.y;\n if (intersectsRay && (((roots[i] === 0 || roots[i] === 1) && bbox.bottomRight().x > point.x) || (0 < roots[i] && roots[i] < 1))) {\n count++;\n }\n }\n\n return count;\n}\n\nfunction lineIntersectionsCount(a, b, point) {\n var intersects;\n if (a.x !== b.x) {\n var minX = Math.min(a.x, b.x);\n var maxX = Math.max(a.x, b.x);\n var minY = Math.min(a.y, b.y);\n var maxY = Math.max(a.y, b.y);\n var inRange = minX <= point.x && point.x < maxX;\n\n if (minY === maxY) {\n intersects = point.y <= minY && inRange;\n } else {\n intersects = inRange && (((maxY - minY) * ((a.x - b.x) * (a.y - b.y) > 0 ? point.x - minX : maxX - point.x)) / (maxX - minX) + minY - point.y) >= 0;\n }\n }\n\n return intersects ? 1 : 0;\n}\n\nfunction pointAccessor(name) {\n var fieldName = \"_\" + name;\n return function(value) {\n if (defined(value)) {\n this._observerField(fieldName, Point.create(value));\n this.geometryChange();\n return this;\n }\n\n return this[fieldName];\n };\n}\n\nfunction definePointAccessors(fn, names) {\n for (var i = 0; i < names.length; i++) {\n fn[names[i]] = pointAccessor(names[i]);\n }\n}\n\nvar withPoints = function (TBase, names) {\n var result = (function (TBase) {\n function result () {\n TBase.apply(this, arguments);\n }extendStatic(result, TBase);\n result.prototype = Object.create( TBase && TBase.prototype );\n result.prototype.constructor = result;\n result.fn = result.prototype;\n result.fn.init = result.fn.constructor;\n\n return result;\n }(TBase));\n definePointAccessors(result.prototype, names);\n\n return result;\n};\n\nvar points = [ \"anchor\", \"controlIn\", \"controlOut\" ];\n\nvar Segment = (function (superclass) {\n function Segment(anchor, controlIn, controlOut) {\n superclass.call(this);\n\n this.anchor(anchor || new Point());\n this.controlIn(controlIn);\n this.controlOut(controlOut);\n }\n\n extendStatic(Segment, superclass);\n Segment.prototype = Object.create( superclass && superclass.prototype );\n Segment.prototype.constructor = Segment;\n Segment.fn = Segment.prototype;\n Segment.fn.init = Segment.fn.constructor;\n\n Segment.prototype.bboxTo = function bboxTo (toSegment, matrix) {\n var segmentAnchor = this.anchor().transformCopy(matrix);\n var toSegmentAnchor = toSegment.anchor().transformCopy(matrix);\n var rect;\n\n if (this.controlOut() && toSegment.controlIn()) {\n rect = this._curveBoundingBox(\n segmentAnchor, this.controlOut().transformCopy(matrix),\n toSegment.controlIn().transformCopy(matrix), toSegmentAnchor\n );\n } else {\n rect = this._lineBoundingBox(segmentAnchor, toSegmentAnchor);\n }\n\n return rect;\n };\n\n Segment.prototype._lineBoundingBox = function _lineBoundingBox (p1, p2) {\n return Rect.fromPoints(p1, p2);\n };\n\n Segment.prototype._curveBoundingBox = function _curveBoundingBox (p1, cp1, cp2, p2) {\n var points = [ p1, cp1, cp2, p2 ];\n var extremesX = this._curveExtremesFor(points, \"x\");\n var extremesY = this._curveExtremesFor(points, \"y\");\n var xLimits = arrayLimits([ extremesX.min, extremesX.max, p1.x, p2.x ]);\n var yLimits = arrayLimits([ extremesY.min, extremesY.max, p1.y, p2.y ]);\n\n return Rect.fromPoints(new Point(xLimits.min, yLimits.min), new Point(xLimits.max, yLimits.max));\n };\n\n Segment.prototype._curveExtremesFor = function _curveExtremesFor (points, field) {\n var extremes = this._curveExtremes(\n points[0][field], points[1][field],\n points[2][field], points[3][field]\n );\n\n return {\n min: calculateCurveAt(extremes.min, field, points),\n max: calculateCurveAt(extremes.max, field, points)\n };\n };\n\n Segment.prototype._curveExtremes = function _curveExtremes (x1, x2, x3, x4) {\n var a = x1 - 3 * x2 + 3 * x3 - x4;\n var b = - 2 * (x1 - 2 * x2 + x3);\n var c = x1 - x2;\n var sqrt = Math.sqrt(b * b - 4 * a * c);\n var t1 = 0;\n var t2 = 1;\n\n if (a === 0) {\n if (b !== 0) {\n t1 = t2 = -c / b;\n }\n } else if (!isNaN(sqrt)) {\n t1 = (- b + sqrt) / (2 * a);\n t2 = (- b - sqrt) / (2 * a);\n }\n\n var min = Math.max(Math.min(t1, t2), 0);\n if (min < 0 || min > 1) {\n min = 0;\n }\n\n var max = Math.min(Math.max(t1, t2), 1);\n if (max > 1 || max < 0) {\n max = 1;\n }\n\n return {\n min: min,\n max: max\n };\n };\n\n Segment.prototype._intersectionsTo = function _intersectionsTo (segment, point) {\n var intersectionsCount;\n if (this.controlOut() && segment.controlIn()) {\n intersectionsCount = curveIntersectionsCount([ this.anchor(), this.controlOut(), segment.controlIn(), segment.anchor() ], point, this.bboxTo(segment));\n } else {\n intersectionsCount = lineIntersectionsCount(this.anchor(), segment.anchor(), point);\n }\n return intersectionsCount;\n };\n\n Segment.prototype._isOnCurveTo = function _isOnCurveTo (segment, point, width, endSegment) {\n var bbox = this.bboxTo(segment).expand(width, width);\n if (bbox.containsPoint(point)) {\n var p1 = this.anchor();\n var p2 = this.controlOut();\n var p3 = segment.controlIn();\n var p4 = segment.anchor();\n\n if (endSegment === \"start\" && p1.distanceTo(point) <= width) {\n return !isOutOfEndPoint(p1, p2, point);\n } else if (endSegment === \"end\" && p4.distanceTo(point) <= width) {\n return !isOutOfEndPoint(p4, p3, point);\n }\n\n //the approach is not entirely correct but is close and the alternatives are solving a 6th degree polynomial or testing the segment points\n var points = [ p1, p2, p3, p4 ];\n if (hasRootsInRange(points, point, \"x\", \"y\", width) || hasRootsInRange(points, point, \"y\", \"x\", width)) {\n return true;\n }\n var rotation = transform$1().rotate(45, point);\n var rotatedPoints = [ p1.transformCopy(rotation), p2.transformCopy(rotation), p3.transformCopy(rotation), p4.transformCopy(rotation) ];\n return hasRootsInRange(rotatedPoints, point, \"x\", \"y\", width) || hasRootsInRange(rotatedPoints, point, \"y\", \"x\", width);\n }\n };\n\n Segment.prototype._isOnLineTo = function _isOnLineTo (segment, point, width) {\n var p1 = this.anchor();\n var p2 = segment.anchor();\n var angle = deg(Math.atan2(p2.y - p1.y, p2.x - p1.x));\n var rect = new Rect([ p1.x, p1.y - width / 2 ], [ p1.distanceTo(p2), width ]);\n return rect.containsPoint(point.transformCopy(transform$1().rotate(-angle, p1)));\n };\n\n Segment.prototype._isOnPathTo = function _isOnPathTo (segment, point, width, endSegment) {\n var isOnPath;\n if (this.controlOut() && segment.controlIn()) {\n isOnPath = this._isOnCurveTo(segment, point, width / 2, endSegment);\n } else {\n isOnPath = this._isOnLineTo(segment, point, width);\n }\n return isOnPath;\n };\n\n return Segment;\n}(withPoints(HasObservers, points)));\n\nfunction arrayLimits(arr) {\n var length = arr.length;\n var min = MAX_NUM;\n var max = MIN_NUM;\n\n for (var i = 0; i < length; i ++) {\n max = Math.max(max, arr[i]);\n min = Math.min(min, arr[i]);\n }\n\n return {\n min: min,\n max: max\n };\n}\n\nvar geometry = {\n\tCircle: Circle$2,\n\tArc: Arc$2,\n\tRect: Rect,\n\tPoint: Point,\n\tSegment: Segment,\n\tMatrix: Matrix,\n\tSize: Size,\n\ttoMatrix: toMatrix,\n\tTransformation: Transformation,\n\ttransform: transform$1\n};\n\nvar WEIGHT = 0.333;\nvar EXTREMUM_ALLOWED_DEVIATION = 0.01;\nvar X = \"x\";\nvar Y = \"y\";\n\nfunction pointsToCurve(pointsIn, closed) {\n var points = pointsIn.slice(0);\n var segments = [];\n var length = points.length;\n\n if (length > 2) {\n removeDuplicates(0, points);\n length = points.length;\n }\n\n if (length < 2 || (length === 2 && points[0].equals(points[1]))) {\n return segments;\n }\n\n var p0 = points[0];\n var p1 = points[1];\n var p2 = points[2];\n\n segments.push(new Segment(p0));\n\n while (p0.equals(points[length - 1])) {\n closed = true;\n points.pop();\n length--;\n }\n\n if (length === 2) {\n var tangent = getTangent(p0,p1, X, Y);\n\n last(segments).controlOut(\n firstControlPoint(tangent, p0, p1, X, Y)\n );\n\n segments.push(new Segment(\n p1,\n secondControlPoint(tangent, p0, p1, X, Y)\n ));\n\n return segments;\n }\n\n var initialControlPoint, lastControlPoint;\n\n if (closed) {\n p0 = points[length - 1]; p1 = points[0]; p2 = points[1];\n var controlPoints = getControlPoints(p0, p1, p2);\n initialControlPoint = controlPoints[1];\n lastControlPoint = controlPoints[0];\n } else {\n var tangent$1 = getTangent(p0, p1, X,Y);\n initialControlPoint = firstControlPoint(tangent$1, p0, p1, X, Y);\n }\n\n var cp0 = initialControlPoint;\n for (var idx = 0; idx <= length - 3; idx++) {\n removeDuplicates(idx, points);\n length = points.length;\n if (idx + 3 <= length) {\n p0 = points[idx]; p1 = points[idx + 1]; p2 = points[idx + 2];\n var controlPoints$1 = getControlPoints(p0,p1,p2);\n\n last(segments).controlOut(cp0);\n cp0 = controlPoints$1[1];\n\n var cp1 = controlPoints$1[0];\n segments.push(new Segment(p1, cp1));\n }\n }\n\n if (closed) {\n p0 = points[length - 2]; p1 = points[length - 1]; p2 = points[0];\n var controlPoints$2 = getControlPoints(p0, p1, p2);\n\n last(segments).controlOut(cp0);\n segments.push(new Segment(\n p1,\n controlPoints$2[0]\n ));\n\n last(segments).controlOut(controlPoints$2[1]);\n segments.push(new Segment(\n p2,\n lastControlPoint\n ));\n } else {\n var tangent$2 = getTangent(p1, p2, X, Y);\n\n last(segments).controlOut(cp0);\n segments.push(new Segment(\n p2,\n secondControlPoint(tangent$2, p1, p2, X, Y)\n ));\n }\n\n return segments;\n}\n\nfunction removeDuplicates(idx, points) {\n while (points[idx + 1] && (points[idx].equals(points[idx + 1]) || points[idx + 1].equals(points[idx + 2]))) {\n points.splice(idx + 1, 1);\n }\n}\n\nfunction invertAxis(p0, p1, p2) {\n var invertAxis = false;\n\n if (p0.x === p1.x) {\n invertAxis = true;\n } else if (p1.x === p2.x) {\n if ((p1.y < p2.y && p0.y <= p1.y) || (p2.y < p1.y && p1.y <= p0.y)) {\n invertAxis = true;\n }\n } else {\n var fn = lineFunction(p0,p1);\n var y2 = calculateFunction(fn, p2.x);\n if (!(p0.y <= p1.y && p2.y <= y2) &&\n !(p1.y <= p0.y && p2.y >= y2)) {\n invertAxis = true;\n }\n }\n\n return invertAxis;\n}\n\nfunction isLine(p0, p1, p2) {\n var fn = lineFunction(p0, p1);\n var y2 = calculateFunction(fn, p2.x);\n\n return (p0.x === p1.x && p1.x === p2.x) || round(y2, 1) === round(p2.y, 1);\n}\n\nfunction lineFunction(p1, p2) {\n var a = (p2.y - p1.y) / (p2.x - p1.x);\n var b = p1.y - a * p1.x;\n\n return [ b, a ];\n}\n\nfunction getControlPoints(p0, p1, p2) {\n var xField = X;\n var yField = Y;\n var restrict = false;\n var switchOrientation = false;\n var tangent;\n\n if (isLine(p0, p1, p2)) {\n tangent = getTangent(p0, p1, X, Y);\n } else {\n var monotonic = {\n x: isMonotonicByField(p0, p1, p2, X),\n y: isMonotonicByField(p0, p1, p2, Y)\n };\n\n if (monotonic.x && monotonic.y) {\n tangent = getTangent(p0, p2, X, Y);\n restrict = true;\n } else {\n if (invertAxis(p0, p1, p2)) {\n xField = Y;\n yField = X;\n }\n\n if (monotonic[xField]) {\n tangent = 0;\n } else {\n var sign;\n if ((p2[yField] < p0[yField] && p0[yField] <= p1[yField]) ||\n (p0[yField] < p2[yField] && p1[yField] <= p0[yField])) {\n sign = numberSign((p2[yField] - p0[yField]) * (p1[xField] - p0[xField]));\n } else {\n sign = -numberSign((p2[xField] - p0[xField]) * (p1[yField] - p0[yField]));\n }\n\n tangent = EXTREMUM_ALLOWED_DEVIATION * sign;\n switchOrientation = true;\n }\n }\n }\n\n var secondCP = secondControlPoint(tangent, p0, p1, xField, yField);\n\n if (switchOrientation) {\n var oldXField = xField;\n xField = yField;\n yField = oldXField;\n }\n\n var firstCP = firstControlPoint(tangent, p1, p2, xField, yField);\n\n if (restrict) {\n restrictControlPoint(p0, p1, secondCP, tangent);\n restrictControlPoint(p1, p2, firstCP, tangent);\n }\n\n return [ secondCP, firstCP ];\n}\n\nfunction restrictControlPoint(p1, p2, cp, tangent) {\n if (p1.y < p2.y) {\n if (p2.y < cp.y) {\n cp.x = p1.x + (p2.y - p1.y) / tangent;\n cp.y = p2.y;\n } else if (cp.y < p1.y) {\n cp.x = p2.x - (p2.y - p1.y) / tangent;\n cp.y = p1.y;\n }\n } else {\n if (cp.y < p2.y) {\n cp.x = p1.x - (p1.y - p2.y) / tangent;\n cp.y = p2.y;\n } else if (p1.y < cp.y) {\n cp.x = p2.x + (p1.y - p2.y) / tangent;\n cp.y = p1.y;\n }\n }\n}\n\nfunction getTangent(p0, p1, xField, yField) {\n var x = p1[xField] - p0[xField];\n var y = p1[yField] - p0[yField];\n var tangent;\n\n if (x === 0) {\n tangent = 0;\n } else {\n tangent = y / x;\n }\n\n return tangent;\n}\n\nfunction isMonotonicByField(p0, p1, p2, field) {\n return (p2[field] > p1[field] && p1[field] > p0[field]) ||\n (p2[field] < p1[field] && p1[field] < p0[field]);\n}\n\nfunction firstControlPoint(tangent, p0, p3, xField, yField) {\n var t1 = p0[xField];\n var t2 = p3[xField];\n var distance = (t2 - t1) * WEIGHT;\n\n return point(t1 + distance, p0[yField] + distance * tangent, xField, yField);\n}\n\nfunction secondControlPoint(tangent, p0, p3, xField, yField) {\n var t1 = p0[xField];\n var t2 = p3[xField];\n var distance = (t2 - t1) * WEIGHT;\n\n return point(t2 - distance, p3[yField] - distance * tangent, xField, yField);\n}\n\nfunction point(xValue, yValue, xField, yField) {\n var controlPoint = new Point();\n controlPoint[xField] = xValue;\n controlPoint[yField] = yValue;\n\n return controlPoint;\n}\n\nfunction calculateFunction(fn, x) {\n var length = fn.length;\n var result = 0;\n\n for (var i = 0; i < length; i++) {\n result += Math.pow(x,i) * fn[i];\n }\n return result;\n}\n\nfunction numberSign(value) {\n return value <= 0 ? -1 : 1;\n}\n\nvar ShapeMap = {\n l: function(path, options) {\n var parameters = options.parameters;\n var position = options.position;\n\n for (var i = 0; i < parameters.length; i += 2) {\n var point = new Point(parameters[i], parameters[i + 1]);\n\n if (options.isRelative) {\n point.translateWith(position);\n }\n\n path.lineTo(point.x, point.y);\n\n position.x = point.x;\n position.y = point.y;\n }\n },\n\n c: function(path, options) {\n var parameters = options.parameters;\n var position = options.position;\n\n for (var i = 0; i < parameters.length; i += 6) {\n var controlOut = new Point(parameters[i], parameters[i + 1]);\n var controlIn = new Point(parameters[i + 2], parameters[i + 3]);\n var point = new Point(parameters[i + 4], parameters[i + 5]);\n if (options.isRelative) {\n controlIn.translateWith(position);\n controlOut.translateWith(position);\n point.translateWith(position);\n }\n\n path.curveTo(controlOut, controlIn, point);\n\n position.x = point.x;\n position.y = point.y;\n }\n },\n\n v: function(path, options) {\n var value = options.isRelative ? 0 : options.position.x;\n\n toLineParamaters(options.parameters, true, value);\n this.l(path, options);\n },\n\n h: function(path, options) {\n var value = options.isRelative ? 0 : options.position.y;\n\n toLineParamaters(options.parameters, false, value);\n this.l(path, options);\n },\n\n a: function(path, options) {\n var parameters = options.parameters;\n var position = options.position;\n\n for (var i = 0; i < parameters.length; i += 7) {\n var radiusX = parameters[i];\n var radiusY = parameters[i + 1];\n var rotation = parameters[i + 2];\n var largeArc = parameters[i + 3];\n var swipe = parameters[i + 4];\n var endPoint = new Point(parameters[i + 5], parameters[i + 6]);\n\n if (options.isRelative) {\n endPoint.translateWith(position);\n }\n if (position.x !== endPoint.x || position.y !== endPoint.y) {\n path.arcTo(endPoint, radiusX, radiusY, largeArc, swipe, rotation);\n\n position.x = endPoint.x;\n position.y = endPoint.y;\n }\n }\n },\n\n s: function(path, options) {\n var parameters = options.parameters;\n var position = options.position;\n var previousCommand = options.previousCommand;\n var lastControlIn;\n\n if (previousCommand === \"s\" || previousCommand === \"c\") {\n lastControlIn = last(last(path.paths).segments).controlIn();\n }\n\n for (var i = 0; i < parameters.length; i += 4) {\n var controlIn = new Point(parameters[i], parameters[i + 1]);\n var endPoint = new Point(parameters[i + 2], parameters[i + 3]);\n var controlOut = (void 0);\n\n if (options.isRelative) {\n controlIn.translateWith(position);\n endPoint.translateWith(position);\n }\n\n if (lastControlIn) {\n controlOut = reflectionPoint(lastControlIn, position);\n } else {\n controlOut = position.clone();\n }\n\n lastControlIn = controlIn;\n\n path.curveTo(controlOut, controlIn, endPoint);\n\n position.x = endPoint.x;\n position.y = endPoint.y;\n }\n },\n\n q: function(path, options) {\n var parameters = options.parameters;\n var position = options.position;\n\n for (var i = 0; i < parameters.length; i += 4) {\n var controlPoint = new Point(parameters[i], parameters[i + 1]);\n var endPoint = new Point(parameters[i + 2], parameters[i + 3]);\n\n if (options.isRelative) {\n controlPoint.translateWith(position);\n endPoint.translateWith(position);\n }\n\n var cubicControlPoints = quadraticToCubicControlPoints(position, controlPoint, endPoint);\n\n path.curveTo(cubicControlPoints.controlOut, cubicControlPoints.controlIn, endPoint);\n\n position.x = endPoint.x;\n position.y = endPoint.y;\n }\n },\n\n t: function(path, options) {\n var parameters = options.parameters;\n var position = options.position;\n var previousCommand = options.previousCommand;\n var controlPoint;\n\n if (previousCommand === \"q\" || previousCommand === \"t\") {\n var lastSegment = last(last(path.paths).segments);\n controlPoint = lastSegment.controlIn().clone()\n .translateWith(position.scaleCopy(-1 / 3))\n .scale(3 / 2);\n }\n\n for (var i = 0; i < parameters.length; i += 2) {\n var endPoint = new Point(parameters[i], parameters[i + 1]);\n if (options.isRelative) {\n endPoint.translateWith(position);\n }\n\n if (controlPoint) {\n controlPoint = reflectionPoint(controlPoint, position);\n } else {\n controlPoint = position.clone();\n }\n\n var cubicControlPoints = quadraticToCubicControlPoints(position, controlPoint, endPoint);\n\n path.curveTo(cubicControlPoints.controlOut, cubicControlPoints.controlIn, endPoint);\n\n position.x = endPoint.x;\n position.y = endPoint.y;\n }\n }\n};\n\nfunction toLineParamaters(parameters, isVertical, value) {\n var insertPosition = isVertical ? 0 : 1;\n\n for (var i = 0; i < parameters.length; i += 2) {\n parameters.splice(i + insertPosition, 0, value);\n }\n}\n\nfunction reflectionPoint(point, center) {\n if (point && center) {\n return center.scaleCopy(2).translate(-point.x, -point.y);\n }\n}\n\nvar third = 1 / 3;\n\nfunction quadraticToCubicControlPoints(position, controlPoint, endPoint) {\n var scaledPoint = controlPoint.clone().scale(2 / 3);\n return {\n controlOut: scaledPoint.clone().translateWith(position.scaleCopy(third)),\n controlIn: scaledPoint.translateWith(endPoint.scaleCopy(third))\n };\n}\n\nvar SEGMENT_REGEX = /([a-df-z]{1})([^a-df-z]*)(z)?/gi;\nvar SPLIT_REGEX = /[,\\s]?([+\\-]?(?:\\d*\\.\\d+|\\d+)(?:[eE][+\\-]?\\d+)?)/g;\nvar MOVE = \"m\";\nvar CLOSE = \"z\";\n\nfunction parseParameters(str) {\n var parameters = [];\n str.replace(SPLIT_REGEX, function(match, number) {\n parameters.push(parseFloat(number));\n });\n return parameters;\n}\n\nfunction parsePath(pathInstance, str) {\n var position = new Point();\n var previousCommand;\n\n str.replace(SEGMENT_REGEX, function (match, element, params, closePath) {\n var command = element.toLowerCase();\n var isRelative = command === element;\n var parameters = parseParameters(params.trim());\n\n if (command === MOVE) {\n if (isRelative) {\n position.x += parameters[0];\n position.y += parameters[1];\n } else {\n position.x = parameters[0];\n position.y = parameters[1];\n }\n\n pathInstance.moveTo(position.x, position.y);\n\n if (parameters.length > 2) {\n command = \"l\";\n parameters.splice(0, 2);\n }\n }\n\n if (ShapeMap[command]) {\n ShapeMap[command](\n pathInstance, {\n parameters: parameters,\n position: position,\n isRelative: isRelative,\n previousCommand: previousCommand\n }\n );\n\n if (closePath && closePath.toLowerCase() === CLOSE) {\n pathInstance.close();\n }\n } else if (command !== MOVE) {\n throw new Error(\"Error while parsing SVG path. Unsupported command: \" + command);\n }\n\n previousCommand = command;\n });\n\n return pathInstance;\n}\n\nfunction elementsBoundingBox(elements, applyTransform, transformation) {\n var boundingBox;\n\n for (var i = 0; i < elements.length; i++) {\n var element = elements[i];\n if (element.visible()) {\n var elementBoundingBox = applyTransform ? element.bbox(transformation) : element.rawBBox();\n if (elementBoundingBox) {\n if (boundingBox) {\n boundingBox = Rect.union(boundingBox, elementBoundingBox);\n } else {\n boundingBox = elementBoundingBox;\n }\n }\n }\n }\n\n return boundingBox;\n}\n\nfunction elementsClippedBoundingBox(elements, transformation) {\n var boundingBox;\n\n for (var i = 0; i < elements.length; i++) {\n var element = elements[i];\n if (element.visible()) {\n var elementBoundingBox = element.clippedBBox(transformation);\n if (elementBoundingBox) {\n if (boundingBox) {\n boundingBox = Rect.union(boundingBox, elementBoundingBox);\n } else {\n boundingBox = elementBoundingBox;\n }\n }\n }\n }\n\n return boundingBox;\n}\n\nvar SPACE = ' ';\nvar printPoints = function (precision) { return function () {\n var points = [], len = arguments.length;\n while ( len-- ) points[ len ] = arguments[ len ];\n\n return points.map(function (p) { return p.toString(precision); }).join(SPACE);\n } };\nvar segmentType = function (segmentStart, segmentEnd) { return segmentStart.controlOut() && segmentEnd.controlIn() ? 'C' : 'L'; };\n\nvar Path = (function (superclass) {\n function Path(options) {\n superclass.call(this, options);\n this.segments = new GeometryElementsArray();\n this.segments.addObserver(this);\n\n if (!defined(this.options.stroke)) {\n this.stroke('#000');\n\n if (!defined(this.options.stroke.lineJoin)) {\n this.options.set('stroke.lineJoin', 'miter');\n }\n }\n }\n\n extendStatic(Path, superclass);\n Path.prototype = Object.create( superclass && superclass.prototype );\n Path.prototype.constructor = Path;\n Path.fn = Path.prototype;\n Path.fn.init = Path.fn.constructor;\n\n var prototypeAccessors = { nodeType: {} };\n\n prototypeAccessors.nodeType.get = function () {\n return 'Path';\n };\n\n Path.prototype.moveTo = function moveTo (x, y) {\n this.suspend();\n this.segments.elements([]);\n this.resume();\n\n this.lineTo(x, y);\n\n return this;\n };\n\n Path.prototype.lineTo = function lineTo (x, y) {\n var point$$1 = defined(y) ? new Point(x, y) : x;\n var segment = new Segment(point$$1);\n\n this.segments.push(segment);\n\n return this;\n };\n\n Path.prototype.curveTo = function curveTo (controlOut, controlIn, point$$1) {\n if (this.segments.length > 0) {\n var lastSegment = last(this.segments);\n var segment = new Segment(point$$1, controlIn);\n this.suspend();\n lastSegment.controlOut(controlOut);\n this.resume();\n\n this.segments.push(segment);\n }\n\n return this;\n };\n\n Path.prototype.arc = function arc (startAngle, endAngle, radiusX, radiusY, anticlockwise) {\n if (this.segments.length > 0) {\n var lastSegment = last(this.segments);\n var anchor = lastSegment.anchor();\n var start = rad(startAngle);\n var center = new Point(anchor.x - radiusX * Math.cos(start),\n anchor.y - radiusY * Math.sin(start));\n var arc = new Arc$2(center, {\n startAngle: startAngle,\n endAngle: endAngle,\n radiusX: radiusX,\n radiusY: radiusY,\n anticlockwise: anticlockwise\n });\n\n this._addArcSegments(arc);\n }\n\n return this;\n };\n\n Path.prototype.arcTo = function arcTo (end, rx, ry, largeArc, swipe, rotation) {\n if (this.segments.length > 0) {\n var lastSegment = last(this.segments);\n var anchor = lastSegment.anchor();\n var arc = Arc$2.fromPoints(anchor, Point.create(end), rx, ry, largeArc, swipe, rotation);\n\n this._addArcSegments(arc);\n }\n return this;\n };\n\n Path.prototype._addArcSegments = function _addArcSegments (arc) {\n var this$1$1 = this;\n\n this.suspend();\n\n var curvePoints = arc.curvePoints();\n\n for (var i = 1; i < curvePoints.length; i += 3) {\n this$1$1.curveTo(curvePoints[i], curvePoints[i + 1], curvePoints[i + 2]);\n }\n\n this.resume();\n this.geometryChange();\n };\n\n Path.prototype.close = function close () {\n this.options.closed = true;\n this.geometryChange();\n\n return this;\n };\n\n Path.prototype.rawBBox = function rawBBox () {\n return this._bbox();\n };\n\n Path.prototype.toString = function toString (digits) {\n var output = '';\n\n var segments = this.segments;\n var length = segments.length;\n if (length > 0) {\n var parts = [];\n var print = printPoints(digits);\n var currentType;\n\n for (var i = 1; i < length; i++) {\n var type = segmentType(segments[i - 1], segments[i]);\n if (type !== currentType) {\n currentType = type;\n parts.push(type);\n }\n\n if (type === 'L') {\n parts.push(print(segments[i].anchor()));\n } else {\n parts.push(print(\n segments[i - 1].controlOut(), segments[i].controlIn(), segments[i].anchor()\n ));\n }\n }\n\n output = 'M' + print(segments[0].anchor()) + SPACE + parts.join(SPACE);\n if (this.options.closed) {\n output += 'Z';\n }\n }\n\n return output;\n };\n\n Path.prototype._containsPoint = function _containsPoint (point$$1) {\n var segments = this.segments;\n var length = segments.length;\n var intersectionsCount = 0;\n var previous, current;\n\n for (var idx = 1; idx < length; idx++) {\n previous = segments[idx - 1];\n current = segments[idx];\n intersectionsCount += previous._intersectionsTo(current, point$$1);\n }\n\n if (this.options.closed || !segments[0].anchor().equals(segments[length - 1].anchor())) {\n intersectionsCount += lineIntersectionsCount(segments[0].anchor(), segments[length - 1].anchor(), point$$1);\n }\n\n return intersectionsCount % 2 !== 0;\n };\n\n Path.prototype._isOnPath = function _isOnPath (point$$1, width) {\n var segments = this.segments;\n var length = segments.length;\n var pathWidth = width || this.options.stroke.width;\n\n if (length > 1) {\n if (segments[0]._isOnPathTo(segments[1], point$$1, pathWidth, 'start')) {\n return true;\n }\n\n for (var idx = 2; idx <= length - 2; idx++) {\n if (segments[idx - 1]._isOnPathTo(segments[idx], point$$1, pathWidth)) {\n return true;\n }\n }\n\n if (segments[length - 2]._isOnPathTo(segments[length - 1], point$$1, pathWidth, 'end')) {\n return true;\n }\n }\n return false;\n };\n\n Path.prototype._bbox = function _bbox (matrix) {\n var segments = this.segments;\n var length = segments.length;\n var boundingBox;\n\n if (length === 1) {\n var anchor = segments[0].anchor().transformCopy(matrix);\n boundingBox = new Rect(anchor, Size.ZERO);\n } else if (length > 0) {\n for (var i = 1; i < length; i++) {\n var segmentBox = segments[i - 1].bboxTo(segments[i], matrix);\n if (boundingBox) {\n boundingBox = Rect.union(boundingBox, segmentBox);\n } else {\n boundingBox = segmentBox;\n }\n }\n }\n\n return boundingBox;\n };\n\n Path.parse = function parse (str, options) {\n return MultiPath.parse(str, options);\n };\n\n Path.fromRect = function fromRect (rect, options) {\n var path = new Path(options);\n var ref = rect.cornerRadius;\n var rx = ref[0];\n var ry = ref[1];\n\n if (rx === 0 && ry === 0) {\n path.moveTo(rect.topLeft())\n .lineTo(rect.topRight())\n .lineTo(rect.bottomRight())\n .lineTo(rect.bottomLeft())\n .close();\n } else {\n var origin = rect.origin;\n var x = origin.x;\n var y = origin.y;\n var width = rect.width();\n var height = rect.height();\n rx = limitValue(rx, 0, width / 2);\n ry = limitValue(ry, 0, height / 2);\n\n path.moveTo(x + rx, y)\n .lineTo(x + width - rx, y)\n .arcTo([ x + width, y + ry ], rx, ry, false)\n .lineTo(x + width, y + height - ry)\n .arcTo([ x + width - rx, y + height ], rx, ry, false)\n .lineTo(x + rx, y + height)\n .arcTo([ x, y + height - ry ], rx, ry, false)\n .lineTo(x, y + ry)\n .arcTo([ x + rx, y ], rx, ry, false);\n }\n\n return path;\n };\n\n Path.fromPoints = function fromPoints (points, options) {\n if (points) {\n var path = new Path(options);\n\n for (var i = 0; i < points.length; i++) {\n var point$$1 = Point.create(points[i]);\n if (point$$1) {\n if (i === 0) {\n path.moveTo(point$$1);\n } else {\n path.lineTo(point$$1);\n }\n }\n }\n\n return path;\n }\n };\n\n Path.curveFromPoints = function curveFromPoints (points, options) {\n if (points) {\n var segments = pointsToCurve(points);\n var path = new Path(options);\n path.segments.push.apply(path.segments, segments);\n\n return path;\n }\n };\n\n Path.fromArc = function fromArc (arc, options) {\n var path = new Path(options);\n var startAngle = arc.startAngle;\n var start = arc.pointAt(startAngle);\n path.moveTo(start.x, start.y);\n path.arc(startAngle, arc.endAngle, arc.radiusX, arc.radiusY, arc.anticlockwise);\n return path;\n };\n\n Object.defineProperties( Path.prototype, prototypeAccessors );\n\n return Path;\n}(paintable(measurable(Element$1))));\n\nvar MultiPath = (function (superclass) {\n function MultiPath(options) {\n superclass.call(this, options);\n this.paths = new GeometryElementsArray();\n this.paths.addObserver(this);\n\n if (!defined(this.options.stroke)) {\n this.stroke('#000');\n }\n }\n\n extendStatic(MultiPath, superclass);\n MultiPath.prototype = Object.create( superclass && superclass.prototype );\n MultiPath.prototype.constructor = MultiPath;\n MultiPath.fn = MultiPath.prototype;\n MultiPath.fn.init = MultiPath.fn.constructor;\n\n var prototypeAccessors$1 = { nodeType: {} };\n\n MultiPath.parse = function parse (str, options) {\n var instance = new MultiPath(options);\n return parsePath(instance, str);\n };\n\n MultiPath.prototype.toString = function toString (digits) {\n var paths = this.paths;\n var output = '';\n\n if (paths.length > 0) {\n var result = [];\n\n for (var i = 0; i < paths.length; i++) {\n result.push(paths[i].toString(digits));\n }\n\n output = result.join(SPACE);\n }\n\n return output;\n };\n\n prototypeAccessors$1.nodeType.get = function () {\n return 'MultiPath';\n };\n\n MultiPath.prototype.moveTo = function moveTo (x, y) {\n var path = new Path();\n path.moveTo(x, y);\n\n this.paths.push(path);\n\n return this;\n };\n\n MultiPath.prototype.lineTo = function lineTo (x, y) {\n if (this.paths.length > 0) {\n last(this.paths).lineTo(x, y);\n }\n\n return this;\n };\n\n MultiPath.prototype.curveTo = function curveTo (controlOut, controlIn, point$$1) {\n if (this.paths.length > 0) {\n last(this.paths).curveTo(controlOut, controlIn, point$$1);\n }\n\n return this;\n };\n\n MultiPath.prototype.arc = function arc (startAngle, endAngle, radiusX, radiusY, anticlockwise) {\n if (this.paths.length > 0) {\n last(this.paths).arc(startAngle, endAngle, radiusX, radiusY, anticlockwise);\n }\n\n return this;\n };\n\n MultiPath.prototype.arcTo = function arcTo (end, rx, ry, largeArc, swipe, rotation) {\n if (this.paths.length > 0) {\n last(this.paths).arcTo(end, rx, ry, largeArc, swipe, rotation);\n }\n\n return this;\n };\n\n MultiPath.prototype.close = function close () {\n if (this.paths.length > 0) {\n last(this.paths).close();\n }\n\n return this;\n };\n\n MultiPath.prototype._bbox = function _bbox (matrix) {\n return elementsBoundingBox(this.paths, true, matrix);\n };\n\n MultiPath.prototype.rawBBox = function rawBBox () {\n return elementsBoundingBox(this.paths, false);\n };\n\n MultiPath.prototype._containsPoint = function _containsPoint (point$$1) {\n var paths = this.paths;\n\n for (var idx = 0; idx < paths.length; idx++) {\n if (paths[idx]._containsPoint(point$$1)) {\n return true;\n }\n }\n return false;\n };\n\n MultiPath.prototype._isOnPath = function _isOnPath (point$$1) {\n var paths = this.paths;\n var width = this.options.stroke.width;\n\n for (var idx = 0; idx < paths.length; idx++) {\n if (paths[idx]._isOnPath(point$$1, width)) {\n return true;\n }\n }\n return false;\n };\n\n MultiPath.prototype._clippedBBox = function _clippedBBox (transformation) {\n return elementsClippedBoundingBox(this.paths, this.currentTransform(transformation));\n };\n\n Object.defineProperties( MultiPath.prototype, prototypeAccessors$1 );\n\n return MultiPath;\n}(paintable(measurable(Element$1))));\n\nvar DEFAULT_STROKE$1 = \"#000\";\n\nvar Arc = (function (superclass) {\n function Arc(geometry, options) {\n if (geometry === void 0) { geometry = new Arc$2(); }\n if (options === void 0) { options = {}; }\n\n superclass.call(this, options);\n\n this.geometry(geometry);\n\n if (!defined(this.options.stroke)) {\n this.stroke(DEFAULT_STROKE$1);\n }\n }\n\n extendStatic(Arc, superclass);\n Arc.prototype = Object.create( superclass && superclass.prototype );\n Arc.prototype.constructor = Arc;\n Arc.fn = Arc.prototype;\n Arc.fn.init = Arc.fn.constructor;\n\n var prototypeAccessors = { nodeType: {} };\n\n prototypeAccessors.nodeType.get = function () {\n return \"Arc\";\n };\n\n Arc.prototype._bbox = function _bbox (matrix) {\n return this._geometry.bbox(matrix);\n };\n\n Arc.prototype.rawBBox = function rawBBox () {\n return this.geometry().bbox();\n };\n\n Arc.prototype.toPath = function toPath () {\n var path = new Path();\n var curvePoints = this.geometry().curvePoints();\n\n if (curvePoints.length > 0) {\n path.moveTo(curvePoints[0].x, curvePoints[0].y);\n\n for (var i = 1; i < curvePoints.length; i += 3) {\n path.curveTo(curvePoints[i], curvePoints[i + 1], curvePoints[i + 2]);\n }\n }\n\n return path;\n };\n\n Arc.prototype._containsPoint = function _containsPoint (point) {\n return this.geometry().containsPoint(point);\n };\n\n Arc.prototype._isOnPath = function _isOnPath (point) {\n return this.geometry()._isOnPath(point, this.options.stroke.width / 2);\n };\n\n Object.defineProperties( Arc.prototype, prototypeAccessors );\n\n return Arc;\n}(paintable(measurable(withGeometry(Element$1)))));\n\nvar DEFAULT_FONT = \"12px sans-serif\";\nvar DEFAULT_FILL = \"#000\";\n\nvar Text = (function (superclass) {\n function Text(content, position, options) {\n if (position === void 0) { position = new Point(); }\n if (options === void 0) { options = {}; }\n\n superclass.call(this, options);\n\n this.content(content);\n this.position(position);\n\n if (!this.options.font) {\n this.options.font = DEFAULT_FONT;\n }\n\n if (!defined(this.options.fill)) {\n this.fill(DEFAULT_FILL);\n }\n }\n\n extendStatic(Text, superclass);\n Text.prototype = Object.create( superclass && superclass.prototype );\n Text.prototype.constructor = Text;\n Text.fn = Text.prototype;\n Text.fn.init = Text.fn.constructor;\n\n var prototypeAccessors = { nodeType: {} };\n\n prototypeAccessors.nodeType.get = function () {\n return \"Text\";\n };\n\n Text.prototype.content = function content (value) {\n if (defined(value)) {\n this.options.set(\"content\", value);\n return this;\n }\n\n return this.options.get(\"content\");\n };\n\n Text.prototype.measure = function measure () {\n var metrics = kendoUtil.measureText(this.content(), {\n font: this.options.get(\"font\")\n });\n\n return metrics;\n };\n\n Text.prototype.rect = function rect () {\n var size = this.measure();\n var pos = this.position().clone();\n return new Rect(pos, [ size.width, size.height ]);\n };\n\n Text.prototype.bbox = function bbox (transformation) {\n var combinedMatrix = toMatrix(this.currentTransform(transformation));\n return this.rect().bbox(combinedMatrix);\n };\n\n Text.prototype.rawBBox = function rawBBox () {\n return this.rect().bbox();\n };\n\n Text.prototype._containsPoint = function _containsPoint (point) {\n return this.rect().containsPoint(point);\n };\n\n Object.defineProperties( Text.prototype, prototypeAccessors );\n\n return Text;\n}(paintable(withPoints(Element$1, [ \"position\" ]))));\n\nvar Image$1 = (function (superclass) {\n function Image(src, rect, options) {\n if (rect === void 0) { rect = new Rect(); }\n if (options === void 0) { options = {}; }\n\n superclass.call(this, options);\n\n this.src(src);\n this.rect(rect);\n }\n\n extendStatic(Image, superclass);\n Image.prototype = Object.create( superclass && superclass.prototype );\n Image.prototype.constructor = Image;\n Image.fn = Image.prototype;\n Image.fn.init = Image.fn.constructor;\n\n var prototypeAccessors = { nodeType: {} };\n\n prototypeAccessors.nodeType.get = function () {\n return \"Image\";\n };\n\n Image.prototype.src = function src (value) {\n if (defined(value)) {\n this.options.set(\"src\", value);\n return this;\n }\n\n return this.options.get(\"src\");\n };\n\n Image.prototype.bbox = function bbox (transformation) {\n var combinedMatrix = toMatrix(this.currentTransform(transformation));\n return this._rect.bbox(combinedMatrix);\n };\n\n Image.prototype.rawBBox = function rawBBox () {\n return this._rect.bbox();\n };\n\n Image.prototype._containsPoint = function _containsPoint (point) {\n return this._rect.containsPoint(point);\n };\n\n Image.prototype._hasFill = function _hasFill () {\n return this.src();\n };\n\n Object.defineProperties( Image.prototype, prototypeAccessors );\n\n return Image;\n}(withGeometry(Element$1, [ \"rect\" ])));\n\nvar traversable = function (TBase, childrenField) { return (\n (function (TBase) {\n function anonymous () {\n TBase.apply(this, arguments);\n }\n\n extendStatic(anonymous, TBase);\n anonymous.prototype = Object.create( TBase && TBase.prototype );\n anonymous.prototype.constructor = anonymous;\n anonymous.fn = anonymous.prototype;\n anonymous.fn.init = anonymous.fn.constructor;\n\n anonymous.prototype.traverse = function traverse (callback) {\n var children = this[childrenField];\n\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n\n if (child.traverse) {\n child.traverse(callback);\n } else {\n callback(child);\n }\n }\n\n return this;\n };\n\n return anonymous;\n }(TBase))\n); };\n\nvar Group = (function (superclass) {\n function Group(options) {\n superclass.call(this, options);\n this.children = [];\n }\n\n extendStatic(Group, superclass);\n Group.prototype = Object.create( superclass && superclass.prototype );\n Group.prototype.constructor = Group;\n Group.fn = Group.prototype;\n Group.fn.init = Group.fn.constructor;\n\n var prototypeAccessors = { nodeType: {} };\n\n prototypeAccessors.nodeType.get = function () {\n return \"Group\";\n };\n\n Group.prototype.childrenChange = function childrenChange (action, items, index) {\n this.trigger(\"childrenChange\",{\n action: action,\n items: items,\n index: index\n });\n };\n\n Group.prototype.append = function append$1 () {\n append$1$1(this.children, arguments);\n this._reparent(arguments, this);\n\n this.childrenChange(\"add\", arguments);\n\n return this;\n };\n\n Group.prototype.insert = function insert (index, element) {\n this.children.splice(index, 0, element);\n element.parent = this;\n\n this.childrenChange(\"add\", [ element ], index);\n\n return this;\n };\n\n Group.prototype.insertAt = function insertAt (element, index) {\n return this.insert(index, element);\n };\n\n Group.prototype.remove = function remove (element) {\n var index = this.children.indexOf(element);\n if (index >= 0) {\n this.children.splice(index, 1);\n element.parent = null;\n this.childrenChange(\"remove\", [ element ], index);\n }\n\n return this;\n };\n\n Group.prototype.removeAt = function removeAt (index) {\n if (0 <= index && index < this.children.length) {\n var element = this.children[index];\n this.children.splice(index, 1);\n element.parent = null;\n this.childrenChange(\"remove\", [ element ], index);\n }\n\n return this;\n };\n\n Group.prototype.clear = function clear () {\n var items = this.children;\n this.children = [];\n this._reparent(items, null);\n\n this.childrenChange(\"remove\", items, 0);\n\n return this;\n };\n\n Group.prototype.bbox = function bbox (transformation) {\n return elementsBoundingBox(this.children, true, this.currentTransform(transformation));\n };\n\n Group.prototype.rawBBox = function rawBBox () {\n return elementsBoundingBox(this.children, false);\n };\n\n Group.prototype._clippedBBox = function _clippedBBox (transformation) {\n return elementsClippedBoundingBox(this.children, this.currentTransform(transformation));\n };\n\n Group.prototype.currentTransform = function currentTransform (transformation) {\n return Element$1.prototype.currentTransform.call(this, transformation) || null;\n };\n\n Group.prototype.containsPoint = function containsPoint (point, parentTransform) {\n if (this.visible()) {\n var children = this.children;\n var transform = this.currentTransform(parentTransform);\n for (var idx = 0; idx < children.length; idx++) {\n if (children[idx].containsPoint(point, transform)) {\n return true;\n }\n }\n }\n return false;\n };\n\n Group.prototype._reparent = function _reparent (elements, newParent) {\n var this$1$1 = this;\n\n for (var i = 0; i < elements.length; i++) {\n var child = elements[i];\n var parent = child.parent;\n if (parent && parent !== this$1$1 && parent.remove) {\n parent.remove(child);\n }\n\n child.parent = newParent;\n }\n };\n\n Object.defineProperties( Group.prototype, prototypeAccessors );\n\n return Group;\n}(traversable(Element$1, \"children\")));\n\nfunction translateToPoint(point, bbox, element) {\n var transofrm = element.transform() || transform$1();\n var matrix = transofrm.matrix();\n matrix.e += point.x - bbox.origin.x;\n matrix.f += point.y - bbox.origin.y;\n\n transofrm.matrix(matrix);\n element.transform(transofrm);\n}\n\nfunction alignStart(size, rect, align, axis, sizeField) {\n var start;\n if (align === \"start\") {\n start = rect.origin[axis];\n } else if (align === \"end\") {\n start = rect.origin[axis] + rect.size[sizeField] - size;\n } else {\n start = rect.origin[axis] + (rect.size[sizeField] - size) / 2;\n }\n\n return start;\n}\n\nfunction alignStartReverse(size, rect, align, axis, sizeField) {\n var start;\n if (align === \"start\") {\n start = rect.origin[axis] + rect.size[sizeField] - size;\n } else if (align === \"end\") {\n start = rect.origin[axis];\n } else {\n start = rect.origin[axis] + (rect.size[sizeField] - size) / 2;\n }\n\n return start;\n}\n\nvar DEFAULT_OPTIONS = {\n alignContent: \"start\",\n justifyContent: \"start\",\n alignItems: \"start\",\n spacing: 0,\n orientation: \"horizontal\",\n lineSpacing: 0,\n wrap: true,\n revers: false\n};\n\nvar forEach = function (elements, callback) {\n elements.forEach(callback);\n};\n\nvar forEachReverse = function (elements, callback) {\n var length = elements.length;\n\n for (var idx = length - 1; idx >= 0; idx--) {\n callback(elements[idx], idx);\n }\n};\n\nvar Layout = (function (Group$$1) {\n function Layout(rect, options) {\n Group$$1.call(this, $.extend({}, DEFAULT_OPTIONS, options));\n this._rect = rect;\n this._fieldMap = {};\n }\n\n extendStatic(Layout, Group$$1);\n Layout.prototype = Object.create( Group$$1 && Group$$1.prototype );\n Layout.prototype.constructor = Layout;\n Layout.fn = Layout.prototype;\n Layout.fn.init = Layout.fn.constructor;\n\n Layout.prototype.rect = function rect (value) {\n if (value) {\n this._rect = value;\n return this;\n }\n\n return this._rect;\n };\n\n Layout.prototype._initMap = function _initMap () {\n var options = this.options;\n var fieldMap = this._fieldMap;\n if (options.orientation === \"horizontal\") {\n fieldMap.sizeField = \"width\";\n fieldMap.groupsSizeField = \"height\";\n fieldMap.groupAxis = \"x\";\n fieldMap.groupsAxis = \"y\";\n } else {\n fieldMap.sizeField = \"height\";\n fieldMap.groupsSizeField = \"width\";\n fieldMap.groupAxis = \"y\";\n fieldMap.groupsAxis = \"x\";\n }\n\n if (options.reverse) {\n this.forEach = forEachReverse;\n this.justifyAlign = alignStartReverse;\n } else {\n this.forEach = forEach;\n this.justifyAlign = alignStart;\n }\n };\n\n Layout.prototype.reflow = function reflow () {\n var this$1$1 = this;\n\n if (!this._rect || this.children.length === 0) {\n return;\n }\n this._initMap();\n\n if (this.options.transform) {\n this.transform(null);\n }\n\n var options = this.options;\n var rect = this._rect;\n var ref = this._initGroups();\n var groups = ref.groups;\n var groupsSize = ref.groupsSize;\n var ref$1 = this._fieldMap;\n var sizeField = ref$1.sizeField;\n var groupsSizeField = ref$1.groupsSizeField;\n var groupAxis = ref$1.groupAxis;\n var groupsAxis = ref$1.groupsAxis;\n var groupOrigin = new Point();\n var elementOrigin = new Point();\n var size = new Size();\n var groupStart = alignStart(groupsSize, rect, options.alignContent, groupsAxis, groupsSizeField);\n var elementStart, group, groupBox;\n\n var arrangeElements = function (bbox, idx) {\n var element = group.elements[idx];\n\n elementOrigin[groupAxis] = elementStart;\n elementOrigin[groupsAxis] = alignStart(bbox.size[groupsSizeField], groupBox, options.alignItems, groupsAxis, groupsSizeField);\n translateToPoint(elementOrigin, bbox, element);\n elementStart += bbox.size[sizeField] + options.spacing;\n };\n\n for (var groupIdx = 0; groupIdx < groups.length; groupIdx++) {\n group = groups[groupIdx];\n groupOrigin[groupAxis] = elementStart = this$1$1.justifyAlign(group.size, rect, options.justifyContent, groupAxis, sizeField);\n groupOrigin[groupsAxis] = groupStart;\n size[sizeField] = group.size;\n size[groupsSizeField] = group.lineSize;\n groupBox = new Rect(groupOrigin, size);\n this$1$1.forEach(group.bboxes, arrangeElements);\n\n groupStart += group.lineSize + options.lineSpacing;\n }\n\n if (!options.wrap && group.size > rect.size[sizeField]) {\n var scale = rect.size[sizeField] / groupBox.size[sizeField];\n var scaledStart = groupBox.topLeft().scale(scale, scale);\n var scaledSize = groupBox.size[groupsSizeField] * scale;\n var newStart = alignStart(scaledSize, rect, options.alignContent, groupsAxis, groupsSizeField);\n var transform = transform$1();\n if (groupAxis === \"x\") {\n transform.translate(rect.origin.x - scaledStart.x, newStart - scaledStart.y);\n } else {\n transform.translate(newStart - scaledStart.x, rect.origin.y - scaledStart.y);\n }\n transform.scale(scale, scale);\n\n this.transform(transform);\n }\n };\n\n Layout.prototype._initGroups = function _initGroups () {\n var this$1$1 = this;\n\n var ref = this;\n var options = ref.options;\n var children = ref.children;\n var lineSpacing = options.lineSpacing;\n var wrap = options.wrap;\n var spacing = options.spacing;\n var sizeField = this._fieldMap.sizeField;\n var group = this._newGroup();\n var groups = [];\n var addGroup = function() {\n groups.push(group);\n groupsSize += group.lineSize + lineSpacing;\n };\n var groupsSize = -lineSpacing;\n\n for (var idx = 0; idx < children.length; idx++) {\n var element = children[idx];\n var bbox = children[idx].clippedBBox();\n if (element.visible() && bbox) {\n if (wrap && group.size + bbox.size[sizeField] + spacing > this$1$1._rect.size[sizeField]) {\n if (group.bboxes.length === 0) {\n this$1$1._addToGroup(group, bbox, element);\n addGroup();\n group = this$1$1._newGroup();\n } else {\n addGroup();\n group = this$1$1._newGroup();\n this$1$1._addToGroup(group, bbox, element);\n }\n } else {\n this$1$1._addToGroup(group, bbox, element);\n }\n }\n }\n\n if (group.bboxes.length) {\n addGroup();\n }\n\n return {\n groups: groups,\n groupsSize: groupsSize\n };\n };\n\n Layout.prototype._addToGroup = function _addToGroup (group, bbox, element) {\n group.size += bbox.size[this._fieldMap.sizeField] + this.options.spacing;\n group.lineSize = Math.max(bbox.size[this._fieldMap.groupsSizeField], group.lineSize);\n group.bboxes.push(bbox);\n group.elements.push(element);\n };\n\n Layout.prototype._newGroup = function _newGroup () {\n return {\n lineSize: 0,\n size: -this.options.spacing,\n bboxes: [],\n elements: []\n };\n };\n\n return Layout;\n}(Group));\n\nvar Rect$2 = (function (superclass) {\n function Rect$$1(geometry, options) {\n if (geometry === void 0) { geometry = new Rect(); }\n if (options === void 0) { options = {}; }\n\n superclass.call(this, options);\n\n this.geometry(geometry);\n\n if (!defined(this.options.stroke)) {\n this.stroke(\"#000\");\n }\n }\n\n extendStatic(Rect$$1, superclass);\n Rect$$1.prototype = Object.create( superclass && superclass.prototype );\n Rect$$1.prototype.constructor = Rect$$1;\n Rect$$1.fn = Rect$$1.prototype;\n Rect$$1.fn.init = Rect$$1.fn.constructor;\n\n var prototypeAccessors = { nodeType: {} };\n\n prototypeAccessors.nodeType.get = function () {\n return \"Rect\";\n };\n\n Rect$$1.prototype._bbox = function _bbox (matrix) {\n return this._geometry.bbox(matrix);\n };\n\n Rect$$1.prototype.rawBBox = function rawBBox () {\n return this._geometry.bbox();\n };\n\n Rect$$1.prototype._containsPoint = function _containsPoint (point) {\n return this._geometry.containsPoint(point);\n };\n\n Rect$$1.prototype._isOnPath = function _isOnPath (point) {\n return this.geometry()._isOnPath(point, this.options.stroke.width / 2);\n };\n\n Object.defineProperties( Rect$$1.prototype, prototypeAccessors );\n\n return Rect$$1;\n}(paintable(measurable(withGeometry(Element$1)))));\n\nfunction alignElements(elements, rect, alignment, axis, sizeField) {\n for (var idx = 0; idx < elements.length; idx++) {\n var bbox = elements[idx].clippedBBox();\n if (bbox) {\n var point = bbox.origin.clone();\n point[axis] = alignStart(bbox.size[sizeField], rect, alignment || \"start\", axis, sizeField);\n translateToPoint(point, bbox, elements[idx]);\n }\n }\n}\n\nfunction align(elements, rect, alignment) {\n alignElements(elements, rect, alignment, \"x\", \"width\");\n}\n\nfunction vAlign(elements, rect, alignment) {\n alignElements(elements, rect, alignment, \"y\", \"height\");\n}\n\nfunction stackElements(elements, stackAxis, otherAxis, sizeField) {\n if (elements.length > 1) {\n var origin = new Point();\n var previousBBox = elements[0].bbox;\n\n for (var idx = 1; idx < elements.length; idx++) {\n var element = elements[idx].element;\n var bbox = elements[idx].bbox;\n origin[stackAxis] = previousBBox.origin[stackAxis] + previousBBox.size[sizeField];\n origin[otherAxis] = bbox.origin[otherAxis];\n translateToPoint(origin, bbox, element);\n bbox.origin[stackAxis] = origin[stackAxis];\n previousBBox = bbox;\n }\n }\n}\n\nfunction createStackElements(elements) {\n var stackElements = [];\n\n for (var idx = 0; idx < elements.length; idx++) {\n var element = elements[idx];\n var bbox = element.clippedBBox();\n if (bbox) {\n stackElements.push({\n element: element,\n bbox: bbox\n });\n }\n }\n\n return stackElements;\n}\n\nfunction stack(elements) {\n stackElements(createStackElements(elements), \"x\", \"y\", \"width\");\n}\n\nfunction vStack(elements) {\n stackElements(createStackElements(elements), \"y\", \"x\", \"height\");\n}\n\nfunction getStacks(elements, rect, sizeField) {\n var maxSize = rect.size[sizeField];\n var stacks = [];\n var stack = [];\n var stackSize = 0;\n var element, bbox;\n\n var addElementToStack = function() {\n stack.push({\n element: element,\n bbox: bbox\n });\n };\n\n for (var idx = 0; idx < elements.length; idx++) {\n element = elements[idx];\n\n bbox = element.clippedBBox();\n if (bbox) {\n var size = bbox.size[sizeField];\n if (stackSize + size > maxSize) {\n if (stack.length) {\n stacks.push(stack);\n stack = [];\n addElementToStack();\n stackSize = size;\n } else {\n addElementToStack();\n stacks.push(stack);\n stack = [];\n stackSize = 0;\n }\n } else {\n addElementToStack();\n stackSize += size;\n }\n }\n }\n\n if (stack.length) {\n stacks.push(stack);\n }\n\n return stacks;\n}\n\nfunction wrapElements(elements, rect, axis, otherAxis, sizeField) {\n var stacks = getStacks(elements, rect, sizeField);\n var origin = rect.origin.clone();\n var result = [];\n\n for (var idx = 0; idx < stacks.length; idx++) {\n var stack = stacks[idx];\n var startElement = stack[0];\n origin[otherAxis] = startElement.bbox.origin[otherAxis];\n translateToPoint(origin, startElement.bbox, startElement.element);\n startElement.bbox.origin[axis] = origin[axis];\n stackElements(stack, axis, otherAxis, sizeField);\n result.push([]);\n for (var elementIdx = 0; elementIdx < stack.length; elementIdx++) {\n result[idx].push(stack[elementIdx].element);\n }\n }\n return result;\n}\n\nfunction wrap(elements, rect) {\n return wrapElements(elements, rect, \"x\", \"y\", \"width\");\n}\n\nfunction vWrap(elements, rect) {\n return wrapElements(elements, rect, \"y\", \"x\", \"height\");\n}\n\nfunction fit(element, rect) {\n var bbox = element.clippedBBox();\n if (bbox) {\n var elementSize = bbox.size;\n var rectSize = rect.size;\n if (rectSize.width < elementSize.width || rectSize.height < elementSize.height) {\n var scale = Math.min(rectSize.width / elementSize.width, rectSize.height / elementSize.height);\n var transform = element.transform() || transform$1();\n transform.scale(scale, scale);\n element.transform(transform);\n }\n }\n}\n\nvar StopsArray = (function (ElementsArray$$1) {\n function StopsArray () {\n ElementsArray$$1.apply(this, arguments);\n }\n\n extendStatic(StopsArray, ElementsArray$$1);\n StopsArray.prototype = Object.create( ElementsArray$$1 && ElementsArray$$1.prototype );\n StopsArray.prototype.constructor = StopsArray;\n StopsArray.fn = StopsArray.prototype;\n StopsArray.fn.init = StopsArray.fn.constructor;\n\n StopsArray.prototype._change = function _change () {\n this.optionsChange({\n field: \"stops\"\n });\n };\n\n return StopsArray;\n}(ElementsArray));\n\nfunction optionsAccessor(name) {\n return function(value) {\n if (defined(value)) {\n this.options.set(name, value);\n return this;\n }\n\n return this.options.get(name);\n };\n}\n\nfunction defineOptionsAccessors(fn, names) {\n for (var i = 0; i < names.length; i++) {\n fn[names[i]] = optionsAccessor(names[i]);\n }\n}\n\nvar withOptions = function (TBase, names) {\n var result = (function (TBase) {\n function result () {\n TBase.apply(this, arguments);\n }extendStatic(result, TBase);\n result.prototype = Object.create( TBase && TBase.prototype );\n result.prototype.constructor = result;\n result.fn = result.prototype;\n result.fn.init = result.fn.constructor;\n\n return result;\n }(TBase));\n defineOptionsAccessors(result.prototype, names);\n\n return result;\n};\n\nvar options = [ \"offset\", \"color\", \"opacity\" ];\n\nvar GradientStop = (function (superclass) {\n function GradientStop(offset, color, opacity) {\n superclass.call(this);\n\n this.options = new OptionsStore({\n offset: offset,\n color: color,\n opacity: defined(opacity) ? opacity : 1\n });\n\n this.options.addObserver(this);\n }\n\n extendStatic(GradientStop, superclass);\n GradientStop.prototype = Object.create( superclass && superclass.prototype );\n GradientStop.prototype.constructor = GradientStop;\n GradientStop.fn = GradientStop.prototype;\n GradientStop.fn.init = GradientStop.fn.constructor;\n\n GradientStop.create = function create (arg) {\n if (defined(arg)) {\n var stop;\n if (arg instanceof GradientStop) {\n stop = arg;\n } else if (arg.length > 1) {\n stop = new GradientStop(arg[0], arg[1], arg[2]);\n } else {\n stop = new GradientStop(arg.offset, arg.color, arg.opacity);\n }\n\n return stop;\n }\n };\n\n return GradientStop;\n}(withOptions(HasObservers, options)));\n\nvar Gradient = (function (HasObservers$$1) {\n function Gradient(options) {\n if (options === void 0) { options = {}; }\n\n HasObservers$$1.call(this);\n\n this.stops = new StopsArray(this._createStops(options.stops));\n this.stops.addObserver(this);\n this._userSpace = options.userSpace;\n this.id = definitionId();\n }\n\n extendStatic(Gradient, HasObservers$$1);\n Gradient.prototype = Object.create( HasObservers$$1 && HasObservers$$1.prototype );\n Gradient.prototype.constructor = Gradient;\n Gradient.fn = Gradient.prototype;\n Gradient.fn.init = Gradient.fn.constructor;\n\n var prototypeAccessors = { nodeType: {} };\n\n prototypeAccessors.nodeType.get = function () {\n return \"Gradient\";\n };\n\n Gradient.prototype.userSpace = function userSpace (value) {\n if (defined(value)) {\n this._userSpace = value;\n this.optionsChange();\n return this;\n }\n\n return this._userSpace;\n };\n\n Gradient.prototype._createStops = function _createStops (stops) {\n if (stops === void 0) { stops = []; }\n\n var result = [];\n for (var idx = 0; idx < stops.length; idx++) {\n result.push(GradientStop.create(stops[idx]));\n }\n\n return result;\n };\n\n Gradient.prototype.addStop = function addStop (offset, color, opacity) {\n this.stops.push(new GradientStop(offset, color, opacity));\n };\n\n Gradient.prototype.removeStop = function removeStop (stop) {\n var index = this.stops.indexOf(stop);\n if (index >= 0) {\n this.stops.splice(index, 1);\n }\n };\n\n Gradient.prototype.optionsChange = function optionsChange (e) {\n this.trigger(\"optionsChange\", {\n field: \"gradient\" + (e ? \".\" + e.field : \"\"),\n value: this\n });\n };\n\n Gradient.prototype.geometryChange = function geometryChange () {\n this.optionsChange();\n };\n\n Object.defineProperties( Gradient.prototype, prototypeAccessors );\n\n return Gradient;\n}(HasObservers));\n\nvar points$1 = [ \"start\", \"end\" ];\n\nvar LinearGradient = (function (superclass) {\n function LinearGradient(options) {\n if (options === void 0) { options = {}; }\n\n superclass.call(this, options);\n\n this.start(options.start || new Point());\n this.end(options.end || new Point(1, 0));\n }\n\n extendStatic(LinearGradient, superclass);\n LinearGradient.prototype = Object.create( superclass && superclass.prototype );\n LinearGradient.prototype.constructor = LinearGradient;\n LinearGradient.fn = LinearGradient.prototype;\n LinearGradient.fn.init = LinearGradient.fn.constructor;\n\n return LinearGradient;\n}(withPoints(Gradient, points$1)));\n\nvar RadialGradient = (function (superclass) {\n function RadialGradient(options) {\n if (options === void 0) { options = {}; }\n\n superclass.call(this, options);\n\n this.center(options.center || new Point());\n this._radius = defined(options.radius) ? options.radius : 1;\n this._fallbackFill = options.fallbackFill;\n }\n\n extendStatic(RadialGradient, superclass);\n RadialGradient.prototype = Object.create( superclass && superclass.prototype );\n RadialGradient.prototype.constructor = RadialGradient;\n RadialGradient.fn = RadialGradient.prototype;\n RadialGradient.fn.init = RadialGradient.fn.constructor;\n\n RadialGradient.prototype.radius = function radius (value) {\n if (defined(value)) {\n this._radius = value;\n this.geometryChange();\n return this;\n }\n\n return this._radius;\n };\n\n RadialGradient.prototype.fallbackFill = function fallbackFill (value) {\n if (defined(value)) {\n this._fallbackFill = value;\n this.optionsChange();\n return this;\n }\n\n return this._fallbackFill;\n };\n\n return RadialGradient;\n}(withPoints(Gradient, [ \"center\" ])));\n\nfunction swing(position) {\n return 0.5 - Math.cos(position * Math.PI) / 2;\n}\n\nfunction linear(position) {\n return position;\n}\n\nfunction easeOutElastic(position, time, start, diff) {\n var s = 1.70158,\n p = 0,\n a = diff;\n\n if (position === 0) {\n return start;\n }\n\n if (position === 1) {\n return start + diff;\n }\n\n if (!p) {\n p = 0.5;\n }\n\n if (a < Math.abs(diff)) {\n a = diff;\n s = p / 4;\n } else {\n s = p / (2 * Math.PI) * Math.asin(diff / a);\n }\n\n return a * Math.pow(2, -10 * position) *\n Math.sin((Number(position) - s) * (1.1 * Math.PI) / p) + diff + start;\n}\n\nvar easingFunctions = {\n\tswing: swing,\n\tlinear: linear,\n\teaseOutElastic: easeOutElastic\n};\n\nvar instance;\n\nvar AnimationFactory = (function (Class$$1) {\n function AnimationFactory() {\n Class$$1.call(this);\n\n this._items = [];\n }\n\n extendStatic(AnimationFactory, Class$$1);\n AnimationFactory.prototype = Object.create( Class$$1 && Class$$1.prototype );\n AnimationFactory.prototype.constructor = AnimationFactory;\n AnimationFactory.fn = AnimationFactory.prototype;\n AnimationFactory.fn.init = AnimationFactory.fn.constructor;\n\n var staticAccessors = { current: {} };\n\n staticAccessors.current.get = function () {\n if (!instance) {\n instance = new AnimationFactory();\n }\n\n return instance;\n };\n\n AnimationFactory.prototype.register = function register (name, type) {\n this._items.push({\n name: name,\n type: type\n });\n };\n\n AnimationFactory.prototype.create = function create (element, options) {\n var items = this._items;\n var match;\n\n if (options && options.type) {\n var type = options.type.toLowerCase();\n for (var i = 0; i < items.length; i++) {\n if (items[i].name.toLowerCase() === type) {\n match = items[i];\n break;\n }\n }\n }\n\n if (match) {\n return new match.type(element, options);\n }\n };\n\n Object.defineProperties( AnimationFactory, staticAccessors );\n\n return AnimationFactory;\n}(Class));\n\nvar Animation = (function (Class$$1) {\n function Animation(element, options) {\n Class$$1.call(this);\n\n this.options = $.extend({}, this.options, options);\n this.element = element;\n }\n\n extendStatic(Animation, Class$$1);\n Animation.prototype = Object.create( Class$$1 && Class$$1.prototype );\n Animation.prototype.constructor = Animation;\n Animation.fn = Animation.prototype;\n Animation.fn.init = Animation.fn.constructor;\n\n var prototypeAccessors = { options: {} };\n\n Animation.create = function create (type, element, options) {\n return AnimationFactory.current.create(type, element, options);\n };\n\n prototypeAccessors.options.get = function () {\n return this._options || {\n duration: 500,\n easing: \"swing\"\n };\n };\n\n prototypeAccessors.options.set = function (value) {\n this._options = value;\n };\n\n Animation.prototype.setup = function setup () {};\n Animation.prototype.step = function step () {};\n\n Animation.prototype.play = function play () {\n var this$1$1 = this;\n\n var options = this.options;\n var duration = options.duration;\n var delay = options.delay; if (delay === void 0) { delay = 0; }\n var easing = easingFunctions[options.easing];\n var start = now() + delay;\n var finish = start + duration;\n\n if (duration === 0) {\n this.step(1);\n this.abort();\n } else {\n setTimeout(function () {\n var loop = function () {\n if (this$1$1._stopped) {\n return;\n }\n\n var wallTime = now();\n\n var time = limitValue(wallTime - start, 0, duration);\n var position = time / duration;\n var easingPosition = easing(position, time, 0, 1, duration);\n\n this$1$1.step(easingPosition);\n\n if (wallTime < finish) {\n kendo.animationFrame(loop);\n } else {\n this$1$1.abort();\n }\n };\n\n loop();\n }, delay);\n }\n };\n\n Animation.prototype.abort = function abort () {\n this._stopped = true;\n };\n\n Animation.prototype.destroy = function destroy () {\n this.abort();\n };\n\n Object.defineProperties( Animation.prototype, prototypeAccessors );\n\n return Animation;\n}(Class));\n\nvar instance$1;\n\nvar PathParser = (function (Class$$1) {\n function PathParser () {\n Class$$1.apply(this, arguments);\n }\n\n extendStatic(PathParser, Class$$1);\n PathParser.prototype = Object.create( Class$$1 && Class$$1.prototype );\n PathParser.prototype.constructor = PathParser;\n PathParser.fn = PathParser.prototype;\n PathParser.fn.init = PathParser.fn.constructor;\n\n var staticAccessors = { current: {} };\n\n staticAccessors.current.get = function () {\n if (!instance$1) {\n instance$1 = new PathParser();\n }\n\n return instance$1;\n };\n\n PathParser.prototype.parse = function parse (str, options) {\n var multiPath = new MultiPath(options);\n return parsePath(multiPath, str);\n };\n\n Object.defineProperties( PathParser, staticAccessors );\n\n return PathParser;\n}(Class));\n\nvar BaseNode = (function (Class$$1) {\n function BaseNode(srcElement) {\n Class$$1.call(this);\n\n this.childNodes = [];\n this.parent = null;\n\n if (srcElement) {\n this.srcElement = srcElement;\n this.observe();\n }\n }\n\n extendStatic(BaseNode, Class$$1);\n BaseNode.prototype = Object.create( Class$$1 && Class$$1.prototype );\n BaseNode.prototype.constructor = BaseNode;\n BaseNode.fn = BaseNode.prototype;\n BaseNode.fn.init = BaseNode.fn.constructor;\n\n BaseNode.prototype.destroy = function destroy () {\n var this$1$1 = this;\n\n if (this.srcElement) {\n this.srcElement.removeObserver(this);\n }\n\n var children = this.childNodes;\n for (var i = 0; i < children.length; i++) {\n this$1$1.childNodes[i].destroy();\n }\n\n this.parent = null;\n };\n\n BaseNode.prototype.load = function load () {};\n\n BaseNode.prototype.observe = function observe () {\n if (this.srcElement) {\n this.srcElement.addObserver(this);\n }\n };\n\n BaseNode.prototype.append = function append (node) {\n this.childNodes.push(node);\n node.parent = this;\n };\n\n BaseNode.prototype.insertAt = function insertAt (node, pos) {\n this.childNodes.splice(pos, 0, node);\n node.parent = this;\n };\n\n BaseNode.prototype.remove = function remove (index, count) {\n var this$1$1 = this;\n\n var end = index + count;\n for (var i = index; i < end; i++) {\n this$1$1.childNodes[i].removeSelf();\n }\n this.childNodes.splice(index, count);\n };\n\n BaseNode.prototype.removeSelf = function removeSelf () {\n this.clear();\n this.destroy();\n };\n\n BaseNode.prototype.clear = function clear () {\n this.remove(0, this.childNodes.length);\n };\n\n BaseNode.prototype.invalidate = function invalidate () {\n if (this.parent) {\n this.parent.invalidate();\n }\n };\n\n BaseNode.prototype.geometryChange = function geometryChange () {\n this.invalidate();\n };\n\n BaseNode.prototype.optionsChange = function optionsChange () {\n this.invalidate();\n };\n\n BaseNode.prototype.childrenChange = function childrenChange (e) {\n if (e.action === \"add\") {\n this.load(e.items, e.index);\n } else if (e.action === \"remove\") {\n this.remove(e.index, e.items.length);\n }\n\n this.invalidate();\n };\n\n return BaseNode;\n}(Class));\n\nvar events = [\n \"click\",\n \"mouseenter\",\n \"mouseleave\",\n \"mousemove\",\n \"resize\"\n];\n\nvar Surface$2 = (function (Observable$$1) {\n function Surface(element, options) {\n Observable$$1.call(this);\n\n this.options = $.extend({}, options);\n this.element = element;\n this.element._kendoExportVisual = this.exportVisual.bind(this);\n\n this._click = this._handler(\"click\");\n this._mouseenter = this._handler(\"mouseenter\");\n this._mouseleave = this._handler(\"mouseleave\");\n this._mousemove = this._handler(\"mousemove\");\n\n this._visual = new Group();\n\n elementSize(element, this.options);\n\n this.bind(events, this.options);\n\n this._enableTracking();\n }\n\n extendStatic(Surface, Observable$$1);\n Surface.prototype = Object.create( Observable$$1 && Observable$$1.prototype );\n Surface.prototype.constructor = Surface;\n Surface.fn = Surface.prototype;\n Surface.fn.init = Surface.fn.constructor;\n\n Surface.prototype.draw = function draw (element) {\n this._visual.children.push(element);\n };\n\n Surface.prototype.clear = function clear () {\n this._visual.children = [];\n };\n\n Surface.prototype.destroy = function destroy () {\n this._visual = null;\n this.element._kendoExportVisual = null;\n this.unbind();\n };\n\n Surface.prototype.eventTarget = function eventTarget (e) {\n var this$1$1 = this;\n\n var domNode = eventElement(e);\n var node;\n\n while (!node && domNode) {\n node = domNode._kendoNode;\n if (domNode === this$1$1.element) {\n break;\n }\n\n domNode = domNode.parentElement;\n }\n\n if (node) {\n return node.srcElement;\n }\n };\n\n Surface.prototype.exportVisual = function exportVisual () {\n return this._visual;\n };\n\n Surface.prototype.getSize = function getSize () {\n return elementSize(this.element);\n };\n\n Surface.prototype.currentSize = function currentSize (size) {\n if (size) {\n this._size = size;\n } else {\n return this._size;\n }\n };\n\n Surface.prototype.setSize = function setSize (size) {\n elementSize(this.element, size);\n\n this.currentSize(size);\n this._resize();\n };\n\n Surface.prototype.resize = function resize (force) {\n var size = this.getSize();\n var currentSize = this.currentSize();\n\n if (force || (size.width > 0 || size.height > 0) && (!currentSize || size.width !== currentSize.width || size.height !== currentSize.height)) {\n this.currentSize(size);\n this._resize(size, force);\n this.trigger(\"resize\", size);\n }\n };\n\n Surface.prototype.size = function size (value) {\n if (!value) {\n return this.getSize();\n }\n\n this.setSize(value);\n };\n\n Surface.prototype.suspendTracking = function suspendTracking () {\n this._suspendedTracking = true;\n };\n\n Surface.prototype.resumeTracking = function resumeTracking () {\n this._suspendedTracking = false;\n };\n\n Surface.prototype._enableTracking = function _enableTracking () {};\n\n Surface.prototype._resize = function _resize () {};\n\n Surface.prototype._handler = function _handler (eventName) {\n var this$1$1 = this;\n\n return function (e) {\n var node = this$1$1.eventTarget(e);\n if (node && !this$1$1._suspendedTracking) {\n this$1$1.trigger(eventName, {\n element: node,\n originalEvent: e,\n type: eventName\n });\n }\n };\n };\n\n Surface.prototype._elementOffset = function _elementOffset () {\n var element = this.element;\n var padding = elementPadding(element);\n var ref = elementOffset(element);\n var left = ref.left;\n var top = ref.top;\n\n return {\n left: left + padding.left,\n top: top + padding.top\n };\n };\n\n Surface.prototype._surfacePoint = function _surfacePoint (e) {\n var offset = this._elementOffset();\n var coord = eventCoordinates(e);\n var x = coord.x - offset.left;\n var y = coord.y - offset.top;\n\n var inverseTransform = elementScale(this.element).invert();\n var point = new Point(\n x,\n y\n ).transform(inverseTransform);\n\n return point;\n };\n\n return Surface;\n}(kendo.Observable));\n\nfunction renderAttr(name, value) {\n return (defined(value) && value !== null) ? (\" \" + name + \"=\\\"\" + value + \"\\\" \") : \"\";\n}\n\nfunction renderAllAttr(attrs) {\n var output = \"\";\n for (var i = 0; i < attrs.length; i++) {\n output += renderAttr(attrs[i][0], attrs[i][1]);\n }\n\n return output;\n}\n\nfunction renderStyle(attrs) {\n var output = \"\";\n for (var i = 0; i < attrs.length; i++) {\n var value = attrs[i][1];\n if (defined(value)) {\n output += attrs[i][0] + \":\" + value + \";\";\n }\n }\n\n if (output !== \"\") {\n return output;\n }\n}\n\nvar NODE_MAP = {};\n\nvar SVG_NS = \"http://www.w3.org/2000/svg\";\nvar NONE = \"none\";\nvar POINT_DIGITS = 3;\n\nvar applyStyle = function (styleString, element) { return styleString.split(';').filter(function (s) { return s !== ''; }).forEach(function (s) {\n var parts = s.split(':');\n element.style[parts[0].trim()] = parts[1].trim();\n }); };\n\nvar styleAttr = 'data-style';\nvar replaceStyleAttr = function (html) { return html.replace(/\\sstyle=/g, ' ' + styleAttr + '='); };\nvar restoreStyleAttr = function (container) {\n Array.from(container.querySelectorAll('[' + styleAttr +']')).forEach(function (element) {\n var styleString = element.getAttribute(styleAttr);\n element.removeAttribute(styleAttr);\n applyStyle(styleString, element);\n });\n};\n\nvar renderSVG = function(container, svg) {\n container.innerHTML = replaceStyleAttr(svg);\n restoreStyleAttr(container);\n};\n\nif (typeof document !== \"undefined\") {\n var testFragment = \"\";\n var testContainer = document.createElement(\"div\");\n var hasParser = typeof DOMParser !== \"undefined\";\n\n testContainer.innerHTML = testFragment;\n\n if (hasParser && testContainer.firstChild.namespaceURI !== SVG_NS) {\n renderSVG = function(container, svg) {\n var parser = new DOMParser();\n var chartDoc = parser.parseFromString(replaceStyleAttr(svg), \"text/xml\");\n restoreStyleAttr(chartDoc);\n var importedDoc = document.adoptNode(chartDoc.documentElement);\n\n container.innerHTML = \"\";\n container.appendChild(importedDoc);\n };\n }\n}\n\nvar renderSVG$1 = renderSVG;\n\nvar TRANSFORM = \"transform\";\nvar DefinitionMap = {\n clip: \"clip-path\",\n fill: \"fill\"\n};\n\nfunction isDefinition(type, value) {\n return type === \"clip\" || (type === \"fill\" && (!value || value.nodeType === \"Gradient\"));\n}\n\nfunction baseUrl() {\n var base = document.getElementsByTagName(\"base\")[0];\n var href = document.location.href;\n var url = \"\";\n\n if (base && !(supportBrowser || {}).msie) {\n var hashIndex = href.indexOf(\"#\");\n if (hashIndex !== -1) {\n href = href.substring(0, hashIndex);\n }\n\n url = href;\n }\n\n return url;\n}\n\nvar Node = (function (BaseNode$$1) {\n function Node(srcElement, options) {\n BaseNode$$1.call(this, srcElement);\n this.definitions = {};\n\n this.options = options;\n }\n\n extendStatic(Node, BaseNode$$1);\n Node.prototype = Object.create( BaseNode$$1 && BaseNode$$1.prototype );\n Node.prototype.constructor = Node;\n Node.fn = Node.prototype;\n Node.fn.init = Node.fn.constructor;\n\n Node.prototype.destroy = function destroy () {\n if (this.element) {\n this.element._kendoNode = null;\n this.element = null;\n }\n\n this.clearDefinitions();\n BaseNode$$1.prototype.destroy.call(this);\n };\n\n Node.prototype.load = function load (elements, pos) {\n var this$1$1 = this;\n\n for (var i = 0; i < elements.length; i++) {\n var srcElement = elements[i];\n var children = srcElement.children;\n\n var childNode = new NODE_MAP[srcElement.nodeType](srcElement, this$1$1.options);\n\n if (defined(pos)) {\n this$1$1.insertAt(childNode, pos);\n } else {\n this$1$1.append(childNode);\n }\n\n childNode.createDefinitions();\n\n if (children && children.length > 0) {\n childNode.load(children);\n }\n\n var element = this$1$1.element;\n if (element) {\n childNode.attachTo(element, pos);\n }\n }\n };\n\n Node.prototype.root = function root () {\n var root = this;\n\n while (root.parent) {\n root = root.parent;\n }\n\n return root;\n };\n\n Node.prototype.attachTo = function attachTo (domElement, pos) {\n var container = document.createElement(\"div\");\n renderSVG$1(container,\n \"\" +\n this.render() +\n \"\"\n );\n\n var element = container.firstChild.firstChild;\n if (element) {\n if (defined(pos)) {\n domElement.insertBefore(element, domElement.childNodes[pos] || null);\n } else {\n domElement.appendChild(element);\n }\n this.setElement(element);\n }\n };\n\n Node.prototype.setElement = function setElement (element) {\n if (this.element) {\n this.element._kendoNode = null;\n }\n\n this.element = element;\n this.element._kendoNode = this;\n\n var nodes = this.childNodes;\n for (var i = 0; i < nodes.length; i++) {\n var childElement = element.childNodes[i];\n nodes[i].setElement(childElement);\n }\n };\n\n Node.prototype.clear = function clear () {\n this.clearDefinitions();\n\n if (this.element) {\n this.element.innerHTML = \"\";\n }\n\n var children = this.childNodes;\n for (var i = 0; i < children.length; i++) {\n children[i].destroy();\n }\n\n this.childNodes = [];\n };\n\n Node.prototype.removeSelf = function removeSelf () {\n if (this.element) {\n var parentNode = this.element.parentNode;\n if (parentNode) {\n parentNode.removeChild(this.element);\n }\n this.element = null;\n }\n\n BaseNode$$1.prototype.removeSelf.call(this);\n };\n\n Node.prototype.template = function template () {\n return this.renderChildren();\n };\n\n Node.prototype.render = function render () {\n return this.template();\n };\n\n Node.prototype.renderChildren = function renderChildren () {\n var nodes = this.childNodes;\n var output = \"\";\n\n for (var i = 0; i < nodes.length; i++) {\n output += nodes[i].render();\n }\n\n return output;\n };\n\n Node.prototype.optionsChange = function optionsChange (e) {\n var field = e.field;\n var value = e.value;\n\n if (field === \"visible\") {\n this.css(\"display\", value ? \"\" : NONE);\n } else if (DefinitionMap[field] && isDefinition(field, value)) {\n this.updateDefinition(field, value);\n } else if (field === \"opacity\") {\n this.attr(\"opacity\", value);\n } else if (field === \"cursor\") {\n this.css(\"cursor\", value);\n } else if (field === \"id\") {\n if (value) {\n this.attr(\"id\", value);\n } else {\n this.removeAttr(\"id\");\n }\n }\n\n BaseNode$$1.prototype.optionsChange.call(this, e);\n };\n\n Node.prototype.accessibilityOptionsChange = function accessibilityOptionsChange (e) {\n var field = e.field;\n var value = e.value;\n\n if (field === \"role\") {\n if (value) {\n this.attr(\"role\", value);\n } else {\n this.removeAttr(\"role\");\n }\n } else if (field === \"ariaLabel\") {\n if (value) {\n this.attr(\"aria-label\", value);\n } else {\n this.removeAttr(\"aria-label\");\n }\n } else if (field === \"ariaRoleDescription\") {\n if (value) {\n this.attr(\"aria-roledescription\", value);\n } else {\n this.removeAttr(\"aria-roledescription\");\n }\n } else if (field === \"className\") {\n this.className(value);\n }\n };\n\n Node.prototype.attr = function attr (name, value) {\n if (this.element) {\n this.element.setAttribute(name, value);\n }\n };\n\n Node.prototype.allAttr = function allAttr (attrs) {\n var this$1$1 = this;\n\n for (var i = 0; i < attrs.length; i++) {\n this$1$1.attr(attrs[i][0], attrs[i][1]);\n }\n };\n\n Node.prototype.css = function css (name, value) {\n if (this.element) {\n this.element.style[name] = value;\n }\n };\n\n Node.prototype.allCss = function allCss (styles) {\n var this$1$1 = this;\n\n for (var i = 0; i < styles.length; i++) {\n this$1$1.css(styles[i][0], styles[i][1]);\n }\n };\n\n Node.prototype.className = function className (value) {\n var this$1$1 = this;\n\n if (this.element) {\n (ref = this.element.classList).remove.apply(ref, this.element.classList);\n value.split(\" \").forEach(function (item) {\n this$1$1.element.classList.add(item);\n });\n }\n var ref;\n };\n\n Node.prototype.removeAttr = function removeAttr (name) {\n if (this.element) {\n this.element.removeAttribute(name);\n }\n };\n\n Node.prototype.mapTransform = function mapTransform (transform) {\n var attrs = [];\n if (transform) {\n attrs.push([\n TRANSFORM,\n \"matrix(\" + transform.matrix().toString(6) + \")\"\n ]);\n }\n\n return attrs;\n };\n\n Node.prototype.renderTransform = function renderTransform () {\n return renderAllAttr(\n this.mapTransform(this.srcElement.transform())\n );\n };\n\n Node.prototype.transformChange = function transformChange (value) {\n if (value) {\n this.allAttr(this.mapTransform(value));\n } else {\n this.removeAttr(TRANSFORM);\n }\n };\n\n Node.prototype.mapStyle = function mapStyle () {\n var options = this.srcElement.options;\n var style = [ [ \"cursor\", options.cursor ] ];\n\n if (options.visible === false) {\n style.push([ \"display\", NONE ]);\n }\n\n return style;\n };\n\n Node.prototype.renderStyle = function renderStyle$1 () {\n return renderAttr(\"style\", renderStyle(this.mapStyle(true)));\n };\n\n Node.prototype.renderOpacity = function renderOpacity () {\n return renderAttr(\"opacity\", this.srcElement.options.opacity);\n };\n\n Node.prototype.renderId = function renderId () {\n return renderAttr(\"id\", this.srcElement.options.id);\n };\n\n Node.prototype.renderClassName = function renderClassName () {\n return renderAttr(\"class\", this.srcElement.options.className);\n };\n\n Node.prototype.renderRole = function renderRole () {\n return renderAttr(\"role\", this.srcElement.options.role);\n };\n\n Node.prototype.renderAriaLabel = function renderAriaLabel () {\n return renderAttr(\"aria-label\", this.srcElement.options.ariaLabel);\n };\n\n Node.prototype.renderAriaRoleDescription = function renderAriaRoleDescription () {\n return renderAttr(\"aria-roledescription\", this.srcElement.options.ariaRoleDescription);\n };\n\n Node.prototype.createDefinitions = function createDefinitions () {\n var srcElement = this.srcElement;\n var definitions = this.definitions;\n if (srcElement) {\n var options = srcElement.options;\n var hasDefinitions;\n\n for (var field in DefinitionMap) {\n var definition = options.get(field);\n if (definition && isDefinition(field, definition)) {\n definitions[field] = definition;\n hasDefinitions = true;\n }\n }\n if (hasDefinitions) {\n this.definitionChange({\n action: \"add\",\n definitions: definitions\n });\n }\n }\n };\n\n Node.prototype.definitionChange = function definitionChange (e) {\n if (this.parent) {\n this.parent.definitionChange(e);\n }\n };\n\n Node.prototype.updateDefinition = function updateDefinition (type, value) {\n var definitions = this.definitions;\n var current = definitions[type];\n var attr = DefinitionMap[type];\n var definition = {};\n if (current) {\n definition[type] = current;\n this.definitionChange({\n action: \"remove\",\n definitions: definition\n });\n delete definitions[type];\n }\n\n if (!value) {\n if (current) {\n this.removeAttr(attr);\n }\n } else {\n definition[type] = value;\n this.definitionChange({\n action: \"add\",\n definitions: definition\n });\n definitions[type] = value;\n this.attr(attr, this.refUrl(value.id));\n }\n };\n\n Node.prototype.clearDefinitions = function clearDefinitions () {\n var definitions = this.definitions;\n\n this.definitionChange({\n action: \"remove\",\n definitions: definitions\n });\n this.definitions = {};\n };\n\n Node.prototype.renderDefinitions = function renderDefinitions () {\n return renderAllAttr(this.mapDefinitions());\n };\n\n Node.prototype.mapDefinitions = function mapDefinitions () {\n var this$1$1 = this;\n\n var definitions = this.definitions;\n var attrs = [];\n\n for (var field in definitions) {\n attrs.push([ DefinitionMap[field], this$1$1.refUrl(definitions[field].id) ]);\n }\n\n return attrs;\n };\n\n Node.prototype.refUrl = function refUrl (id) {\n var skipBaseHref = (this.options || {}).skipBaseHref;\n var baseHref = this.baseUrl().replace(/'/g, \"\\\\'\");\n var base = skipBaseHref ? '' : baseHref;\n return (\"url(\" + base + \"#\" + id + \")\");\n };\n\n Node.prototype.baseUrl = function baseUrl$1 () {\n return baseUrl();\n };\n\n return Node;\n}(BaseNode));\n\nvar GradientStopNode = (function (Node$$1) {\n function GradientStopNode () {\n Node$$1.apply(this, arguments);\n }\n\n extendStatic(GradientStopNode, Node$$1);\n GradientStopNode.prototype = Object.create( Node$$1 && Node$$1.prototype );\n GradientStopNode.prototype.constructor = GradientStopNode;\n GradientStopNode.fn = GradientStopNode.prototype;\n GradientStopNode.fn.init = GradientStopNode.fn.constructor;\n\n GradientStopNode.prototype.template = function template () {\n return (\"\");\n };\n\n GradientStopNode.prototype.renderOffset = function renderOffset () {\n return renderAttr(\"offset\", this.srcElement.offset());\n };\n\n GradientStopNode.prototype.mapStyle = function mapStyle () {\n var srcElement = this.srcElement;\n return [\n [ \"stop-color\", srcElement.color() ],\n [ \"stop-opacity\", srcElement.opacity() ]\n ];\n };\n\n GradientStopNode.prototype.optionsChange = function optionsChange (e) {\n if (e.field === \"offset\") {\n this.attr(e.field, e.value);\n } else if (e.field === \"color\" || e.field === \"opacity\") {\n this.css(\"stop-\" + e.field, e.value);\n }\n };\n\n return GradientStopNode;\n}(Node));\n\nvar GradientNode = (function (Node$$1) {\n function GradientNode(srcElement) {\n Node$$1.call(this, srcElement);\n\n this.id = srcElement.id;\n\n this.loadStops();\n }\n\n extendStatic(GradientNode, Node$$1);\n GradientNode.prototype = Object.create( Node$$1 && Node$$1.prototype );\n GradientNode.prototype.constructor = GradientNode;\n GradientNode.fn = GradientNode.prototype;\n GradientNode.fn.init = GradientNode.fn.constructor;\n\n GradientNode.prototype.loadStops = function loadStops () {\n var this$1$1 = this;\n\n var stops = this.srcElement.stops;\n var element = this.element;\n\n for (var idx = 0; idx < stops.length; idx++) {\n var stopNode = new GradientStopNode(stops[idx]);\n this$1$1.append(stopNode);\n if (element) {\n stopNode.attachTo(element);\n }\n }\n };\n\n GradientNode.prototype.optionsChange = function optionsChange (e) {\n if (e.field === \"gradient.stops\") {\n BaseNode.prototype.clear.call(this);\n this.loadStops();\n } else if (e.field === \"gradient\") {\n this.allAttr(this.mapCoordinates());\n }\n };\n\n GradientNode.prototype.renderCoordinates = function renderCoordinates () {\n return renderAllAttr(this.mapCoordinates());\n };\n\n GradientNode.prototype.mapSpace = function mapSpace () {\n return [ \"gradientUnits\", this.srcElement.userSpace() ? \"userSpaceOnUse\" : \"objectBoundingBox\" ];\n };\n\n return GradientNode;\n}(Node));\n\nvar LinearGradientNode = (function (GradientNode$$1) {\n function LinearGradientNode () {\n GradientNode$$1.apply(this, arguments);\n }\n\n extendStatic(LinearGradientNode, GradientNode$$1);\n LinearGradientNode.prototype = Object.create( GradientNode$$1 && GradientNode$$1.prototype );\n LinearGradientNode.prototype.constructor = LinearGradientNode;\n LinearGradientNode.fn = LinearGradientNode.prototype;\n LinearGradientNode.fn.init = LinearGradientNode.fn.constructor;\n\n LinearGradientNode.prototype.template = function template () {\n return (\"\" + (this.renderChildren()) + \"\");\n };\n\n LinearGradientNode.prototype.mapCoordinates = function mapCoordinates () {\n var srcElement = this.srcElement;\n var start = srcElement.start();\n var end = srcElement.end();\n var attrs = [\n [ \"x1\", start.x ],\n [ \"y1\", start.y ],\n [ \"x2\", end.x ],\n [ \"y2\", end.y ],\n this.mapSpace()\n ];\n\n return attrs;\n };\n\n return LinearGradientNode;\n}(GradientNode));\n\nvar RadialGradientNode = (function (GradientNode$$1) {\n function RadialGradientNode () {\n GradientNode$$1.apply(this, arguments);\n }\n\n extendStatic(RadialGradientNode, GradientNode$$1);\n RadialGradientNode.prototype = Object.create( GradientNode$$1 && GradientNode$$1.prototype );\n RadialGradientNode.prototype.constructor = RadialGradientNode;\n RadialGradientNode.fn = RadialGradientNode.prototype;\n RadialGradientNode.fn.init = RadialGradientNode.fn.constructor;\n\n RadialGradientNode.prototype.template = function template () {\n return (\"\" + (this.renderChildren()) + \"\");\n };\n\n RadialGradientNode.prototype.mapCoordinates = function mapCoordinates () {\n var srcElement = this.srcElement;\n var center = srcElement.center();\n var radius = srcElement.radius();\n var attrs = [\n [ \"cx\", center.x ],\n [ \"cy\", center.y ],\n [ \"r\", radius ],\n this.mapSpace()\n ];\n return attrs;\n };\n\n return RadialGradientNode;\n}(GradientNode));\n\nvar ClipNode = (function (Node$$1) {\n function ClipNode(srcElement) {\n Node$$1.call(this);\n\n this.srcElement = srcElement;\n this.id = srcElement.id;\n\n this.load([ srcElement ]);\n }\n\n extendStatic(ClipNode, Node$$1);\n ClipNode.prototype = Object.create( Node$$1 && Node$$1.prototype );\n ClipNode.prototype.constructor = ClipNode;\n ClipNode.fn = ClipNode.prototype;\n ClipNode.fn.init = ClipNode.fn.constructor;\n\n ClipNode.prototype.template = function template () {\n return (\"\" + (this.renderChildren()) + \"\");\n };\n\n return ClipNode;\n}(Node));\n\nvar DefinitionNode = (function (Node$$1) {\n function DefinitionNode() {\n Node$$1.call(this);\n this.definitionMap = {};\n }\n\n extendStatic(DefinitionNode, Node$$1);\n DefinitionNode.prototype = Object.create( Node$$1 && Node$$1.prototype );\n DefinitionNode.prototype.constructor = DefinitionNode;\n DefinitionNode.fn = DefinitionNode.prototype;\n DefinitionNode.fn.init = DefinitionNode.fn.constructor;\n\n DefinitionNode.prototype.attachTo = function attachTo (domElement) {\n this.element = domElement;\n };\n\n DefinitionNode.prototype.template = function template () {\n return (\"\" + (this.renderChildren()) + \"\");\n };\n\n DefinitionNode.prototype.definitionChange = function definitionChange (e) {\n var definitions = e.definitions;\n var action = e.action;\n\n if (action === \"add\") {\n this.addDefinitions(definitions);\n } else if (action === \"remove\") {\n this.removeDefinitions(definitions);\n }\n };\n\n DefinitionNode.prototype.createDefinition = function createDefinition (type, item) {\n var nodeType;\n if (type === \"clip\") {\n nodeType = ClipNode;\n } else if (type === \"fill\") {\n if (item instanceof LinearGradient) {\n nodeType = LinearGradientNode;\n } else if (item instanceof RadialGradient) {\n nodeType = RadialGradientNode;\n }\n }\n return new nodeType(item);\n };\n\n DefinitionNode.prototype.addDefinitions = function addDefinitions (definitions) {\n var this$1$1 = this;\n\n for (var field in definitions) {\n this$1$1.addDefinition(field, definitions[field]);\n }\n };\n\n DefinitionNode.prototype.addDefinition = function addDefinition (type, srcElement) {\n var ref = this;\n var element = ref.element;\n var definitionMap = ref.definitionMap;\n var id = srcElement.id;\n var mapItem = definitionMap[id];\n if (!mapItem) {\n var node = this.createDefinition(type, srcElement);\n definitionMap[id] = {\n element: node,\n count: 1\n };\n this.append(node);\n if (element) {\n node.attachTo(this.element);\n }\n } else {\n mapItem.count++;\n }\n };\n\n DefinitionNode.prototype.removeDefinitions = function removeDefinitions (definitions) {\n var this$1$1 = this;\n\n for (var field in definitions) {\n this$1$1.removeDefinition(definitions[field]);\n }\n };\n\n DefinitionNode.prototype.removeDefinition = function removeDefinition (srcElement) {\n var definitionMap = this.definitionMap;\n var id = srcElement.id;\n var mapItem = definitionMap[id];\n\n if (mapItem) {\n mapItem.count--;\n if (mapItem.count === 0) {\n this.remove(this.childNodes.indexOf(mapItem.element), 1);\n delete definitionMap[id];\n }\n }\n };\n\n return DefinitionNode;\n}(Node));\n\nvar RootNode = (function (Node$$1) {\n function RootNode(options) {\n Node$$1.call(this);\n this.options = options;\n this.defs = new DefinitionNode();\n }\n\n extendStatic(RootNode, Node$$1);\n RootNode.prototype = Object.create( Node$$1 && Node$$1.prototype );\n RootNode.prototype.constructor = RootNode;\n RootNode.fn = RootNode.prototype;\n RootNode.fn.init = RootNode.fn.constructor;\n\n RootNode.prototype.attachTo = function attachTo (domElement) {\n this.element = domElement;\n this.defs.attachTo(domElement.firstElementChild);\n };\n\n RootNode.prototype.clear = function clear () {\n BaseNode.prototype.clear.call(this);\n };\n\n RootNode.prototype.template = function template () {\n return this.defs.render() + this.renderChildren();\n };\n\n RootNode.prototype.definitionChange = function definitionChange (e) {\n this.defs.definitionChange(e);\n };\n\n return RootNode;\n}(Node));\n\nvar DASH_ARRAYS = {\n dot: [ 1.5, 3.5 ],\n dash: [ 4, 3.5 ],\n longdash: [ 8, 3.5 ],\n dashdot: [ 3.5, 3.5, 1.5, 3.5 ],\n longdashdot: [ 8, 3.5, 1.5, 3.5 ],\n longdashdotdot: [ 8, 3.5, 1.5, 3.5, 1.5, 3.5 ]\n};\n\nvar SOLID = \"solid\";\nvar BUTT = \"butt\";\n\nvar ATTRIBUTE_MAP = {\n \"fill.opacity\": \"fill-opacity\",\n \"stroke.color\": \"stroke\",\n \"stroke.width\": \"stroke-width\",\n \"stroke.opacity\": \"stroke-opacity\"\n};\n\nvar PathNode = (function (Node$$1) {\n function PathNode () {\n Node$$1.apply(this, arguments);\n }\n\n extendStatic(PathNode, Node$$1);\n PathNode.prototype = Object.create( Node$$1 && Node$$1.prototype );\n PathNode.prototype.constructor = PathNode;\n PathNode.fn = PathNode.prototype;\n PathNode.fn.init = PathNode.fn.constructor;\n\n PathNode.prototype.geometryChange = function geometryChange () {\n this.attr(\"d\", this.renderData());\n this.invalidate();\n };\n\n PathNode.prototype.optionsChange = function optionsChange (e) {\n switch (e.field) {\n case \"fill\":\n if (e.value) {\n this.allAttr(this.mapFill(e.value));\n } else {\n this.removeAttr(\"fill\");\n }\n break;\n\n case \"fill.color\":\n this.allAttr(this.mapFill({ color: e.value }));\n break;\n\n case \"stroke\":\n if (e.value) {\n this.allAttr(this.mapStroke(e.value));\n } else {\n this.removeAttr(\"stroke\");\n }\n break;\n\n case \"transform\":\n this.transformChange(e.value);\n break;\n\n default:\n var name = ATTRIBUTE_MAP[e.field];\n if (name) {\n this.attr(name, e.value);\n }\n break;\n }\n\n this.accessibilityOptionsChange(e);\n\n Node$$1.prototype.optionsChange.call(this, e);\n };\n\n PathNode.prototype.content = function content () {\n if (this.element) {\n this.element.textContent = this.srcElement.content();\n }\n };\n\n PathNode.prototype.renderData = function renderData () {\n return this.srcElement.toString(POINT_DIGITS) || undefined;\n };\n\n PathNode.prototype.mapStroke = function mapStroke (stroke) {\n var attrs = [];\n\n if (stroke && !isTransparent(stroke.color)) {\n attrs.push([ \"stroke\", stroke.color ]);\n attrs.push([ \"stroke-width\", stroke.width ]);\n attrs.push([ \"stroke-linecap\", this.renderLinecap(stroke) ]);\n attrs.push([ \"stroke-linejoin\", stroke.lineJoin ]);\n\n if (defined(stroke.opacity)) {\n attrs.push([ \"stroke-opacity\", stroke.opacity ]);\n }\n\n if (defined(stroke.dashType)) {\n attrs.push([ \"stroke-dasharray\", this.renderDashType(stroke) ]);\n }\n } else {\n attrs.push([ \"stroke\", NONE ]);\n }\n\n return attrs;\n };\n\n PathNode.prototype.renderStroke = function renderStroke () {\n return renderAllAttr(\n this.mapStroke(this.srcElement.options.stroke)\n );\n };\n\n PathNode.prototype.renderDashType = function renderDashType (stroke) {\n var dashType = stroke.dashType;\n var width = stroke.width; if (width === void 0) { width = 1; }\n\n if (dashType && dashType !== SOLID) {\n var dashArray = DASH_ARRAYS[dashType.toLowerCase()];\n var result = [];\n\n for (var i = 0; i < dashArray.length; i++) {\n result.push(dashArray[i] * width);\n }\n\n return result.join(\" \");\n }\n };\n\n PathNode.prototype.renderLinecap = function renderLinecap (stroke) {\n var dashType = stroke.dashType;\n var lineCap = stroke.lineCap;\n\n return (dashType && dashType !== \"solid\") ? BUTT : lineCap;\n };\n\n PathNode.prototype.mapFill = function mapFill (fill) {\n var attrs = [];\n if (!(fill && fill.nodeType === \"Gradient\")) {\n if (fill && !isTransparent(fill.color)) {\n attrs.push([ \"fill\", fill.color ]);\n\n if (defined(fill.opacity)) {\n attrs.push([ \"fill-opacity\", fill.opacity ]);\n }\n } else {\n attrs.push([ \"fill\", NONE ]);\n }\n }\n\n return attrs;\n };\n\n PathNode.prototype.renderFill = function renderFill () {\n return renderAllAttr(\n this.mapFill(this.srcElement.options.fill)\n );\n };\n\n PathNode.prototype.template = function template () {\n return \"\";\n };\n\n return PathNode;\n}(Node));\n\nvar ArcNode = (function (PathNode$$1) {\n function ArcNode () {\n PathNode$$1.apply(this, arguments);\n }\n\n extendStatic(ArcNode, PathNode$$1);\n ArcNode.prototype = Object.create( PathNode$$1 && PathNode$$1.prototype );\n ArcNode.prototype.constructor = ArcNode;\n ArcNode.fn = ArcNode.prototype;\n ArcNode.fn.init = ArcNode.fn.constructor;\n\n ArcNode.prototype.renderData = function renderData () {\n return this.srcElement.toPath().toString(POINT_DIGITS);\n };\n\n return ArcNode;\n}(PathNode));\n\nvar CircleNode = (function (PathNode$$1) {\n function CircleNode () {\n PathNode$$1.apply(this, arguments);\n }\n\n extendStatic(CircleNode, PathNode$$1);\n CircleNode.prototype = Object.create( PathNode$$1 && PathNode$$1.prototype );\n CircleNode.prototype.constructor = CircleNode;\n CircleNode.fn = CircleNode.prototype;\n CircleNode.fn.init = CircleNode.fn.constructor;\n\n CircleNode.prototype.geometryChange = function geometryChange () {\n var center = this.center();\n this.attr(\"cx\", center.x);\n this.attr(\"cy\", center.y);\n this.attr(\"r\", this.radius());\n this.invalidate();\n };\n\n CircleNode.prototype.center = function center () {\n return this.srcElement.geometry().center;\n };\n\n CircleNode.prototype.radius = function radius () {\n return this.srcElement.geometry().radius;\n };\n\n CircleNode.prototype.template = function template () {\n return \"\";\n };\n\n return CircleNode;\n}(PathNode));\n\nvar GroupNode = (function (Node$$1) {\n function GroupNode () {\n Node$$1.apply(this, arguments);\n }\n\n extendStatic(GroupNode, Node$$1);\n GroupNode.prototype = Object.create( Node$$1 && Node$$1.prototype );\n GroupNode.prototype.constructor = GroupNode;\n GroupNode.fn = GroupNode.prototype;\n GroupNode.fn.init = GroupNode.fn.constructor;\n\n GroupNode.prototype.template = function template () {\n return (\"\" + (this.renderChildren()) + \"\");\n };\n\n GroupNode.prototype.optionsChange = function optionsChange (e) {\n var field = e.field;\n var value = e.value;\n\n if (field === \"transform\") {\n this.transformChange(value);\n }\n\n this.accessibilityOptionsChange(e);\n\n Node$$1.prototype.optionsChange.call(this, e);\n };\n\n return GroupNode;\n}(Node));\n\nvar ImageNode = (function (PathNode$$1) {\n function ImageNode () {\n PathNode$$1.apply(this, arguments);\n }\n\n extendStatic(ImageNode, PathNode$$1);\n ImageNode.prototype = Object.create( PathNode$$1 && PathNode$$1.prototype );\n ImageNode.prototype.constructor = ImageNode;\n ImageNode.fn = ImageNode.prototype;\n ImageNode.fn.init = ImageNode.fn.constructor;\n\n ImageNode.prototype.geometryChange = function geometryChange () {\n this.allAttr(this.mapPosition());\n this.invalidate();\n };\n\n ImageNode.prototype.optionsChange = function optionsChange (e) {\n if (e.field === \"src\") {\n this.allAttr(this.mapSource());\n }\n\n PathNode$$1.prototype.optionsChange.call(this, e);\n };\n\n ImageNode.prototype.mapPosition = function mapPosition () {\n var rect = this.srcElement.rect();\n var tl = rect.topLeft();\n\n return [\n [ \"x\", tl.x ],\n [ \"y\", tl.y ],\n [ \"width\", rect.width() + \"px\" ],\n [ \"height\", rect.height() + \"px\" ]\n ];\n };\n\n ImageNode.prototype.renderPosition = function renderPosition () {\n return renderAllAttr(this.mapPosition());\n };\n\n ImageNode.prototype.mapSource = function mapSource (encode) {\n var src = this.srcElement.src();\n\n if (encode) {\n src = kendo.htmlEncode(src);\n }\n\n return [ [ \"xlink:href\", src ] ];\n };\n\n ImageNode.prototype.renderSource = function renderSource () {\n return renderAllAttr(this.mapSource(true));\n };\n\n ImageNode.prototype.template = function template () {\n return \"\" +\n \"\";\n };\n\n return ImageNode;\n}(PathNode));\n\nvar MultiPathNode = (function (PathNode$$1) {\n function MultiPathNode () {\n PathNode$$1.apply(this, arguments);\n }\n\n extendStatic(MultiPathNode, PathNode$$1);\n MultiPathNode.prototype = Object.create( PathNode$$1 && PathNode$$1.prototype );\n MultiPathNode.prototype.constructor = MultiPathNode;\n MultiPathNode.fn = MultiPathNode.prototype;\n MultiPathNode.fn.init = MultiPathNode.fn.constructor;\n\n MultiPathNode.prototype.renderData = function renderData () {\n return this.srcElement.toString(POINT_DIGITS) || 'undefined';\n };\n\n return MultiPathNode;\n}(PathNode));\n\nvar RectNode = (function (PathNode$$1) {\n function RectNode () {\n PathNode$$1.apply(this, arguments);\n }\n\n extendStatic(RectNode, PathNode$$1);\n RectNode.prototype = Object.create( PathNode$$1 && PathNode$$1.prototype );\n RectNode.prototype.constructor = RectNode;\n RectNode.fn = RectNode.prototype;\n RectNode.fn.init = RectNode.fn.constructor;\n\n RectNode.prototype.geometryChange = function geometryChange () {\n var geometry = this.srcElement.geometry();\n this.attr(\"x\", geometry.origin.x);\n this.attr(\"y\", geometry.origin.y);\n this.attr(\"width\", geometry.size.width);\n this.attr(\"height\", geometry.size.height);\n this.attr(\"rx\", geometry.cornerRadius[0]);\n this.attr(\"ry\", geometry.cornerRadius[1]);\n this.invalidate();\n };\n\n RectNode.prototype.size = function size () {\n return this.srcElement.geometry().size;\n };\n\n RectNode.prototype.origin = function origin () {\n return this.srcElement.geometry().origin;\n };\n\n RectNode.prototype.rx = function rx () {\n return this.srcElement.geometry().cornerRadius[0];\n };\n\n RectNode.prototype.ry = function ry () {\n return this.srcElement.geometry().cornerRadius[1];\n };\n\n RectNode.prototype.template = function template () {\n return \"\";\n };\n\n return RectNode;\n}(PathNode));\n\nvar ENTITY_REGEX = /&(?:[a-zA-Z]+|#\\d+);/g;\n\nfunction decodeEntities(text) {\n if (!text || typeof text !== \"string\" || !ENTITY_REGEX.test(text)) {\n return text;\n }\n\n var element = decodeEntities._element;\n ENTITY_REGEX.lastIndex = 0;\n\n return text.replace(ENTITY_REGEX, function (match) {\n element.innerHTML = match;\n\n return element.textContent || element.innerText;\n });\n}\n\nif (typeof document !== \"undefined\") {\n decodeEntities._element = document.createElement(\"span\");\n}\n\nvar TextNode = (function (PathNode$$1) {\n function TextNode () {\n PathNode$$1.apply(this, arguments);\n }\n\n extendStatic(TextNode, PathNode$$1);\n TextNode.prototype = Object.create( PathNode$$1 && PathNode$$1.prototype );\n TextNode.prototype.constructor = TextNode;\n TextNode.fn = TextNode.prototype;\n TextNode.fn.init = TextNode.fn.constructor;\n\n TextNode.prototype.geometryChange = function geometryChange () {\n var pos = this.pos();\n this.attr(\"x\", pos.x);\n this.attr(\"y\", pos.y);\n this.invalidate();\n };\n\n TextNode.prototype.optionsChange = function optionsChange (e) {\n if (e.field === \"font\") {\n this.attr(\"style\", renderStyle(this.mapStyle()));\n this.geometryChange();\n } else if (e.field === \"content\") {\n PathNode$$1.prototype.content.call(this, this.srcElement.content());\n }\n\n PathNode$$1.prototype.optionsChange.call(this, e);\n };\n\n TextNode.prototype.mapStyle = function mapStyle (encode) {\n var style = PathNode$$1.prototype.mapStyle.call(this, encode);\n var font = this.srcElement.options.font;\n\n if (encode) {\n font = kendo.htmlEncode(font);\n }\n\n style.push([ \"font\", font ], [ \"white-space\", \"pre\" ]);\n\n return style;\n };\n\n TextNode.prototype.pos = function pos () {\n var pos = this.srcElement.position();\n var size = this.srcElement.measure();\n return pos.clone().setY(pos.y + size.baseline);\n };\n\n TextNode.prototype.renderContent = function renderContent () {\n var content = this.srcElement.content();\n content = decodeEntities(content);\n content = kendo.htmlEncode(content);\n\n return kendoUtil.normalizeText(content);\n };\n\n TextNode.prototype.renderTextAnchor = function renderTextAnchor () {\n var anchor;\n\n if ((this.options || {}).rtl && !(supportBrowser.msie || supportBrowser.edge)) {\n anchor = 'end';\n }\n\n return renderAttr(\"text-anchor\", anchor);\n };\n\n TextNode.prototype.template = function template () {\n return \"\" + (this.renderContent()) + \"\";\n };\n\n return TextNode;\n}(PathNode));\n\nNODE_MAP.Arc = ArcNode;\nNODE_MAP.Circle = CircleNode;\nNODE_MAP.Group = GroupNode;\nNODE_MAP.Image = ImageNode;\nNODE_MAP.MultiPath = MultiPathNode;\nNODE_MAP.Path = PathNode;\nNODE_MAP.Rect = RectNode;\nNODE_MAP.Text = TextNode;\n\nvar RTL = 'rtl';\n\nfunction alignToScreen(element) {\n var ctm;\n\n try {\n ctm = element.getScreenCTM ? element.getScreenCTM() : null;\n } catch (e) { } // eslint-disable-line no-empty\n\n if (ctm) {\n var left = - ctm.e % 1;\n var top = - ctm.f % 1;\n var style = element.style;\n\n if (left !== 0 || top !== 0) {\n style.left = left + \"px\";\n style.top = top + \"px\";\n }\n }\n}\n\nvar Surface$3 = (function (BaseSurface) {\n function Surface(element, options) {\n BaseSurface.call(this, element, options);\n\n this._root = new RootNode($.extend({\n rtl: elementStyles(element, 'direction').direction === RTL\n }, this.options));\n\n renderSVG$1(this.element, this._template(''));\n\n this._rootElement = this.element.firstElementChild;\n this._rootElement.style.width = '100%';\n this._rootElement.style.height = '100%';\n this._rootElement.style.overflow = 'hidden';\n\n alignToScreen(this._rootElement);\n\n this._root.attachTo(this._rootElement);\n\n bindEvents(this.element, {\n click: this._click,\n mouseover: this._mouseenter,\n mouseout: this._mouseleave,\n mousemove: this._mousemove\n });\n\n this.resize();\n }\n\n extendStatic(Surface, BaseSurface);\n Surface.prototype = Object.create( BaseSurface && BaseSurface.prototype );\n Surface.prototype.constructor = Surface;\n Surface.fn = Surface.prototype;\n Surface.fn.init = Surface.fn.constructor;\n\n var prototypeAccessors = { type: {} };\n\n prototypeAccessors.type.get = function () {\n return \"svg\";\n };\n\n Surface.prototype.destroy = function destroy () {\n if (this._root) {\n this._root.destroy();\n this._root = null;\n this._rootElement = null;\n unbindEvents(this.element, {\n click: this._click,\n mouseover: this._mouseenter,\n mouseout: this._mouseleave,\n mousemove: this._mousemove\n });\n }\n\n BaseSurface.prototype.destroy.call(this);\n };\n\n Surface.prototype.translate = function translate (offset) {\n var viewBox = (Math.round(offset.x)) + \" \" + (Math.round(offset.y)) + \" \" + (this._size.width) + \" \" + (this._size.height);\n\n this._offset = offset;\n this._rootElement.setAttribute(\"viewBox\", viewBox);\n };\n\n Surface.prototype.draw = function draw (element) {\n BaseSurface.prototype.draw.call(this, element);\n this._root.load([ element ]);\n };\n\n Surface.prototype.clear = function clear () {\n BaseSurface.prototype.clear.call(this);\n this._root.clear();\n };\n\n Surface.prototype.svg = function svg () {\n return \"\" + this._template();\n };\n\n Surface.prototype.exportVisual = function exportVisual () {\n var ref = this;\n var visual = ref._visual;\n var offset = ref._offset;\n\n if (offset) {\n var wrap = new Group();\n wrap.children.push(visual);\n\n wrap.transform(\n transform$1().translate(-offset.x, -offset.y)\n );\n\n visual = wrap;\n }\n\n return visual;\n };\n\n Surface.prototype._resize = function _resize () {\n if (this._offset) {\n this.translate(this._offset);\n }\n };\n\n Surface.prototype._template = function _template (svgStyles) {\n var styles = typeof svgStyles === 'string' ? svgStyles :\n \"style='width: 100%; height: 100%; overflow: hidden;' \";\n return (\"\" + (this._root.render()) + \"\");\n };\n\n Object.defineProperties( Surface.prototype, prototypeAccessors );\n\n return Surface;\n}(Surface$2));\n\nvar NODE_MAP$2 = {};\n\nfunction renderPath(ctx, path) {\n var segments = path.segments;\n\n if (segments.length === 0) {\n return;\n }\n\n var segment = segments[0];\n var anchor = segment.anchor();\n ctx.moveTo(anchor.x, anchor.y);\n\n for (var i = 1; i < segments.length; i++) {\n segment = segments[i];\n anchor = segment.anchor();\n\n var prevSeg = segments[i - 1];\n var prevOut = prevSeg.controlOut();\n var controlIn = segment.controlIn();\n\n if (prevOut && controlIn) {\n ctx.bezierCurveTo(prevOut.x, prevOut.y,\n controlIn.x, controlIn.y,\n anchor.x, anchor.y);\n } else {\n ctx.lineTo(anchor.x, anchor.y);\n }\n }\n\n if (path.options.closed) {\n ctx.closePath();\n }\n}\n\nvar Node$2 = (function (BaseNode$$1) {\n function Node(srcElement) {\n BaseNode$$1.call(this, srcElement);\n if (srcElement) {\n this.initClip();\n }\n }\n\n extendStatic(Node, BaseNode$$1);\n Node.prototype = Object.create( BaseNode$$1 && BaseNode$$1.prototype );\n Node.prototype.constructor = Node;\n Node.fn = Node.prototype;\n Node.fn.init = Node.fn.constructor;\n\n Node.prototype.initClip = function initClip () {\n var clip = this.srcElement.clip();\n if (clip) {\n this.clip = clip;\n clip.addObserver(this);\n }\n };\n\n Node.prototype.clear = function clear () {\n if (this.srcElement) {\n this.srcElement.removeObserver(this);\n }\n\n this.clearClip();\n\n BaseNode$$1.prototype.clear.call(this);\n };\n\n Node.prototype.clearClip = function clearClip () {\n if (this.clip) {\n this.clip.removeObserver(this);\n delete this.clip;\n }\n };\n\n Node.prototype.setClip = function setClip (ctx) {\n if (this.clip) {\n ctx.beginPath();\n renderPath(ctx, this.clip);\n ctx.clip();\n }\n };\n\n Node.prototype.optionsChange = function optionsChange (e) {\n if (e.field === \"clip\") {\n this.clearClip();\n this.initClip();\n }\n\n BaseNode$$1.prototype.optionsChange.call(this, e);\n };\n\n Node.prototype.setTransform = function setTransform (ctx) {\n if (this.srcElement) {\n var transform = this.srcElement.transform();\n if (transform) {\n ctx.transform.apply(ctx, transform.matrix().toArray(6));\n }\n }\n };\n\n Node.prototype.loadElements = function loadElements (elements, pos, cors) {\n var this$1$1 = this;\n\n for (var i = 0; i < elements.length; i++) {\n var srcElement = elements[i];\n var children = srcElement.children;\n\n var childNode = new NODE_MAP$2[srcElement.nodeType](srcElement, cors);\n\n if (children && children.length > 0) {\n childNode.load(children, pos, cors);\n }\n\n if (defined(pos)) {\n this$1$1.insertAt(childNode, pos);\n } else {\n this$1$1.append(childNode);\n }\n }\n };\n\n Node.prototype.load = function load (elements, pos, cors) {\n this.loadElements(elements, pos, cors);\n\n this.invalidate();\n };\n\n Node.prototype.setOpacity = function setOpacity (ctx) {\n if (this.srcElement) {\n var opacity = this.srcElement.opacity();\n if (defined(opacity)) {\n this.globalAlpha(ctx, opacity);\n }\n }\n };\n\n Node.prototype.globalAlpha = function globalAlpha (ctx, value) {\n var opactity = value;\n if (opactity && ctx.globalAlpha) {\n opactity *= ctx.globalAlpha;\n }\n ctx.globalAlpha = opactity;\n };\n\n Node.prototype.visible = function visible () {\n var src = this.srcElement;\n return !src || (src && src.options.visible !== false);\n };\n\n return Node;\n}(BaseNode));\n\nvar GroupNode$2 = (function (superclass) {\n function GroupNode () {\n superclass.apply(this, arguments);\n }\n\n extendStatic(GroupNode, superclass);\n GroupNode.prototype = Object.create( superclass && superclass.prototype );\n GroupNode.prototype.constructor = GroupNode;\n GroupNode.fn = GroupNode.prototype;\n GroupNode.fn.init = GroupNode.fn.constructor;\n\n GroupNode.prototype.renderTo = function renderTo (ctx) {\n if (!this.visible()) {\n return;\n }\n\n ctx.save();\n\n this.setTransform(ctx);\n this.setClip(ctx);\n this.setOpacity(ctx);\n\n var childNodes = this.childNodes;\n for (var i = 0; i < childNodes.length; i++) {\n var child = childNodes[i];\n if (child.visible()) {\n child.renderTo(ctx);\n }\n }\n\n ctx.restore();\n };\n\n return GroupNode;\n}(traversable(Node$2, \"childNodes\")));\n\nvar FRAME_DELAY = 1000 / 60;\n\nvar RootNode$2 = (function (superclass) {\n function RootNode(canvas, size) {\n superclass.call(this);\n\n this.canvas = canvas;\n this.size = size;\n this.ctx = canvas.getContext(\"2d\");\n\n var invalidateHandler = this._invalidate.bind(this);\n this.invalidate = kendo.throttle(function () {\n kendo.animationFrame(invalidateHandler);\n }, FRAME_DELAY);\n }\n\n extendStatic(RootNode, superclass);\n RootNode.prototype = Object.create( superclass && superclass.prototype );\n RootNode.prototype.constructor = RootNode;\n RootNode.fn = RootNode.prototype;\n RootNode.fn.init = RootNode.fn.constructor;\n\n RootNode.prototype.destroy = function destroy () {\n superclass.prototype.destroy.call(this);\n this.canvas = null;\n this.ctx = null;\n };\n\n RootNode.prototype.load = function load (elements, pos, cors) {\n this.loadElements(elements, pos, cors);\n this._invalidate();\n };\n\n RootNode.prototype._rescale = function _rescale (scale) {\n var ref = this;\n var canvas = ref.canvas;\n var size = ref.size;\n canvas.width = size.width * scale;\n canvas.height = size.height * scale;\n this.ctx.scale(scale, scale);\n };\n\n RootNode.prototype._devicePixelRatio = function _devicePixelRatio () {\n if (typeof window.devicePixelRatio === 'number') {\n return window.devicePixelRatio;\n }\n\n return 1;\n };\n\n RootNode.prototype._invalidate = function _invalidate (options) {\n if (!this.ctx) {\n return;\n }\n\n var fixedScale = options && options.fixedScale;\n var scale = fixedScale ? 1 : this._devicePixelRatio();\n this._rescale(scale);\n\n this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n this.renderTo(this.ctx);\n };\n\n return RootNode;\n}(traversable(GroupNode$2, \"childNodes\")));\n\nvar QuadRoot = (function (Class$$1) {\n function QuadRoot() {\n Class$$1.call(this);\n\n this.shapes = [];\n }\n\n extendStatic(QuadRoot, Class$$1);\n QuadRoot.prototype = Object.create( Class$$1 && Class$$1.prototype );\n QuadRoot.prototype.constructor = QuadRoot;\n QuadRoot.fn = QuadRoot.prototype;\n QuadRoot.fn.init = QuadRoot.fn.constructor;\n\n QuadRoot.prototype._add = function _add (shape, bbox) {\n this.shapes.push({\n bbox: bbox,\n shape: shape\n });\n shape._quadNode = this;\n };\n\n QuadRoot.prototype.pointShapes = function pointShapes (point) {\n var shapes = this.shapes;\n var length = shapes.length;\n var result = [];\n for (var idx = 0; idx < length; idx++) {\n if (shapes[idx].bbox.containsPoint(point)) {\n result.push(shapes[idx].shape);\n }\n }\n return result;\n };\n\n QuadRoot.prototype.insert = function insert (shape, bbox) {\n this._add(shape, bbox);\n };\n\n QuadRoot.prototype.remove = function remove (shape) {\n var shapes = this.shapes;\n var length = shapes.length;\n\n for (var idx = 0; idx < length; idx++) {\n if (shapes[idx].shape === shape) {\n shapes.splice(idx, 1);\n break;\n }\n }\n };\n\n return QuadRoot;\n}(Class));\n\nvar QuadNode = (function (QuadRoot$$1) {\n function QuadNode(rect) {\n QuadRoot$$1.call(this);\n this.children = [];\n this.rect = rect;\n }\n\n extendStatic(QuadNode, QuadRoot$$1);\n QuadNode.prototype = Object.create( QuadRoot$$1 && QuadRoot$$1.prototype );\n QuadNode.prototype.constructor = QuadNode;\n QuadNode.fn = QuadNode.prototype;\n QuadNode.fn.init = QuadNode.fn.constructor;\n\n QuadNode.prototype.inBounds = function inBounds (rect) {\n var nodeRect = this.rect;\n var nodeBottomRight = nodeRect.bottomRight();\n var bottomRight = rect.bottomRight();\n var inBounds = nodeRect.origin.x <= rect.origin.x && nodeRect.origin.y <= rect.origin.y && bottomRight.x <= nodeBottomRight.x &&\n bottomRight.y <= nodeBottomRight.y;\n return inBounds;\n };\n\n QuadNode.prototype.pointShapes = function pointShapes (point) {\n var children = this.children;\n var length = children.length;\n var result = QuadRoot$$1.prototype.pointShapes.call(this, point);\n for (var idx = 0; idx < length; idx++) {\n append$1$1(result, children[idx].pointShapes(point));\n }\n return result;\n };\n\n QuadNode.prototype.insert = function insert (shape, bbox) {\n var children = this.children;\n var inserted = false;\n\n if (this.inBounds(bbox)) {\n if (this.shapes.length < 4) {\n this._add(shape, bbox);\n } else {\n if (!children.length) {\n this._initChildren();\n }\n\n for (var idx = 0; idx < children.length; idx++) {\n if (children[idx].insert(shape, bbox)) {\n inserted = true;\n break;\n }\n }\n\n if (!inserted) {\n this._add(shape, bbox);\n }\n }\n inserted = true;\n }\n\n return inserted;\n };\n\n QuadNode.prototype._initChildren = function _initChildren () {\n var ref = this;\n var rect = ref.rect;\n var children = ref.children;\n var center = rect.center();\n var halfWidth = rect.width() / 2;\n var halfHeight = rect.height() / 2;\n\n children.push(\n new QuadNode(new Rect([ rect.origin.x, rect.origin.y ], [ halfWidth, halfHeight ])),\n new QuadNode(new Rect([ center.x, rect.origin.y ], [ halfWidth, halfHeight ])),\n new QuadNode(new Rect([ rect.origin.x, center.y ], [ halfWidth, halfHeight ])),\n new QuadNode(new Rect([ center.x, center.y ], [ halfWidth, halfHeight ]))\n );\n };\n\n return QuadNode;\n}(QuadRoot));\n\nvar ROOT_SIZE = 3000;\nvar LEVEL_STEP = 10000;\nvar MAX_LEVEL = 75;\n\nvar ShapesQuadTree = (function (Class$$1) {\n function ShapesQuadTree() {\n Class$$1.call(this);\n\n this.initRoots();\n }\n\n extendStatic(ShapesQuadTree, Class$$1);\n ShapesQuadTree.prototype = Object.create( Class$$1 && Class$$1.prototype );\n ShapesQuadTree.prototype.constructor = ShapesQuadTree;\n ShapesQuadTree.fn = ShapesQuadTree.prototype;\n ShapesQuadTree.fn.init = ShapesQuadTree.fn.constructor;\n\n ShapesQuadTree.prototype.initRoots = function initRoots () {\n this.rootMap = {};\n this.root = new QuadRoot();\n this.rootElements = [];\n };\n\n ShapesQuadTree.prototype.clear = function clear () {\n var this$1$1 = this;\n\n var rootElements = this.rootElements;\n for (var idx = 0; idx < rootElements.length; idx++) {\n this$1$1.remove(rootElements[idx]);\n }\n this.initRoots();\n };\n\n ShapesQuadTree.prototype.pointShape = function pointShape (point) {\n var sectorRoot = ( this.rootMap[ Math.floor( point.x / ROOT_SIZE ) ] || {} )[ Math.floor( point.y / ROOT_SIZE ) ];\n var result = this.root.pointShapes(point);\n\n if (sectorRoot) {\n result = result.concat(sectorRoot.pointShapes(point));\n }\n\n this.assignZindex(result);\n\n result.sort(zIndexComparer);\n for (var idx = 0; idx < result.length; idx++) {\n if (result[idx].containsPoint(point)) {\n return result[idx];\n }\n }\n };\n\n ShapesQuadTree.prototype.assignZindex = function assignZindex (elements) {\n var this$1$1 = this;\n\n for (var idx = 0; idx < elements.length; idx++) {\n var element = elements[idx];\n var zIndex = 0;\n var levelWeight = Math.pow(LEVEL_STEP, MAX_LEVEL);\n var parents = [];\n\n while (element) {\n parents.push(element);\n element = element.parent;\n }\n\n while (parents.length) {\n element = parents.pop();\n zIndex += ((element.parent ? element.parent.children : this$1$1.rootElements).indexOf(element) + 1) * levelWeight;\n levelWeight /= LEVEL_STEP;\n }\n\n elements[idx]._zIndex = zIndex;\n }\n };\n\n ShapesQuadTree.prototype.optionsChange = function optionsChange (e) {\n if (e.field === \"transform\" || e.field === \"stroke.width\") {\n this.bboxChange(e.element);\n }\n };\n\n ShapesQuadTree.prototype.geometryChange = function geometryChange (e) {\n this.bboxChange(e.element);\n };\n\n ShapesQuadTree.prototype.bboxChange = function bboxChange (element) {\n var this$1$1 = this;\n\n if (element.nodeType === \"Group\") {\n for (var idx = 0; idx < element.children.length; idx++) {\n this$1$1.bboxChange(element.children[idx]);\n }\n } else {\n if (element._quadNode) {\n element._quadNode.remove(element);\n }\n this._insertShape(element);\n }\n };\n\n ShapesQuadTree.prototype.add = function add (elements) {\n var elementsArray = Array.isArray(elements) ? elements.slice(0) : [ elements ];\n\n append$1$1(this.rootElements, elementsArray);\n this._insert(elementsArray);\n };\n\n ShapesQuadTree.prototype.childrenChange = function childrenChange (e) {\n var this$1$1 = this;\n\n if (e.action === \"remove\") {\n for (var idx = 0; idx < e.items.length; idx++) {\n this$1$1.remove(e.items[idx]);\n }\n } else {\n this._insert(Array.prototype.slice.call(e.items, 0));\n }\n };\n\n ShapesQuadTree.prototype._insert = function _insert (elements) {\n var this$1$1 = this;\n\n var element;\n\n while (elements.length > 0) {\n element = elements.pop();\n element.addObserver(this$1$1);\n if (element.nodeType === \"Group\") {\n append$1$1(elements, element.children);\n } else {\n this$1$1._insertShape(element);\n }\n }\n };\n\n ShapesQuadTree.prototype._insertShape = function _insertShape (shape) {\n var bbox = shape.bbox();\n if (bbox) {\n var sectors = this.getSectors(bbox);\n var x = sectors[0][0];\n var y = sectors[1][0];\n\n if (this.inRoot(sectors)) {\n this.root.insert(shape, bbox);\n } else {\n var rootMap = this.rootMap;\n if (!rootMap[x]) {\n rootMap[x] = {};\n }\n\n if (!rootMap[x][y]) {\n rootMap[x][y] = new QuadNode(\n new Rect([ x * ROOT_SIZE, y * ROOT_SIZE ], [ ROOT_SIZE, ROOT_SIZE ])\n );\n }\n\n rootMap[x][y].insert(shape, bbox);\n }\n }\n };\n\n ShapesQuadTree.prototype.remove = function remove (element) {\n var this$1$1 = this;\n\n element.removeObserver(this);\n\n if (element.nodeType === \"Group\") {\n var children = element.children;\n for (var idx = 0; idx < children.length; idx++) {\n this$1$1.remove(children[idx]);\n }\n } else if (element._quadNode) {\n element._quadNode.remove(element);\n delete element._quadNode;\n }\n };\n\n ShapesQuadTree.prototype.inRoot = function inRoot (sectors) {\n return sectors[0].length > 1 || sectors[1].length > 1;\n };\n\n ShapesQuadTree.prototype.getSectors = function getSectors (rect) {\n var bottomRight = rect.bottomRight();\n var bottomX = Math.floor(bottomRight.x / ROOT_SIZE);\n var bottomY = Math.floor(bottomRight.y / ROOT_SIZE);\n var sectors = [ [], [] ];\n for (var x = Math.floor(rect.origin.x / ROOT_SIZE); x <= bottomX; x++) {\n sectors[0].push(x);\n }\n for (var y = Math.floor(rect.origin.y / ROOT_SIZE); y <= bottomY; y++) {\n sectors[1].push(y);\n }\n return sectors;\n };\n\n return ShapesQuadTree;\n}(Class));\n\nfunction zIndexComparer(x1, x2) {\n if (x1._zIndex < x2._zIndex) {\n return 1;\n }\n if (x1._zIndex > x2._zIndex) {\n return -1;\n }\n\n return 0;\n}\n\nvar SurfaceCursor = function SurfaceCursor(surface) {\n surface.bind(\"mouseenter\", this._mouseenter.bind(this));\n surface.bind(\"mouseleave\", this._mouseleave.bind(this));\n\n this.element = surface.element;\n};\n\nSurfaceCursor.prototype.clear = function clear () {\n this._resetCursor();\n};\n\nSurfaceCursor.prototype.destroy = function destroy () {\n this._resetCursor();\n delete this.element;\n};\n\nSurfaceCursor.prototype._mouseenter = function _mouseenter (e) {\n var cursor = this._shapeCursor(e);\n\n if (!cursor) {\n this._resetCursor();\n } else {\n if (!this._current) {\n this._defaultCursor = this._getCursor();\n }\n\n this._setCursor(cursor);\n }\n};\n\nSurfaceCursor.prototype._mouseleave = function _mouseleave () {\n this._resetCursor();\n};\n\nSurfaceCursor.prototype._shapeCursor = function _shapeCursor (e) {\n var shape = e.element;\n\n while (shape && !defined(shape.options.cursor)) {\n shape = shape.parent;\n }\n\n if (shape) {\n return shape.options.cursor;\n }\n};\n\nSurfaceCursor.prototype._getCursor = function _getCursor () {\n if (this.element) {\n return this.element.style.cursor;\n }\n};\n\nSurfaceCursor.prototype._setCursor = function _setCursor (cursor) {\n if (this.element) {\n this.element.style.cursor = cursor;\n this._current = cursor;\n }\n};\n\nSurfaceCursor.prototype._resetCursor = function _resetCursor () {\n if (this._current) {\n this._setCursor(this._defaultCursor || \"\");\n delete this._current;\n }\n};\n\nfunction addGradientStops(gradient, stops) {\n for (var idx = 0; idx < stops.length; idx++) {\n var stop = stops[idx];\n var color = kendo.parseColor(stop.color());\n\n color.a *= stop.opacity();\n\n gradient.addColorStop(stop.offset(), color.toCssRgba());\n }\n}\n\nvar PathNode$2 = (function (Node) {\n function PathNode () {\n Node.apply(this, arguments);\n }\n\n extendStatic(PathNode, Node);\n PathNode.prototype = Object.create( Node && Node.prototype );\n PathNode.prototype.constructor = PathNode;\n PathNode.fn = PathNode.prototype;\n PathNode.fn.init = PathNode.fn.constructor;\n\n PathNode.prototype.renderTo = function renderTo (ctx) {\n ctx.save();\n\n this.setTransform(ctx);\n this.setClip(ctx);\n this.setOpacity(ctx);\n\n ctx.beginPath();\n\n this.renderPoints(ctx, this.srcElement);\n\n this.setLineDash(ctx);\n this.setLineCap(ctx);\n this.setLineJoin(ctx);\n\n this.setFill(ctx);\n this.setStroke(ctx);\n\n ctx.restore();\n };\n\n PathNode.prototype.setFill = function setFill (ctx) {\n var fill = this.srcElement.options.fill;\n var hasFill = false;\n\n if (fill) {\n if (fill.nodeType === \"Gradient\") {\n this.setGradientFill(ctx, fill);\n hasFill = true;\n } else if (!isTransparent(fill.color)) {\n ctx.fillStyle = fill.color;\n\n ctx.save();\n this.globalAlpha(ctx, fill.opacity);\n ctx.fill();\n ctx.restore();\n\n hasFill = true;\n }\n }\n\n return hasFill;\n };\n\n PathNode.prototype.setGradientFill = function setGradientFill (ctx, fill) {\n var bbox = this.srcElement.rawBBox();\n var gradient;\n\n if (fill instanceof LinearGradient) {\n var start = fill.start();\n var end = fill.end();\n gradient = ctx.createLinearGradient(start.x, start.y, end.x, end.y);\n } else if (fill instanceof RadialGradient) {\n var center = fill.center();\n gradient = ctx.createRadialGradient(center.x, center.y, 0, center.x, center.y, fill.radius());\n }\n\n addGradientStops(gradient, fill.stops);\n\n ctx.save();\n\n if (!fill.userSpace()) {\n ctx.transform(bbox.width(), 0, 0, bbox.height(), bbox.origin.x, bbox.origin.y);\n }\n ctx.fillStyle = gradient;\n ctx.fill();\n\n ctx.restore();\n };\n\n PathNode.prototype.setStroke = function setStroke (ctx) {\n var stroke = this.srcElement.options.stroke;\n if (stroke && !isTransparent(stroke.color) && stroke.width > 0) {\n ctx.strokeStyle = stroke.color;\n ctx.lineWidth = valueOrDefault(stroke.width, 1);\n\n ctx.save();\n this.globalAlpha(ctx, stroke.opacity);\n ctx.stroke();\n ctx.restore();\n\n return true;\n }\n };\n\n PathNode.prototype.dashType = function dashType () {\n var stroke = this.srcElement.options.stroke;\n if (stroke && stroke.dashType) {\n return stroke.dashType.toLowerCase();\n }\n };\n\n PathNode.prototype.setLineDash = function setLineDash (ctx) {\n var dashType = this.dashType();\n if (dashType && dashType !== SOLID) {\n var dashArray = DASH_ARRAYS[dashType];\n if (ctx.setLineDash) {\n ctx.setLineDash(dashArray);\n } else {\n ctx.mozDash = dashArray;\n ctx.webkitLineDash = dashArray;\n }\n }\n };\n\n PathNode.prototype.setLineCap = function setLineCap (ctx) {\n var dashType = this.dashType();\n var stroke = this.srcElement.options.stroke;\n if (dashType && dashType !== SOLID) {\n ctx.lineCap = BUTT;\n } else if (stroke && stroke.lineCap) {\n ctx.lineCap = stroke.lineCap;\n }\n };\n\n PathNode.prototype.setLineJoin = function setLineJoin (ctx) {\n var stroke = this.srcElement.options.stroke;\n if (stroke && stroke.lineJoin) {\n ctx.lineJoin = stroke.lineJoin;\n }\n };\n\n PathNode.prototype.renderPoints = function renderPoints (ctx, path) {\n renderPath(ctx, path);\n };\n\n return PathNode;\n}(Node$2));\n\nvar ArcNode$2 = (function (PathNode) {\n function ArcNode () {\n PathNode.apply(this, arguments);\n }\n\n extendStatic(ArcNode, PathNode);\n ArcNode.prototype = Object.create( PathNode && PathNode.prototype );\n ArcNode.prototype.constructor = ArcNode;\n ArcNode.fn = ArcNode.prototype;\n ArcNode.fn.init = ArcNode.fn.constructor;\n\n ArcNode.prototype.renderPoints = function renderPoints (ctx) {\n var path = this.srcElement.toPath();\n renderPath(ctx, path);\n };\n\n return ArcNode;\n}(PathNode$2));\n\nvar CircleNode$2 = (function (PathNode) {\n function CircleNode () {\n PathNode.apply(this, arguments);\n }\n\n extendStatic(CircleNode, PathNode);\n CircleNode.prototype = Object.create( PathNode && PathNode.prototype );\n CircleNode.prototype.constructor = CircleNode;\n CircleNode.fn = CircleNode.prototype;\n CircleNode.fn.init = CircleNode.fn.constructor;\n\n CircleNode.prototype.renderPoints = function renderPoints (ctx) {\n var ref = this.srcElement.geometry();\n var center = ref.center;\n var radius = ref.radius;\n\n ctx.arc(center.x, center.y, radius, 0, Math.PI * 2);\n };\n\n return CircleNode;\n}(PathNode$2));\n\nvar ImageNode$2 = (function (PathNode) {\n function ImageNode(srcElement, cors) {\n PathNode.call(this, srcElement);\n\n this.onLoad = this.onLoad.bind(this);\n this.onError = this.onError.bind(this);\n\n this.loading = createPromise();\n\n var img = this.img = new Image();\n var src = srcElement.src();\n\n if (cors && !(/^data:/i.test(src))) {\n img.crossOrigin = cors;\n }\n\n if (src) {\n img.src = src;\n }\n\n if (img.complete) {\n this.onLoad();\n } else {\n img.onload = this.onLoad;\n img.onerror = this.onError;\n }\n }\n\n extendStatic(ImageNode, PathNode);\n ImageNode.prototype = Object.create( PathNode && PathNode.prototype );\n ImageNode.prototype.constructor = ImageNode;\n ImageNode.fn = ImageNode.prototype;\n ImageNode.fn.init = ImageNode.fn.constructor;\n\n ImageNode.prototype.renderTo = function renderTo (ctx) {\n if (this.loading.state() === \"resolved\") {\n ctx.save();\n\n this.setTransform(ctx);\n this.setClip(ctx);\n\n this.drawImage(ctx);\n\n ctx.restore();\n }\n };\n\n ImageNode.prototype.optionsChange = function optionsChange (e) {\n if (e.field === \"src\") {\n this.loading = createPromise();\n this.img.src = this.srcElement.src();\n } else {\n PathNode.prototype.optionsChange.call(this, e);\n }\n };\n\n ImageNode.prototype.onLoad = function onLoad () {\n this.loading.resolve();\n this.invalidate();\n };\n\n ImageNode.prototype.onError = function onError () {\n this.loading.reject(new Error(\n \"Unable to load image '\" + this.img.src +\n \"'. Check for connectivity and verify CORS headers.\"\n ));\n };\n\n ImageNode.prototype.drawImage = function drawImage (ctx) {\n var rect = this.srcElement.rect();\n var topLeft = rect.topLeft();\n\n ctx.drawImage(\n this.img, topLeft.x, topLeft.y, rect.width(), rect.height()\n );\n };\n\n return ImageNode;\n}(PathNode$2));\n\nvar MultiPathNode$2 = (function (PathNode) {\n function MultiPathNode () {\n PathNode.apply(this, arguments);\n }\n\n extendStatic(MultiPathNode, PathNode);\n MultiPathNode.prototype = Object.create( PathNode && PathNode.prototype );\n MultiPathNode.prototype.constructor = MultiPathNode;\n MultiPathNode.fn = MultiPathNode.prototype;\n MultiPathNode.fn.init = MultiPathNode.fn.constructor;\n\n MultiPathNode.prototype.renderPoints = function renderPoints (ctx) {\n var paths = this.srcElement.paths;\n for (var i = 0; i < paths.length; i++) {\n renderPath(ctx, paths[i]);\n }\n };\n\n return MultiPathNode;\n}(PathNode$2));\n\nvar RectNode$2 = (function (PathNode) {\n function RectNode () {\n PathNode.apply(this, arguments);\n }\n\n extendStatic(RectNode, PathNode);\n RectNode.prototype = Object.create( PathNode && PathNode.prototype );\n RectNode.prototype.constructor = RectNode;\n RectNode.fn = RectNode.prototype;\n RectNode.fn.init = RectNode.fn.constructor;\n\n RectNode.prototype.renderPoints = function renderPoints (ctx) {\n var geometry = this.srcElement.geometry();\n var ref = geometry.cornerRadius;\n var rx = ref[0];\n var ry = ref[1];\n\n if (rx === 0 && ry === 0) {\n var origin = geometry.origin;\n var size = geometry.size;\n ctx.rect(origin.x, origin.y, size.width, size.height);\n } else {\n PathNode.prototype.renderPoints.call(this, ctx, Path.fromRect(geometry));\n }\n };\n\n return RectNode;\n}(PathNode$2));\n\nvar TextNode$2 = (function (PathNode) {\n function TextNode () {\n PathNode.apply(this, arguments);\n }\n\n extendStatic(TextNode, PathNode);\n TextNode.prototype = Object.create( PathNode && PathNode.prototype );\n TextNode.prototype.constructor = TextNode;\n TextNode.fn = TextNode.prototype;\n TextNode.fn.init = TextNode.fn.constructor;\n\n TextNode.prototype.renderTo = function renderTo (ctx) {\n var text = this.srcElement;\n var pos = text.position();\n var size = text.measure();\n\n ctx.save();\n\n this.setTransform(ctx);\n this.setClip(ctx);\n this.setOpacity(ctx);\n\n ctx.beginPath();\n\n ctx.font = text.options.font;\n ctx.textAlign = 'left';\n\n if (this.setFill(ctx)) {\n ctx.fillText(text.content(), pos.x, pos.y + size.baseline);\n }\n\n if (this.setStroke(ctx)) {\n this.setLineDash(ctx);\n ctx.strokeText(text.content(), pos.x, pos.y + size.baseline);\n }\n\n ctx.restore();\n };\n\n return TextNode;\n}(PathNode$2));\n\nNODE_MAP$2.Arc = ArcNode$2;\nNODE_MAP$2.Circle = CircleNode$2;\nNODE_MAP$2.Group = GroupNode$2;\nNODE_MAP$2.Image = ImageNode$2;\nNODE_MAP$2.MultiPath = MultiPathNode$2;\nNODE_MAP$2.Path = PathNode$2;\nNODE_MAP$2.Rect = RectNode$2;\nNODE_MAP$2.Text = TextNode$2;\n\nvar Surface$4 = (function (BaseSurface) {\n function Surface(element, options) {\n BaseSurface.call(this, element, options);\n\n this.element.innerHTML = this._template(this);\n\n var canvas = this.element.firstElementChild;\n canvas.style.width = '100%';\n canvas.style.height = '100%';\n\n var size = elementSize(element);\n\n canvas.width = size.width;\n canvas.height = size.height;\n\n this._rootElement = canvas;\n\n this._root = new RootNode$2(canvas, size);\n\n this._mouseTrackHandler = this._trackMouse.bind(this);\n\n bindEvents(this.element, {\n click: this._mouseTrackHandler,\n mousemove: this._mouseTrackHandler\n });\n }\n\n extendStatic(Surface, BaseSurface);\n Surface.prototype = Object.create( BaseSurface && BaseSurface.prototype );\n Surface.prototype.constructor = Surface;\n Surface.fn = Surface.prototype;\n Surface.fn.init = Surface.fn.constructor;\n\n var prototypeAccessors = { type: {} };\n\n prototypeAccessors.type.get = function () {\n return \"canvas\";\n };\n\n Surface.prototype.destroy = function destroy () {\n BaseSurface.prototype.destroy.call(this);\n\n if (this._root) {\n this._root.destroy();\n this._root = null;\n }\n\n if (this._searchTree) {\n this._searchTree.clear();\n delete this._searchTree;\n }\n\n if (this._cursor) {\n this._cursor.destroy();\n delete this._cursor;\n }\n\n unbindEvents(this.element, {\n click: this._mouseTrackHandler,\n mousemove: this._mouseTrackHandler\n });\n };\n\n Surface.prototype.draw = function draw (element) {\n BaseSurface.prototype.draw.call(this, element);\n this._root.load([ element ], undefined, this.options.cors);\n\n if (this._searchTree) {\n this._searchTree.add([ element ]);\n }\n };\n\n Surface.prototype.clear = function clear () {\n BaseSurface.prototype.clear.call(this);\n this._root.clear();\n\n if (this._searchTree) {\n this._searchTree.clear();\n }\n\n if (this._cursor) {\n this._cursor.clear();\n }\n };\n\n Surface.prototype.eventTarget = function eventTarget (e) {\n if (this._searchTree) {\n var point = this._surfacePoint(e);\n var shape = this._searchTree.pointShape(point);\n return shape;\n }\n };\n\n Surface.prototype.image = function image () {\n var ref = this;\n var root = ref._root;\n var rootElement = ref._rootElement;\n var loadingStates = [];\n\n root.traverse(function (childNode) {\n if (childNode.loading) {\n loadingStates.push(childNode.loading);\n }\n });\n\n var promise = createPromise();\n var resolveDataURL = function () {\n root._invalidate({ fixedScale: true });\n\n try {\n var data = rootElement.toDataURL();\n promise.resolve(data);\n } catch (e) {\n promise.reject(e);\n }\n };\n\n promiseAll(loadingStates).then(resolveDataURL, resolveDataURL);\n\n return promise;\n };\n\n Surface.prototype.suspendTracking = function suspendTracking () {\n BaseSurface.prototype.suspendTracking.call(this);\n if (this._searchTree) {\n this._searchTree.clear();\n delete this._searchTree;\n }\n };\n\n Surface.prototype.resumeTracking = function resumeTracking () {\n BaseSurface.prototype.resumeTracking.call(this);\n if (!this._searchTree) {\n this._searchTree = new ShapesQuadTree();\n\n var childNodes = this._root.childNodes;\n var rootElements = [];\n for (var idx = 0; idx < childNodes.length; idx++) {\n rootElements.push(childNodes[idx].srcElement);\n }\n this._searchTree.add(rootElements);\n }\n };\n\n Surface.prototype._resize = function _resize () {\n this._rootElement.width = this._size.width;\n this._rootElement.height = this._size.height;\n\n this._root.size = this._size;\n this._root.invalidate();\n };\n\n Surface.prototype._template = function _template () {\n return \"\";\n };\n\n Surface.prototype._enableTracking = function _enableTracking () {\n this._searchTree = new ShapesQuadTree();\n this._cursor = new SurfaceCursor(this);\n\n BaseSurface.prototype._enableTracking.call(this);\n };\n\n Surface.prototype._trackMouse = function _trackMouse (e) {\n if (this._suspendedTracking) {\n return;\n }\n\n var shape = this.eventTarget(e);\n\n if (e.type !== \"click\") {\n var currentShape = this._currentShape;\n if (currentShape && currentShape !== shape) {\n this.trigger(\"mouseleave\", {\n element: currentShape,\n originalEvent: e,\n type: \"mouseleave\"\n });\n }\n\n if (shape && currentShape !== shape) {\n this.trigger(\"mouseenter\", {\n element: shape,\n originalEvent: e,\n type: \"mouseenter\"\n });\n }\n\n this.trigger(\"mousemove\", {\n element: shape,\n originalEvent: e,\n type: \"mousemove\"\n });\n\n this._currentShape = shape;\n } else if (shape) {\n this.trigger(\"click\", {\n element: shape,\n originalEvent: e,\n type: \"click\"\n });\n }\n };\n\n Object.defineProperties( Surface.prototype, prototypeAccessors );\n\n return Surface;\n}(Surface$2));\n\nvar instance$2;\nvar support$1;\n\nvar hasDocument = function () { return typeof document !== \"undefined\"; };\n\nvar supportsCanvas = function () { return hasDocument() &&\n document.createElement(\"canvas\").getContext; };\n\nvar supportsSVG = function () { return hasDocument() &&\n document.implementation.hasFeature(\"http://www.w3.org/TR/SVG11/feature#BasicStructure\", \"1.1\"); };\n\nvar SurfaceFactory = (function (Class$$1) {\n function SurfaceFactory() {\n Class$$1.call(this);\n\n this._items = [ {\n name: \"svg\",\n type: Surface$3\n }, {\n name: \"canvas\",\n type: Surface$4\n } ];\n }\n\n extendStatic(SurfaceFactory, Class$$1);\n SurfaceFactory.prototype = Object.create( Class$$1 && Class$$1.prototype );\n SurfaceFactory.prototype.constructor = SurfaceFactory;\n SurfaceFactory.fn = SurfaceFactory.prototype;\n SurfaceFactory.fn.init = SurfaceFactory.fn.constructor;\n\n var staticAccessors = { support: {},current: {} };\n\n staticAccessors.support.get = function () {\n if (!support$1) {\n support$1 = {\n canvas: supportsCanvas(),\n svg: supportsSVG()\n };\n }\n\n return support$1;\n };\n\n staticAccessors.current.get = function () {\n if (!instance$2) {\n instance$2 = new SurfaceFactory();\n }\n\n return instance$2;\n };\n\n SurfaceFactory.prototype.create = function create (element, options) {\n var items = this._items;\n var match = items[0];\n\n if (options && options.type) {\n var preferred = options.type.toLowerCase();\n for (var i = 0; i < items.length; i++) {\n if (items[i].name === preferred) {\n match = items[i];\n break;\n }\n }\n }\n\n if (match) {\n return new match.type(element, options);\n }\n\n kendo.logToConsole(\n \"Warning: Unable to create Kendo UI Drawing Surface. Possible causes:\\n\" +\n \"- The browser does not support SVG and Canvas. User agent: \" + (navigator.userAgent));\n };\n\n Object.defineProperties( SurfaceFactory, staticAccessors );\n\n return SurfaceFactory;\n}(Class));\n\nvar Surface = (function (BaseSurface) {\n function Surface () {\n BaseSurface.apply(this, arguments);\n }\n\n extendStatic(Surface, BaseSurface);\n Surface.prototype = Object.create( BaseSurface && BaseSurface.prototype );\n Surface.prototype.constructor = Surface;\n Surface.fn = Surface.prototype;\n Surface.fn.init = Surface.fn.constructor;\n\n var staticAccessors = { support: {} };\n\n staticAccessors.support.get = function () {\n return SurfaceFactory.support;\n };\n\n Surface.create = function create (element, options) {\n return SurfaceFactory.current.create(element, options);\n };\n\n Object.defineProperties( Surface, staticAccessors );\n\n return Surface;\n}(Surface$2));\n\nfunction exportGroup(group) {\n var root = new RootNode({\n skipBaseHref: true\n });\n var bbox = group.clippedBBox();\n var rootGroup = group;\n\n if (bbox) {\n var origin = bbox.getOrigin();\n var exportRoot = new Group();\n exportRoot.transform(transform$1().translate(-origin.x, -origin.y));\n exportRoot.children.push(group);\n rootGroup = exportRoot;\n }\n\n root.load([ rootGroup ]);\n\n var svg = \"\" + (root.render()) + \"\";\n\n root.destroy();\n\n return svg;\n}\n\nvar svg$1 = {\n\tSurface: Surface$3,\n\tRootNode: RootNode,\n\tNode: Node,\n\tGroupNode: GroupNode,\n\tArcNode: ArcNode,\n\tCircleNode: CircleNode,\n\tRectNode: RectNode,\n\tImageNode: ImageNode,\n\tTextNode: TextNode,\n\tPathNode: PathNode,\n\tMultiPathNode: MultiPathNode,\n\tDefinitionNode: DefinitionNode,\n\tClipNode: ClipNode,\n\tGradientStopNode: GradientStopNode,\n\tLinearGradientNode: LinearGradientNode,\n\tRadialGradientNode: RadialGradientNode,\n\texportGroup: exportGroup\n};\n\nvar canvas = {\n\tSurface: Surface$4,\n\tRootNode: RootNode$2,\n\tNode: Node$2,\n\tGroupNode: GroupNode$2,\n\tArcNode: ArcNode$2,\n\tCircleNode: CircleNode$2,\n\tRectNode: RectNode$2,\n\tImageNode: ImageNode$2,\n\tTextNode: TextNode$2,\n\tPathNode: PathNode$2,\n\tMultiPathNode: MultiPathNode$2\n};\n\nfunction exportImage(group, options) {\n var defaults = {\n width: \"800px\", height: \"600px\",\n cors: \"Anonymous\"\n };\n\n var exportRoot = group;\n var bbox = group.clippedBBox();\n\n if (bbox) {\n var origin = bbox.getOrigin();\n exportRoot = new Group();\n exportRoot.transform(transform$1().translate(-origin.x, -origin.y));\n exportRoot.children.push(group);\n\n var size = bbox.getSize();\n defaults.width = size.width + \"px\";\n defaults.height = size.height + \"px\";\n }\n\n var surfaceOptions = $.extend(defaults, options);\n\n var container = document.createElement(\"div\");\n var style = container.style;\n\n style.display = \"none\";\n style.width = surfaceOptions.width;\n style.height = surfaceOptions.height;\n document.body.appendChild(container);\n\n var surface = new Surface$4(container, surfaceOptions);\n surface.suspendTracking();\n surface.draw(exportRoot);\n\n var promise = surface.image();\n var destroy = function () {\n surface.destroy();\n document.body.removeChild(container);\n };\n promise.then(destroy, destroy);\n\n return promise;\n}\n\nfunction exportSVG(group, options) {\n var svg = exportGroup(group);\n\n if (!options || !options.raw) {\n svg = \"data:image/svg+xml;base64,\" + encodeBase64(svg);\n }\n\n return createPromise().resolve(svg);\n}\n\n/* eslint-disable no-multi-spaces, key-spacing, indent, camelcase, space-before-blocks, eqeqeq, brace-style */\n/* eslint-disable space-infix-ops, space-before-function-paren, array-bracket-spacing, object-curly-spacing */\n/* eslint-disable no-nested-ternary, max-params, default-case, no-else-return, no-empty, yoda */\n/* eslint-disable no-param-reassign, no-var, block-scoped-var */\n\nvar browser = supportBrowser || {};\n/*\n\n XXX: to test:\n\n - cloneNodes function:\n - drawing document containing canvas with page breaking\n - drawing document with named radio -s (should not clear selection)\n - IE9/IE10 don't support el.dataset; do they copy user data?\n\n - repeating table headers/footers on page breaking\n\n - forceBreak, keepTogether\n\n - avoidLinks\n\n */\n\n/* -----[ local vars ]----- */\n\nfunction slice$1$1(thing) {\n return Array.prototype.slice.call(thing);\n}\n\nvar KENDO_PSEUDO_ELEMENT = \"KENDO-PSEUDO-ELEMENT\";\n\nvar IMAGE_CACHE = {};\n\nvar nodeInfo = {};\nnodeInfo._root = nodeInfo;\n\n/* -----[ Custom Text node to speed up rendering in kendo.pdf ]----- */\n\nvar inBrowser = typeof window !== 'undefined';\nvar microsoft = inBrowser ? browser.msie || browser.edge : false;\n\nvar TextRect = (function (Text$$1) {\n function TextRect(str, rect, options) {\n Text$$1.call(this, str, rect.getOrigin(), options);\n this._pdfRect = rect;\n }\n\n extendStatic(TextRect, Text$$1);\n TextRect.prototype = Object.create( Text$$1 && Text$$1.prototype );\n TextRect.prototype.constructor = TextRect;\n TextRect.fn = TextRect.prototype;\n TextRect.fn.init = TextRect.fn.constructor;\n TextRect.prototype.rect = function rect () {\n // this is the crux of it: we can avoid a call to\n // measure(), which is what the base class does, since we\n // already know the rect. measure() is s-l-o-w.\n return this._pdfRect;\n };\n TextRect.prototype.rawBBox = function rawBBox () {\n // also let's avoid creating a new rectangle.\n return this._pdfRect;\n };\n\n return TextRect;\n}(Text));\n\nfunction addClass(el, cls) {\n if (el.classList) {\n el.classList.add(cls);\n } else {\n el.className += \" \" + cls;\n }\n}\n\nfunction removeClass(el, cls) {\n if (el.classList) {\n el.classList.remove(cls);\n } else {\n el.className = el.className.split(/\\s+/).reduce(function(a, word){\n if (word != cls) {\n a.push(word);\n }\n return a;\n }, []).join(\" \");\n }\n}\n\nfunction setCSS(el, styles) {\n Object.keys(styles).forEach(function(key){\n el.style[key] = styles[key];\n });\n}\n\nvar matches = typeof Element !== \"undefined\" && Element.prototype && (function(p){\n if (p.matches) {\n return function(el, selector) { return el.matches(selector); };\n }\n if (p.webkitMatchesSelector) {\n return function(el, selector) { return el.webkitMatchesSelector(selector); };\n }\n if (p.mozMatchesSelector) {\n return function(el, selector) { return el.mozMatchesSelector(selector); };\n }\n if (p.msMatchesSelector) {\n return function(el, selector) { return el.msMatchesSelector(selector); };\n }\n return function(s) {\n\treturn [].indexOf.call(document.querySelectorAll(s), this) !== -1;\n };\n})(Element.prototype);\n\nfunction closest(el, selector) {\n if (el.closest) {\n return el.closest(selector);\n }\n // IE: stringifying rather than simply comparing with `document`,\n // which is not iframe-proof and fails in editor export \u2014\n // https://github.com/telerik/kendo/issues/6721\n while (el && !/^\\[object (?:HTML)?Document\\]$/.test(String(el))) {\n if (el.nodeType == 1 /* Element */ && matches(el, selector)) {\n return el;\n }\n el = el.parentNode;\n }\n}\n\n// clone nodes ourselves, so that we redraw (DOM or\n// jQuery clone will not)\nvar cloneNodes = (function($){\n if ($) {\n // if we have Kendo and jQuery, use this version as it will\n // maintain proper links between cloned element and Kendo\n // widgets (i.e. it clones jQuery data(), which isn't the same\n // as element's data attributes).\n // https://github.com/telerik/kendo-ui-core/issues/2750\n return function cloneNodes(el) {\n var clone = el.cloneNode(false);\n if (el.nodeType == 1 /* Element */) {\n var $el = $(el), $clone = $(clone), i;\n var data = $el.data();\n for (i in data) {\n $clone.data(i, data[i]);\n }\n if (/^canvas$/i.test(el.tagName)) {\n clone.getContext(\"2d\").drawImage(el, 0, 0);\n } else if (/^(?:input|select|textarea|option)$/i.test(el.tagName)) {\n // drop the name attributes so that we don't affect the selection of the\n // original nodes (i.e. checked status of radio buttons) when we insert our copy\n // into the DOM. https://github.com/telerik/kendo/issues/5409\n clone.removeAttribute(\"id\");\n clone.removeAttribute(\"name\");\n if (!/^textarea$/i.test(el.tagName)) {\n clone.value = el.value;\n }\n clone.checked = el.checked;\n clone.selected = el.selected;\n }\n for (i = el.firstChild; i; i = i.nextSibling) {\n clone.appendChild(cloneNodes(i));\n }\n }\n return clone;\n };\n } else {\n // the no-jQuery version\n return function cloneNodes(el) {\n var clone = (function dive(node){\n var clone = node.cloneNode(false);\n if (node._kendoExportVisual) {\n clone._kendoExportVisual = node._kendoExportVisual;\n }\n for (var i = node.firstChild; i; i = i.nextSibling) {\n clone.appendChild(dive(i));\n }\n return clone;\n })(el);\n\n // re-draw canvases - https://github.com/telerik/kendo/issues/4872\n var canvases = el.querySelectorAll(\"canvas\");\n if (canvases.length) {\n slice$1$1(clone.querySelectorAll(\"canvas\")).forEach(function (canvas$$1, i) {\n canvas$$1.getContext(\"2d\").drawImage(canvases[i], 0, 0);\n });\n }\n\n // remove \"name\" attributes from elements -\n // https://github.com/telerik/kendo/issues/5409\n var orig = el.querySelectorAll(\"input, select, textarea, option\");\n slice$1$1(clone.querySelectorAll(\"input, select, textarea, option\")).forEach(function (el, i) {\n el.removeAttribute(\"id\");\n el.removeAttribute(\"name\");\n if (!/^textarea$/i.test(el.tagName)) {\n el.value = orig[i].value;\n }\n el.checked = orig[i].checked;\n el.selected = orig[i].selected;\n });\n\n return clone;\n };\n }\n})(typeof window !== \"undefined\" && window.kendo && window.kendo.jQuery);\n\nfunction getXY(thing) {\n if (typeof thing == \"number\") {\n return { x: thing, y: thing };\n }\n if (Array.isArray(thing)) {\n return { x: thing[0], y: thing[1] };\n }\n return { x: thing.x, y: thing.y };\n}\n\nfunction drawDOM(element, options) {\n if (!options) {\n options = {};\n }\n var promise = createPromise();\n\n if (!element) {\n return promise.reject(\"No element to export\");\n }\n\n if (typeof window.getComputedStyle != \"function\") {\n throw new Error(\"window.getComputedStyle is missing. You are using an unsupported browser, or running in IE8 compatibility mode. Drawing HTML is supported in Chrome, Firefox, Safari and IE9+.\");\n }\n\n kendo.pdf.defineFont(getFontFaces(element.ownerDocument));\n\n var scale = getXY(options.scale || 1);\n\n function doOne(element) {\n var group = new Group();\n\n // translate to start of page\n var pos = element.getBoundingClientRect();\n setTransform$1(group, [\n scale.x,\n 0,\n 0,\n scale.y,\n (-pos.left * scale.x),\n (-pos.top * scale.y)\n ]);\n\n nodeInfo._clipbox = false;\n nodeInfo._matrix = Matrix.unit();\n nodeInfo._stackingContext = {\n element: element,\n group: group\n };\n\n if (options.avoidLinks === true) {\n nodeInfo._avoidLinks = \"a\";\n } else {\n nodeInfo._avoidLinks = options.avoidLinks;\n }\n\n addClass(element, \"k-pdf-export\");\n renderElement(element, group);\n removeClass(element, \"k-pdf-export\");\n\n return group;\n }\n\n cacheImages([ element ], function(){\n var forceBreak = options && options.forcePageBreak;\n var hasPaperSize = options && options.paperSize && options.paperSize != \"auto\";\n var paperOptions = kendo.pdf.getPaperOptions(function(key, def){\n if (key == \"paperSize\") {\n // PDF.getPaperOptions croaks on \"auto\", just pass dummy A4 as we might\n // still be interested in margins.\n return hasPaperSize ? options[key] : \"A4\";\n }\n return key in options ? options[key] : def;\n });\n var pageWidth = hasPaperSize && paperOptions.paperSize[0];\n var pageHeight = hasPaperSize && paperOptions.paperSize[1];\n var margin = options.margin && paperOptions.margin;\n var hasMargin = Boolean(margin);\n if (forceBreak || pageHeight) {\n if (!margin) {\n margin = { left: 0, top: 0, right: 0, bottom: 0 };\n }\n\n // we want paper size and margin to be unaffected by\n // scaling in the output, so we have to reverse-scale\n // before our calculations begin.\n if (pageWidth) { pageWidth /= scale.x; }\n if (pageHeight) { pageHeight /= scale.y; }\n margin.left /= scale.x;\n margin.right /= scale.x;\n margin.top /= scale.y;\n margin.bottom /= scale.y;\n\n var group = new Group({\n pdf: {\n multiPage : true,\n paperSize : hasPaperSize ? paperOptions.paperSize : \"auto\",\n _ignoreMargin : hasMargin // HACK! see exportPDF in pdf/drawing.js\n }\n });\n handlePageBreaks(\n function(x) {\n if (options.progress) {\n var canceled = false, pageNum = 0;\n (function next(){\n if (pageNum < x.pages.length) {\n var page = doOne(x.pages[pageNum]);\n group.append(page);\n options.progress({\n page: page,\n pageNum: ++pageNum,\n totalPages: x.pages.length,\n cancel: function() {\n canceled = true;\n }\n });\n if (!canceled) {\n setTimeout(next);\n } else {\n // XXX: should we also fail() the deferred object?\n x.container.parentNode.removeChild(x.container);\n }\n } else {\n x.container.parentNode.removeChild(x.container);\n promise.resolve(group);\n }\n })();\n } else {\n x.pages.forEach(function(page){\n group.append(doOne(page));\n });\n x.container.parentNode.removeChild(x.container);\n promise.resolve(group);\n }\n },\n element,\n forceBreak,\n pageWidth ? pageWidth - margin.left - margin.right : null,\n pageHeight ? pageHeight - margin.top - margin.bottom : null,\n margin,\n options\n );\n } else {\n promise.resolve(doOne(element));\n }\n });\n\n function makeTemplate(template) {\n if (template != null) {\n if (typeof template == \"string\") {\n template = kendo.template(template.replace(/^\\s+|\\s+$/g, \"\"));\n }\n if (typeof template == \"function\") {\n return function(data) {\n var el = template(data);\n if (el && typeof el == \"string\") {\n var div = document.createElement(\"div\");\n div.innerHTML = el;\n el = div.firstElementChild;\n }\n return el;\n };\n }\n // assumed DOM element\n return function() {\n return template.cloneNode(true);\n };\n }\n }\n\n function handlePageBreaks(callback, element, forceBreak, pageWidth, pageHeight, margin, options) {\n var template = makeTemplate(options.template);\n var doc = element.ownerDocument;\n var pages = [];\n var copy = options._destructive ? element : cloneNodes(element);\n var container = doc.createElement(\"KENDO-PDF-DOCUMENT\");\n var adjust = 0;\n\n // make sure elements are at the end (Grid widget\n // places TFOOT before TBODY, tricking our algorithm to\n // insert a page break right after the header).\n // https://github.com/telerik/kendo/issues/4699\n slice$1$1(copy.querySelectorAll(\"tfoot\")).forEach(function(tfoot){\n tfoot.parentNode.appendChild(tfoot);\n });\n\n // remember the index of each LI from an ordered list.\n // we'll use it to reconstruct the proper numbering.\n slice$1$1(copy.querySelectorAll(\"ol\")).forEach(function(ol){\n slice$1$1(ol.children).forEach(function(li, index){\n li.setAttribute(\"kendo-split-index\", index);\n });\n });\n\n setCSS(container, {\n display : \"block\",\n position : \"absolute\",\n boxSizing : \"content-box\",\n left : \"-10000px\",\n top : \"-10000px\"\n });\n\n if (pageWidth) {\n // subtle: if we don't set the width *and* margins here, the layout in this\n // container will be different from the one in our final page elements, and we'll\n // split at the wrong places.\n setCSS(container, {\n width : pageWidth + \"px\",\n paddingLeft : margin.left + \"px\",\n paddingRight : margin.right + \"px\"\n });\n\n // when the first element has a margin-top (i.e. a

) the page will be\n // inadvertently enlarged by that number (the browser will report the container's\n // bounding box top to start at the element's top, rather than including its\n // margin). Adding overflow: hidden seems to fix it.\n //\n // to understand the difference, try the following snippets in your browser:\n //\n // 1.
\n //

Foo

\n //
\n //\n // 2.
\n //

Foo

\n //
\n //\n // this detail is not important when automatic page breaking is not requested, hence\n // doing it only if pageWidth is defined.\n setCSS(copy, { overflow: \"hidden\" });\n }\n\n element.parentNode.insertBefore(container, element);\n container.appendChild(copy);\n\n // With cache disabled, images will still have height zero until their `complete` attribute\n // is true. `whenImagesAreActuallyLoaded` will wait for it.\n if (options.beforePageBreak) {\n whenImagesAreActuallyLoaded([ container ], function() {\n options.beforePageBreak(container, doPageBreak);\n });\n } else {\n whenImagesAreActuallyLoaded([ container ], doPageBreak);\n }\n\n function doPageBreak() {\n if (forceBreak != \"-\" || pageHeight) {\n splitElement(copy);\n }\n\n {\n var page = makePage();\n copy.parentNode.insertBefore(page, copy);\n page.appendChild(copy);\n }\n\n if (template) {\n pages.forEach(function(page, i){\n var el = template({\n element : page,\n pageNum : i + 1,\n totalPages : pages.length\n });\n if (el) {\n page.appendChild(el);\n }\n });\n }\n\n cacheImages(pages, callback.bind(null, { pages: pages, container: container }));\n }\n\n function keepTogether(el) {\n if (options.keepTogether && matches(el, options.keepTogether) && el.offsetHeight <= pageHeight - adjust) {\n return true;\n }\n\n var tag = el.tagName;\n if (/^h[1-6]$/i.test(tag) && el.offsetHeight >= pageHeight - adjust) {\n return false;\n }\n\n return (el.getAttribute(\"data-kendo-chart\") ||\n /^(?:img|tr|thead|th|tfoot|iframe|svg|object|canvas|input|textarea|select|video|h[1-6])/i.test(el.tagName));\n }\n\n function splitElement(element) {\n if (element.tagName == \"TABLE\") {\n setCSS(element, { tableLayout: \"fixed\" });\n }\n if (keepTogether(element)) {\n return;\n }\n var style = getComputedStyle$1(element);\n var bottomPadding = parseFloat(getPropertyValue(style, \"padding-bottom\"));\n var bottomBorder = parseFloat(getPropertyValue(style, \"border-bottom-width\"));\n var saveAdjust = adjust;\n adjust += bottomPadding + bottomBorder;\n var isFirst = true;\n for (var el = element.firstChild; el; el = el.nextSibling) {\n if (el.nodeType == 1 /* Element */) {\n isFirst = false;\n if (matches(el, forceBreak)) {\n breakAtElement(el);\n continue;\n }\n if (!pageHeight) {\n // we're in \"manual breaks mode\"\n splitElement(el);\n continue;\n }\n if (!/^(?:static|relative)$/.test(getPropertyValue(getComputedStyle$1(el), \"position\"))) {\n continue;\n }\n var fall = fallsOnMargin(el);\n if (fall == 1) {\n // element starts on next page, break before anyway.\n breakAtElement(el);\n }\n else if (fall) {\n // elements ends up on next page, or possibly doesn't fit on a page at\n // all. break before it anyway if it's an or , otherwise\n // attempt to split.\n if (keepTogether(el)) {\n breakAtElement(el);\n } else {\n splitElement(el);\n }\n }\n else {\n splitElement(el);\n }\n }\n else if (el.nodeType == 3 /* Text */ && pageHeight) {\n splitText(el, isFirst);\n isFirst = false;\n }\n }\n adjust = saveAdjust;\n }\n\n function firstInParent(el) {\n var p = el.parentNode, first = p.firstChild;\n if (el === first) {\n return true;\n }\n if (el === p.children[0]) {\n if (first.nodeType == 7 /* comment */ ||\n first.nodeType == 8 /* processing instruction */) {\n return true;\n }\n if (first.nodeType == 3 /* text */) {\n // if whitespace only we can probably consider it's first\n return !/\\S/.test(first.data);\n }\n }\n return false;\n }\n\n function breakAtElement(el) {\n if (el.nodeType == 1 && el !== copy && firstInParent(el)) {\n return breakAtElement(el.parentNode);\n }\n var table, colgroup, thead, grid, gridHead;\n table = closest(el, \"table\");\n colgroup = table && table.querySelector(\"colgroup\");\n if (options.repeatHeaders) {\n thead = table && table.querySelector(\"thead\");\n\n // If we break page in a Kendo Grid, repeat its header. This ugly hack is\n // necessary because a scrollable grid will keep the header in a separate\n // element from its content.\n //\n // XXX: This is likely to break as soon as the widget HTML is modified.\n grid = closest(el, \".k-grid\");\n if (grid && grid.querySelector(\".k-auto-scrollable\")) {\n gridHead = grid.querySelector(\".k-grid-header\");\n }\n }\n var page = makePage();\n var range = doc.createRange();\n range.setStartBefore(copy);\n range.setEndBefore(el);\n page.appendChild(range.extractContents());\n copy.parentNode.insertBefore(page, copy);\n preventBulletOnListItem(el.parentNode);\n if (table) {\n table = closest(el, \"table\"); // that's the
on next page!\n if (options.repeatHeaders && thead) {\n table.insertBefore(thead.cloneNode(true), table.firstChild);\n }\n if (colgroup) {\n table.insertBefore(colgroup.cloneNode(true), table.firstChild);\n }\n }\n if (options.repeatHeaders && gridHead) {\n grid = closest(el, \".k-grid\");\n grid.insertBefore(gridHead.cloneNode(true), grid.firstChild);\n }\n }\n\n function makePage() {\n var page = doc.createElement(\"KENDO-PDF-PAGE\");\n setCSS(page, {\n display : \"block\",\n boxSizing: \"content-box\",\n width : pageWidth ? (pageWidth + \"px\") : \"auto\",\n padding : (margin.top + \"px \" +\n margin.right + \"px \" +\n margin.bottom + \"px \" +\n margin.left + \"px\"),\n\n // allow absolutely positioned elements to be relative to current page\n position : \"relative\",\n\n // without the following we might affect layout of subsequent pages\n height : pageHeight ? (pageHeight + \"px\") : \"auto\",\n overflow : pageHeight || pageWidth ? \"hidden\" : \"visible\",\n clear : \"both\"\n });\n\n // debug\n // $(\"
\").css({\n // position : \"absolute\",\n // left : margin.left,\n // top : margin.top,\n // width : pageWidth,\n // height : pageHeight,\n // boxSizing : \"border-box\",\n // background: \"rgba(255, 255, 0, 0.5)\"\n // //border : \"1px solid red\"\n // }).appendTo(page);\n\n if (options && options.pageClassName) {\n page.className = options.pageClassName;\n }\n pages.push(page);\n return page;\n }\n\n function fallsOnMargin(thing) {\n var box = thing.getBoundingClientRect();\n if (box.width === 0 || box.height === 0) {\n // I'd say an element with dimensions zero fits on current page.\n return 0;\n }\n var top = copy.getBoundingClientRect().top;\n var available = pageHeight - adjust;\n return (box.height > available) ? 3\n : (box.top - top > available) ? 1\n : (box.bottom - top > available) ? 2\n : 0;\n }\n\n function splitText(node, isFirst) {\n if (!/\\S/.test(node.data)) {\n return;\n }\n\n var len = node.data.length;\n var range = doc.createRange();\n range.selectNodeContents(node);\n var fall = fallsOnMargin(range);\n if (!fall) {\n return; // the whole text fits on current page\n }\n\n var nextnode = node;\n if (fall == 1) {\n // starts on next page, break before anyway.\n if (isFirst) {\n // avoid leaving an empty

,

  • , etc. on previous page.\n breakAtElement(node.parentNode);\n } else {\n breakAtElement(node);\n }\n }\n else {\n (function findEOP(min, pos, max) {\n range.setEnd(node, pos);\n if (min == pos || pos == max) {\n return pos;\n }\n if (fallsOnMargin(range)) {\n return findEOP(min, (min + pos) >> 1, pos);\n } else {\n return findEOP(pos, (pos + max) >> 1, max);\n }\n })(0, len >> 1, len);\n\n if (!/\\S/.test(range.toString()) && isFirst) {\n // avoid leaving an empty

    ,

  • , etc. on previous page.\n breakAtElement(node.parentNode);\n } else {\n // This is only needed for IE, but it feels cleaner to do it anyway. Without\n // it, IE will truncate a very long text (playground/pdf-long-text-2.html).\n nextnode = node.splitText(range.endOffset);\n\n var page = makePage();\n range.setStartBefore(copy);\n page.appendChild(range.extractContents());\n copy.parentNode.insertBefore(page, copy);\n preventBulletOnListItem(nextnode.parentNode);\n }\n }\n\n splitText(nextnode);\n }\n\n function preventBulletOnListItem(el) {\n // set a hint on continued LI elements, to tell the\n // renderer not to draw the bullet again.\n // https://github.com/telerik/kendo-ui-core/issues/2732\n var li = closest(el, \"li\");\n if (li) {\n li.setAttribute(\"kendo-no-bullet\", \"1\");\n preventBulletOnListItem(li.parentNode);\n }\n }\n }\n\n return promise;\n}\n\n// This is needed for the Spreadsheet print functionality. Since\n// there we only need to draw text, this cuts through the ceremony\n// of drawDOM/renderElement and renders the text node directly.\nfunction drawText(element) {\n var group = new Group();\n nodeInfo._clipbox = false;\n nodeInfo._matrix = Matrix.unit();\n nodeInfo._stackingContext = {\n element: element,\n group: group\n };\n pushNodeInfo(element, getComputedStyle$1(element), group);\n if (element.firstChild.nodeType == 3 /* Text */) {\n // avoid the penalty of renderElement\n renderText(element, element.firstChild, group);\n } else {\n _renderElement(element, group);\n }\n popNodeInfo();\n return group;\n}\n\nvar parseBackgroundImage = (function(){\n var tok_linear_gradient = /^((-webkit-|-moz-|-o-|-ms-)?linear-gradient\\s*)\\(/;\n //var tok_radial_gradient = /^((-webkit-|-moz-|-o-|-ms-)?radial-gradient\\s*)\\(/;\n var tok_percent = /^([-0-9.]+%)/;\n var tok_length = /^([-0-9.]+px)/;\n var tok_keyword = /^(left|right|top|bottom|to|center)\\W/;\n var tok_angle = /^([-0-9.]+(deg|grad|rad|turn)|0)/;\n var tok_whitespace = /^(\\s+)/;\n var tok_popen = /^(\\()/;\n var tok_pclose = /^(\\))/;\n var tok_comma = /^(,)/;\n var tok_url = /^(url)\\(/;\n var tok_content = /^(.*?)\\)/;\n\n var cache1 = {}, cache2 = {};\n\n function parse(input) {\n var orig = input;\n if (hasOwnProperty(cache1, orig)) {\n return cache1[orig];\n }\n function skip_ws() {\n var m = tok_whitespace.exec(input);\n if (m) {\n input = input.substr(m[1].length);\n }\n }\n function read(token) {\n skip_ws();\n var m = token.exec(input);\n if (m) {\n input = input.substr(m[1].length);\n return m[1];\n }\n }\n\n function read_stop() {\n var color = kendo.parseColor(input, true);\n var length, percent;\n if (color) {\n var match =\n /^#[0-9a-f]+/i.exec(input) ||\n /^rgba?\\(.*?\\)/i.exec(input) ||\n /^..*?\\b/.exec(input); // maybe named color\n input = input.substr(match[0].length);\n color = color.toRGB();\n if (!(length = read(tok_length))) {\n percent = read(tok_percent);\n }\n return { color: color, length: length, percent: percent };\n }\n }\n\n function read_linear_gradient(propName) {\n var angle;\n var to1, to2;\n var stops = [];\n var reverse = false;\n\n if (read(tok_popen)) {\n // 1. [ || to , ]?\n angle = read(tok_angle);\n if (angle == \"0\") {\n angle = \"0deg\"; // Edge\n }\n if (angle) {\n angle = parseAngle(angle);\n read(tok_comma);\n }\n else {\n to1 = read(tok_keyword);\n if (to1 == \"to\") {\n to1 = read(tok_keyword);\n } else if (to1 && /^-/.test(propName)) {\n reverse = true;\n }\n to2 = read(tok_keyword);\n read(tok_comma);\n }\n\n if (/-moz-/.test(propName) && angle == null && to1 == null) {\n var x = read(tok_percent), y = read(tok_percent);\n reverse = true;\n if (x == \"0%\") {\n to1 = \"left\";\n } else if (x == \"100%\") {\n to1 = \"right\";\n }\n if (y == \"0%\") {\n to2 = \"top\";\n } else if (y == \"100%\") {\n to2 = \"bottom\";\n }\n read(tok_comma);\n }\n\n // 2. color stops\n while (input && !read(tok_pclose)) {\n var stop = read_stop();\n if (!stop) {\n break;\n }\n stops.push(stop);\n read(tok_comma);\n }\n\n return {\n type : \"linear\",\n angle : angle,\n to : to1 && to2 ? to1 + \" \" + to2 : to1 ? to1 : to2 ? to2 : null,\n stops : stops,\n reverse : reverse\n };\n }\n }\n\n function read_url() {\n if (read(tok_popen)) {\n var url = read(tok_content);\n url = url.replace(/^['\"]+|[\"']+$/g, \"\");\n read(tok_pclose);\n return { type: \"url\", url: url };\n }\n }\n\n var tok;\n\n if ((tok = read(tok_linear_gradient))) {\n tok = read_linear_gradient(tok);\n }\n else if ((tok = read(tok_url))) {\n tok = read_url();\n }\n\n return (cache1[orig] = tok || { type: \"none\" });\n }\n\n return function(input) {\n if (hasOwnProperty(cache2, input)) {\n return cache2[input];\n }\n return (cache2[input] = splitProperty(input).map(parse));\n };\n})();\n\nvar splitProperty = (function(){\n var cache = {};\n return function(input, separator) {\n if (!separator) {\n separator = /^\\s*,\\s*/;\n }\n\n var cacheKey = input + separator;\n\n if (hasOwnProperty(cache, cacheKey)) {\n return cache[cacheKey];\n }\n\n var ret = [];\n var last$$1 = 0, pos = 0;\n var in_paren = 0;\n var in_string = false;\n var m;\n\n function looking_at(rx) {\n return (m = rx.exec(input.substr(pos)));\n }\n\n function trim(str) {\n return str.replace(/^\\s+|\\s+$/g, \"\");\n }\n\n while (pos < input.length) {\n if (!in_string && looking_at(/^[\\(\\[\\{]/)) {\n in_paren++;\n pos++;\n }\n else if (!in_string && looking_at(/^[\\)\\]\\}]/)) {\n in_paren--;\n pos++;\n }\n else if (!in_string && looking_at(/^[\\\"\\']/)) {\n in_string = m[0];\n pos++;\n }\n else if (in_string == \"'\" && looking_at(/^\\\\\\'/)) {\n pos += 2;\n }\n else if (in_string == '\"' && looking_at(/^\\\\\\\"/)) {\n pos += 2;\n }\n else if (in_string == \"'\" && looking_at(/^\\'/)) {\n in_string = false;\n pos++;\n }\n else if (in_string == '\"' && looking_at(/^\\\"/)) {\n in_string = false;\n pos++;\n }\n else if (looking_at(separator)) {\n if (!in_string && !in_paren && pos > last$$1) {\n ret.push(trim(input.substring(last$$1, pos)));\n last$$1 = pos + m[0].length;\n }\n pos += m[0].length;\n }\n else {\n pos++;\n }\n }\n if (last$$1 < pos) {\n ret.push(trim(input.substring(last$$1, pos)));\n }\n return (cache[cacheKey] = ret);\n };\n})();\n\nvar getFontURL = (function(cache){\n return function(el){\n // XXX: for IE we get here the whole cssText of the rule,\n // because the computedStyle.src is empty. Next time we need\n // to fix these regexps we better write a CSS parser. :-\\\n var url = cache[el];\n if (!url) {\n var m;\n if ((m = /url\\((['\"]?)([^'\")]*?)\\1\\)\\s+format\\((['\"]?)truetype\\3\\)/.exec(el))) {\n url = cache[el] = m[2];\n } else if ((m = /url\\((['\"]?)([^'\")]*?\\.ttf)\\1\\)/.exec(el))) {\n url = cache[el] = m[2];\n }\n }\n return url;\n };\n})(Object.create ? Object.create(null) : {});\n\nvar getFontHeight = (function(cache){\n return function(font) {\n var height = cache[font];\n if (height == null) {\n height = cache[font] = kendoUtil.measureText(\"Mapq\", { font: font }).height;\n }\n return height;\n };\n})(Object.create ? Object.create(null) : {});\n\nfunction getFontFaces(doc) {\n if (doc == null) {\n doc = document;\n }\n var result = {};\n for (var i = 0; i < doc.styleSheets.length; ++i) {\n doStylesheet(doc.styleSheets[i]);\n }\n return result;\n function doStylesheet(ss) {\n if (ss) {\n var rules = null;\n try {\n rules = ss.cssRules;\n } catch (ex) {}\n if (rules) {\n addRules(ss, rules);\n }\n }\n }\n function findFonts(rule) {\n var src = getPropertyValue(rule.style, \"src\");\n if (src) {\n return splitProperty(src).reduce(function(a, el){\n var font = getFontURL(el);\n if (font) {\n a.push(font);\n }\n return a;\n }, []);\n } else {\n // Internet Explorer\n // XXX: this is gross. should work though for valid CSS.\n var font = getFontURL(rule.cssText);\n return font ? [ font ] : [];\n }\n }\n function addRules(styleSheet, rules) {\n for (var i = 0; i < rules.length; ++i) {\n var r = rules[i];\n switch (r.type) {\n case 3: // CSSImportRule\n doStylesheet(r.styleSheet);\n break;\n case 5: // CSSFontFaceRule\n var style = r.style;\n var family = splitProperty(getPropertyValue(style, \"font-family\"));\n var bold = /^([56789]00|bold)$/i.test(getPropertyValue(style, \"font-weight\"));\n var italic = \"italic\" == getPropertyValue(style, \"font-style\");\n var src = findFonts(r);\n if (src.length > 0) {\n addRule(styleSheet, family, bold, italic, src[0]);\n }\n }\n }\n }\n function addRule(styleSheet, names, bold, italic, url) {\n // We get full resolved absolute URLs in Chrome, but sadly\n // not in Firefox.\n if (!(/^data:/i.test(url))) {\n if (!(/^[^\\/:]+:\\/\\//.test(url) || /^\\//.test(url))) {\n url = String(styleSheet.href).replace(/[^\\/]*$/, \"\") + url;\n }\n }\n names.forEach(function(name){\n name = name.replace(/^(['\"]?)(.*?)\\1$/, \"$2\"); // it's quoted\n if (bold) {\n name += \"|bold\";\n }\n if (italic) {\n name += \"|italic\";\n }\n result[name] = url;\n });\n }\n}\n\nfunction hasOwnProperty(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nfunction getCounter(name) {\n name = \"_counter_\" + name;\n return nodeInfo[name];\n}\n\nfunction getAllCounters(name) {\n var values = [], p = nodeInfo;\n name = \"_counter_\" + name;\n while (p) {\n if (hasOwnProperty(p, name)) {\n values.push(p[name]);\n }\n p = Object.getPrototypeOf(p);\n }\n return values.reverse();\n}\n\nfunction incCounter(name, inc) {\n var p = nodeInfo;\n name = \"_counter_\" + name;\n while (p && !hasOwnProperty(p, name)) {\n p = Object.getPrototypeOf(p);\n }\n if (!p) {\n p = nodeInfo._root;\n }\n p[name] = (p[name] || 0) + (inc == null ? 1 : inc);\n}\n\nfunction resetCounter(name, val) {\n name = \"_counter_\" + name;\n nodeInfo[name] = val == null ? 0 : val;\n}\n\nfunction doCounters(a, f, def) {\n for (var i = 0; i < a.length;) {\n var name = a[i++];\n var val = parseFloat(a[i]);\n if (isNaN(val)) {\n f(name, def);\n } else {\n f(name, val);\n ++i;\n }\n }\n}\n\nfunction updateCounters(style) {\n var counterReset = getPropertyValue(style, \"counter-reset\");\n if (counterReset) {\n doCounters(splitProperty(counterReset, /^\\s+/), resetCounter, 0);\n }\n var counterIncrement = getPropertyValue(style, \"counter-increment\");\n if (counterIncrement) {\n doCounters(splitProperty(counterIncrement, /^\\s+/), incCounter, 1);\n }\n}\n\nfunction parseColor$1(str, css) {\n var color = kendo.parseColor(str, true);\n if (color) {\n color = color.toRGB();\n if (css) {\n color = color.toCssRgba();\n } else if (color.a === 0) {\n color = null;\n }\n }\n return color;\n}\n\nfunction whenImagesAreActuallyLoaded(elements, callback) {\n var pending = 0;\n var done = false;\n elements.forEach(function(el){\n var images = el.querySelectorAll(\"img\");\n for (var i = 0; i < images.length; ++i) {\n var img = images[i];\n if (!img.complete) {\n pending++;\n img.onload = img.onerror = next;\n }\n }\n });\n\n if (!pending) {\n next();\n }\n\n function next() {\n if (!done && --pending <= 0) {\n callback();\n done = true;\n }\n }\n}\n\nfunction cacheImages(elements, callback) {\n var urls = [];\n function add(url) {\n if (!IMAGE_CACHE[url]) {\n IMAGE_CACHE[url] = true;\n urls.push(url);\n }\n }\n\n elements.forEach(function dive(element){\n if (/^img$/i.test(element.tagName)) {\n add(element.src);\n }\n parseBackgroundImage(\n getPropertyValue(\n getComputedStyle$1(element), \"background-image\"\n )\n ).forEach(function(bg){\n if (bg.type == \"url\") {\n add(bg.url);\n }\n });\n\n if (element.children) {\n slice$1$1(element.children).forEach(dive);\n }\n });\n\n var count = urls.length;\n function next() {\n if (--count <= 0) {\n // Even though we cached them, they simply won't be available immediately in the newly\n // created DOM. Previously we'd allow a 10ms timeout, but that's arbitrary and clearly\n // not working in all cases (https://github.com/telerik/kendo/issues/5399), so this\n // function will wait for their .complete attribute.\n whenImagesAreActuallyLoaded(elements, callback);\n }\n }\n if (count === 0) {\n next();\n }\n urls.forEach(function(url){\n var img = IMAGE_CACHE[url] = new window.Image();\n if (!(/^data:/i.test(url))) {\n img.crossOrigin = \"Anonymous\";\n }\n img.src = url;\n if (img.complete) {\n next();\n } else {\n img.onload = next;\n img.onerror = function() {\n IMAGE_CACHE[url] = null;\n next();\n };\n }\n });\n}\n\nfunction alphaNumeral(n) {\n var result = \"\";\n do {\n var r = n % 26;\n result = String.fromCharCode(97 + r) + result;\n n = Math.floor(n / 26);\n } while (n > 0);\n return result;\n}\n\nfunction pushNodeInfo(element, style, group) {\n nodeInfo = Object.create(nodeInfo);\n nodeInfo[element.tagName.toLowerCase()] = {\n element: element,\n style: style\n };\n var decoration = getPropertyValue(style, \"text-decoration\");\n if (decoration && decoration != \"none\") {\n var color = getPropertyValue(style, \"text-decoration-color\");\n decoration.split(/\\s+/g).forEach(function(name){\n if (!nodeInfo[name]) {\n nodeInfo[name] = color;\n if (name == \"underline\") {\n var offset = getPropertyValue(style, \"text-underline-offset\");\n if (offset != \"auto\") {\n nodeInfo[\"underline-offset\"] = parseFloat(offset);\n }\n }\n }\n });\n }\n\n if (createsStackingContext(style)) {\n nodeInfo._stackingContext = {\n element: element,\n group: group\n };\n }\n}\n\nfunction popNodeInfo() {\n nodeInfo = Object.getPrototypeOf(nodeInfo);\n}\n\nfunction updateClipbox(path) {\n if (nodeInfo._clipbox != null) {\n var box = path.bbox(nodeInfo._matrix);\n if (nodeInfo._clipbox) {\n nodeInfo._clipbox = Rect.intersect(nodeInfo._clipbox, box);\n } else {\n nodeInfo._clipbox = box;\n }\n }\n}\n\nfunction emptyClipbox() {\n var cb = nodeInfo._clipbox;\n if (cb == null) {\n return true;\n }\n if (cb) {\n return cb.width() === 0 || cb.height() === 0;\n }\n}\n\nfunction createsStackingContext(style) {\n function prop(name) { return getPropertyValue(style, name); }\n if (prop(\"transform\") != \"none\" ||\n prop(\"position\") != \"static\" ||\n prop(\"z-index\") != \"auto\" ||\n prop(\"opacity\") < 1) {\n return true;\n }\n}\n\nfunction getComputedStyle$1(element, pseudoElt) {\n return window.getComputedStyle(element, pseudoElt || null);\n}\n\nfunction getPropertyValue(style, prop, defa) {\n var val = style.getPropertyValue(prop);\n if (val == null || val === \"\") {\n if (browser.webkit) {\n val = style.getPropertyValue(\"-webkit-\" + prop );\n } else if (browser.mozilla) {\n val = style.getPropertyValue(\"-moz-\" + prop );\n } else if (browser.opera) {\n val = style.getPropertyValue(\"-o-\" + prop);\n } else if (microsoft) {\n val = style.getPropertyValue(\"-ms-\" + prop);\n }\n }\n if (arguments.length > 2 && (val == null || val === \"\")) {\n return defa;\n } else {\n return val;\n }\n}\n\nfunction pleaseSetPropertyValue(style, prop, value, important) {\n style.setProperty(prop, value, important);\n if (browser.webkit) {\n style.setProperty(\"-webkit-\" + prop, value, important);\n } else if (browser.mozilla) {\n style.setProperty(\"-moz-\" + prop, value, important);\n } else if (browser.opera) {\n style.setProperty(\"-o-\" + prop, value, important);\n } else if (microsoft) {\n style.setProperty(\"-ms-\" + prop, value, important);\n prop = \"ms\" + prop.replace(/(^|-)([a-z])/g, function(s, p1, p2){\n return p1 + p2.toUpperCase();\n });\n style[prop] = value;\n }\n}\n\nfunction getBorder(style, side) {\n side = \"border-\" + side;\n return {\n width: parseFloat(getPropertyValue(style, side + \"-width\")),\n style: getPropertyValue(style, side + \"-style\"),\n color: parseColor$1(getPropertyValue(style, side + \"-color\"), true)\n };\n}\n\nfunction saveStyle(element, func) {\n var prev = element.style.cssText;\n var result = func();\n element.style.cssText = prev;\n return result;\n}\n\nfunction getBorderRadius(style, side) {\n var r = getPropertyValue(style, \"border-\" + side + \"-radius\").split(/\\s+/g).map(parseFloat);\n if (r.length == 1) {\n r.push(r[0]);\n }\n return sanitizeRadius({ x: r[0], y: r[1] });\n}\n\nfunction getContentBox(element) {\n var box = element.getBoundingClientRect();\n box = innerBox(box, \"border-*-width\", element);\n box = innerBox(box, \"padding-*\", element);\n return box;\n}\n\nfunction innerBox(box, prop, element) {\n var style, wt, wr, wb, wl;\n if (typeof prop == \"string\") {\n style = getComputedStyle$1(element);\n wt = parseFloat(getPropertyValue(style, prop.replace(\"*\", \"top\")));\n wr = parseFloat(getPropertyValue(style, prop.replace(\"*\", \"right\")));\n wb = parseFloat(getPropertyValue(style, prop.replace(\"*\", \"bottom\")));\n wl = parseFloat(getPropertyValue(style, prop.replace(\"*\", \"left\")));\n }\n else if (typeof prop == \"number\") {\n wt = wr = wb = wl = prop;\n }\n return {\n top : box.top + wt,\n right : box.right - wr,\n bottom : box.bottom - wb,\n left : box.left + wl,\n width : box.right - box.left - wr - wl,\n height : box.bottom - box.top - wb - wt\n };\n}\n\nfunction getTransform(style) {\n var transform$$1 = getPropertyValue(style, \"transform\");\n if (transform$$1 == \"none\") {\n return null;\n }\n var matrix = /^\\s*matrix\\(\\s*(.*?)\\s*\\)\\s*$/.exec(transform$$1);\n if (matrix) {\n var origin = getPropertyValue(style, \"transform-origin\");\n matrix = matrix[1].split(/\\s*,\\s*/g).map(parseFloat);\n origin = origin.split(/\\s+/g).map(parseFloat);\n return {\n matrix: matrix,\n origin: origin\n };\n }\n}\n\nfunction radiansToDegrees(radians) {\n return ((180 * radians) / Math.PI) % 360;\n}\n\nfunction parseAngle(angle) {\n var num = parseFloat(angle);\n if (/grad$/.test(angle)) {\n return Math.PI * num / 200;\n }\n else if (/rad$/.test(angle)) {\n return num;\n }\n else if (/turn$/.test(angle)) {\n return Math.PI * num * 2;\n }\n else if (/deg$/.test(angle)) {\n return Math.PI * num / 180;\n }\n}\n\nfunction setTransform$1(shape, m) {\n m = new Matrix(m[0], m[1], m[2], m[3], m[4], m[5]);\n shape.transform(m);\n return m;\n}\n\nfunction setClipping(shape, clipPath) {\n shape.clip(clipPath);\n}\n\nfunction addArcToPath(path, x, y, options) {\n var points = new Arc$2([ x, y ], options).curvePoints(), i = 1;\n while (i < points.length) {\n path.curveTo(points[i++], points[i++], points[i++]);\n }\n}\n\nfunction sanitizeRadius(r) {\n if (r.x <= 0 || r.y <= 0) {\n r.x = r.y = 0;\n }\n return r;\n}\n\nfunction adjustBorderRadiusForBox(box, rTL, rTR, rBR, rBL) {\n // adjust border radiuses such that the sum of adjacent\n // radiuses is not bigger than the length of the side.\n // seems the correct algorithm is variant (3) from here:\n // http://www.w3.org/Style/CSS/Tracker/issues/29?changelog\n var tl_x = Math.max(0, rTL.x), tl_y = Math.max(0, rTL.y);\n var tr_x = Math.max(0, rTR.x), tr_y = Math.max(0, rTR.y);\n var br_x = Math.max(0, rBR.x), br_y = Math.max(0, rBR.y);\n var bl_x = Math.max(0, rBL.x), bl_y = Math.max(0, rBL.y);\n\n var f = Math.min(\n box.width / (tl_x + tr_x),\n box.height / (tr_y + br_y),\n box.width / (br_x + bl_x),\n box.height / (bl_y + tl_y)\n );\n\n if (f < 1) {\n tl_x *= f; tl_y *= f;\n tr_x *= f; tr_y *= f;\n br_x *= f; br_y *= f;\n bl_x *= f; bl_y *= f;\n }\n\n return {\n tl: { x: tl_x, y: tl_y },\n tr: { x: tr_x, y: tr_y },\n br: { x: br_x, y: br_y },\n bl: { x: bl_x, y: bl_y }\n };\n}\n\nfunction elementRoundBox(element, box, type) {\n var style = getComputedStyle$1(element);\n\n var rTL = getBorderRadius(style, \"top-left\");\n var rTR = getBorderRadius(style, \"top-right\");\n var rBL = getBorderRadius(style, \"bottom-left\");\n var rBR = getBorderRadius(style, \"bottom-right\");\n\n if (type == \"padding\" || type == \"content\") {\n var bt = getBorder(style, \"top\");\n var br = getBorder(style, \"right\");\n var bb = getBorder(style, \"bottom\");\n var bl = getBorder(style, \"left\");\n rTL.x -= bl.width; rTL.y -= bt.width;\n rTR.x -= br.width; rTR.y -= bt.width;\n rBR.x -= br.width; rBR.y -= bb.width;\n rBL.x -= bl.width; rBL.y -= bb.width;\n if (type == \"content\") {\n var pt = parseFloat(getPropertyValue(style, \"padding-top\"));\n var pr = parseFloat(getPropertyValue(style, \"padding-right\"));\n var pb = parseFloat(getPropertyValue(style, \"padding-bottom\"));\n var pl = parseFloat(getPropertyValue(style, \"padding-left\"));\n rTL.x -= pl; rTL.y -= pt;\n rTR.x -= pr; rTR.y -= pt;\n rBR.x -= pr; rBR.y -= pb;\n rBL.x -= pl; rBL.y -= pb;\n }\n }\n\n if (typeof type == \"number\") {\n rTL.x -= type; rTL.y -= type;\n rTR.x -= type; rTR.y -= type;\n rBR.x -= type; rBR.y -= type;\n rBL.x -= type; rBL.y -= type;\n }\n\n return roundBox(box, rTL, rTR, rBR, rBL);\n}\n\n// Create a drawing.Path for a rounded rectangle. Receives the\n// bounding box and the border-radiuses in CSS order (top-left,\n// top-right, bottom-right, bottom-left). The radiuses must be\n// objects containing x (horiz. radius) and y (vertical radius).\nfunction roundBox(box, rTL0, rTR0, rBR0, rBL0) {\n var tmp = adjustBorderRadiusForBox(box, rTL0, rTR0, rBR0, rBL0);\n var rTL = tmp.tl;\n var rTR = tmp.tr;\n var rBR = tmp.br;\n var rBL = tmp.bl;\n var path = new Path({ fill: null, stroke: null });\n path.moveTo(box.left, box.top + rTL.y);\n if (rTL.x) {\n addArcToPath(path, box.left + rTL.x, box.top + rTL.y, {\n startAngle: -180,\n endAngle: -90,\n radiusX: rTL.x,\n radiusY: rTL.y\n });\n }\n path.lineTo(box.right - rTR.x, box.top);\n if (rTR.x) {\n addArcToPath(path, box.right - rTR.x, box.top + rTR.y, {\n startAngle: -90,\n endAngle: 0,\n radiusX: rTR.x,\n radiusY: rTR.y\n });\n }\n path.lineTo(box.right, box.bottom - rBR.y);\n if (rBR.x) {\n addArcToPath(path, box.right - rBR.x, box.bottom - rBR.y, {\n startAngle: 0,\n endAngle: 90,\n radiusX: rBR.x,\n radiusY: rBR.y\n });\n }\n path.lineTo(box.left + rBL.x, box.bottom);\n if (rBL.x) {\n addArcToPath(path, box.left + rBL.x, box.bottom - rBL.y, {\n startAngle: 90,\n endAngle: 180,\n radiusX: rBL.x,\n radiusY: rBL.y\n });\n }\n return path.close();\n}\n\nfunction formatCounter(val, style) {\n var str = String(parseFloat(val));\n switch (style) {\n case \"decimal-leading-zero\":\n if (str.length < 2) {\n str = \"0\" + str;\n }\n return str;\n case \"lower-roman\":\n return arabicToRoman(val).toLowerCase();\n case \"upper-roman\":\n return arabicToRoman(val).toUpperCase();\n case \"lower-latin\":\n case \"lower-alpha\":\n return alphaNumeral(val - 1);\n case \"upper-latin\":\n case \"upper-alpha\":\n return alphaNumeral(val - 1).toUpperCase();\n default:\n return str;\n }\n}\n\nfunction evalPseudoElementContent(element, content) {\n function displayCounter(name, style, separator) {\n if (!separator) {\n return formatCounter(getCounter(name) || 0, style);\n }\n separator = separator.replace(/^\\s*([\"'])(.*)\\1\\s*$/, \"$2\");\n return getAllCounters(name).map(function(val){\n return formatCounter(val, style);\n }).join(separator);\n }\n var a = splitProperty(content, /^\\s+/);\n var result = [], m;\n a.forEach(function(el){\n var tmp;\n if ((m = /^\\s*([\"'])(.*)\\1\\s*$/.exec(el))) {\n result.push(m[2].replace(/\\\\([0-9a-f]{4})/gi, function(s, p){\n return String.fromCharCode(parseInt(p, 16));\n }));\n }\n else if ((m = /^\\s*counter\\((.*?)\\)\\s*$/.exec(el))) {\n tmp = splitProperty(m[1]);\n result.push(displayCounter(tmp[0], tmp[1]));\n }\n else if ((m = /^\\s*counters\\((.*?)\\)\\s*$/.exec(el))) {\n tmp = splitProperty(m[1]);\n result.push(displayCounter(tmp[0], tmp[2], tmp[1]));\n }\n else if ((m = /^\\s*attr\\((.*?)\\)\\s*$/.exec(el))) {\n result.push(element.getAttribute(m[1]) || \"\");\n }\n else {\n result.push(el);\n }\n });\n return result.join(\"\");\n}\n\nfunction getCssText(style) {\n if (style.cssText) {\n return style.cssText;\n }\n // Status: NEW. Report year: 2002. Current year: 2014.\n // Nice played, Mozillians.\n // https://bugzilla.mozilla.org/show_bug.cgi?id=137687\n var result = [];\n for (var i = 0; i < style.length; ++i) {\n result.push(style[i] + \": \" + getPropertyValue(style, style[i]));\n }\n return result.join(\";\\n\");\n}\n\nfunction _renderWithPseudoElements(element, group) {\n if (element.tagName == KENDO_PSEUDO_ELEMENT) {\n _renderElement(element, group);\n return;\n }\n var fake = [];\n function pseudo(kind, place) {\n var style = getComputedStyle$1(element, kind), content = style.content;\n updateCounters(style);\n if (content && content != \"normal\" && content != \"none\" && style.width != \"0px\") {\n var psel = element.ownerDocument.createElement(KENDO_PSEUDO_ELEMENT);\n psel.style.cssText = getCssText(style);\n psel.textContent = evalPseudoElementContent(element, content);\n element.insertBefore(psel, place);\n fake.push(psel);\n }\n }\n pseudo(\":before\", element.firstChild);\n pseudo(\":after\", null);\n if (fake.length > 0) {\n var saveClass = element.className;\n element.className += \" kendo-pdf-hide-pseudo-elements\";\n _renderElement(element, group);\n element.className = saveClass;\n fake.forEach(function(el){ element.removeChild(el); });\n } else {\n _renderElement(element, group);\n }\n}\n\nfunction _renderElement(element, group) {\n var style = getComputedStyle$1(element);\n\n var top = getBorder(style, \"top\");\n var right = getBorder(style, \"right\");\n var bottom = getBorder(style, \"bottom\");\n var left = getBorder(style, \"left\");\n\n var rTL0 = getBorderRadius(style, \"top-left\");\n var rTR0 = getBorderRadius(style, \"top-right\");\n var rBL0 = getBorderRadius(style, \"bottom-left\");\n var rBR0 = getBorderRadius(style, \"bottom-right\");\n\n var dir = getPropertyValue(style, \"direction\");\n\n var backgroundColor = getPropertyValue(style, \"background-color\");\n backgroundColor = parseColor$1(backgroundColor);\n\n var backgroundImage = parseBackgroundImage( getPropertyValue(style, \"background-image\") );\n var backgroundRepeat = splitProperty( getPropertyValue(style, \"background-repeat\") );\n var backgroundPosition = splitProperty( getPropertyValue(style, \"background-position\") );\n var backgroundOrigin = splitProperty( getPropertyValue(style, \"background-origin\") );\n var backgroundSize = splitProperty( getPropertyValue(style, \"background-size\") );\n\n // IE shrinks the text with text-overflow: ellipsis,\n // apparently because the returned bounding box for the range\n // is limited to the visible area minus space for the dots,\n // instead of being the full width of the text.\n //\n // https://github.com/telerik/kendo/issues/5232\n // https://github.com/telerik/kendo-ui-core/issues/1868\n //\n // We have to test it here rather than in renderText because\n // text-overflow: ellipsis could be set on a parent element (not\n // necessarily the one containing the text); in this case,\n // getComputedStyle(elementWithTheText) will return \"clip\", not\n // \"ellipsis\" (which is probably a bug, but oh well...)\n var textOverflow, saveTextOverflow;\n if (microsoft) {\n textOverflow = style.textOverflow; // computed style\n if (textOverflow == \"ellipsis\") {\n saveTextOverflow = element.style.textOverflow; // own style.\n element.style.textOverflow = \"clip\";\n }\n }\n\n if (browser.msie && browser.version < 10) {\n // IE9 hacks. getPropertyValue won't return the correct\n // value. Sucks that we have to do it here, I'd prefer to\n // move it in getPropertyValue, but we don't have the\n // element.\n backgroundPosition = splitProperty(element.currentStyle.backgroundPosition);\n }\n\n var innerbox = innerBox(element.getBoundingClientRect(), \"border-*-width\", element);\n\n // CSS \"clip\" property - if present, replace the group with a\n // new one which is clipped. This must happen before drawing\n // the borders and background.\n (function(){\n var clip = getPropertyValue(style, \"clip\");\n var m = /^\\s*rect\\((.*)\\)\\s*$/.exec(clip);\n if (m) {\n var a = m[1].split(/[ ,]+/g);\n var top = a[0] == \"auto\" ? innerbox.top : parseFloat(a[0]) + innerbox.top;\n var right = a[1] == \"auto\" ? innerbox.right : parseFloat(a[1]) + innerbox.left;\n var bottom = a[2] == \"auto\" ? innerbox.bottom : parseFloat(a[2]) + innerbox.top;\n var left = a[3] == \"auto\" ? innerbox.left : parseFloat(a[3]) + innerbox.left;\n var tmp = new Group();\n var clipPath = new Path()\n .moveTo(left, top)\n .lineTo(right, top)\n .lineTo(right, bottom)\n .lineTo(left, bottom)\n .close();\n setClipping(tmp, clipPath);\n group.append(tmp);\n group = tmp;\n updateClipbox(clipPath);\n }\n })();\n\n var boxes, i, cells;\n var display = getPropertyValue(style, \"display\");\n\n if (display == \"table-row\") {\n // because of rowspan/colspan, we shouldn't draw background of table row elements on the\n // box given by its getBoundingClientRect, because if we do we risk overwritting a\n // previously rendered cell. https://github.com/telerik/kendo/issues/4881\n boxes = [];\n for (i = 0, cells = element.children; i < cells.length; ++i) {\n boxes.push(cells[i].getBoundingClientRect());\n }\n } else {\n boxes = element.getClientRects();\n if (boxes.length == 1) {\n // Workaround the missing borders in Chrome! getClientRects() boxes contains values\n // rounded to integer. getBoundingClientRect() appears to work fine. We still need\n // getClientRects() to support cases where there are more boxes (continued inline\n // elements that might have border/background).\n boxes = [ element.getBoundingClientRect() ];\n }\n }\n\n // This function workarounds another Chrome bug, where boxes returned for a table with\n // border-collapse: collapse will overlap the table border. Our rendering is not perfect in\n // such case anyway, but with this is better than without it.\n boxes = adjustBoxes(boxes);\n\n for (i = 0; i < boxes.length; ++i) {\n drawOneBox(boxes[i], i === 0, i == boxes.length - 1);\n }\n\n // Render links as separate groups. We can't use boxes returned by element's getClientRects\n // because if display type is \"inline\" (default for ), boxes will not include the height of\n // images inside. https://github.com/telerik/kendo-ui-core/issues/3359\n if (element.tagName == \"A\" && element.href && !/^#?$/.test(element.getAttribute(\"href\"))) {\n if (!nodeInfo._avoidLinks || !matches(element, nodeInfo._avoidLinks)) {\n var r = document.createRange();\n r.selectNodeContents(element);\n slice$1$1(r.getClientRects()).forEach(function(box){\n var g = new Group();\n g._pdfLink = {\n url : element.href,\n top : box.top,\n right : box.right,\n bottom : box.bottom,\n left : box.left\n };\n group.append(g);\n });\n }\n }\n\n if (boxes.length > 0 && display == \"list-item\" && !element.getAttribute(\"kendo-no-bullet\")) {\n drawBullet(boxes[0]);\n }\n\n // overflow: hidden/auto - if present, replace the group with\n // a new one clipped by the inner box.\n (function(){\n function clipit() {\n var clipPath = elementRoundBox(element, innerbox, \"padding\");\n var tmp = new Group();\n setClipping(tmp, clipPath);\n group.append(tmp);\n group = tmp;\n updateClipbox(clipPath);\n }\n if (isFormField(element)) {\n clipit();\n } else if (/^(hidden|auto|scroll)/.test(getPropertyValue(style, \"overflow\"))) {\n clipit();\n } else if (/^(hidden|auto|scroll)/.test(getPropertyValue(style, \"overflow-x\"))) {\n clipit();\n } else if (/^(hidden|auto|scroll)/.test(getPropertyValue(style, \"overflow-y\"))) {\n clipit();\n }\n })();\n\n if (!maybeRenderWidget(element, group)) {\n renderContents(element, group);\n }\n\n if (microsoft && textOverflow == \"ellipsis\") {\n element.style.textOverflow = saveTextOverflow;\n }\n\n return group; // only utility functions after this line.\n\n function adjustBoxes(boxes) {\n if (/^td$/i.test(element.tagName)) {\n var table = nodeInfo.table;\n if (table && getPropertyValue(table.style, \"border-collapse\") == \"collapse\") {\n var tableBorderLeft = getBorder(table.style, \"left\").width;\n var tableBorderTop = getBorder(table.style, \"top\").width;\n // check if we need to adjust\n if (tableBorderLeft === 0 && tableBorderTop === 0) {\n return boxes; // nope\n }\n var tableBox = table.element.getBoundingClientRect();\n var firstCell = table.element.rows[0].cells[0];\n var firstCellBox = firstCell.getBoundingClientRect();\n if (firstCellBox.top == tableBox.top || firstCellBox.left == tableBox.left) {\n return slice$1$1(boxes).map(function(box){\n return {\n left : box.left + tableBorderLeft,\n top : box.top + tableBorderTop,\n right : box.right + tableBorderLeft,\n bottom : box.bottom + tableBorderTop,\n height : box.height,\n width : box.width\n };\n });\n }\n }\n }\n return boxes;\n }\n\n // this function will be called to draw each border. it\n // draws starting at origin and the resulted path must be\n // translated/rotated to be placed in the proper position.\n //\n // arguments are named as if it draws the top border:\n //\n // - `len` the length of the edge\n // - `Wtop` the width of the edge (i.e. border-top-width)\n // - `Wleft` the width of the left edge (border-left-width)\n // - `Wright` the width of the right edge\n // - `rl` and `rl` -- the border radius on the left and right\n // (objects containing x and y, for horiz/vertical radius)\n // - `transform` -- transformation to apply\n //\n function drawEdge(color, len, Wtop, Wleft, Wright, rl, rr, transform$$1) {\n if (Wtop <= 0) {\n return;\n }\n\n var path, edge = new Group();\n setTransform$1(edge, transform$$1);\n group.append(edge);\n\n sanitizeRadius(rl);\n sanitizeRadius(rr);\n\n // draw main border. this is the area without the rounded corners\n path = new Path({\n fill: { color: color },\n stroke: null\n });\n edge.append(path);\n path.moveTo(rl.x ? Math.max(rl.x, Wleft) : 0, 0)\n .lineTo(len - (rr.x ? Math.max(rr.x, Wright) : 0), 0)\n .lineTo(len - Math.max(rr.x, Wright), Wtop)\n .lineTo(Math.max(rl.x, Wleft), Wtop)\n .close();\n\n if (rl.x) {\n drawRoundCorner(Wleft, rl, [ -1, 0, 0, 1, rl.x, 0 ]);\n }\n\n if (rr.x) {\n drawRoundCorner(Wright, rr, [ 1, 0, 0, 1, len - rr.x, 0 ]);\n }\n\n // draws one round corner, starting at origin (needs to be\n // translated/rotated to be placed properly).\n function drawRoundCorner(Wright, r, transform$$1) {\n var angle = Math.PI/2 * Wright / (Wright + Wtop);\n\n // not sanitizing this one, because negative values\n // are useful to fill the box correctly.\n var ri = {\n x: r.x - Wright,\n y: r.y - Wtop\n };\n\n var path = new Path({\n fill: { color: color },\n stroke: null\n }).moveTo(0, 0);\n\n setTransform$1(path, transform$$1);\n\n addArcToPath(path, 0, r.y, {\n startAngle: -90,\n endAngle: -radiansToDegrees(angle),\n radiusX: r.x,\n radiusY: r.y\n });\n\n if (ri.x > 0 && ri.y > 0) {\n path.lineTo(ri.x * Math.cos(angle), r.y - ri.y * Math.sin(angle));\n addArcToPath(path, 0, r.y, {\n startAngle: -radiansToDegrees(angle),\n endAngle: -90,\n radiusX: ri.x,\n radiusY: ri.y,\n anticlockwise: true\n });\n }\n else if (ri.x > 0) {\n path.lineTo(ri.x, Wtop)\n .lineTo(0, Wtop);\n }\n else {\n path.lineTo(ri.x, Wtop)\n .lineTo(ri.x, 0);\n }\n\n edge.append(path.close());\n }\n }\n\n function drawBackground(box) {\n var background = new Group();\n setClipping(background, roundBox(box, rTL0, rTR0, rBR0, rBL0));\n group.append(background);\n\n if (backgroundColor) {\n var path = new Path({\n fill: { color: backgroundColor.toCssRgba() },\n stroke: null\n });\n path.moveTo(box.left, box.top)\n .lineTo(box.right, box.top)\n .lineTo(box.right, box.bottom)\n .lineTo(box.left, box.bottom)\n .close();\n background.append(path);\n }\n\n for (var i = backgroundImage.length; --i >= 0;) {\n drawOneBackground(\n background, box,\n backgroundImage[i],\n backgroundRepeat[i % backgroundRepeat.length],\n backgroundPosition[i % backgroundPosition.length],\n backgroundOrigin[i % backgroundOrigin.length],\n backgroundSize[i % backgroundSize.length]\n );\n }\n }\n\n function drawOneBackground(group, box, background, backgroundRepeat, backgroundPosition, backgroundOrigin, backgroundSize) {\n if (!background || (background == \"none\")) {\n return;\n }\n\n if (background.type == \"url\") {\n var img = IMAGE_CACHE[background.url];\n if (img && img.width > 0 && img.height > 0) {\n drawBackgroundImage(group, box, img.width, img.height, function(group, rect){\n group.append(new Image$1(background.url, rect));\n });\n }\n } else if (background.type == \"linear\") {\n drawBackgroundImage(group, box, box.width, box.height, gradientRenderer(background));\n } else {\n return;\n }\n\n function drawBackgroundImage(group, box, img_width, img_height, renderBG) {\n var aspect_ratio = img_width / img_height, f;\n\n // for background-origin: border-box the box is already appropriate\n var orgBox = box;\n if (backgroundOrigin == \"content-box\") {\n orgBox = innerBox(orgBox, \"border-*-width\", element);\n orgBox = innerBox(orgBox, \"padding-*\", element);\n } else if (backgroundOrigin == \"padding-box\") {\n orgBox = innerBox(orgBox, \"border-*-width\", element);\n }\n\n if (!/^\\s*auto(\\s+auto)?\\s*$/.test(backgroundSize)) {\n if (backgroundSize == \"contain\") {\n f = Math.min(orgBox.width / img_width,\n orgBox.height / img_height);\n img_width *= f;\n img_height *= f;\n }\n else if (backgroundSize == \"cover\") {\n f = Math.max(orgBox.width / img_width,\n orgBox.height / img_height);\n img_width *= f;\n img_height *= f;\n }\n else {\n var size = backgroundSize.split(/\\s+/g);\n // compute width\n if (/%$/.test(size[0])) {\n img_width = orgBox.width * parseFloat(size[0]) / 100;\n } else {\n img_width = parseFloat(size[0]);\n }\n // compute height\n if (size.length == 1 || size[1] == \"auto\") {\n img_height = img_width / aspect_ratio;\n } else if (/%$/.test(size[1])) {\n img_height = orgBox.height * parseFloat(size[1]) / 100;\n } else {\n img_height = parseFloat(size[1]);\n }\n }\n }\n\n var pos = String(backgroundPosition);\n\n // IE sometimes reports single-word positions\n // https://github.com/telerik/kendo-ui-core/issues/2786\n //\n // it seems to switch to percentages when the horizontal\n // position is not \"center\", therefore we don't handle\n // multi-word cases here. All other browsers return\n // percentages or pixels instead of keywords. At least\n // for now...\n switch (pos) {\n case \"bottom\" : pos = \"50% 100%\"; break;\n case \"top\" : pos = \"50% 0\"; break;\n case \"left\" : pos = \"0 50%\"; break;\n case \"right\" : pos = \"100% 50%\"; break;\n case \"center\" : pos = \"50% 50%\"; break;\n }\n\n pos = pos.split(/\\s+/);\n if (pos.length == 1) {\n pos[1] = \"50%\";\n }\n\n if (/%$/.test(pos[0])) {\n pos[0] = parseFloat(pos[0]) / 100 * (orgBox.width - img_width);\n } else {\n pos[0] = parseFloat(pos[0]);\n }\n if (/%$/.test(pos[1])) {\n pos[1] = parseFloat(pos[1]) / 100 * (orgBox.height - img_height);\n } else {\n pos[1] = parseFloat(pos[1]);\n }\n\n var rect = new Rect([ orgBox.left + pos[0], orgBox.top + pos[1] ], [ img_width, img_height ]);\n\n // XXX: background-repeat could be implemented more\n // efficiently as a fill pattern (at least for PDF\n // output, probably SVG too).\n\n function rewX() {\n while (rect.origin.x > box.left) {\n rect.origin.x -= img_width;\n }\n }\n\n function rewY() {\n while (rect.origin.y > box.top) {\n rect.origin.y -= img_height;\n }\n }\n\n function repeatX() {\n while (rect.origin.x < box.right) {\n renderBG(group, rect.clone());\n rect.origin.x += img_width;\n }\n }\n\n if (backgroundRepeat == \"no-repeat\") {\n renderBG(group, rect);\n }\n else if (backgroundRepeat == \"repeat-x\") {\n rewX();\n repeatX();\n }\n else if (backgroundRepeat == \"repeat-y\") {\n rewY();\n while (rect.origin.y < box.bottom) {\n renderBG(group, rect.clone());\n rect.origin.y += img_height;\n }\n }\n else if (backgroundRepeat == \"repeat\") {\n rewX();\n rewY();\n var origin = rect.origin.clone();\n while (rect.origin.y < box.bottom) {\n rect.origin.x = origin.x;\n repeatX();\n rect.origin.y += img_height;\n }\n }\n }\n }\n\n function drawBullet() {\n var listStyleType = getPropertyValue(style, \"list-style-type\");\n if (listStyleType == \"none\") {\n return;\n }\n var listStylePosition = getPropertyValue(style, \"list-style-position\");\n\n function _drawBullet(f) {\n saveStyle(element, function(){\n element.style.position = \"relative\";\n var bullet = element.ownerDocument.createElement(KENDO_PSEUDO_ELEMENT);\n bullet.style.position = \"absolute\";\n bullet.style.boxSizing = \"border-box\";\n if (listStylePosition == \"outside\") {\n bullet.style.width = \"6em\";\n bullet.style.left = \"-6.8em\";\n bullet.style.textAlign = \"right\";\n } else {\n bullet.style.left = \"0px\";\n }\n f(bullet);\n element.insertBefore(bullet, element.firstChild);\n renderElement(bullet, group);\n element.removeChild(bullet);\n });\n }\n\n function elementIndex(f) {\n var a = element.parentNode.children;\n var k = element.getAttribute(\"kendo-split-index\");\n if (k != null) {\n return f(k|0, a.length);\n }\n for (var i = 0; i < a.length; ++i) {\n if (a[i] === element) {\n return f(i, a.length);\n }\n }\n }\n\n switch (listStyleType) {\n case \"circle\":\n case \"disc\":\n case \"square\":\n _drawBullet(function(bullet){\n // XXX: the science behind these values is called \"trial and error\".\n bullet.style.fontSize = \"60%\";\n bullet.style.lineHeight = \"200%\";\n bullet.style.paddingRight = \"0.5em\";\n bullet.style.fontFamily = \"DejaVu Serif\";\n bullet.innerHTML = {\n \"disc\" : \"\\u25cf\",\n \"circle\" : \"\\u25ef\",\n \"square\" : \"\\u25a0\"\n }[listStyleType];\n });\n break;\n\n case \"decimal\":\n case \"decimal-leading-zero\":\n _drawBullet(function(bullet){\n elementIndex(function(idx){\n ++idx;\n if (listStyleType == \"decimal-leading-zero\" && idx < 10) {\n idx = \"0\" + idx;\n }\n bullet.innerHTML = idx + \".\";\n });\n });\n break;\n\n case \"lower-roman\":\n case \"upper-roman\":\n _drawBullet(function(bullet){\n elementIndex(function(idx){\n idx = arabicToRoman(idx + 1);\n if (listStyleType == \"upper-roman\") {\n idx = idx.toUpperCase();\n }\n bullet.innerHTML = idx + \".\";\n });\n });\n break;\n\n case \"lower-latin\":\n case \"lower-alpha\":\n case \"upper-latin\":\n case \"upper-alpha\":\n _drawBullet(function(bullet){\n elementIndex(function(idx){\n idx = alphaNumeral(idx);\n if (/^upper/i.test(listStyleType)) {\n idx = idx.toUpperCase();\n }\n bullet.innerHTML = idx + \".\";\n });\n });\n break;\n }\n }\n\n // draws a single border box\n function drawOneBox(box, isFirst, isLast) {\n if (box.width === 0 || box.height === 0) {\n return;\n }\n\n drawBackground(box);\n\n var shouldDrawLeft = (left.width > 0 && ((isFirst && dir == \"ltr\") || (isLast && dir == \"rtl\")));\n var shouldDrawRight = (right.width > 0 && ((isLast && dir == \"ltr\") || (isFirst && dir == \"rtl\")));\n\n // The most general case is that the 4 borders have different widths and border\n // radiuses. The way that is handled is by drawing 3 Paths for each border: the\n // straight line, and two round corners which represent half of the entire rounded\n // corner. To simplify code those shapes are drawed at origin (by the drawEdge\n // function), then translated/rotated into the right position.\n //\n // However, this leads to poor results due to rounding in the simpler cases where\n // borders are straight lines. Therefore we handle a few such cases separately with\n // straight lines. C^wC^wC^w -- nope, scratch that. poor rendering was because of a bug\n // in Chrome (getClientRects() returns rounded integer values rather than exact floats.\n // web dev is still a ghetto.)\n\n // first, just in case there is no border...\n if (top.width === 0 && left.width === 0 && right.width === 0 && bottom.width === 0) {\n return;\n }\n\n // START paint borders\n // if all borders have equal colors...\n if (top.color == right.color && top.color == bottom.color && top.color == left.color) {\n\n // if same widths too, we can draw the whole border by stroking a single path.\n if (top.width == right.width && top.width == bottom.width && top.width == left.width)\n {\n if (shouldDrawLeft && shouldDrawRight) {\n // reduce box by half the border width, so we can draw it by stroking.\n box = innerBox(box, top.width/2);\n\n // adjust the border radiuses, again by top.width/2, and make the path element.\n var path = elementRoundBox(element, box, top.width/2);\n path.options.stroke = {\n color: top.color,\n width: top.width\n };\n group.append(path);\n return;\n }\n }\n }\n\n // if border radiuses are zero and widths are at most one pixel, we can again use simple\n // paths.\n if (rTL0.x === 0 && rTR0.x === 0 && rBR0.x === 0 && rBL0.x === 0) {\n // alright, 1.9px will do as well. the difference in color blending should not be\n // noticeable.\n if (top.width < 2 && left.width < 2 && right.width < 2 && bottom.width < 2) {\n // top border\n if (top.width > 0) {\n group.append(\n new Path({\n stroke: { width: top.width, color: top.color }\n })\n .moveTo(box.left, box.top + top.width/2)\n .lineTo(box.right, box.top + top.width/2)\n );\n }\n\n // bottom border\n if (bottom.width > 0) {\n group.append(\n new Path({\n stroke: { width: bottom.width, color: bottom.color }\n })\n .moveTo(box.left, box.bottom - bottom.width/2)\n .lineTo(box.right, box.bottom - bottom.width/2)\n );\n }\n\n // left border\n if (shouldDrawLeft) {\n group.append(\n new Path({\n stroke: { width: left.width, color: left.color }\n })\n .moveTo(box.left + left.width/2, box.top)\n .lineTo(box.left + left.width/2, box.bottom)\n );\n }\n\n // right border\n if (shouldDrawRight) {\n group.append(\n new Path({\n stroke: { width: right.width, color: right.color }\n })\n .moveTo(box.right - right.width/2, box.top)\n .lineTo(box.right - right.width/2, box.bottom)\n );\n }\n\n return;\n }\n }\n // END paint borders\n\n var tmp = adjustBorderRadiusForBox(box, rTL0, rTR0, rBR0, rBL0);\n var rTL = tmp.tl;\n var rTR = tmp.tr;\n var rBR = tmp.br;\n var rBL = tmp.bl;\n\n // top border\n drawEdge(top.color,\n box.width, top.width, left.width, right.width,\n rTL, rTR,\n [ 1, 0, 0, 1, box.left, box.top ]);\n\n // bottom border\n drawEdge(bottom.color,\n box.width, bottom.width, right.width, left.width,\n rBR, rBL,\n [ -1, 0, 0, -1, box.right, box.bottom ]);\n\n // for left/right borders we need to invert the border-radiuses\n function inv(p) {\n return { x: p.y, y: p.x };\n }\n\n // left border\n drawEdge(left.color,\n box.height, left.width, bottom.width, top.width,\n inv(rBL), inv(rTL),\n [ 0, -1, 1, 0, box.left, box.bottom ]);\n\n // right border\n drawEdge(right.color,\n box.height, right.width, top.width, bottom.width,\n inv(rTR), inv(rBR),\n [ 0, 1, -1, 0, box.right, box.top ]);\n }\n}\n\nfunction gradientRenderer(gradient) {\n return function(group, rect) {\n var width = rect.width(), height = rect.height();\n\n switch (gradient.type) {\n case \"linear\":\n\n // figure out the angle.\n var angle = gradient.angle != null ? gradient.angle : Math.PI;\n switch (gradient.to) {\n case \"top\":\n angle = 0;\n break;\n case \"left\":\n angle = -Math.PI / 2;\n break;\n case \"bottom\":\n angle = Math.PI;\n break;\n case \"right\":\n angle = Math.PI / 2;\n break;\n case \"top left\": case \"left top\":\n angle = -Math.atan2(height, width);\n break;\n case \"top right\": case \"right top\":\n angle = Math.atan2(height, width);\n break;\n case \"bottom left\": case \"left bottom\":\n angle = Math.PI + Math.atan2(height, width);\n break;\n case \"bottom right\": case \"right bottom\":\n angle = Math.PI - Math.atan2(height, width);\n break;\n }\n\n if (gradient.reverse) {\n angle -= Math.PI;\n }\n\n // limit the angle between 0..2PI\n angle %= 2 * Math.PI;\n if (angle < 0) {\n angle += 2 * Math.PI;\n }\n\n // compute gradient's start/end points. here len is the length of the gradient line\n // and x,y is the end point relative to the center of the rectangle in conventional\n // (math) axis direction.\n\n // this is the original (unscaled) length of the gradient line. needed to deal with\n // absolutely positioned color stops. formula from the CSS spec:\n // http://dev.w3.org/csswg/css-images-3/#linear-gradient-syntax\n var pxlen = Math.abs(width * Math.sin(angle)) + Math.abs(height * Math.cos(angle));\n\n // The math below is pretty simple, but it took a while to figure out. We compute x\n // and y, the *end* of the gradient line. However, we want to transform them into\n // element-based coordinates (SVG's gradientUnits=\"objectBoundingBox\"). That means,\n // x=0 is the left edge, x=1 is the right edge, y=0 is the top edge and y=1 is the\n // bottom edge.\n //\n // A naive approach would use the original angle for these calculations. Say we'd\n // like to draw a gradient angled at 45deg in a 100x400 box. When we use\n // objectBoundingBox, the renderer will draw it in a 1x1 *square* box, and then\n // scale that to the desired dimensions. The 45deg angle will look more like 70deg\n // after scaling. SVG (http://www.w3.org/TR/SVG/pservers.html#LinearGradients) says\n // the following:\n //\n // When gradientUnits=\"objectBoundingBox\" and 'gradientTransform' is the\n // identity matrix, the normal of the linear gradient is perpendicular to the\n // gradient vector in object bounding box space (i.e., the abstract coordinate\n // system where (0,0) is at the top/left of the object bounding box and (1,1) is\n // at the bottom/right of the object bounding box). When the object's bounding\n // box is not square, the gradient normal which is initially perpendicular to\n // the gradient vector within object bounding box space may render\n // non-perpendicular relative to the gradient vector in user space. If the\n // gradient vector is parallel to one of the axes of the bounding box, the\n // gradient normal will remain perpendicular. This transformation is due to\n // application of the non-uniform scaling transformation from bounding box space\n // to user space.\n //\n // which is an extremely long and confusing way to tell what I just said above.\n //\n // For this reason we need to apply the reverse scaling to the original angle, so\n // that when it'll finally be rendered it'll actually be at the desired slope. Now\n // I'll let you figure out the math yourself.\n\n var scaledAngle = Math.atan(width * Math.tan(angle) / height);\n var sin = Math.sin(scaledAngle), cos = Math.cos(scaledAngle);\n var len = Math.abs(sin) + Math.abs(cos);\n var x = len/2 * sin;\n var y = len/2 * cos;\n\n // Because of the arctangent, our scaledAngle ends up between -PI/2..PI/2, possibly\n // losing the intended direction of the gradient. The following fixes it.\n if (angle > Math.PI/2 && angle <= 3*Math.PI/2) {\n x = -x;\n y = -y;\n }\n\n // compute the color stops.\n var implicit = [], right = 0;\n var stops = gradient.stops.map(function(s, i){\n var offset = s.percent;\n if (offset) {\n offset = parseFloat(offset) / 100;\n } else if (s.length) {\n offset = parseFloat(s.length) / pxlen;\n } else if (i === 0) {\n offset = 0;\n } else if (i == gradient.stops.length - 1) {\n offset = 1;\n }\n var stop = {\n color: s.color.toCssRgba(),\n offset: offset\n };\n if (offset != null) {\n right = offset;\n // fix implicit offsets\n implicit.forEach(function(s, i){\n var stop = s.stop;\n stop.offset = s.left + (right - s.left) * (i + 1) / (implicit.length + 1);\n });\n implicit = [];\n } else {\n implicit.push({ left: right, stop: stop });\n }\n return stop;\n });\n\n var start = [ 0.5 - x, 0.5 + y ];\n var end = [ 0.5 + x, 0.5 - y ];\n\n // finally, draw it.\n group.append(\n Path.fromRect(rect)\n .stroke(null)\n .fill(new LinearGradient({\n start : start,\n end : end,\n stops : stops,\n userSpace : false\n }))\n );\n break;\n case \"radial\":\n // XXX:\n if (window.console && window.console.log) {\n window.console.log(\"Radial gradients are not yet supported in HTML renderer\");\n }\n break;\n }\n };\n}\n\nfunction maybeRenderWidget(element, group) {\n var visual;\n\n if (element._kendoExportVisual) {\n visual = element._kendoExportVisual();\n } else if (window.kendo && window.kendo.jQuery && element.getAttribute(window.kendo.attr(\"role\"))) {\n var widget = window.kendo.widgetInstance(window.kendo.jQuery(element));\n if (widget && (widget.exportDOMVisual || widget.exportVisual)) {\n if (widget.exportDOMVisual) {\n visual = widget.exportDOMVisual();\n } else {\n visual = widget.exportVisual();\n }\n }\n }\n\n if (!visual) {\n return false;\n }\n\n var wrap$$1 = new Group();\n wrap$$1.children.push(visual);\n\n var bbox = element.getBoundingClientRect();\n wrap$$1.transform(transform$1().translate(bbox.left, bbox.top));\n\n group.append(wrap$$1);\n\n return true;\n}\n\nfunction renderImage(element, url, group) {\n var box = getContentBox(element);\n var rect = new Rect([ box.left, box.top ], [ box.width, box.height ]);\n var image = new Image$1(url, rect);\n setClipping(image, elementRoundBox(element, box, \"content\"));\n group.append(image);\n}\n\nfunction zIndexSort(a, b) {\n var sa = getComputedStyle$1(a);\n var sb = getComputedStyle$1(b);\n var za = parseFloat(getPropertyValue(sa, \"z-index\"));\n var zb = parseFloat(getPropertyValue(sb, \"z-index\"));\n var pa = getPropertyValue(sa, \"position\");\n var pb = getPropertyValue(sb, \"position\");\n if (isNaN(za) && isNaN(zb)) {\n if ((/static|absolute/.test(pa)) && (/static|absolute/.test(pb))) {\n return 0;\n }\n if (pa == \"static\") {\n return -1;\n }\n if (pb == \"static\") {\n return 1;\n }\n return 0;\n }\n if (isNaN(za)) {\n return zb === 0 ? 0 : zb > 0 ? -1 : 1;\n }\n if (isNaN(zb)) {\n return za === 0 ? 0 : za > 0 ? 1 : -1;\n }\n return parseFloat(za) - parseFloat(zb);\n}\n\nfunction isFormField(element) {\n return /^(?:textarea|select|input)$/i.test(element.tagName);\n}\n\nfunction getSelectedOption(element) {\n if (element.selectedOptions && element.selectedOptions.length > 0) {\n return element.selectedOptions[0];\n }\n return element.options[element.selectedIndex];\n}\n\nfunction renderCheckbox(element, group) {\n var style = getComputedStyle$1(element);\n var color = getPropertyValue(style, \"color\");\n var box = element.getBoundingClientRect();\n if (element.type == \"checkbox\") {\n group.append(\n Path.fromRect(\n new Rect([ box.left+1, box.top+1 ],\n [ box.width-2, box.height-2 ])\n ).stroke(color, 1)\n );\n if (element.checked) {\n // fill a rectangle inside? looks kinda ugly.\n // group.append(\n // Path.fromRect(\n // new geo.Rect([ box.left+4, box.top+4 ],\n // [ box.width-8, box.height-8])\n // ).fill(color).stroke(null)\n // );\n\n // let's draw a checkmark instead. artistic, eh?\n group.append(\n new Path()\n .stroke(color, 1.2)\n .moveTo(box.left + 0.22 * box.width,\n box.top + 0.55 * box.height)\n .lineTo(box.left + 0.45 * box.width,\n box.top + 0.75 * box.height)\n .lineTo(box.left + 0.78 * box.width,\n box.top + 0.22 * box.width)\n );\n }\n } else {\n group.append(\n new Circle(\n new Circle$2([\n (box.left + box.right) / 2,\n (box.top + box.bottom) / 2\n ], Math.min(box.width-2, box.height-2) / 2)\n ).stroke(color, 1)\n );\n if (element.checked) {\n group.append(\n new Circle(\n new Circle$2([\n (box.left + box.right) / 2,\n (box.top + box.bottom) / 2\n ], Math.min(box.width-8, box.height-8) / 2)\n ).fill(color).stroke(null)\n );\n }\n }\n}\n\nfunction renderFormField(element, group) {\n var tag = element.tagName.toLowerCase();\n if (tag == \"input\" && (element.type == \"checkbox\" || element.type == \"radio\")) {\n return renderCheckbox(element, group);\n }\n var p = element.parentNode;\n var doc = element.ownerDocument;\n var el = doc.createElement(KENDO_PSEUDO_ELEMENT);\n var option;\n el.style.cssText = getCssText(getComputedStyle$1(element));\n if (tag == \"input\") {\n el.style.whiteSpace = \"pre\";\n }\n if (tag == \"select\" || tag == \"textarea\") {\n el.style.overflow = \"auto\";\n }\n if (tag == \"select\") {\n if (element.multiple) {\n for (var i = 0; i < element.options.length; ++i) {\n option = doc.createElement(KENDO_PSEUDO_ELEMENT);\n option.style.cssText = getCssText(getComputedStyle$1(element.options[i]));\n option.style.display = \"block\"; // IE9 messes up without this\n option.textContent = element.options[i].textContent;\n el.appendChild(option);\n }\n } else {\n option = getSelectedOption(element);\n if (option) {\n el.textContent = option.textContent;\n }\n }\n } else {\n el.textContent = element.value;\n }\n p.insertBefore(el, element);\n el.scrollLeft = element.scrollLeft;\n el.scrollTop = element.scrollTop;\n\n // must temporarily hide the original element, otherwise it\n // may affect layout of the fake element we want to render.\n element.style.display = \"none\";\n\n renderContents(el, group);\n element.style.display = \"\";\n p.removeChild(el);\n}\n\nfunction serializeSVG(element) {\n var serializer = new window.XMLSerializer();\n var xml = serializer.serializeToString(element);\n\n if (browser.mozilla && !(element.getAttribute(\"width\") && element.getAttribute(\"height\"))) {\n var doc = new window.DOMParser().parseFromString(xml, \"image/svg+xml\");\n var svg$$1 = doc.documentElement;\n var box = getContentBox(element);\n svg$$1.setAttribute(\"width\", box.width);\n svg$$1.setAttribute(\"height\", box.height);\n xml = serializer.serializeToString(svg$$1);\n }\n\n return xml;\n}\n\nfunction renderContents(element, group) {\n if (nodeInfo._stackingContext.element === element) {\n // the group that was set in pushNodeInfo might have\n // changed due to clipping/transforms, update it here.\n nodeInfo._stackingContext.group = group;\n }\n switch (element.tagName.toLowerCase()) {\n case \"img\":\n renderImage(element, element.src, group);\n break;\n\n case \"svg\":\n var xml = serializeSVG(element);\n var dataURL = \"data:image/svg+xml;base64,\" + (encodeBase64(xml));\n renderImage(element, dataURL, group);\n break;\n\n case \"canvas\":\n try {\n renderImage(element, element.toDataURL(\"image/png\"), group);\n } catch (ex) {\n // tainted; can't draw it, ignore.\n }\n break;\n\n case \"textarea\":\n case \"input\":\n case \"select\":\n renderFormField(element, group);\n break;\n\n default:\n var children = [], floats = [], positioned = [];\n for (var i = element.firstChild; i; i = i.nextSibling) {\n switch (i.nodeType) {\n case 3: // Text\n if (/\\S/.test(i.data)) {\n renderText(element, i, group);\n }\n break;\n case 1: // Element\n var style = getComputedStyle$1(i);\n var floating = getPropertyValue(style, \"float\");\n var position = getPropertyValue(style, \"position\");\n if (position != \"static\") {\n positioned.push(i);\n }\n else if (floating != \"none\") {\n floats.push(i);\n } else {\n children.push(i);\n }\n break;\n }\n }\n\n mergeSort(children, zIndexSort).forEach(function(el){ renderElement(el, group); });\n mergeSort(floats, zIndexSort).forEach(function(el){ renderElement(el, group); });\n mergeSort(positioned, zIndexSort).forEach(function(el){ renderElement(el, group); });\n }\n}\n\nfunction renderText(element, node, group) {\n if (emptyClipbox()) {\n return;\n }\n var style = getComputedStyle$1(element);\n\n if (parseFloat(getPropertyValue(style, \"text-indent\")) < -500) {\n // assume it should not be displayed. the slider's\n // draggable handle displays a Drag text for some reason,\n // having text-indent: -3333px.\n return;\n }\n\n var text = node.data;\n var start = 0;\n var end = text.search(/\\S\\s*$/) + 1;\n\n if (!end) {\n return; // whitespace-only node\n }\n\n var fontSize = getPropertyValue(style, \"font-size\");\n var lineHeight = getPropertyValue(style, \"line-height\");\n\n // simply getPropertyValue(\"font\") doesn't work in Firefox :-\\\n var font = [\n getPropertyValue(style, \"font-style\"),\n getPropertyValue(style, \"font-variant\"),\n getPropertyValue(style, \"font-weight\"),\n fontSize, // no need for line height here; it breaks layout in FF\n getPropertyValue(style, \"font-family\")\n ].join(\" \");\n\n fontSize = parseFloat(fontSize);\n lineHeight = parseFloat(lineHeight);\n\n if (fontSize === 0 || isNaN(fontSize)) {\n return;\n }\n\n var color = getPropertyValue(style, \"color\");\n var range = element.ownerDocument.createRange();\n var align$$1 = getPropertyValue(style, \"text-align\");\n var isJustified = align$$1 == \"justify\";\n var columnCount = getPropertyValue(style, \"column-count\", 1);\n var whiteSpace = getPropertyValue(style, \"white-space\");\n var textTransform = getPropertyValue(style, \"text-transform\");\n\n // A line of 500px, with a font of 12px, contains an average of 80 characters, but since we\n // err, we'd like to guess a bigger number rather than a smaller one. Multiplying by 5\n // seems to be a good option.\n var estimateLineLength = element.getBoundingClientRect().width / fontSize * 5;\n if (estimateLineLength === 0) {\n estimateLineLength = 500;\n }\n\n // we'll maintain this so we can workaround bugs in Chrome's Range.getClientRects\n // https://github.com/telerik/kendo/issues/5740\n var prevLineBottom = null;\n\n var underline = nodeInfo[\"underline\"];\n var lineThrough = nodeInfo[\"line-through\"];\n var overline = nodeInfo[\"overline\"];\n var underlineOffset = nodeInfo[\"underline-offset\"];\n\n if (underline) {\n forEachRect(decorateUnder);\n }\n\n // doChunk returns true when all text has been rendered\n while (!doChunk()) {}\n\n if (lineThrough || overline) {\n forEachRect(decorateOver);\n }\n\n return; // only function declarations after this line\n\n function forEachRect(callback) {\n range.selectNode(node);\n var clientRects = slice$1$1(range.getClientRects());\n\n forEachRect = function (cb) { return clientRects.forEach(cb); };\n forEachRect(callback);\n }\n\n function actuallyGetRangeBoundingRect(range) {\n // XXX: to be revised when this Chrome bug is fixed:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=612459\n if (microsoft || browser.chrome || browser.safari) {\n // Workaround browser bugs: IE and Chrome would sometimes\n // return 0 or 1-width rectangles before or after the main\n // one. https://github.com/telerik/kendo/issues/4674\n\n // Actually Chrome 50 got worse, since the rectangles can now have the width of a\n // full character, making it hard to tell whether it's a bogus rectangle or valid\n // selection location. The workaround is to ignore rectangles that fall on the\n // previous line. https://github.com/telerik/kendo/issues/5740\n var rectangles = range.getClientRects(), box = {\n top : Infinity,\n right : -Infinity,\n bottom : -Infinity,\n left : Infinity\n }, done = false;\n for (var i = 0; i < rectangles.length; ++i) {\n var b = rectangles[i];\n if (b.width <= 1 || b.bottom === prevLineBottom) {\n continue; // bogus rectangle\n }\n box.left = Math.min(b.left , box.left);\n box.top = Math.min(b.top , box.top);\n box.right = Math.max(b.right , box.right);\n box.bottom = Math.max(b.bottom , box.bottom);\n done = true;\n }\n if (!done) {\n return range.getBoundingClientRect();\n }\n box.width = box.right - box.left;\n box.height = box.bottom - box.top;\n return box;\n }\n return range.getBoundingClientRect();\n }\n\n // Render a chunk of text, typically one line (but for justified text we render each word as\n // a separate Text object, because spacing is variable). Returns true when it finished the\n // current node. After each chunk it updates `start` to just after the last rendered\n // character.\n function doChunk() {\n var origStart = start;\n var box, pos = text.substr(start).search(/\\S/);\n start += pos;\n if (pos < 0 || start >= end) {\n return true;\n }\n\n // Select a single character to determine the height of a line of text. The box.bottom\n // will be essential for us to figure out where the next line begins.\n range.setStart(node, start);\n range.setEnd(node, start + 1);\n box = actuallyGetRangeBoundingRect(range);\n\n // for justified text we must split at each space, because space has variable width.\n var found = false;\n if (isJustified || columnCount > 1) {\n pos = text.substr(start).search(/\\s/);\n if (pos >= 0) {\n // we can only split there if it's on the same line, otherwise we'll fall back\n // to the default mechanism (see findEOL below).\n range.setEnd(node, start + pos);\n var r = actuallyGetRangeBoundingRect(range);\n if (r.bottom == box.bottom) {\n box = r;\n found = true;\n start += pos;\n }\n }\n }\n\n if (!found) {\n // This code does three things: (1) it selects one line of text in `range`, (2) it\n // leaves the bounding rect of that line in `box` and (3) it returns the position\n // just after the EOL. We know where the line starts (`start`) but we don't know\n // where it ends. To figure this out, we select a piece of text and look at the\n // bottom of the bounding box. If it changes, we have more than one line selected\n // and should retry with a smaller selection.\n //\n // To speed things up, we first try to select all text in the node (`start` ->\n // `end`). If there's more than one line there, then select only half of it. And\n // so on. When we find a value for `end` that fits in one line, we try increasing\n // it (also in halves) until we get to the next line. The algorithm stops when the\n // right side of the bounding box does not change.\n //\n // One more thing to note is that everything happens in a single Text DOM node.\n // There's no other tags inside it, therefore the left/top coordinates of the\n // bounding box will not change.\n pos = (function findEOL(min, eol, max){\n range.setEnd(node, eol);\n var r = actuallyGetRangeBoundingRect(range);\n if (r.bottom != box.bottom && min < eol) {\n return findEOL(min, (min + eol) >> 1, eol);\n } else if (r.right != box.right) {\n box = r;\n if (eol < max) {\n return findEOL(eol, (eol + max) >> 1, max);\n } else {\n return eol;\n }\n } else {\n return eol;\n }\n })(start, Math.min(end, start + estimateLineLength), end);\n\n if (pos == start) {\n // if EOL is at the start, then no more text fits on this line. Skip the\n // remainder of this node entirely to avoid a stack overflow.\n return true;\n }\n start = pos;\n\n pos = range.toString().search(/\\s+$/);\n if (pos === 0) {\n return false; // whitespace only; we should not get here.\n }\n if (pos > 0) {\n // eliminate trailing whitespace\n range.setEnd(node, range.startOffset + pos);\n box = actuallyGetRangeBoundingRect(range);\n }\n }\n\n // another workaround for IE: if we rely on getBoundingClientRect() we'll overlap with the bullet for LI\n // elements. Calling getClientRects() and using the *first* rect appears to give us the correct location.\n // Note: not to be used in Chrome as it randomly returns a zero-width rectangle from the previous line.\n if (microsoft) {\n box = range.getClientRects()[0];\n }\n\n var str = range.toString();\n if (!/^(?:pre|pre-wrap)$/i.test(whiteSpace)) {\n // node with non-significant space -- collapse whitespace.\n str = str.replace(/\\s+/g, \" \");\n }\n else if (/\\t/.test(str)) {\n // with significant whitespace we need to do something about literal TAB characters.\n // There's no TAB glyph in a font so they would be rendered in PDF as an empty box,\n // and the whole text will stretch to fill the original width. The core PDF lib\n // does not have sufficient context to deal with it.\n\n // calculate the starting column here, since we initially discarded any whitespace.\n var cc = 0;\n for (pos = origStart; pos < range.startOffset; ++pos) {\n var code = text.charCodeAt(pos);\n if (code == 9) {\n // when we meet a TAB we must round up to the next tab stop.\n // in all browsers TABs seem to be 8 characters.\n cc += 8 - cc % 8;\n } else if (code == 10 || code == 13) {\n // just in case we meet a newline we must restart.\n cc = 0;\n } else {\n // ordinary character --> advance one column\n cc++;\n }\n }\n\n // based on starting column, replace any TAB characters in the string we actually\n // have to display with spaces so that they align to columns multiple of 8.\n while ((pos = str.search(\"\\t\")) >= 0) {\n var indent = \" \".substr(0, 8 - (cc + pos) % 8);\n str = str.substr(0, pos) + indent + str.substr(pos + 1);\n }\n }\n\n if (!found) {\n prevLineBottom = box.bottom;\n }\n drawText(str, box);\n }\n\n function drawText(str, box) {\n // In IE the box height will be approximately lineHeight, while in\n // other browsers it'll (correctly) be the height of the bounding\n // box for the current text/font. Which is to say, IE sucks again.\n // The only good solution I can think of is to measure the text\n // ourselves and center the bounding box.\n if (microsoft && !isNaN(lineHeight)) {\n var height = getFontHeight(font);\n var top = (box.top + box.bottom - height) / 2;\n box = {\n top : top,\n right : box.right,\n bottom : top + height,\n left : box.left,\n height : height,\n width : box.right - box.left\n };\n }\n\n // var path = new Path({ stroke: { color: \"red\" }});\n // path.moveTo(box.left, box.top)\n // .lineTo(box.right, box.top)\n // .lineTo(box.right, box.bottom)\n // .lineTo(box.left, box.bottom)\n // .close();\n // group.append(path);\n\n switch (textTransform) {\n case \"uppercase\":\n str = str.toUpperCase();\n break;\n case \"lowercase\":\n str = str.toLowerCase();\n break;\n case \"capitalize\":\n str = str.replace(/(?:^|\\s)\\S/g, function (l) { return l.toUpperCase(); });\n break;\n }\n\n var text = new TextRect(\n str, new Rect([ box.left, box.top ],\n [ box.width, box.height ]),\n {\n font: font,\n fill: { color: color }\n }\n );\n group.append(text);\n }\n\n function drawTextLine(lineWidth, textBox, color, ypos) {\n if (color) {\n var path = new Path({ stroke: {\n width: lineWidth,\n color: color\n }});\n\n ypos -= lineWidth;\n path.moveTo(textBox.left, ypos)\n .lineTo(textBox.right, ypos);\n group.append(path);\n }\n }\n\n function decorateOver(box) {\n var width = fontSize / 12;\n drawTextLine(width, box, lineThrough, box.bottom - box.height / 2.7);\n drawTextLine(width, box, overline, box.top);\n }\n\n function decorateUnder(box) {\n var width = fontSize / 12;\n var underlinePos = box.bottom;\n if (underlineOffset != null) {\n underlinePos += underlineOffset;\n } else {\n underlinePos += width; // for \"auto\" it seems better to add line width\n }\n drawTextLine(width, box, underline, underlinePos);\n }\n}\n\nfunction groupInStackingContext(element, group, zIndex) {\n var main;\n if (zIndex != \"auto\") {\n // use the current stacking context\n main = nodeInfo._stackingContext.group;\n zIndex = parseFloat(zIndex);\n } else {\n // normal flow \u2014 use given container. we still have to\n // figure out where should we insert this element with the\n // assumption that its z-index is zero, as the group might\n // already contain elements with higher z-index.\n main = group;\n zIndex = 0;\n }\n var a = main.children;\n for (var i = 0; i < a.length; ++i) {\n if (a[i]._dom_zIndex != null && a[i]._dom_zIndex > zIndex) {\n break;\n }\n }\n\n var tmp = new Group();\n main.insert(i, tmp);\n tmp._dom_zIndex = zIndex;\n\n if (main !== group) {\n // console.log(\"Placing\", element, \"in\", nodeInfo._stackingContext.element, \"at position\", i, \" / \", a.length);\n // console.log(a.slice(i+1));\n\n // if (nodeInfo._matrix) {\n // tmp.transform(nodeInfo._matrix);\n // }\n if (nodeInfo._clipbox) {\n var m = nodeInfo._matrix.invert();\n var r = nodeInfo._clipbox.transformCopy(m);\n setClipping(tmp, Path.fromRect(r));\n // console.log(r);\n // tmp.append(Path.fromRect(r));\n // tmp.append(new Text(element.className || element.id, r.topLeft()));\n }\n }\n\n return tmp;\n}\n\nfunction renderElement(element, container) {\n var style = getComputedStyle$1(element);\n\n updateCounters(style);\n\n if (/^(style|script|link|meta|iframe|col|colgroup)$/i.test(element.tagName)) {\n return;\n }\n\n if (nodeInfo._clipbox == null) {\n return;\n }\n\n var opacity = parseFloat(getPropertyValue(style, \"opacity\"));\n var visibility = getPropertyValue(style, \"visibility\");\n var display = getPropertyValue(style, \"display\");\n\n if (opacity === 0 || visibility == \"hidden\" || display == \"none\") {\n return;\n }\n\n var tr = getTransform(style);\n var group;\n\n var zIndex = getPropertyValue(style, \"z-index\");\n if ((tr || opacity < 1) && zIndex == \"auto\") {\n zIndex = 0;\n }\n group = groupInStackingContext(element, container, zIndex);\n\n // XXX: remove at some point\n // group._pdfElement = element;\n // group.options._pdfDebug = \"\";\n // if (element.id) {\n // group.options._pdfDebug = \"#\" + element.id;\n // }\n // if (element.className) {\n // group.options._pdfDebug += \".\" + element.className.split(\" \").join(\".\");\n // }\n\n if (opacity < 1) {\n group.opacity(opacity * group.opacity());\n }\n\n pushNodeInfo(element, style, group);\n\n if (!tr) {\n _renderWithPseudoElements(element, group);\n }\n else {\n saveStyle(element, function(){\n // must clear transform, so getBoundingClientRect returns correct values.\n pleaseSetPropertyValue(element.style, \"transform\", \"none\", \"important\");\n\n // must also clear transitions, so correct values are returned *immediately*\n pleaseSetPropertyValue(element.style, \"transition\", \"none\", \"important\");\n\n // the presence of any transform makes it behave like it had position: relative,\n // because why not.\n // http://meyerweb.com/eric/thoughts/2011/09/12/un-fixing-fixed-elements-with-css-transforms/\n if (getPropertyValue(style, \"position\") == \"static\") {\n // but only if it's not already positioned. :-/\n pleaseSetPropertyValue(element.style, \"position\", \"relative\", \"important\");\n }\n\n // must translate to origin before applying the CSS\n // transformation, then translate back.\n var bbox = element.getBoundingClientRect();\n var x = bbox.left + tr.origin[0];\n var y = bbox.top + tr.origin[1];\n var m = [ 1, 0, 0, 1, -x, -y ];\n m = mmul(m, tr.matrix);\n m = mmul(m, [ 1, 0, 0, 1, x, y ]);\n m = setTransform$1(group, m);\n\n nodeInfo._matrix = nodeInfo._matrix.multiplyCopy(m);\n\n _renderWithPseudoElements(element, group);\n });\n }\n\n popNodeInfo();\n\n //drawDebugBox(element.getBoundingClientRect(), container);\n}\n\n// function drawDebugBox(box, group, color) {\n// var path = Path.fromRect(new geo.Rect([ box.left, box.top ], [ box.width, box.height ]));\n// if (color) {\n// path.stroke(color);\n// }\n// group.append(path);\n// }\n\n// function dumpTextNode(node) {\n// var txt = node.data.replace(/^\\s+/, \"\");\n// if (txt.length < 100) {\n// console.log(node.data.length + \": |\" + txt);\n// } else {\n// console.log(node.data.length + \": |\" + txt.substr(0, 50) + \"|...|\" + txt.substr(-50));\n// }\n// }\n\nfunction mmul(a, b) {\n var a1 = a[0], b1 = a[1], c1 = a[2], d1 = a[3], e1 = a[4], f1 = a[5];\n var a2 = b[0], b2 = b[1], c2 = b[2], d2 = b[3], e2 = b[4], f2 = b[5];\n return [\n a1*a2 + b1*c2, a1*b2 + b1*d2,\n c1*a2 + d1*c2, c1*b2 + d1*d2,\n e1*a2 + f1*c2 + e2, e1*b2 + f1*d2 + f2\n ];\n}\n\nvar drawing = {\n\tsvg: svg$1,\n\tcanvas: canvas,\n\tutil: util,\n\tHasObservers: HasObservers,\n\tPathParser: PathParser,\n\tparsePath: parsePath,\n\tBaseNode: BaseNode,\n\tOptionsStore: OptionsStore,\n\tSurface: Surface,\n\tSurfaceFactory: SurfaceFactory,\n\texportImage: exportImage,\n\texportSVG: exportSVG,\n\tQuadNode: QuadNode,\n\tShapesQuadTree: ShapesQuadTree,\n\tElement: Element$1,\n\tCircle: Circle,\n\tArc: Arc,\n\tPath: Path,\n\tMultiPath: MultiPath,\n\tText: Text,\n\tImage: Image$1,\n\tGroup: Group,\n\tLayout: Layout,\n\tRect: Rect$2,\n\talign: align,\n\tvAlign: vAlign,\n\tstack: stack,\n\tvStack: vStack,\n\twrap: wrap,\n\tvWrap: vWrap,\n\tfit: fit,\n\tLinearGradient: LinearGradient,\n\tRadialGradient: RadialGradient,\n\tGradientStop: GradientStop,\n\tGradient: Gradient,\n\tAnimation: Animation,\n\tAnimationFactory: AnimationFactory,\n\tdrawDOM: drawDOM,\n\tdrawText: drawText,\n\tgetFontFaces: getFontFaces\n};\n\nkendo.deepExtend(kendo, {\n drawing: drawing,\n geometry: geometry\n});\n\n// Use unique SVG Definition IDs for Kendo UI\ndefId = 1000;\n\nkendo.drawing.Segment = kendo.geometry.Segment;\nkendo.dataviz.drawing = kendo.drawing;\nkendo.dataviz.geometry = kendo.geometry;\nkendo.drawing.util.measureText = kendo.util.measureText;\nkendo.drawing.util.objectKey = kendo.util.objectKey;\nkendo.drawing.Color = kendo.Color;\nkendo.util.encodeBase64 = kendo.drawing.util.encodeBase64;\n\n})(window.kendo.jQuery);\n\n(function($) {\n\n var NS = \".kendo\";\n var kendo = window.kendo;\n var deepExtend = kendo.deepExtend;\n var utils = kendo.drawing.util;\n var defined = utils.defined;\n var limitValue = utils.limitValue;\n var eventCoordinates = utils.eventCoordinates;\n var outerWidth = kendo._outerWidth;\n var outerHeight = kendo._outerHeight;\n\n var TOOLTIP_TEMPLATE = '
    ' +\n '
    ' +\n '
    ';\n var TOOLTIP_CLOSE_TEMPLATE = `
    ${kendo.ui.icon($(''), { icon: \"x\" })}
    `;\n\n var SurfaceTooltip = kendo.Class.extend({\n init: function(surface, options) {\n this.element = $(TOOLTIP_TEMPLATE);\n this.content = this.element.children(\".k-tooltip-content\");\n\n options = options || {};\n\n this.options = deepExtend({}, this.options, this._tooltipOptions(options));\n this.popupOptions = {\n appendTo: options.appendTo,\n animation: options.animation,\n copyAnchorStyles: false,\n collision: \"fit fit\"\n };\n\n this._openPopupHandler = this._openPopup.bind(this);\n\n this.surface = surface;\n this._bindEvents();\n },\n\n options: {\n position: \"top\",\n showOn: \"mouseenter\",\n offset: 7,\n autoHide: true,\n hideDelay: 0,\n showAfter: 100\n },\n\n _bindEvents: function() {\n this._showHandler = this._showEvent.bind(this);\n this._surfaceLeaveHandler = this._surfaceLeave.bind(this);\n this._mouseleaveHandler = this._mouseleave.bind(this);\n this._mousemoveHandler = this._mousemove.bind(this);\n\n this.surface.bind(\"click\", this._showHandler);\n this.surface.bind(\"mouseenter\", this._showHandler);\n this.surface.bind(\"mouseleave\", this._mouseleaveHandler);\n this.surface.bind(\"mousemove\", this._mousemoveHandler);\n\n this.surface.element.on(\"mouseleave\" + NS, this._surfaceLeaveHandler);\n\n this.element.on(\"click\" + NS, \".k-tooltip-button\", this._hideClick.bind(this));\n this.element.on(\"mouseleave\" + NS, this._tooltipLeave.bind(this));\n },\n\n getPopup: function() {\n if (!this.popup) {\n this.popup = new kendo.ui.Popup(this.element, this.popupOptions);\n }\n\n return this.popup;\n },\n\n destroy: function() {\n var popup = this.popup;\n\n this.surface.unbind(\"click\", this._showHandler);\n this.surface.unbind(\"mouseenter\", this._showHandler);\n this.surface.unbind(\"mouseleave\", this._mouseleaveHandler);\n this.surface.unbind(\"mousemove\", this._mousemoveHandler);\n\n this.surface.element.off(\"mouseleave\" + NS, this._surfaceLeaveHandler);\n this.element.off(\"click\" + NS);\n this.element.off(\"mouseleave\" + NS);\n\n if (popup) {\n popup.destroy();\n delete this.popup;\n }\n delete this.popupOptions;\n\n clearTimeout(this._timeout);\n\n delete this.element;\n delete this.content;\n delete this.surface;\n },\n\n _tooltipOptions: function(options) {\n options = options || {};\n return {\n position: options.position,\n showOn: options.showOn,\n offset: options.offset,\n autoHide: options.autoHide,\n width: options.width,\n height: options.height,\n content: options.content,\n shared: options.shared,\n hideDelay: options.hideDelay,\n showAfter: options.showAfter\n };\n },\n\n _tooltipShape: function(shape) {\n while (shape && !shape.options.tooltip) {\n shape = shape.parent;\n }\n return shape;\n },\n\n _updateContent: function(target, shape, options) {\n var content = options.content;\n if (kendo.isFunction(content)) {\n content = content({\n element: shape,\n target: target\n });\n }\n\n if (content) {\n this.content.html(content);\n return true;\n }\n },\n\n _position: function(shape, options, elementSize, event) {\n var position = options.position;\n var tooltipOffset = options.offset || 0;\n var surface = this.surface;\n var offset = surface._instance._elementOffset();\n var size = surface.getSize();\n var surfaceOffset = surface._instance._offset;\n var bbox = shape.bbox();\n var width = elementSize.width;\n var height = elementSize.height;\n var left = 0, top = 0;\n\n bbox.origin.translate(offset.left, offset.top);\n if (surfaceOffset) {\n bbox.origin.translate(-surfaceOffset.x, -surfaceOffset.y);\n }\n\n if (position == \"cursor\" && event) {\n var coord = eventCoordinates(event);\n left = coord.x - width / 2;\n top = coord.y - height - tooltipOffset;\n } else if (position == \"left\") {\n left = bbox.origin.x - width - tooltipOffset;\n top = bbox.center().y - height / 2;\n } else if (position == \"right\") {\n left = bbox.bottomRight().x + tooltipOffset;\n top = bbox.center().y - height / 2;\n } else if (position == \"bottom\") {\n left = bbox.center().x - width / 2;\n top = bbox.bottomRight().y + tooltipOffset;\n } else {\n left = bbox.center().x - width / 2;\n top = bbox.origin.y - height - tooltipOffset;\n }\n\n return {\n left: limitValue(left, offset.left, offset.left + size.width),\n top: limitValue(top, offset.top, offset.top + size.height)\n };\n },\n\n show: function(shape, options) {\n this._show(shape, shape, deepExtend({}, this.options, this._tooltipOptions(shape.options.tooltip), options));\n },\n\n hide: function() {\n var popup = this.popup;\n var current = this._current;\n\n delete this._current;\n clearTimeout(this._showTimeout);\n if (popup && popup.visible() && current &&\n !this.surface.trigger(\"tooltipClose\", { element: current.shape, target: current.target, popup: popup })) {\n popup.close();\n }\n },\n\n _hideClick: function(e) {\n e.preventDefault();\n this.hide();\n },\n\n _show: function(target, shape, options, event, delay) {\n var current = this._current;\n\n clearTimeout(this._timeout);\n\n if (current && ((current.shape === shape && options.shared) || current.target === target)) {\n return;\n }\n\n clearTimeout(this._showTimeout);\n\n var popup = this.getPopup();\n\n if (!this.surface.trigger(\"tooltipOpen\", { element: shape, target: target, popup: popup }) &&\n this._updateContent(target, shape, options)) {\n\n this._autoHide(options);\n var elementSize = this._measure(options);\n\n if (popup.visible()) {\n popup.close(true);\n }\n\n this._current = {\n options: options,\n elementSize: elementSize,\n shape: shape,\n target: target,\n position: this._position(options.shared ? shape : target, options, elementSize, event)\n };\n\n if (delay) {\n this._showTimeout = setTimeout(this._openPopupHandler, options.showAfter || 0);\n } else {\n this._openPopup();\n }\n }\n },\n\n _openPopup: function() {\n var current = this._current;\n var position = current.position;\n\n this.getPopup().open(position.left, position.top);\n },\n\n _autoHide: function(options) {\n if (options.autoHide && this._closeButton) {\n this.element.removeClass(\"k-tooltip-closable\");\n this._closeButton.remove();\n delete this._closeButton;\n }\n\n if (!options.autoHide && !this._closeButton) {\n this.element.addClass(\"k-tooltip-closable\");\n this._closeButton = $(TOOLTIP_CLOSE_TEMPLATE).appendTo(this.element);\n }\n },\n\n _showEvent: function(e) {\n var shape = this._tooltipShape(e.element);\n\n if (shape) {\n var options = deepExtend({}, this.options, this._tooltipOptions(shape.options.tooltip));\n\n if (options && options.showOn == e.type) {\n this._show(e.element, shape, options, e.originalEvent, true);\n }\n }\n },\n\n _measure: function(options) {\n this.element.css({\n width: defined(options.width) ? options.width : 'auto',\n height: defined(options.height) ? options.height : 'auto'\n });\n\n const clone = this.element.clone().appendTo(document.body).css({ visibility: 'hidden' });\n const width = outerWidth(clone);\n const height = outerHeight(clone);\n clone.remove();\n\n this.element.css({\n width: width,\n height: height\n });\n\n return {\n width: width,\n height: height\n };\n },\n\n _mouseleave: function(e) {\n if (this.popup && !this._popupRelatedTarget(e.originalEvent)) {\n var tooltip = this;\n var current = tooltip._current;\n\n if (current && current.options.autoHide) {\n tooltip._timeout = setTimeout(function() {\n clearTimeout(tooltip._showTimeout);\n tooltip.hide();\n }, current.options.hideDelay || 0);\n }\n }\n },\n\n _mousemove: function(e) {\n var current = this._current;\n if (current && e.element) {\n var options = current.options;\n if (options.position == \"cursor\") {\n var position = this._position(e.element, options, current.elementSize, e.originalEvent);\n current.position = position;\n this.getPopup().wrapper.css({ left: position.left, top: position.top });\n }\n }\n },\n\n _surfaceLeave: function(e) {\n if (this.popup && !this._popupRelatedTarget(e)) {\n clearTimeout(this._showTimeout);\n this.hide();\n }\n },\n\n _popupRelatedTarget: function(e) {\n return e.relatedTarget && $(e.relatedTarget).closest(this.popup.wrapper).length;\n },\n\n _tooltipLeave: function() {\n var tooltip = this;\n var current = tooltip._current;\n if (current && current.options.autoHide) {\n tooltip._timeout = setTimeout(function() {\n tooltip.hide();\n }, current.options.hideDelay || 0);\n }\n }\n });\n\n kendo.drawing.SurfaceTooltip = SurfaceTooltip;\n\n})(window.kendo.jQuery);\n\n(function($) {\n\n var kendo = window.kendo;\n var draw = kendo.drawing;\n var DrawingSurface = draw.Surface;\n var Widget = kendo.ui.Widget;\n var deepExtend = kendo.deepExtend;\n\n kendo.support.svg = DrawingSurface.support.svg;\n kendo.support.canvas = DrawingSurface.support.canvas;\n\n var Surface = Widget.extend({\n init: function(element, options) {\n Widget.fn.init.call(this, element, {});\n\n this.options = deepExtend({}, this.options, options);\n\n this._instance = DrawingSurface.create(this.element[0], options);\n if (this._instance.translate) {\n this.translate = translate;\n }\n\n this._triggerInstanceHandler = this._triggerInstanceEvent.bind(this);\n this._bindHandler(\"click\");\n this._bindHandler(\"mouseenter\");\n this._bindHandler(\"mouseleave\");\n this._bindHandler(\"mousemove\");\n\n this._enableTracking();\n },\n\n options: {\n name: \"Surface\",\n tooltip: {}\n },\n\n events: [\n \"click\",\n \"mouseenter\",\n \"mouseleave\",\n \"mousemove\",\n \"resize\",\n \"tooltipOpen\",\n \"tooltipClose\"\n ],\n\n _triggerInstanceEvent: function(e) {\n this.trigger(e.type, e);\n },\n\n _bindHandler: function(event) {\n this._instance.bind(event, this._triggerInstanceHandler);\n },\n\n draw: function(element) {\n this._instance.draw(element);\n },\n\n clear: function() {\n if (this._instance) {\n this._instance.clear();\n }\n this.hideTooltip();\n },\n\n destroy: function() {\n if (this._instance) {\n this._instance.destroy();\n delete this._instance;\n }\n\n if (this._tooltip) {\n this._tooltip.destroy();\n delete this._tooltip;\n }\n\n Widget.fn.destroy.call(this);\n },\n\n exportVisual: function() {\n return this._instance.exportVisual();\n },\n\n eventTarget: function(e) {\n return this._instance.eventTarget(e);\n },\n\n showTooltip: function(shape, options) {\n if (this._tooltip) {\n this._tooltip.show(shape, options);\n }\n },\n\n hideTooltip: function() {\n if (this._tooltip) {\n this._tooltip.hide();\n }\n },\n\n suspendTracking: function() {\n this._instance.suspendTracking();\n this.hideTooltip();\n },\n\n resumeTracking: function() {\n this._instance.resumeTracking();\n },\n\n getSize: function() {\n return {\n width: this.element.width(),\n height: this.element.height()\n };\n },\n\n setSize: function(size) {\n this.element.css({\n width: size.width,\n height: size.height\n });\n\n this._size = size;\n this._instance.currentSize(size);\n this._resize();\n },\n\n _resize: function() {\n this._instance.currentSize(this._size);\n this._instance._resize();\n },\n\n _enableTracking: function() {\n if (kendo.ui.Popup) {\n this._tooltip = new draw.SurfaceTooltip(this, this.options.tooltip || {});\n }\n }\n });\n\n kendo.ui.plugin(Surface);\n\n Surface.create = function(element, options) {\n return new Surface(element, options);\n };\n\n kendo.drawing.Surface = Surface;\n\n function translate(offset) {\n this._instance.translate(offset);\n }\n\n})(window.kendo.jQuery);\n\n(function($) {\n\n var kendo = window.kendo;\n var drawing = kendo.drawing;\n var drawDOM = drawing.drawDOM;\n\n drawing.drawDOM = function(element, options) {\n return drawDOM($(element)[0], options);\n };\n\n // Aliases used by spreadsheet/print.js\n drawing.drawDOM.drawText = drawing.drawText;\n drawing.drawDOM.getFontFaces = drawing.getFontFaces;\n\n})(window.kendo.jQuery);\n\nvar __meta__ = {\n id: \"drawing\",\n name: \"Drawing API\",\n category: \"framework\",\n description: \"The Kendo UI low-level drawing API\",\n depends: [ \"core\", \"color\", \"popup\", \"icons\" ]\n };\n", "import './kendo.core.js';\n\nvar __meta__ = {\n id: \"validator\",\n name: \"Validator\",\n category: \"web\",\n description: \"The Validator offers an easy way to do a client-side form validation.\",\n depends: [ \"core\" ]\n};\n\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n Widget = kendo.ui.Widget,\n NS = \".kendoValidator\",\n INVALIDMSG = \"k-invalid-msg\",\n invalidMsgRegExp = new RegExp(INVALIDMSG,'i'),\n INVALIDINPUT = \"k-invalid\",\n VALIDINPUT = \"k-valid\",\n VALIDATIONSUMMARY = \"k-validation-summary\",\n INVALIDLABEL = \"k-text-error\",\n MESSAGEBOX = \"k-messagebox k-messagebox-error\",\n INPUTINNER = \".k-input-inner\",\n INPUTWRAPPER = \".k-input\",\n ARIAINVALID = \"aria-invalid\",\n ARIADESCRIBEDBY = \"aria-describedby\",\n emailRegExp = /^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/i,\n urlRegExp = /^(https?|ftp):\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i,\n INPUTSELECTOR = \":input:not(:button,[type=submit],[type=reset],[disabled],[readonly])\",\n CHECKBOXSELECTOR = \":checkbox:not([disabled],[readonly])\",\n NUMBERINPUTSELECTOR = \"[type=number],[type=range]\",\n BLUR = \"blur\",\n NAME = \"name\",\n FORM = \"form\",\n NOVALIDATE = \"novalidate\",\n //events\n VALIDATE = \"validate\",\n CHANGE = \"change\",\n VALIDATE_INPUT = \"validateInput\",\n\n patternMatcher = function(value, pattern) {\n if (typeof pattern === \"string\") {\n pattern = new RegExp('^(?:' + pattern + ')$');\n }\n return pattern.test(value);\n },\n matcher = function(input, selector, pattern) {\n var value = input.val();\n\n if (input.filter(selector).length && value !== \"\") {\n return patternMatcher(value, pattern);\n }\n return true;\n },\n hasAttribute = function(input, name) {\n if (input.length) {\n return input[0].attributes[name] != null;\n }\n return false;\n };\n\n if (!kendo.ui.validator) {\n kendo.ui.validator = { rules: {}, messages: {}, allowSubmit: $.noop, validateOnInit: $.noop };\n }\n\n function resolveRules(element) {\n var resolvers = kendo.ui.validator.ruleResolvers || {},\n rules = {},\n name;\n\n for (name in resolvers) {\n $.extend(true, rules, resolvers[name].resolve(element));\n }\n return rules;\n }\n\n function decode(value) {\n return value.replace(/&/g, '&')\n .replace(/"/g, '\"')\n .replace(/'/g, \"'\")\n .replace(/</g, '<')\n .replace(/>/g, '>');\n }\n\n function numberOfDecimalDigits(value) {\n value = (value + \"\").split('.');\n if (value.length > 1) {\n return value[1].length;\n }\n return 0;\n }\n\n function parseHtml(text) {\n if ($.parseHTML) {\n return $($.parseHTML(text));\n }\n return $(text);\n }\n\n function searchForMessageContainer(elements, fieldName) {\n var containers = $(),\n element,\n attr;\n\n for (var idx = 0, length = elements.length; idx < length; idx++) {\n element = elements[idx];\n if (invalidMsgRegExp.test(element.className)) {\n attr = element.getAttribute(kendo.attr(\"for\"));\n if (attr === fieldName) {\n containers = containers.add(element);\n }\n }\n }\n return containers;\n }\n\n function isLabelFor(label, element) {\n if (!label) {\n return false;\n }\n if (typeof label.nodeName !== 'string' || label.nodeName !== 'LABEL') {\n return false;\n }\n if (typeof label.getAttribute('for') !== 'string' || typeof element.getAttribute('id') !== 'string') {\n return false;\n }\n if (label.getAttribute('for') !== element.getAttribute('id')) {\n return false;\n }\n\n return true;\n }\n\n var SUMMARYTEMPLATE = ({ errors }) => {\n let result = '
      ';\n for (var i = 0; i < errors.length; i += 1) {\n result += `
    • ${errors[i].message}
    • `;\n }\n\n result += '
    ';\n return result;\n };\n\n var Validator = Widget.extend({\n init: function(element, options) {\n var that = this,\n resolved = resolveRules(element),\n validateAttributeSelector = \"[\" + kendo.attr(\"validate\") + \"!=false]\";\n\n options = options || {};\n\n options.rules = $.extend({}, kendo.ui.validator.rules, resolved.rules, options.rules);\n options.messages = $.extend({}, kendo.ui.validator.messages, resolved.messages, options.messages);\n\n Widget.fn.init.call(that, element, options);\n\n that._errorTemplate = kendo.template(that.options.errorTemplate);\n that._summaryTemplate = kendo.template(that.options.validationSummary.template || SUMMARYTEMPLATE);\n\n if (that.element.is(FORM)) {\n that.element.attr(NOVALIDATE, NOVALIDATE);\n }\n\n that._inputSelector = INPUTSELECTOR + validateAttributeSelector;\n that._checkboxSelector = CHECKBOXSELECTOR + validateAttributeSelector;\n\n that._errors = {};\n that._attachEvents();\n that._isValidated = false;\n\n if (that._validateOnInit()) {\n that.validate();\n }\n },\n\n events: [ VALIDATE, CHANGE, VALIDATE_INPUT ],\n\n options: {\n name: \"Validator\",\n errorTemplate: ({ message }) => `${message}`,\n messages: {\n required: \"{0} is required\",\n pattern: \"{0} is not valid\",\n min: \"{0} should be greater than or equal to {1}\",\n max: \"{0} should be smaller than or equal to {1}\",\n step: \"{0} is not valid\",\n email: \"{0} is not valid email\",\n url: \"{0} is not valid URL\",\n date: \"{0} is not valid date\",\n dateCompare: \"End date should be greater than or equal to the start date\",\n captcha: \"The text you entered doesn't match the image.\"\n },\n rules: {\n required: function(input) {\n var noNameCheckbox = !input.attr(\"name\") && !input.is(\":checked\"),\n name = input.attr(\"name\"),\n quote = !!name && name.indexOf(\"'\") > -1 ? '\\\"' : \"'\",\n namedCheckbox = input.attr(\"name\") && !this.element.find(\"input[name=\" + quote + input.attr(\"name\") + quote + \"]:checked\").length,\n checkbox = input.filter(\"[type=checkbox]\").length && (noNameCheckbox || namedCheckbox),\n radio = input.filter(\"[type=radio]\").length && !this.element.find(\"input[name=\" + quote + input.attr(\"name\") + quote + \"]:checked\").length,\n value = input.val();\n\n return !(hasAttribute(input, \"required\") && (!value || value === \"\" || value.length === 0 || checkbox || radio));\n },\n pattern: function(input) {\n if (input.filter(\"[type=text],[type=email],[type=url],[type=tel],[type=search],[type=password]\").filter(\"[pattern]\").length && input.val() !== \"\") {\n return patternMatcher(input.val(), input.attr(\"pattern\"));\n }\n return true;\n },\n min: function(input) {\n if (input.filter(NUMBERINPUTSELECTOR + \",[\" + kendo.attr(\"type\") + \"=number]\").filter(\"[min]\").length && input.val() !== \"\") {\n var min = parseFloat(input.attr(\"min\")) || 0,\n val = kendo.parseFloat(input.val());\n\n return min <= val;\n }\n return true;\n },\n max: function(input) {\n if (input.filter(NUMBERINPUTSELECTOR + \",[\" + kendo.attr(\"type\") + \"=number]\").filter(\"[max]\").length && input.val() !== \"\") {\n var max = parseFloat(input.attr(\"max\")) || 0,\n val = kendo.parseFloat(input.val());\n\n return max >= val;\n }\n return true;\n },\n step: function(input) {\n if (input.filter(NUMBERINPUTSELECTOR + \",[\" + kendo.attr(\"type\") + \"=number]\").filter(\"[step]\").length && input.val() !== \"\") {\n var min = parseFloat(input.attr(\"min\")) || 0,\n step = parseFloat(input.attr(\"step\")) || 1,\n val = parseFloat(input.val()),\n decimals = numberOfDecimalDigits(step),\n raise;\n\n if (decimals) {\n raise = Math.pow(10, decimals);\n return ((Math.floor((val - min) * raise)) % (step * raise)) / Math.pow(100, decimals) === 0;\n }\n return ((val - min) % step) === 0;\n }\n return true;\n },\n email: function(input) {\n return matcher(input, \"[type=email],[\" + kendo.attr(\"type\") + \"=email]\", emailRegExp);\n },\n url: function(input) {\n return matcher(input, \"[type=url],[\" + kendo.attr(\"type\") + \"=url]\", urlRegExp);\n },\n date: function(input) {\n if (input.filter(\"[type^=date],[\" + kendo.attr(\"type\") + \"=date]\").length && input.val() !== \"\") {\n return kendo.parseDate(input.val(), input.attr(kendo.attr(\"format\"))) !== null;\n }\n return true;\n },\n captcha: function(input) {\n if (input.filter(\"[\" + kendo.attr(\"role\") + \"=captcha]\").length) {\n var that = this,\n captcha = kendo.widgetInstance(input),\n isValidated = function(isValid) {\n return typeof(isValid) !== 'undefined' && isValid !== null;\n };\n\n if (!input.data(\"captcha_validating\") && !isValidated(captcha.isValid()) && !!captcha.getCaptchaId()) {\n input.data(\"captcha_validating\", true);\n that._validating = true;\n captcha.validate().done(function() {\n that._validating = false;\n that._checkElement(input);\n }).fail(function(data) {\n that._validating = false;\n if (data.error && data.error === \"handler_not_defined\") {\n window.console.warn(\"Captcha's validationHandler is not defined! You should either define a proper validation endpoint or declare a callback function to ensure the required behavior.\");\n }\n });\n }\n\n if (isValidated(captcha.isValid())) {\n input.removeData(\"captcha_validating\");\n return captcha.isValid();\n }\n }\n return true;\n }\n },\n validateOnBlur: true,\n validationSummary: false\n },\n\n _allowSubmit: function() {\n return kendo.ui.validator.allowSubmit(this.element, this.errors());\n },\n\n _validateOnInit: function() {\n return kendo.ui.validator.validateOnInit(this.element);\n },\n\n destroy: function() {\n Widget.fn.destroy.call(this);\n\n this.element.off(NS);\n\n if (this.validationSummary) {\n this.validationSummary.off(NS);\n this.validationSummary = null;\n }\n },\n\n value: function() {\n if (!this._isValidated) {\n return false;\n }\n\n return this.errors().length === 0;\n },\n\n _submit: function(e) {\n if ((!this.validate() && !this._allowSubmit()) || this._validating) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n e.preventDefault();\n return false;\n }\n return true;\n },\n\n _checkElement: function(element) {\n var state = this.value();\n\n this.validateInput(element);\n\n if (this.value() !== state) {\n this.trigger(CHANGE);\n }\n },\n\n _attachEvents: function() {\n var that = this;\n\n if (that.element.is(FORM)) {\n that.element.on(\"submit\" + NS, that._submit.bind(that));\n }\n\n if (that.options.validateOnBlur) {\n if (!that.element.is(INPUTSELECTOR)) {\n that.element.on(BLUR + NS, that._inputSelector, function() {\n that._checkElement($(this));\n });\n\n that.element.on(\"click\" + NS, that._checkboxSelector, function() {\n that._checkElement($(this));\n });\n } else {\n that.element.on(BLUR + NS, function() {\n that._checkElement(that.element);\n });\n\n if (that.element.is(CHECKBOXSELECTOR)) {\n that.element.on(\"click\" + NS, function() {\n that._checkElement(that.element);\n });\n }\n }\n }\n },\n\n validate: function() {\n var inputs;\n var idx;\n var result = false;\n var length;\n\n var isValid = this.value();\n\n this._errors = {};\n\n if (!this.element.is(INPUTSELECTOR)) {\n var invalid = false;\n\n inputs = this.element.find(this._inputSelector);\n\n for (idx = 0, length = inputs.length; idx < length; idx++) {\n if (!this.validateInput(inputs.eq(idx))) {\n invalid = true;\n }\n }\n\n result = !invalid;\n } else {\n result = this.validateInput(this.element);\n }\n\n if (this.options.validationSummary && !isValid) {\n this.showValidationSummary();\n }\n\n this.trigger(VALIDATE, { valid: result, errors: this.errors() });\n\n if (isValid !== result) {\n this.trigger(CHANGE);\n }\n\n return result;\n },\n\n validateInput: function(input) {\n input = $(input);\n\n\n this._isValidated = true;\n\n var that = this,\n template = that._errorTemplate,\n result = that._checkValidity(input),\n valid = result.valid,\n widgetInstance,\n className = \".\" + INVALIDMSG,\n fieldName = (input.attr(NAME) || \"\"),\n lbl = that._findMessageContainer(fieldName).add(input.next(className).filter(function() {\n var element = $(this);\n if (element.filter(\"[\" + kendo.attr(\"for\") + \"]\").length) {\n return element.attr(kendo.attr(\"for\")) === fieldName;\n }\n\n return true;\n\n })).addClass(\"k-hidden\"),\n messageText = !valid ? that._extractMessage(input, result.key) : \"\",\n messageLabel = !valid ? parseHtml(template({ message: decode(messageText), field: fieldName })) : \"\",\n wasValid = !input.attr(ARIAINVALID),\n isInputInner = input.is(INPUTINNER),\n inputWrapper = input.parent(INPUTWRAPPER);\n\n input.removeAttr(ARIAINVALID);\n\n if (input.hasClass(\"k-hidden\")) {\n widgetInstance = kendo.widgetInstance(input.closest(\".k-signature\"));\n }\n\n if (input.is(\"[type=radio]\")) {\n widgetInstance = kendo.widgetInstance(input.closest(\".k-radio-list\"));\n }\n\n if (input.is(\"[type=checkbox]\")) {\n widgetInstance = kendo.widgetInstance(input.closest(\".k-checkbox-list\"));\n }\n\n if (!valid && !input.data(\"captcha_validating\")) {\n that._errors[fieldName] = messageText;\n var lblId = lbl.attr('id');\n\n that._decorateMessageContainer(messageLabel, fieldName);\n\n\n if (lblId) {\n messageLabel.attr('id', lblId);\n }\n\n if (lbl.length !== 0) {\n lbl.replaceWith(messageLabel);\n } else {\n widgetInstance = widgetInstance || kendo.widgetInstance(input);\n var parentElement = input.parent().get(0);\n var nextElement = input.next().get(0);\n var prevElement = input.prev().get(0);\n\n // Get the instance of the RadioGroup which is not initialized on the input element\n if (!widgetInstance && input.is(\"[type=radio]\")) {\n widgetInstance = kendo.widgetInstance(input.closest(\".k-radio-list\"));\n }\n\n // Get the instance of the CheckBoxGroup which is not initialized on the input element\n if (!widgetInstance && input.is(\"[type=checkbox]\")) {\n widgetInstance = kendo.widgetInstance(input.closest(\".k-checkbox-list\"));\n }\n\n if (widgetInstance && widgetInstance.wrapper && (widgetInstance.element !== widgetInstance.wrapper || [\"Signature\", \"RadioGroup\", \"CheckBoxGroup\"].indexOf(widgetInstance.options.name) > -1)) {\n messageLabel.insertAfter(widgetInstance.wrapper);\n } else if (parentElement && parentElement.nodeName === \"LABEL\") {\n // Input inside label\n messageLabel.insertAfter(parentElement);\n } else if (nextElement && isLabelFor(nextElement, input[0])) {\n // Input before label\n messageLabel.insertAfter(nextElement);\n } else if (prevElement && isLabelFor(prevElement, input[0])) {\n // Input after label\n messageLabel.insertAfter(input);\n } else if (isInputInner && inputWrapper.length) {\n // Input after input wrapper\n messageLabel.insertAfter(inputWrapper);\n } else {\n messageLabel.insertAfter(input);\n }\n }\n\n messageLabel.removeClass(\"k-hidden\");\n\n input.attr(ARIAINVALID, true);\n } else {\n delete that._errors[fieldName];\n }\n\n if (wasValid !== valid) {\n this.trigger(VALIDATE_INPUT, { valid: valid, input: input, error: messageText, field: fieldName });\n }\n\n widgetInstance = (widgetInstance && widgetInstance.options.name == \"Signature\") ? widgetInstance : kendo.widgetInstance(input);\n if (!widgetInstance || !(widgetInstance._inputWrapper || widgetInstance.wrapper)) {\n input.toggleClass(INVALIDINPUT, !valid);\n input.toggleClass(VALIDINPUT, valid);\n }\n\n if (widgetInstance) {\n var inputWrap = widgetInstance._inputWrapper || widgetInstance.wrapper;\n var inputLabel = widgetInstance._inputLabel;\n\n if (inputWrap) {\n inputWrap.toggleClass(INVALIDINPUT, !valid);\n inputWrap.toggleClass(VALIDINPUT, valid);\n }\n if (inputLabel) {\n inputLabel.toggleClass(INVALIDLABEL, !valid);\n }\n }\n\n if (wasValid !== valid) {\n var errorId = messageLabel ? messageLabel.attr(\"id\") : lbl.attr(\"id\");\n\n that._associateMessageContainer(input, errorId);\n\n if (this.options.validationSummary && this.options.validateOnBlur) {\n this.showValidationSummary();\n }\n }\n\n return valid;\n },\n\n hideMessages: function() {\n var that = this,\n className = \".\" + INVALIDMSG,\n element = that.element;\n\n that._disassociateMessageContainers();\n\n if (!element.is(INPUTSELECTOR)) {\n element.find(className).addClass(\"k-hidden\");\n } else {\n element.next(className).addClass(\"k-hidden\");\n }\n },\n\n reset: function() {\n var that = this,\n inputs = that.element.find(\".\" + INVALIDINPUT),\n labels = that.element.find(\".\" + INVALIDLABEL);\n\n that._errors = [];\n\n that.hideMessages();\n\n that.hideValidationSummary();\n\n inputs.removeAttr(ARIAINVALID);\n inputs.removeClass(INVALIDINPUT);\n labels.removeClass(INVALIDLABEL);\n },\n\n _findMessageContainer: function(fieldName) {\n var locators = kendo.ui.validator.messageLocators,\n name,\n containers = $();\n\n for (var idx = 0, length = this.element.length; idx < length; idx++) {\n containers = containers.add(searchForMessageContainer(this.element[idx].getElementsByTagName(\"*\"), fieldName));\n }\n\n for (name in locators) {\n containers = containers.add(locators[name].locate(this.element, fieldName));\n }\n\n return containers;\n },\n\n _decorateMessageContainer: function(container, fieldName) {\n var locators = kendo.ui.validator.messageLocators,\n name;\n\n container.addClass(INVALIDMSG)\n .attr(kendo.attr(\"for\"), fieldName || \"\");\n\n if (!container.attr(\"id\")) {\n container.attr(\"id\", fieldName + \"-error\");\n }\n\n for (name in locators) {\n locators[name].decorate(container, fieldName);\n }\n },\n\n _extractMessage: function(input, ruleKey) {\n var that = this,\n customMessage = that.options.messages[ruleKey],\n fieldName = input.attr(NAME),\n nonDefaultMessage;\n\n if (!kendo.ui.Validator.prototype.options.messages[ruleKey]) {\n nonDefaultMessage = kendo.isFunction(customMessage) ? customMessage(input) : customMessage;\n }\n\n customMessage = kendo.isFunction(customMessage) ? customMessage(input) : customMessage;\n\n return kendo.format(input.attr(kendo.attr(ruleKey + \"-msg\")) || input.attr(\"validationMessage\") || nonDefaultMessage || customMessage || input.attr(\"title\") || \"\",\n fieldName,\n input.attr(ruleKey) || input.attr(kendo.attr(ruleKey)));\n },\n\n _checkValidity: function(input) {\n var rules = this.options.rules,\n rule;\n\n for (rule in rules) {\n if (!rules[rule].call(this, input)) {\n return { valid: false, key: rule };\n }\n }\n\n return { valid: true };\n },\n\n errors: function() {\n var results = [],\n errors = this._errors,\n error;\n\n for (error in errors) {\n results.push(errors[error]);\n }\n return results;\n },\n\n setOptions: function(options) {\n if (options.validationSummary) {\n this.hideValidationSummary();\n }\n\n kendo.deepExtend(this.options, options);\n\n this.destroy();\n\n this.init(this.element, this.options);\n\n this._setEvents(this.options);\n },\n\n _getInputNames: function() {\n var that = this,\n inputs = that.element.find(that._inputSelector),\n sorted = [];\n\n for (var idx = 0, length = inputs.length; idx < length; idx++) {\n var input = $(inputs[idx]);\n\n if (hasAttribute(input, NAME)) {\n // Add current name if:\n // - not present so far;\n // - present but not part of CheckBoxGroup or RadioGroup.\n if (sorted.indexOf(input.attr(NAME)) === -1 ||\n (input.closest(\".k-checkbox-list\").length === 0 &&\n input.closest(\".k-radio-list\").length === 0)) {\n sorted.push(input.attr(NAME));\n }\n }\n }\n\n return sorted;\n },\n\n _associateMessageContainer: function(input, errorId) {\n var nextFocusable = kendo.getWidgetFocusableElement(input);\n\n if (!nextFocusable || !errorId) {\n return;\n }\n\n kendo.toggleAttribute(nextFocusable, ARIADESCRIBEDBY, errorId);\n },\n\n _disassociateMessageContainers: function() {\n var that = this,\n inputs = that.element.find(\".\" + INVALIDINPUT).addBack(),\n input, errorId;\n\n for (var i = 0; i < inputs.length; i += 1) {\n input = $(inputs[i]);\n\n if (input.is(\"input\")) {\n errorId = that._findMessageContainer(input.attr(NAME))\n .add(input.next(\".\" + INVALIDMSG))\n .attr(\"id\");\n\n that._associateMessageContainer(input, errorId);\n }\n }\n },\n\n _errorsByName: function() {\n var that = this,\n inputNames = that._getInputNames(),\n sorted = [];\n\n for (var i = 0; i < inputNames.length; i += 1) {\n var name = inputNames[i];\n\n if (that._errors[name]) {\n sorted.push({\n field: name,\n message: that._errors[name]\n });\n }\n }\n\n return sorted;\n },\n\n _renderSummary: function() {\n var that = this,\n options = this.options.validationSummary,\n element = this.element,\n prevElement = element.prev(),\n container;\n\n if (options.container) {\n container = $(options.container);\n } else if (prevElement && prevElement.hasClass(VALIDATIONSUMMARY)) {\n container = prevElement;\n } else {\n container = $(\"
    \").insertBefore(that.element);\n }\n\n container.addClass([VALIDATIONSUMMARY, MESSAGEBOX].join(\" \"));\n container.attr(\"role\", \"alert\");\n\n container.on(\"click\" + NS, that._summaryClick.bind(that));\n\n return container;\n },\n\n _summaryClick: function(e) {\n e.preventDefault();\n\n var that = this,\n link = $(e.target),\n target = that.element.find(\"[name='\" + link.data(\"field\") + \"']\"),\n nextFocusable;\n\n if (!target.length) {\n return;\n }\n\n nextFocusable = kendo.getWidgetFocusableElement(target);\n\n if (nextFocusable) {\n nextFocusable.trigger(\"focus\");\n }\n },\n\n showValidationSummary: function() {\n var that = this,\n summary = that.validationSummary,\n errors = that._errorsByName(),\n errorsList;\n\n if (!summary) {\n summary = that.validationSummary = that._renderSummary();\n }\n\n errorsList = parseHtml(that._summaryTemplate({\n errors: errors\n }));\n\n summary.html(errorsList);\n\n summary.toggleClass(\"k-hidden\", !errors.length);\n },\n\n hideValidationSummary: function() {\n var that = this,\n summary = that.validationSummary;\n\n if (!summary) {\n return;\n }\n\n summary.addClass(\"k-hidden\");\n }\n });\n\n kendo.ui.plugin(Validator);\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.core.js';\n\nvar __meta__ = {\n id: \"userevents\",\n name: \"User Events\",\n category: \"framework\",\n depends: [ \"core\" ],\n hidden: true\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n support = kendo.support,\n Class = kendo.Class,\n Observable = kendo.Observable,\n now = Date.now,\n extend = $.extend,\n OS = support.mobileOS,\n invalidZeroEvents = OS && OS.android,\n DEFAULT_MIN_HOLD = 800,\n CLICK_DELAY = 300,\n DEFAULT_THRESHOLD = support.browser.msie ? 5 : 0, // WP8 and W8 are very sensitive and always report move.\n\n // UserEvents events\n PRESS = \"press\",\n HOLD = \"hold\",\n SELECT = \"select\",\n START = \"start\",\n MOVE = \"move\",\n END = \"end\",\n CANCEL = \"cancel\",\n TAP = \"tap\",\n DOUBLETAP = \"doubleTap\",\n RELEASE = \"release\",\n GESTURESTART = \"gesturestart\",\n GESTURECHANGE = \"gesturechange\",\n GESTUREEND = \"gestureend\",\n GESTURETAP = \"gesturetap\";\n\n var THRESHOLD = {\n \"api\": 0,\n \"touch\": 0,\n \"mouse\": 9,\n \"pointer\": 9\n };\n\n var ENABLE_GLOBAL_SURFACE = (!support.touch || support.mouseAndTouchPresent);\n\n function touchDelta(touch1, touch2) {\n var x1 = touch1.x.location,\n y1 = touch1.y.location,\n x2 = touch2.x.location,\n y2 = touch2.y.location,\n dx = x1 - x2,\n dy = y1 - y2;\n\n return {\n center: {\n x: (x1 + x2) / 2,\n y: (y1 + y2) / 2\n },\n\n distance: Math.sqrt(dx * dx + dy * dy)\n };\n }\n\n function getTouches(e) {\n var touches = [],\n originalEvent = e.originalEvent,\n currentTarget = e.currentTarget,\n idx = 0, length,\n changedTouches,\n touch;\n\n if (e.api) {\n touches.push({\n id: 2, // hardcoded ID for API call;\n event: e,\n target: e.target,\n currentTarget: e.target,\n location: e,\n type: \"api\"\n });\n }\n else if (e.type.match(/touch/)) {\n changedTouches = originalEvent ? originalEvent.changedTouches : [];\n for (length = changedTouches.length; idx < length; idx ++) {\n touch = changedTouches[idx];\n touches.push({\n location: touch,\n event: e,\n target: touch.target,\n currentTarget: currentTarget,\n id: touch.identifier,\n type: \"touch\"\n });\n }\n }\n else if (support.pointers || support.msPointers) {\n touches.push({\n location: originalEvent,\n event: e,\n target: e.target,\n currentTarget: currentTarget,\n id: originalEvent.pointerId,\n type: \"pointer\"\n });\n } else {\n touches.push({\n id: 1, // hardcoded ID for mouse event;\n event: e,\n target: e.target,\n currentTarget: currentTarget,\n location: e,\n type: \"mouse\"\n });\n }\n\n return touches;\n }\n\n var TouchAxis = Class.extend({\n init: function(axis, location) {\n var that = this;\n\n that.axis = axis;\n\n that._updateLocationData(location);\n\n that.startLocation = that.location;\n that.velocity = that.delta = 0;\n that.timeStamp = now();\n },\n\n move: function(location) {\n var that = this,\n offset = location[\"page\" + that.axis],\n timeStamp = now(),\n timeDelta = (timeStamp - that.timeStamp) || 1; // Firing manually events in tests can make this 0;\n\n if (!offset && invalidZeroEvents) {\n return;\n }\n\n that.delta = offset - that.location;\n\n that._updateLocationData(location);\n\n that.initialDelta = offset - that.startLocation;\n that.velocity = that.delta / timeDelta;\n that.timeStamp = timeStamp;\n },\n\n _updateLocationData: function(location) {\n var that = this, axis = that.axis;\n\n that.location = location[\"page\" + axis];\n that.client = location[\"client\" + axis];\n that.screen = location[\"screen\" + axis];\n }\n });\n\n var Touch = Class.extend({\n init: function(userEvents, target, touchInfo) {\n extend(this, {\n x: new TouchAxis(\"X\", touchInfo.location),\n y: new TouchAxis(\"Y\", touchInfo.location),\n type: touchInfo.type,\n useClickAsTap: userEvents.useClickAsTap,\n threshold: userEvents.threshold || THRESHOLD[touchInfo.type],\n userEvents: userEvents,\n target: target,\n currentTarget: touchInfo.currentTarget,\n initialTouch: touchInfo.target,\n id: touchInfo.id,\n pressEvent: touchInfo,\n _clicks: userEvents._clicks,\n supportDoubleTap: userEvents.supportDoubleTap,\n _moved: false,\n _finished: false\n });\n },\n\n press: function() {\n this._holdTimeout = setTimeout(this._hold.bind(this), this.userEvents.minHold);\n this._trigger(PRESS, this.pressEvent);\n },\n\n _tap: function(touchInfo) {\n var that = this;\n that.userEvents._clicks++;\n if (that.userEvents._clicks == 1) {\n that._clickTimeout = setTimeout(function() {\n if (that.userEvents._clicks == 1) {\n that._trigger(TAP, touchInfo);\n }\n else {\n that._trigger(DOUBLETAP, touchInfo);\n }\n that.userEvents._clicks = 0;\n }, CLICK_DELAY);\n }\n },\n\n _hold: function() {\n this._trigger(HOLD, this.pressEvent);\n },\n\n move: function(touchInfo) {\n var that = this;\n var preventMove = touchInfo.type !== \"api\" && that.userEvents._shouldNotMove;\n\n if (that._finished || preventMove) { return; }\n\n that.x.move(touchInfo.location);\n that.y.move(touchInfo.location);\n\n if (!that._moved) {\n if (that._withinIgnoreThreshold()) {\n return;\n }\n\n if (!UserEvents.current || UserEvents.current === that.userEvents) {\n that._start(touchInfo);\n } else {\n return that.dispose();\n }\n }\n\n // Event handlers may cancel the drag in the START event handler, hence the double check for pressed.\n if (!that._finished) {\n that._trigger(MOVE, touchInfo);\n }\n },\n\n end: function(touchInfo) {\n this.endTime = now();\n\n if (this._finished) { return; }\n\n // Mark the object as finished if there are blocking operations in the event handlers (alert/confirm)\n this._finished = true;\n\n this._trigger(RELEASE, touchInfo); // Release should be fired before TAP (as click is after mouseup/touchend)\n\n if (this._moved) {\n this._trigger(END, touchInfo);\n } else {\n if (!this.useClickAsTap) {\n if (this.supportDoubleTap) {\n this._tap(touchInfo);\n }\n else {\n this._trigger(TAP, touchInfo);\n }\n }\n }\n\n clearTimeout(this._holdTimeout);\n\n this.dispose();\n },\n\n dispose: function() {\n var userEvents = this.userEvents,\n activeTouches = userEvents.touches;\n\n this._finished = true;\n this.pressEvent = null;\n clearTimeout(this._holdTimeout);\n\n activeTouches.splice($.inArray(this, activeTouches), 1);\n },\n\n skip: function() {\n this.dispose();\n },\n\n cancel: function() {\n this.dispose();\n },\n\n isMoved: function() {\n return this._moved;\n },\n\n _start: function(touchInfo) {\n clearTimeout(this._holdTimeout);\n\n this.startTime = now();\n this._moved = true;\n this._trigger(START, touchInfo);\n },\n\n _trigger: function(name, touchInfo) {\n var that = this,\n jQueryEvent = touchInfo.event,\n data = {\n touch: that,\n x: that.x,\n y: that.y,\n target: that.target,\n event: jQueryEvent\n };\n\n if (that.userEvents.notify(name, data)) {\n jQueryEvent.preventDefault();\n }\n },\n\n _withinIgnoreThreshold: function() {\n var xDelta = this.x.initialDelta,\n yDelta = this.y.initialDelta;\n\n return Math.sqrt(xDelta * xDelta + yDelta * yDelta) <= this.threshold;\n }\n });\n\n function withEachUpEvent(callback) {\n var downEvents = kendo.eventMap.up.split(\" \"),\n idx = 0,\n length = downEvents.length;\n\n for (; idx < length; idx ++) {\n callback(downEvents[idx]);\n }\n }\n\n var UserEvents = Observable.extend({\n init: function(element, options) {\n var that = this,\n filter,\n ns = kendo.guid();\n\n options = options || {};\n filter = that.filter = options.filter;\n that.threshold = options.threshold || DEFAULT_THRESHOLD;\n that.minHold = options.minHold || DEFAULT_MIN_HOLD;\n that.touches = [];\n that._maxTouches = options.multiTouch ? 2 : 1;\n that.allowSelection = options.allowSelection;\n that.captureUpIfMoved = options.captureUpIfMoved;\n that.useClickAsTap = !options.fastTap && !support.delayedClick();\n that.eventNS = ns;\n that._clicks = 0;\n that.supportDoubleTap = options.supportDoubleTap;\n\n element = $(element).handler(that);\n Observable.fn.init.call(that);\n\n extend(that, {\n element: element,\n // the touch events lock to the element anyway, so no need for the global setting\n surface: options.global && ENABLE_GLOBAL_SURFACE ? $(element[0].ownerDocument.documentElement) : $(options.surface || element),\n stopPropagation: options.stopPropagation,\n pressed: false\n });\n\n that.surface.handler(that)\n .on(kendo.applyEventMap(\"move\", ns), \"_move\")\n .on(kendo.applyEventMap(\"up cancel\", ns), \"_end\");\n\n element.on(kendo.applyEventMap(\"down\", ns), filter, \"_start\");\n\n if (that.useClickAsTap) {\n element.on(kendo.applyEventMap(\"click\", ns), filter, \"_click\");\n }\n\n if (support.pointers || support.msPointers) {\n //touch-action:none will not work for IE10\n if (support.browser.version < 11) {\n var defaultAction = \"pinch-zoom double-tap-zoom\";\n element.css(\"-ms-touch-action\", options.touchAction && options.touchAction != \"none\" ? defaultAction + \" \" + options.touchAction : defaultAction);\n } else {\n element.css(\"touch-action\", options.touchAction || \"none\");\n }\n }\n\n if (options.preventDragEvent) {\n element.on(kendo.applyEventMap(\"dragstart\", ns), kendo.preventDefault);\n }\n\n element.on(kendo.applyEventMap(\"mousedown\", ns), filter, { root: element }, \"_select\");\n\n if (that.captureUpIfMoved && support.eventCapture) {\n var surfaceElement = that.surface[0],\n preventIfMovingProxy = that.preventIfMoving.bind(that);\n\n withEachUpEvent(function(eventName) {\n surfaceElement.addEventListener(eventName, preventIfMovingProxy, true);\n });\n }\n\n that.bind([\n PRESS,\n HOLD,\n TAP,\n DOUBLETAP,\n START,\n MOVE,\n END,\n RELEASE,\n CANCEL,\n GESTURESTART,\n GESTURECHANGE,\n GESTUREEND,\n GESTURETAP,\n SELECT\n ], options);\n },\n\n preventIfMoving: function(e) {\n if (this._isMoved()) {\n e.preventDefault();\n }\n },\n\n destroy: function() {\n var that = this;\n\n if (that._destroyed) {\n return;\n }\n\n that._destroyed = true;\n\n if (that.captureUpIfMoved && support.eventCapture) {\n var surfaceElement = that.surface[0];\n withEachUpEvent(function(eventName) {\n surfaceElement.removeEventListener(eventName, that.preventIfMoving);\n });\n }\n\n that.element.kendoDestroy(that.eventNS);\n that.surface.kendoDestroy(that.eventNS);\n that.element.removeData(\"handler\");\n that.surface.removeData(\"handler\");\n that._disposeAll();\n\n that.unbind();\n delete that.surface;\n delete that.element;\n delete that.currentTarget;\n },\n\n capture: function() {\n UserEvents.current = this;\n },\n\n cancel: function() {\n this._disposeAll();\n this.trigger(CANCEL);\n },\n\n notify: function(eventName, data) {\n var that = this,\n touches = that.touches;\n\n if (this._isMultiTouch()) {\n switch (eventName) {\n case MOVE:\n eventName = GESTURECHANGE;\n break;\n case END:\n eventName = GESTUREEND;\n break;\n case TAP:\n eventName = GESTURETAP;\n break;\n }\n\n extend(data, { touches: touches }, touchDelta(touches[0], touches[1]));\n }\n\n return this.trigger(eventName, extend(data, { type: eventName }));\n },\n\n // API\n press: function(x, y, target) {\n this._apiCall(\"_start\", x, y, target);\n },\n\n move: function(x, y) {\n this._apiCall(\"_move\", x, y);\n },\n\n end: function(x, y) {\n this._apiCall(\"_end\", x, y);\n },\n\n _isMultiTouch: function() {\n return this.touches.length > 1;\n },\n\n _maxTouchesReached: function() {\n return this.touches.length >= this._maxTouches;\n },\n\n _disposeAll: function() {\n var touches = this.touches;\n while (touches.length > 0) {\n touches.pop().dispose();\n }\n },\n\n _isMoved: function() {\n return $.grep(this.touches, function(touch) {\n return touch.isMoved();\n }).length;\n },\n\n _select: function(e) {\n if (!this.allowSelection || this.trigger(SELECT, { event: e })) {\n e.preventDefault();\n }\n },\n\n _start: function(e) {\n var that = this,\n idx = 0,\n filter = that.filter,\n target,\n touches = getTouches(e),\n length = touches.length,\n touch,\n which = e.which;\n\n if ((which && which > 1) || (that._maxTouchesReached())) {\n return;\n }\n\n UserEvents.current = null;\n\n that.currentTarget = e.currentTarget;\n\n if (that.stopPropagation) {\n e.stopPropagation();\n }\n\n for (; idx < length; idx ++) {\n if (that._maxTouchesReached()) {\n break;\n }\n\n touch = touches[idx];\n\n if (filter) {\n target = $(touch.currentTarget); // target.is(filter) ? target : target.closest(filter, that.element);\n } else {\n target = that.element;\n }\n\n if (!target.length) {\n continue;\n }\n\n touch = new Touch(that, target, touch);\n that.touches.push(touch);\n touch.press();\n\n if (that._isMultiTouch()) {\n that.notify(\"gesturestart\", {});\n }\n }\n },\n\n _move: function(e) {\n this._eachTouch(\"move\", e);\n },\n\n _end: function(e) {\n this._eachTouch(\"end\", e);\n },\n\n _click: function(e) {\n var data = {\n touch: {\n initialTouch: e.target,\n target: $(e.currentTarget),\n endTime: now(),\n x: {\n location: e.pageX,\n client: e.clientX\n },\n y: {\n location: e.pageY,\n client: e.clientY\n }\n },\n x: e.pageX,\n y: e.pageY,\n target: $(e.currentTarget),\n event: e,\n type: \"tap\"\n };\n\n if (this.trigger(\"tap\", data)) {\n e.preventDefault();\n }\n },\n\n _eachTouch: function(methodName, e) {\n var that = this,\n dict = {},\n touches = getTouches(e),\n activeTouches = that.touches,\n idx,\n touch,\n touchInfo,\n matchingTouch;\n\n for (idx = 0; idx < activeTouches.length; idx ++) {\n touch = activeTouches[idx];\n dict[touch.id] = touch;\n }\n\n for (idx = 0; idx < touches.length; idx ++) {\n touchInfo = touches[idx];\n matchingTouch = dict[touchInfo.id];\n\n if (matchingTouch) {\n matchingTouch[methodName](touchInfo);\n }\n }\n },\n\n _apiCall: function(type, x, y, target) {\n this[type]({\n api: true,\n pageX: x,\n pageY: y,\n clientX: x,\n clientY: y,\n target: $(target || this.element)[0],\n stopPropagation: $.noop,\n preventDefault: $.noop\n });\n }\n });\n\n var ClickMoveClick = Observable.extend({\n init: function(element, options) {\n var that = this,\n filter,\n ns = kendo.guid();\n\n options = options || {};\n filter = that.filter = options.filter;\n that.touches = [];\n that._maxTouches = 1;\n that.eventNS = ns;\n that._downStarted = 0;\n\n element = $(element).handler(that);\n Observable.fn.init.call(that);\n\n extend(that, {\n element: element,\n // the touch events lock to the element anyway, so no need for the global setting\n surface: options.global && ENABLE_GLOBAL_SURFACE ? $(element[0].ownerDocument.documentElement) : $(options.surface || element),\n stopPropagation: options.stopPropagation,\n pressed: false\n });\n\n that.surface.handler(that)\n .on(kendo.applyEventMap(\"move\", ns), \"_move\")\n .on(kendo.applyEventMap(\"cancel up\", ns), \"cancel\");\n\n element.on(kendo.applyEventMap(\"down\", ns), filter, \"_down\")\n .on(kendo.applyEventMap(\"up\", ns), filter, \"_up\");\n\n that.bind([\n START,\n MOVE,\n END,\n HOLD,\n CANCEL,\n SELECT\n ], options);\n },\n\n _down: function(e) {\n if (e.which && e.which > 1) {\n this.cancel();\n } else {\n this._downStarted = new Date().getTime();\n this._downTarget = e.target;\n }\n },\n\n _up: function(e) {\n var currentMilestone = new Date().getTime(),\n currentTarget = e.target;\n\n if ((!e.which || e.which === 1) &&\n currentMilestone < this._downStarted + CLICK_DELAY &&\n currentTarget === this._downTarget) {\n if (this.touches && this.touches.length > 0) {\n this._end(e);\n } else {\n this._start(e);\n }\n\n this._preventCancel = true;\n } else {\n this.cancel();\n }\n\n this._downStarted = 0;\n this._downTarget = null;\n },\n\n destroy: function() {\n var that = this;\n\n if (that._destroyed) {\n return;\n }\n\n that._destroyed = true;\n\n that.element.kendoDestroy(that.eventNS);\n that.surface.kendoDestroy(that.eventNS);\n that.element.removeData(\"handler\");\n that.surface.removeData(\"handler\");\n that._disposeAll();\n\n that.unbind();\n delete that.surface;\n delete that.element;\n delete that.currentTarget;\n },\n\n capture: function() {\n ClickMoveClick.current = this;\n },\n\n cancel: function() {\n if (this._preventCancel) {\n this._preventCancel = false;\n return;\n } else if (this.touches && this.touches.length > 0) {\n this._disposeAll();\n this.trigger(CANCEL);\n }\n },\n\n notify: function(eventName, data) {\n data.clickMoveClick = true;\n return this.trigger(eventName, extend(data, { type: eventName }));\n },\n\n _maxTouchesReached: function() {\n return this.touches.length >= this._maxTouches;\n },\n\n _disposeAll: function() {\n var touches = this.touches;\n\n while (touches.length > 0) {\n touches.pop().dispose();\n }\n },\n\n _start: function(e) {\n var that = this,\n idx = 0,\n filter = that.filter,\n target,\n touches = getTouches(e),\n length = touches.length,\n touch,\n which = e.which;\n\n if ((which && which > 1) || (that._maxTouchesReached())) {\n return;\n }\n\n ClickMoveClick.current = null;\n\n that.currentTarget = e.currentTarget;\n\n if (that.stopPropagation) {\n e.stopPropagation();\n }\n\n for (; idx < length; idx ++) {\n if (that._maxTouchesReached()) {\n break;\n }\n\n touch = touches[idx];\n\n if (filter) {\n target = $(touch.currentTarget);\n } else {\n target = that.element;\n }\n\n if (!target.length) {\n continue;\n }\n\n touch = new Touch(that, target, touch);\n that.touches.push(touch);\n touch.press();\n touch._start(touch);\n }\n },\n\n _move: function(e) {\n this._eachTouch(\"move\", e);\n },\n\n _end: function(e) {\n this._eachTouch(\"move\", e);\n this._eachTouch(\"end\", e);\n },\n\n _eachTouch: function(methodName, e) {\n var that = this,\n dict = {},\n touches = getTouches(e),\n activeTouches = that.touches,\n idx,\n touch,\n touchInfo,\n matchingTouch;\n\n for (idx = 0; idx < activeTouches.length; idx ++) {\n touch = activeTouches[idx];\n dict[touch.id] = touch;\n }\n\n for (idx = 0; idx < touches.length; idx ++) {\n touchInfo = touches[idx];\n matchingTouch = dict[touchInfo.id];\n\n if (matchingTouch) {\n matchingTouch.x.move(touchInfo.location);\n matchingTouch.y.move(touchInfo.location);\n matchingTouch[methodName](touchInfo);\n }\n }\n }\n });\n\n UserEvents.defaultThreshold = function(value) {\n DEFAULT_THRESHOLD = value;\n };\n\n UserEvents.minHold = function(value) {\n DEFAULT_MIN_HOLD = value;\n };\n\n kendo.getTouches = getTouches;\n kendo.touchDelta = touchDelta;\n kendo.UserEvents = UserEvents;\n kendo.ClickMoveClick = ClickMoveClick;\n })(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.core.js';\nimport './kendo.userevents.js';\n\nvar __meta__ = {\n id: \"draganddrop\",\n name: \"Drag & drop\",\n category: \"framework\",\n description: \"Drag & drop functionality for any DOM element.\",\n depends: [ \"core\", \"userevents\" ]\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n support = kendo.support,\n document = window.document,\n $window = $(window),\n Class = kendo.Class,\n Widget = kendo.ui.Widget,\n Observable = kendo.Observable,\n UserEvents = kendo.UserEvents,\n ClickMoveClick = kendo.ClickMoveClick,\n extend = $.extend,\n getOffset = kendo.getOffset,\n draggables = {},\n dropTargets = {},\n dropAreas = {},\n lastDropTarget,\n elementUnderCursor = kendo.elementUnderCursor,\n KEYUP = \"keyup\",\n CHANGE = \"change\",\n\n // Draggable events\n DRAGSTART = \"dragstart\",\n HOLD = \"hold\",\n DRAG = \"drag\",\n DRAGEND = \"dragend\",\n DRAGCANCEL = \"dragcancel\",\n HINTDESTROYED = \"hintDestroyed\",\n\n // DropTarget events\n DRAGENTER = \"dragenter\",\n DRAGLEAVE = \"dragleave\",\n DROP = \"drop\";\n\n function contains(parent, child) {\n try {\n return $.contains(parent, child) || parent == child;\n } catch (e) {\n return false;\n }\n }\n\n function numericCssPropery(element, property) {\n return parseInt(element.css(property), 10) || 0;\n }\n\n function within(value, range) {\n return Math.min(Math.max(value, range.min), range.max);\n }\n\n function containerBoundaries(container, element) {\n var offset = getOffset(container),\n outerWidth = kendo._outerWidth,\n outerHeight = kendo._outerHeight,\n minX = offset.left + numericCssPropery(container, \"borderLeftWidth\") + numericCssPropery(container, \"paddingLeft\"),\n minY = offset.top + numericCssPropery(container, \"borderTopWidth\") + numericCssPropery(container, \"paddingTop\"),\n maxX = minX + container.width() - outerWidth(element, true),\n maxY = minY + container.height() - outerHeight(element, true);\n\n return {\n x: { min: minX, max: maxX },\n y: { min: minY, max: maxY }\n };\n }\n\n function checkTarget(target, targets, areas) {\n var theTarget, theFilter, i = 0,\n targetLen = targets && targets.length,\n areaLen = areas && areas.length;\n\n while (target && target.parentNode) {\n for (i = 0; i < targetLen; i ++) {\n theTarget = targets[i];\n if (theTarget.element[0] === target) {\n return { target: theTarget, targetElement: target };\n }\n }\n\n for (i = 0; i < areaLen; i ++) {\n theFilter = areas[i];\n if ($.contains(theFilter.element[0], target) && support.matchesSelector.call(target, theFilter.options.filter)) {\n return { target: theFilter, targetElement: target };\n }\n }\n\n target = target.parentNode;\n }\n\n return undefined$1;\n }\n\n var TapCapture = Observable.extend({\n init: function(element, options) {\n var that = this,\n domElement = element[0];\n\n that.capture = false;\n\n if (domElement.addEventListener) {\n $.each(kendo.eventMap.down.split(\" \"), function() {\n domElement.addEventListener(this, that._press.bind(that), true);\n });\n $.each(kendo.eventMap.up.split(\" \"), function() {\n domElement.addEventListener(this, that._release.bind(that), true);\n });\n } else {\n $.each(kendo.eventMap.down.split(\" \"), function() {\n domElement.attachEvent(this, that._press.bind(that));\n });\n $.each(kendo.eventMap.up.split(\" \"), function() {\n domElement.attachEvent(this, that._release.bind(that));\n });\n }\n\n Observable.fn.init.call(that);\n\n that.bind([\"press\", \"release\"], options || {});\n },\n\n captureNext: function() {\n this.capture = true;\n },\n\n cancelCapture: function() {\n this.capture = false;\n },\n\n _press: function(e) {\n var that = this;\n that.trigger(\"press\");\n if (that.capture) {\n e.preventDefault();\n }\n },\n\n _release: function(e) {\n var that = this;\n that.trigger(\"release\");\n\n if (that.capture) {\n e.preventDefault();\n that.cancelCapture();\n }\n }\n });\n\n var PaneDimension = Observable.extend({\n init: function(options) {\n var that = this;\n Observable.fn.init.call(that);\n\n that.forcedEnabled = false;\n\n $.extend(that, options);\n\n that.scale = 1;\n\n if (that.horizontal) {\n that.measure = \"offsetWidth\";\n that.scrollSize = \"scrollWidth\";\n that.axis = \"x\";\n } else {\n that.measure = \"offsetHeight\";\n that.scrollSize = \"scrollHeight\";\n that.axis = \"y\";\n }\n },\n\n makeVirtual: function() {\n $.extend(this, {\n virtual: true,\n forcedEnabled: true,\n _virtualMin: 0,\n _virtualMax: 0\n });\n },\n\n virtualSize: function(min, max) {\n if (this._virtualMin !== min || this._virtualMax !== max) {\n this._virtualMin = min;\n this._virtualMax = max;\n this.update();\n }\n },\n\n outOfBounds: function(offset) {\n return offset > this.max || offset < this.min;\n },\n\n forceEnabled: function() {\n this.forcedEnabled = true;\n },\n\n getSize: function() {\n return this.container[0][this.measure];\n },\n\n getTotal: function() {\n return this.element[0][this.scrollSize];\n },\n\n rescale: function(scale) {\n this.scale = scale;\n },\n\n update: function(silent) {\n var that = this,\n total = that.virtual ? that._virtualMax : that.getTotal(),\n scaledTotal = total * that.scale,\n size = that.getSize();\n\n if (total === 0 && !that.forcedEnabled) {\n return; // we are not visible.\n }\n\n that.max = that.virtual ? -that._virtualMin : 0;\n that.size = size;\n that.total = scaledTotal;\n that.min = Math.min(that.max, size - scaledTotal);\n that.minScale = size / total;\n that.centerOffset = (scaledTotal - size) / 2;\n\n that.enabled = that.forcedEnabled || (scaledTotal > size);\n\n if (!silent) {\n that.trigger(CHANGE, that);\n }\n }\n });\n\n var PaneDimensions = Observable.extend({\n init: function(options) {\n var that = this;\n\n Observable.fn.init.call(that);\n\n that.x = new PaneDimension(extend({ horizontal: true }, options));\n that.y = new PaneDimension(extend({ horizontal: false }, options));\n that.container = options.container;\n that.forcedMinScale = options.minScale;\n that.maxScale = options.maxScale || 100;\n\n that.bind(CHANGE, options);\n },\n\n rescale: function(newScale) {\n this.x.rescale(newScale);\n this.y.rescale(newScale);\n this.refresh();\n },\n\n centerCoordinates: function() {\n return { x: Math.min(0, -this.x.centerOffset), y: Math.min(0, -this.y.centerOffset) };\n },\n\n refresh: function() {\n var that = this;\n that.x.update();\n that.y.update();\n that.enabled = that.x.enabled || that.y.enabled;\n that.minScale = that.forcedMinScale || Math.min(that.x.minScale, that.y.minScale);\n that.fitScale = Math.max(that.x.minScale, that.y.minScale);\n that.trigger(CHANGE);\n }\n });\n\n var PaneAxis = Observable.extend({\n init: function(options) {\n var that = this;\n extend(that, options);\n Observable.fn.init.call(that);\n },\n\n outOfBounds: function() {\n return this.dimension.outOfBounds(this.movable[this.axis]);\n },\n\n dragMove: function(delta) {\n var that = this,\n dimension = that.dimension,\n axis = that.axis,\n movable = that.movable,\n position = movable[axis] + delta;\n\n if (!dimension.enabled) {\n return;\n }\n\n if ((position < dimension.min && delta < 0) || (position > dimension.max && delta > 0)) {\n delta *= that.resistance;\n }\n\n movable.translateAxis(axis, delta);\n that.trigger(CHANGE, that);\n }\n });\n\n var Pane = Class.extend({\n\n init: function(options) {\n var that = this,\n x,\n y,\n resistance,\n movable;\n\n extend(that, { elastic: true }, options);\n\n resistance = that.elastic ? 0.5 : 0;\n movable = that.movable;\n\n that.x = x = new PaneAxis({\n axis: \"x\",\n dimension: that.dimensions.x,\n resistance: resistance,\n movable: movable\n });\n\n that.y = y = new PaneAxis({\n axis: \"y\",\n dimension: that.dimensions.y,\n resistance: resistance,\n movable: movable\n });\n\n that.userEvents.bind([\"press\", \"move\", \"end\", \"gesturestart\", \"gesturechange\"], {\n gesturestart: function(e) {\n that.gesture = e;\n that.offset = that.dimensions.container.offset();\n },\n\n press: function(e) {\n if ($(e.event.target).closest(\"a\").is(\"[data-navigate-on-press=true]\")) {\n e.sender.cancel();\n }\n },\n\n gesturechange: function(e) {\n var previousGesture = that.gesture,\n previousCenter = previousGesture.center,\n\n center = e.center,\n\n scaleDelta = e.distance / previousGesture.distance,\n\n minScale = that.dimensions.minScale,\n maxScale = that.dimensions.maxScale,\n coordinates;\n\n if (movable.scale <= minScale && scaleDelta < 1) {\n // Resist shrinking. Instead of shrinking from 1 to 0.5, it will shrink to 0.5 + (1 /* minScale */ - 0.5) * 0.8 = 0.9;\n scaleDelta += (1 - scaleDelta) * 0.8;\n }\n\n if (movable.scale * scaleDelta >= maxScale) {\n scaleDelta = maxScale / movable.scale;\n }\n\n var offsetX = movable.x + that.offset.left,\n offsetY = movable.y + that.offset.top;\n\n coordinates = {\n x: (offsetX - previousCenter.x) * scaleDelta + center.x - offsetX,\n y: (offsetY - previousCenter.y) * scaleDelta + center.y - offsetY\n };\n\n movable.scaleWith(scaleDelta);\n\n x.dragMove(coordinates.x);\n y.dragMove(coordinates.y);\n\n that.dimensions.rescale(movable.scale);\n that.gesture = e;\n e.preventDefault();\n },\n\n move: function(e) {\n if (e.event.target.tagName.match(/textarea|input/i)) {\n return;\n }\n\n if (x.dimension.enabled || y.dimension.enabled) {\n x.dragMove(e.x.delta);\n y.dragMove(e.y.delta);\n e.preventDefault();\n } else {\n e.touch.skip();\n }\n },\n\n end: function(e) {\n e.preventDefault();\n }\n });\n }\n });\n\n var TRANSFORM_STYLE = support.transitions.prefix + \"Transform\",\n translate;\n\n\n if (support.hasHW3D) {\n translate = function(x, y, scale) {\n return \"translate3d(\" + x + \"px,\" + y + \"px,0) scale(\" + scale + \")\";\n };\n } else {\n translate = function(x, y, scale) {\n return \"translate(\" + x + \"px,\" + y + \"px) scale(\" + scale + \")\";\n };\n }\n\n var Movable = Observable.extend({\n init: function(element) {\n var that = this;\n\n Observable.fn.init.call(that);\n\n that.element = $(element);\n that.element[0].style.webkitTransformOrigin = \"left top\";\n that.x = 0;\n that.y = 0;\n that.scale = 1;\n that._saveCoordinates(translate(that.x, that.y, that.scale));\n },\n\n translateAxis: function(axis, by) {\n this[axis] += by;\n this.refresh();\n },\n\n scaleTo: function(scale) {\n this.scale = scale;\n this.refresh();\n },\n\n scaleWith: function(scaleDelta) {\n this.scale *= scaleDelta;\n this.refresh();\n },\n\n translate: function(coordinates) {\n this.x += coordinates.x;\n this.y += coordinates.y;\n this.refresh();\n },\n\n moveAxis: function(axis, value) {\n this[axis] = value;\n this.refresh();\n },\n\n moveTo: function(coordinates) {\n extend(this, coordinates);\n this.refresh();\n },\n\n refresh: function() {\n var that = this,\n x = that.x,\n y = that.y,\n newCoordinates;\n\n if (that.round) {\n x = Math.round(x);\n y = Math.round(y);\n }\n\n newCoordinates = translate(x, y, that.scale);\n\n if (newCoordinates != that.coordinates) {\n if (kendo.support.browser.msie && kendo.support.browser.version < 10) {\n that.element[0].style.position = \"absolute\";\n that.element[0].style.left = that.x + \"px\";\n that.element[0].style.top = that.y + \"px\";\n\n } else {\n that.element[0].style[TRANSFORM_STYLE] = newCoordinates;\n }\n that._saveCoordinates(newCoordinates);\n that.trigger(CHANGE);\n }\n },\n\n _saveCoordinates: function(coordinates) {\n this.coordinates = coordinates;\n }\n });\n\n function destroyDroppable(collection, widget) {\n var groupName = widget.options.group,\n droppables = collection[groupName],\n i;\n\n Widget.fn.destroy.call(widget);\n\n if (droppables.length > 1) {\n for (i = 0; i < droppables.length; i++) {\n if (droppables[i] == widget) {\n droppables.splice(i, 1);\n break;\n }\n }\n } else {\n droppables.length = 0; // WTF, porting this from the previous destroyGroup\n delete collection[groupName];\n }\n }\n\n var DropTarget = Widget.extend({\n init: function(element, options) {\n var that = this;\n\n Widget.fn.init.call(that, element, options);\n\n var group = that.options.group;\n\n if (!(group in dropTargets)) {\n dropTargets[group] = [ that ];\n } else {\n dropTargets[group].push( that );\n }\n },\n\n events: [\n DRAGENTER,\n DRAGLEAVE,\n DROP\n ],\n\n options: {\n name: \"DropTarget\",\n group: \"default\"\n },\n\n destroy: function() {\n destroyDroppable(dropTargets, this);\n },\n\n _trigger: function(eventName, e) {\n var that = this,\n draggable = draggables[that.options.group];\n\n if (draggable) {\n return that.trigger(eventName, extend({}, e.event, {\n draggable: draggable,\n dropTarget: e.dropTarget\n }));\n }\n },\n\n _over: function(e) {\n this._trigger(DRAGENTER, e);\n },\n\n _out: function(e) {\n this._trigger(DRAGLEAVE, e);\n },\n\n _drop: function(e) {\n var that = this,\n draggable = draggables[that.options.group];\n\n if (draggable) {\n draggable.dropped = !that._trigger(DROP, e);\n }\n }\n });\n\n DropTarget.destroyGroup = function(groupName) {\n var group = dropTargets[groupName] || dropAreas[groupName],\n i;\n\n if (group) {\n for (i = 0; i < group.length; i++) {\n Widget.fn.destroy.call(group[i]);\n }\n\n group.length = 0;\n delete dropTargets[groupName];\n delete dropAreas[groupName];\n }\n };\n\n DropTarget._cache = dropTargets;\n\n var DropTargetArea = DropTarget.extend({\n init: function(element, options) {\n var that = this;\n\n Widget.fn.init.call(that, element, options);\n\n var group = that.options.group;\n\n if (!(group in dropAreas)) {\n dropAreas[group] = [ that ];\n } else {\n dropAreas[group].push( that );\n }\n },\n\n destroy: function() {\n destroyDroppable(dropAreas, this);\n },\n\n options: {\n name: \"DropTargetArea\",\n group: \"default\",\n filter: null\n }\n });\n\n var Draggable = Widget.extend({\n init: function(element, options) {\n var that = this;\n\n Widget.fn.init.call(that, element, options);\n\n that._activated = false;\n\n if (this.options.clickMoveClick) {\n that.clickMoveClick = new ClickMoveClick(that.element, {\n global: true,\n filter: that.options.filter,\n start: that._startClickMoveClick.bind(that),\n move: that._drag.bind(that),\n end: that._end.bind(that),\n cancel: that._onCancel.bind(that)\n });\n }\n\n that.userEvents = new UserEvents(that.element, {\n global: true,\n allowSelection: true,\n filter: that.options.filter,\n threshold: that.options.distance,\n start: that._start.bind(that),\n hold: that._hold.bind(that),\n move: that._drag.bind(that),\n end: that._end.bind(that),\n cancel: that._onCancel.bind(that),\n select: that._select.bind(that),\n press: that._press.bind(that),\n });\n\n if (kendo.support.touch) {\n that.element.find(that.options.filter).css('touch-action', 'none');\n }\n\n that._afterEndHandler = that._afterEnd.bind(that);\n that._captureEscape = that._captureEscape.bind(that);\n },\n\n events: [\n HOLD,\n DRAGSTART,\n DRAG,\n DRAGEND,\n DRAGCANCEL,\n HINTDESTROYED\n ],\n\n options: {\n name: \"Draggable\",\n distance: ( kendo.support.touch ? 0 : 5),\n group: \"default\",\n cursorOffset: null,\n axis: null,\n container: null,\n filter: null,\n ignore: null,\n holdToDrag: false,\n showHintOnHold: false,\n autoScroll: false,\n dropped: false,\n clickMoveClick: false,\n preventOsHoldFeatures: false\n },\n\n cancelHold: function() {\n this._activated = false;\n },\n\n _captureEscape: function(e) {\n var that = this;\n\n if (e.keyCode === kendo.keys.ESC) {\n that.userEvents.cancel();\n\n if (that.clickMoveClick) {\n that.clickMoveClick.cancel();\n }\n\n this._trigger(DRAGCANCEL, { event: e });\n }\n },\n\n _updateHint: function(e) {\n var that = this,\n coordinates,\n options = that.options,\n boundaries = that.boundaries,\n axis = options.axis,\n cursorOffset = that.options.cursorOffset;\n\n if (cursorOffset) {\n coordinates = { left: e.x.location + cursorOffset.left, top: e.y.location + cursorOffset.top };\n } else {\n if (e.x.delta !== 0 || e.y.delta !== 0) {\n that.hintOffset.left += e.x.delta;\n that.hintOffset.top += e.y.delta;\n coordinates = $.extend({}, that.hintOffset);\n } else {\n that.hintOffset.left = e.x.startLocation + e.x.initialDelta;\n that.hintOffset.top = e.y.startLocation + e.y.initialDelta;\n coordinates = $.extend({}, that.hintOffset);\n }\n }\n\n if (boundaries) {\n coordinates.top = within(coordinates.top, boundaries.y);\n coordinates.left = within(coordinates.left, boundaries.x);\n }\n\n if (axis === \"x\") {\n delete coordinates.top;\n } else if (axis === \"y\") {\n delete coordinates.left;\n }\n\n that.hint.css(coordinates);\n },\n\n _shouldIgnoreTarget: function(target) {\n var ignoreSelector = this.options.ignore;\n return ignoreSelector && $(target).is(ignoreSelector);\n },\n\n _select: function(e) {\n if (!this._shouldIgnoreTarget(e.event.target)) {\n e.preventDefault();\n }\n },\n\n _startClickMoveClick: function(e) {\n this._activated = true;\n\n this._start(e);\n },\n\n _hint: function() {\n var that = this,\n hint = that.options.hint;\n\n if (hint) {\n if (that.hint) {\n that.hint.stop(true, true).remove();\n }\n\n that.hint = kendo.isFunction(hint) ? $(hint.call(that, that.currentTarget)) : hint;\n\n var offset = getOffset(that.currentTarget);\n that.hintOffset = offset;\n\n that.hint.css( {\n position: \"absolute\",\n zIndex: 20000, // the Window's z-index is 10000 and can be raised because of z-stacking\n left: offset.left,\n top: offset.top\n })\n .appendTo(document.body);\n }\n },\n\n _start: function(e) {\n var that = this,\n options = that.options,\n container = options.container ? $(options.container) : null,\n hint = options.hint;\n\n if (this._shouldIgnoreTarget(e.touch.initialTouch) || (options.holdToDrag && !that._activated)) {\n that.userEvents.cancel();\n return;\n }\n\n that.currentTarget = e.target;\n that.currentTargetOffset = getOffset(that.currentTarget);\n\n if (hint) {\n that._hint();\n\n that.angular(\"compile\", function() {\n that.hint.removeAttr(\"ng-repeat\");\n var scopeTarget = $(e.target);\n\n while (!scopeTarget.data(\"$$kendoScope\") && scopeTarget.length) {\n scopeTarget = scopeTarget.parent();\n }\n\n return {\n elements: that.hint.get(),\n scopeFrom: scopeTarget.data(\"$$kendoScope\")\n };\n });\n }\n\n draggables[options.group] = that;\n\n that.dropped = false;\n\n if (container) {\n that.boundaries = containerBoundaries(container, that.hint);\n }\n\n $(document).on(KEYUP, that._captureEscape);\n\n if (that._trigger(DRAGSTART, e)) {\n that.userEvents.cancel();\n\n if (that.clickMoveClick) {\n that.clickMoveClick.cancel();\n }\n\n that._afterEnd();\n }\n\n that.userEvents.capture();\n },\n\n _hold: function(e) {\n this.currentTarget = e.target;\n\n if (this._trigger(HOLD, e)) {\n this.userEvents.cancel();\n } else {\n this._activated = true;\n if (this.options.showHintOnHold) {\n this._hint();\n }\n }\n },\n\n _drag: function(e) {\n e.preventDefault();\n\n var cursorElement = this._elementUnderCursor(e);\n\n if (this.options.autoScroll && this._cursorElement !== cursorElement) {\n this._scrollableParent = findScrollableParent(cursorElement);\n this._cursorElement = cursorElement;\n }\n\n this._lastEvent = e;\n this._processMovement(e, cursorElement);\n\n if (this.options.autoScroll) {\n // chrome seems to trigger mousemove when mouse is moved outside of the window (over the Chrome), too.\n if (this._scrollableParent[0]) {\n var velocity = autoScrollVelocity(e.x.location, e.y.location, scrollableViewPort(this._scrollableParent));\n\n\n this._scrollCompenstation = $.extend({}, this.hintOffset);\n this._scrollVelocity = velocity;\n\n if (velocity.y === 0 && velocity.x === 0) {\n clearInterval(this._scrollInterval);\n this._scrollInterval = null;\n } else if (!this._scrollInterval) {\n this._scrollInterval = setInterval(this._autoScroll.bind(this), 50);\n }\n }\n }\n\n if (this.hint) {\n this._updateHint(e);\n }\n },\n\n _processMovement: function(e, cursorElement) {\n this._withDropTarget(cursorElement, function(target, targetElement) {\n if (!target) {\n if (lastDropTarget) {\n lastDropTarget._trigger(DRAGLEAVE, extend(e, { dropTarget: $(lastDropTarget.targetElement) }));\n lastDropTarget = null;\n }\n return;\n }\n\n if (lastDropTarget) {\n if (targetElement === lastDropTarget.targetElement) {\n return;\n }\n\n lastDropTarget._trigger(DRAGLEAVE, extend(e, { dropTarget: $(lastDropTarget.targetElement) }));\n }\n\n target._trigger(DRAGENTER, extend(e, { dropTarget: $(targetElement) }));\n lastDropTarget = extend(target, { targetElement: targetElement });\n });\n\n this._trigger(DRAG, extend(e, { dropTarget: lastDropTarget, elementUnderCursor: cursorElement }));\n },\n\n _autoScroll: function() {\n var parent = this._scrollableParent[0],\n velocity = this._scrollVelocity,\n compensation = this._scrollCompenstation;\n\n if (!parent) {\n return;\n }\n\n var cursorElement = this._elementUnderCursor(this._lastEvent);\n this._processMovement(this._lastEvent, cursorElement);\n\n var yIsScrollable, xIsScrollable;\n\n var isRootNode = parent === scrollableRoot()[0];\n\n if (isRootNode) {\n yIsScrollable = document.body.scrollHeight > $window.height();\n xIsScrollable = document.body.scrollWidth > $window.width();\n } else {\n yIsScrollable = parent.offsetHeight <= parent.scrollHeight;\n xIsScrollable = parent.offsetWidth <= parent.scrollWidth;\n }\n\n var yDelta = parent.scrollTop + velocity.y;\n var yInBounds = yIsScrollable && yDelta > 0 && yDelta < parent.scrollHeight;\n\n var xDelta = parent.scrollLeft + velocity.x;\n var xInBounds = xIsScrollable && xDelta > 0 && xDelta < parent.scrollWidth;\n\n if (yInBounds) {\n parent.scrollTop += velocity.y;\n } else if (yIsScrollable && yDelta < 0) {\n parent.scrollTop = 0;\n }\n\n if (xInBounds) {\n parent.scrollLeft += velocity.x;\n } else if (xIsScrollable && xDelta < 0) {\n parent.scrollLeft = 0;\n }\n\n if (this.hint && isRootNode && (xInBounds || yInBounds)) {\n if (yInBounds) {\n compensation.top += velocity.y;\n }\n\n if (xInBounds) {\n compensation.left += velocity.x;\n }\n\n this.hint.css(compensation);\n }\n },\n\n _press: function(ev) {\n if (this.options.preventOsHoldFeatures) {\n ev.target.css('-webkit-user-select', 'none');\n ev.target.attr('unselectable', 'on');\n ev.target.one('contextmenu', (ev) => {\n ev.preventDefault();\n });\n }\n },\n\n _end: function(e) {\n this._withDropTarget(this._elementUnderCursor(e), function(target, targetElement) {\n if (target) {\n target._drop(extend({}, e, { dropTarget: $(targetElement) }));\n lastDropTarget = null;\n }\n });\n\n clearInterval(this._scrollInterval);\n this._scrollInterval = null;\n this._cancel(this._trigger(DRAGEND, e));\n },\n\n _onCancel: function(e) {\n this._cancel();\n this._trigger(DRAGCANCEL, { event: e });\n },\n\n _cancel: function(isDefaultPrevented) {\n var that = this;\n\n that._scrollableParent = null;\n this._cursorElement = null;\n clearInterval(this._scrollInterval);\n that._activated = false;\n\n if (that.hint && !that.dropped) {\n setTimeout(function() {\n that.hint.stop(true, true);\n\n if (isDefaultPrevented) {\n that._afterEndHandler();\n } else {\n that.hint.animate(that.currentTargetOffset, \"fast\", that._afterEndHandler);\n }\n }, 0);\n } else {\n that._afterEnd();\n }\n },\n\n _trigger: function(eventName, e) {\n var that = this;\n\n return that.trigger(\n eventName, extend(\n {},\n e.event,\n {\n x: e.x,\n y: e.y,\n currentTarget: that.currentTarget,\n initialTarget: e.touch ? e.touch.initialTouch : null,\n dropTarget: e.dropTarget,\n elementUnderCursor: e.elementUnderCursor,\n clickMoveClick: e.clickMoveClick\n }\n ));\n },\n\n _elementUnderCursor: function(e) {\n var target = elementUnderCursor(e),\n hint = this.hint;\n\n if (hint && contains(hint[0], target)) {\n hint.hide();\n target = elementUnderCursor(e);\n // IE8 does not return the element in iframe from first attempt\n if (!target) {\n target = elementUnderCursor(e);\n }\n hint.show();\n }\n\n return target;\n },\n\n _withDropTarget: function(element, callback) {\n var result,\n group = this.options.group,\n targets = dropTargets[group],\n areas = dropAreas[group];\n\n if (targets && targets.length || areas && areas.length) {\n result = checkTarget(element, targets, areas);\n\n if (result) {\n callback(result.target, result.targetElement);\n } else {\n callback();\n }\n }\n },\n\n destroy: function() {\n var that = this;\n\n Widget.fn.destroy.call(that);\n\n that._afterEnd();\n\n that.userEvents.destroy();\n\n if (that.clickMoveClick) {\n that.clickMoveClick.destroy();\n }\n\n this._scrollableParent = null;\n this._cursorElement = null;\n clearInterval(this._scrollInterval);\n\n that.currentTarget = null;\n },\n\n _afterEnd: function() {\n var that = this;\n\n if (that.hint) {\n that.hint.remove();\n }\n\n delete draggables[that.options.group];\n\n that.trigger(\"destroy\");\n that.trigger(HINTDESTROYED);\n $(document).off(KEYUP, that._captureEscape);\n }\n });\n\n kendo.ui.plugin(DropTarget);\n kendo.ui.plugin(DropTargetArea);\n kendo.ui.plugin(Draggable);\n kendo.TapCapture = TapCapture;\n kendo.containerBoundaries = containerBoundaries;\n\n extend(kendo.ui, {\n Pane: Pane,\n PaneDimensions: PaneDimensions,\n Movable: Movable\n });\n\n function scrollableViewPort(element) {\n var root = scrollableRoot()[0],\n offset,\n top,\n left;\n\n if (element[0] === root) {\n top = root.scrollTop;\n left = root.scrollLeft;\n\n return {\n top: top,\n left: left,\n bottom: top + $window.height(),\n right: left + $window.width()\n };\n } else {\n offset = element.offset();\n offset.bottom = offset.top + element.height();\n offset.right = offset.left + element.width();\n return offset;\n }\n }\n\n function scrollableRoot() {\n return $(kendo.support.browser.edge || kendo.support.browser.safari ? document.body : document.documentElement);\n }\n\n function findScrollableParent(element) {\n var root = scrollableRoot();\n\n if (!element || element === document.body || element === document.documentElement) {\n return root;\n }\n\n var parent = $(element)[0];\n\n while (parent && !kendo.isScrollable(parent) && parent !== document.body) {\n parent = parent.parentNode;\n }\n\n if (parent === document.body) {\n return root;\n }\n\n return $(parent);\n }\n\n function autoScrollVelocity(mouseX, mouseY, rect) {\n var velocity = { x: 0, y: 0 };\n\n var AUTO_SCROLL_AREA = 50;\n\n if (mouseX - rect.left < AUTO_SCROLL_AREA) {\n velocity.x = -(AUTO_SCROLL_AREA - (mouseX - rect.left));\n } else if (rect.right - mouseX < AUTO_SCROLL_AREA) {\n velocity.x = AUTO_SCROLL_AREA - (rect.right - mouseX);\n }\n\n if (mouseY - rect.top < AUTO_SCROLL_AREA) {\n velocity.y = -(AUTO_SCROLL_AREA - (mouseY - rect.top));\n } else if (rect.bottom - mouseY < AUTO_SCROLL_AREA) {\n velocity.y = AUTO_SCROLL_AREA - (rect.bottom - mouseY);\n }\n\n return velocity;\n }\n\n // export for testing\n kendo.ui.Draggable.utils = {\n autoScrollVelocity: autoScrollVelocity,\n scrollableViewPort: scrollableViewPort,\n findScrollableParent: findScrollableParent\n };\n\n })(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.fx.js';\nimport './kendo.draganddrop.js';\n\nvar __meta__ = {\n id: \"mobile.scroller\",\n name: \"Scroller\",\n category: \"mobile\",\n description: \"The Kendo Mobile Scroller widget enables touch friendly kinetic scrolling for the contents of a given DOM element.\",\n depends: [ \"fx\", \"draganddrop\" ]\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n mobile = kendo.mobile,\n fx = kendo.effects,\n ui = mobile.ui,\n extend = $.extend,\n Widget = ui.Widget,\n Class = kendo.Class,\n Movable = kendo.ui.Movable,\n Pane = kendo.ui.Pane,\n PaneDimensions = kendo.ui.PaneDimensions,\n Transition = fx.Transition,\n Animation = fx.Animation,\n abs = Math.abs,\n SNAPBACK_DURATION = 500,\n SCROLLBAR_OPACITY = 0.7,\n FRICTION = 0.96,\n VELOCITY_MULTIPLIER = 10,\n MAX_VELOCITY = 55,\n OUT_OF_BOUNDS_FRICTION = 0.5,\n ANIMATED_SCROLLER_PRECISION = 5,\n RELEASECLASS = \"km-scroller-release\",\n REFRESHCLASS = \"km-scroller-refresh\",\n PULL = \"pull\",\n CHANGE = \"change\",\n RESIZE = \"resize\",\n SCROLL = \"scroll\",\n MOUSE_WHEEL_ID = 2;\n\n var ZoomSnapBack = Animation.extend({\n init: function(options) {\n var that = this;\n Animation.fn.init.call(that);\n extend(that, options);\n\n that.userEvents.bind(\"gestureend\", that.start.bind(that));\n that.tapCapture.bind(\"press\", that.cancel.bind(that));\n },\n\n enabled: function() {\n return this.movable.scale < this.dimensions.minScale;\n },\n\n done: function() {\n return this.dimensions.minScale - this.movable.scale < 0.01;\n },\n\n tick: function() {\n var movable = this.movable;\n movable.scaleWith(1.1);\n this.dimensions.rescale(movable.scale);\n },\n\n onEnd: function() {\n var movable = this.movable;\n movable.scaleTo(this.dimensions.minScale);\n this.dimensions.rescale(movable.scale);\n }\n });\n\n var DragInertia = Animation.extend({\n init: function(options) {\n var that = this;\n\n Animation.fn.init.call(that);\n\n extend(that, options, {\n transition: new Transition({\n axis: options.axis,\n movable: options.movable,\n onEnd: function() { that._end(); }\n })\n });\n\n that.tapCapture.bind(\"press\", function() { that.cancel(); });\n that.userEvents.bind(\"end\", that.start.bind(that));\n that.userEvents.bind(\"gestureend\", that.start.bind(that));\n that.userEvents.bind(\"tap\", that.onEnd.bind(that));\n },\n\n onCancel: function() {\n this.transition.cancel();\n },\n\n freeze: function(location) {\n var that = this;\n that.cancel();\n that._moveTo(location);\n },\n\n onEnd: function() {\n var that = this;\n if (that.paneAxis.outOfBounds()) {\n that._snapBack();\n } else {\n that._end();\n }\n },\n\n done: function() {\n return abs(this.velocity) < 1;\n },\n\n start: function(e) {\n var that = this,\n velocity;\n\n if (!that.dimension.enabled) { return; }\n\n if (that.paneAxis.outOfBounds()) {\n if (that.transition._started) {\n that.transition.cancel();\n that.velocity = Math.min(e.touch[that.axis].velocity * that.velocityMultiplier, MAX_VELOCITY);\n\n Animation.fn.start.call(that);\n } else {\n that._snapBack();\n }\n } else {\n velocity = e.touch.id === MOUSE_WHEEL_ID ? 0 : e.touch[that.axis].velocity;\n that.velocity = Math.max(Math.min(velocity * that.velocityMultiplier, MAX_VELOCITY), -MAX_VELOCITY);\n\n that.tapCapture.captureNext();\n Animation.fn.start.call(that);\n }\n },\n\n tick: function() {\n var that = this,\n dimension = that.dimension,\n friction = that.paneAxis.outOfBounds() ? OUT_OF_BOUNDS_FRICTION : that.friction,\n delta = (that.velocity *= friction),\n location = that.movable[that.axis] + delta;\n\n if (!that.elastic && dimension.outOfBounds(location)) {\n location = Math.max(Math.min(location, dimension.max), dimension.min);\n that.velocity = 0;\n }\n\n that.movable.moveAxis(that.axis, location);\n },\n\n _end: function() {\n this.tapCapture.cancelCapture();\n this.end();\n },\n\n _snapBack: function() {\n var that = this,\n dimension = that.dimension,\n snapBack = that.movable[that.axis] > dimension.max ? dimension.max : dimension.min;\n that._moveTo(snapBack);\n },\n\n _moveTo: function(location) {\n this.transition.moveTo({ location: location, duration: SNAPBACK_DURATION, ease: Transition.easeOutExpo });\n }\n });\n\n var AnimatedScroller = Animation.extend({\n init: function(options) {\n var that = this;\n\n kendo.effects.Animation.fn.init.call(this);\n\n extend(that, options, {\n origin: {},\n destination: {},\n offset: {}\n });\n },\n\n tick: function() {\n this._updateCoordinates();\n this.moveTo(this.origin);\n },\n\n done: function() {\n return abs(this.offset.y) < ANIMATED_SCROLLER_PRECISION && abs(this.offset.x) < ANIMATED_SCROLLER_PRECISION;\n },\n\n onEnd: function() {\n this.moveTo(this.destination);\n if (this.callback) {\n this.callback.call();\n }\n },\n\n setCoordinates: function(from, to) {\n this.offset = {};\n this.origin = from;\n this.destination = to;\n },\n\n setCallback: function(callback) {\n if (callback && kendo.isFunction(callback)) {\n this.callback = callback;\n } else {\n callback = undefined$1;\n }\n },\n\n _updateCoordinates: function() {\n this.offset = {\n x: (this.destination.x - this.origin.x) / 4,\n y: (this.destination.y - this.origin.y) / 4\n };\n\n this.origin = {\n y: this.origin.y + this.offset.y,\n x: this.origin.x + this.offset.x\n };\n }\n });\n\n var ScrollBar = Class.extend({\n init: function(options) {\n var that = this,\n horizontal = options.axis === \"x\",\n element = $('
    ');\n\n if (horizontal) {\n element.attr(\"aria-orientation\", \"horizontal\");\n }\n\n extend(that, options, {\n element: element,\n elementSize: 0,\n movable: new Movable(element),\n scrollMovable: options.movable,\n alwaysVisible: options.alwaysVisible,\n size: horizontal ? \"width\" : \"height\"\n });\n\n that.scrollMovable.bind(CHANGE, that.refresh.bind(that));\n that.container.append(element);\n if (options.alwaysVisible) {\n that.show();\n }\n },\n\n refresh: function() {\n var that = this,\n axis = that.axis,\n dimension = that.dimension,\n paneSize = dimension.size,\n scrollMovable = that.scrollMovable,\n sizeRatio = paneSize / dimension.total,\n position = Math.round(-scrollMovable[axis] * sizeRatio),\n size = Math.round(paneSize * sizeRatio);\n\n if (sizeRatio >= 1) {\n this.element.css(\"display\", \"none\");\n } else {\n this.element.css(\"display\", \"\");\n }\n\n if (position + size > paneSize) {\n size = paneSize - position;\n } else if (position < 0) {\n size += position;\n position = 0;\n }\n\n if (that.elementSize != size) {\n that.element.css(that.size, size + \"px\");\n that.elementSize = size;\n }\n\n that._ariaValue(position, dimension.size - that.elementSize);\n\n that.movable.moveAxis(axis, position);\n },\n\n show: function() {\n this.element.css({ opacity: SCROLLBAR_OPACITY, visibility: \"visible\" });\n },\n\n hide: function() {\n if (!this.alwaysVisible) {\n this.element.css({ opacity: 0 });\n }\n },\n\n _ariaValue: function(current, total) {\n var element = this.element;\n\n if (current > total) {\n current = total;\n }\n\n element.attr(\"aria-valuemax\", total);\n element.attr(\"aria-valuenow\", current);\n }\n });\n\n var Scroller = Widget.extend({\n init: function(element, options) {\n var that = this;\n Widget.fn.init.call(that, element, options);\n\n element = that.element;\n\n that._native = that.options.useNative && kendo.support.hasNativeScrolling;\n if (that._native) {\n element.addClass(\"km-native-scroller\")\n .prepend('
    ');\n\n extend(that, {\n scrollElement: element,\n fixedContainer: element.children().first()\n });\n\n return;\n }\n\n element\n .css(\"overflow\", \"hidden\")\n .addClass(\"km-scroll-wrapper\")\n .wrapInner('
    ')\n .prepend('
    ');\n\n var inner = element.children().eq(1),\n\n tapCapture = new kendo.TapCapture(element),\n\n movable = new Movable(inner),\n\n dimensions = new PaneDimensions({\n element: inner,\n container: element,\n forcedEnabled: that.options.zoom\n }),\n\n avoidScrolling = this.options.avoidScrolling,\n\n userEvents = new kendo.UserEvents(element, {\n touchAction: \"pan-y\",\n fastTap: true,\n allowSelection: true,\n preventDragEvent: true,\n captureUpIfMoved: true,\n multiTouch: that.options.zoom,\n supportDoubleTap: that.options.supportDoubleTap,\n start: function(e) {\n dimensions.refresh();\n\n var velocityX = abs(e.x.velocity),\n velocityY = abs(e.y.velocity),\n horizontalSwipe = velocityX * 2 >= velocityY,\n originatedFromFixedContainer = $.contains(that.fixedContainer[0], e.event.target),\n verticalSwipe = velocityY * 2 >= velocityX;\n\n\n if (!originatedFromFixedContainer && !avoidScrolling(e) && that.enabled && (dimensions.x.enabled && horizontalSwipe || dimensions.y.enabled && verticalSwipe)) {\n userEvents.capture();\n } else {\n userEvents.cancel();\n }\n }\n }),\n\n pane = new Pane({\n movable: movable,\n dimensions: dimensions,\n userEvents: userEvents,\n elastic: that.options.elastic\n }),\n\n zoomSnapBack = new ZoomSnapBack({\n movable: movable,\n dimensions: dimensions,\n userEvents: userEvents,\n tapCapture: tapCapture\n }),\n\n animatedScroller = new AnimatedScroller({\n moveTo: function(coordinates) {\n that.scrollTo(coordinates.x, coordinates.y);\n }\n });\n\n movable.bind(CHANGE, function() {\n that.scrollTop = - movable.y;\n that.scrollLeft = - movable.x;\n\n that.trigger(SCROLL, {\n scrollTop: that.scrollTop,\n scrollLeft: that.scrollLeft\n });\n });\n\n if (that.options.mousewheelScrolling) {\n element.on(\"DOMMouseScroll mousewheel\", this._wheelScroll.bind(this));\n }\n\n extend(that, {\n movable: movable,\n dimensions: dimensions,\n zoomSnapBack: zoomSnapBack,\n animatedScroller: animatedScroller,\n userEvents: userEvents,\n pane: pane,\n tapCapture: tapCapture,\n pulled: false,\n enabled: true,\n scrollElement: inner,\n scrollTop: 0,\n scrollLeft: 0,\n fixedContainer: element.children().first()\n });\n\n that._initAxis(\"x\");\n that._initAxis(\"y\");\n\n // build closure\n that._wheelEnd = function() {\n that._wheel = false;\n that.userEvents.end(0, that._wheelY);\n };\n\n dimensions.refresh();\n\n if (that.options.pullToRefresh) {\n that._initPullToRefresh();\n }\n },\n\n _wheelScroll: function(e) {\n if (e.ctrlKey) {\n return;\n }\n\n if (!this._wheel) {\n this._wheel = true;\n this._wheelY = 0;\n this.userEvents.press(0, this._wheelY);\n }\n\n clearTimeout(this._wheelTimeout);\n this._wheelTimeout = setTimeout(this._wheelEnd, 50);\n\n var delta = kendo.wheelDeltaY(e);\n\n if (delta) {\n this._wheelY += delta;\n this.userEvents.move(0, this._wheelY);\n }\n\n e.preventDefault();\n },\n\n makeVirtual: function() {\n this.dimensions.y.makeVirtual();\n },\n\n virtualSize: function(min, max) {\n this.dimensions.y.virtualSize(min, max);\n },\n\n height: function() {\n return this.dimensions.y.size;\n },\n\n scrollHeight: function() {\n return this.scrollElement[0].scrollHeight;\n },\n\n scrollWidth: function() {\n return this.scrollElement[0].scrollWidth;\n },\n\n options: {\n name: \"Scroller\",\n zoom: false,\n pullOffset: 140,\n visibleScrollHints: false,\n elastic: true,\n useNative: false,\n mousewheelScrolling: true,\n avoidScrolling: function() { return false; },\n pullToRefresh: false,\n messages: {\n pullTemplate: \"Pull to refresh\",\n releaseTemplate: \"Release to refresh\",\n refreshTemplate: \"Refreshing\"\n }\n },\n\n events: [\n PULL,\n SCROLL,\n RESIZE\n ],\n\n _resize: function() {\n if (!this._native) {\n this.contentResized();\n }\n },\n\n setOptions: function(options) {\n var that = this;\n Widget.fn.setOptions.call(that, options);\n if (options.pullToRefresh) {\n that._initPullToRefresh();\n }\n },\n\n reset: function() {\n if (this._native) {\n this.scrollElement.scrollTop(0);\n } else {\n this.movable.moveTo({ x: 0, y: 0 });\n this._scale(1);\n }\n },\n\n contentResized: function() {\n this.dimensions.refresh();\n if (this.pane.x.outOfBounds()) {\n this.movable.moveAxis(\"x\", this.dimensions.x.min);\n }\n\n if (this.pane.y.outOfBounds()) {\n this.movable.moveAxis(\"y\", this.dimensions.y.min);\n }\n },\n\n zoomOut: function() {\n var dimensions = this.dimensions;\n dimensions.refresh();\n this._scale(dimensions.fitScale);\n this.movable.moveTo(dimensions.centerCoordinates());\n },\n\n enable: function() {\n this.enabled = true;\n },\n\n disable: function() {\n this.enabled = false;\n },\n\n scrollTo: function(x, y) {\n if (this._native) {\n kendo.scrollLeft(this.scrollElement, abs(x));\n this.scrollElement.scrollTop(abs(y));\n } else {\n this.dimensions.refresh();\n this.movable.moveTo({ x: x, y: y });\n }\n },\n\n animatedScrollTo: function(x, y, callback) {\n var from,\n to;\n\n if (this._native) {\n this.scrollTo(x, y);\n } else {\n from = { x: this.movable.x, y: this.movable.y };\n to = { x: x, y: y };\n\n this.animatedScroller.setCoordinates(from, to);\n this.animatedScroller.setCallback(callback);\n this.animatedScroller.start();\n }\n },\n\n pullHandled: function() {\n var that = this;\n that.refreshHint.removeClass(REFRESHCLASS);\n that.hintContainer.html(that.pullTemplate({}));\n that.yinertia.onEnd();\n that.xinertia.onEnd();\n that.userEvents.cancel();\n },\n\n destroy: function() {\n Widget.fn.destroy.call(this);\n if (this.userEvents) {\n this.userEvents.destroy();\n }\n },\n\n _scale: function(scale) {\n this.dimensions.rescale(scale);\n this.movable.scaleTo(scale);\n },\n\n _initPullToRefresh: function() {\n var that = this;\n\n that.dimensions.y.forceEnabled();\n that.pullTemplate = kendo.template(that.options.messages.pullTemplate);\n that.releaseTemplate = kendo.template(that.options.messages.releaseTemplate);\n that.refreshTemplate = kendo.template(that.options.messages.refreshTemplate);\n\n that.scrollElement.prepend('' + that.pullTemplate({}) + '');\n that.refreshHint = that.scrollElement.children().first();\n that.hintContainer = that.refreshHint.children(\".km-template\");\n\n that.pane.y.bind(\"change\", that._paneChange.bind(that));\n that.userEvents.bind(\"end\", that._dragEnd.bind(that));\n },\n\n _dragEnd: function() {\n var that = this;\n\n if (!that.pulled) {\n return;\n }\n\n that.pulled = false;\n that.refreshHint.removeClass(RELEASECLASS).addClass(REFRESHCLASS);\n that.hintContainer.html(that.refreshTemplate({}));\n that.yinertia.freeze(that.options.pullOffset / 2);\n that.trigger(\"pull\");\n },\n\n _paneChange: function() {\n var that = this;\n\n if (that.movable.y / OUT_OF_BOUNDS_FRICTION > that.options.pullOffset) {\n if (!that.pulled) {\n that.pulled = true;\n that.refreshHint.removeClass(REFRESHCLASS).addClass(RELEASECLASS);\n that.hintContainer.html(that.releaseTemplate({}));\n }\n } else if (that.pulled) {\n that.pulled = false;\n that.refreshHint.removeClass(RELEASECLASS);\n that.hintContainer.html(that.pullTemplate({}));\n }\n },\n\n _initAxis: function(axis) {\n var that = this,\n elementId = that.element.attr(\"id\"),\n movable = that.movable,\n dimension = that.dimensions[axis],\n tapCapture = that.tapCapture,\n paneAxis = that.pane[axis],\n scrollBar;\n\n if (!elementId) {\n elementId = kendo.guid();\n that.element.attr(\"id\", elementId);\n }\n\n scrollBar = new ScrollBar({\n axis: axis,\n movable: movable,\n dimension: dimension,\n container: that.element,\n alwaysVisible: that.options.visibleScrollHints,\n controlsId: elementId\n });\n\n dimension.bind(CHANGE, function() {\n scrollBar.refresh();\n });\n\n paneAxis.bind(CHANGE, function() {\n scrollBar.show();\n });\n\n that[axis + \"inertia\"] = new DragInertia({\n axis: axis,\n paneAxis: paneAxis,\n movable: movable,\n tapCapture: tapCapture,\n userEvents: that.userEvents,\n dimension: dimension,\n elastic: that.options.elastic,\n friction: that.options.friction || FRICTION,\n velocityMultiplier: that.options.velocityMultiplier || VELOCITY_MULTIPLIER,\n end: function() {\n scrollBar.hide();\n that.trigger(\"scrollEnd\", {\n axis: axis,\n scrollTop: that.scrollTop,\n scrollLeft: that.scrollLeft\n });\n }\n });\n }\n });\n\n ui.plugin(Scroller);\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.html.base.js';\nimport './kendo.icons.js';\n\nvar __meta__ = {\n id: \"html.chip\",\n name: \"Html.Chip\",\n category: \"web\",\n description: \"HTML rendering utility for Kendo UI for jQuery.\",\n depends: [ \"html.base\", \"icons\" ],\n features: []\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n HTMLBase = kendo.html.HTMLBase;\n\n var renderChip = function(element, options) {\n if (!element || $.isPlainObject(element)) {\n options = element;\n element = $(\"\");\n }\n\n return (new HTMLChip(element, options)).html();\n };\n\n var HTMLChip = HTMLBase.extend({\n init: function(element, options) {\n var that = this;\n HTMLBase.fn.init.call(that, element, options);\n that._wrapper();\n },\n options: {\n name: \"HTMLChip\",\n size: \"medium\",\n rounded: \"medium\",\n fillMode: \"solid\",\n themeColor: \"base\",\n attr: {},\n icon: \"\",\n iconClass: \"\",\n iconAttr: {},\n removable: false,\n removableAttr: {},\n removeIcon: \"x-circle\",\n removeIconClass: \"\",\n content: \"\",\n text: \"\",\n actions: [],\n stylingOptions: [ \"size\", \"rounded\", \"fillMode\", \"themeColor\" ]\n },\n _wrapper: function() {\n var that = this,\n options = that.options;\n\n options.text = options.text || options.label;\n that.wrapper = that.element.wrap(\"
    \").parent().attr(options.attr);\n that._addClasses();\n\n if (options.icon) {\n that.wrapper.prepend($(kendo.ui.icon({ icon: options.icon, size: \"small\", iconClass: `k-chip-icon${options.iconClass ? ` ${options.iconClass}` : '' }` })).attr(options.iconAttr));\n } else if (options.iconClass) {\n that.wrapper.prepend($(\"\").attr(options.iconAttr));\n } else if (options.avatarClass) {\n that.wrapper.prepend($(\"\").attr(options.iconAttr));\n }\n\n that.element.addClass(\"k-chip-content\");\n if (options.text) {\n that.element.html('' + options.text + '');\n }\n\n if (options.visible === false) {\n that.wrapper.addClass(\"k-hidden\");\n }\n\n if (options.selected === true) {\n that.wrapper.addClass(\"k-selected\");\n }\n\n if (options.enabled === false) {\n that.wrapper.addClass(\"k-disabled\");\n }\n\n if ((options.actions && options.actions.length > 0) || options.removable) {\n that._actions();\n }\n\n\n },\n _actions: function() {\n var that = this,\n options = that.options;\n\n that.actionsWrapper = $(\"\");\n that.actionsWrapper.appendTo(that.wrapper);\n\n if (options.actions && options.actions.length > 0) {\n for (var i = 0; i < options.actions.length; i++) {\n var action = options.actions[i];\n that.actionsWrapper.append($(`${kendo.ui.icon({ icon: action.icon, iconClass: \"k-chip-icon\" })}`).attr(action.attr ? action.attr : {}));\n }\n }\n\n if (options.removable) {\n that.actionsWrapper.append($(`${kendo.ui.icon({ icon: options.removeIcon, iconClass: \"k-chip-icon\" })}`).attr(options.removableAttr));\n }\n }\n });\n\n $.extend(kendo.html, {\n renderChip: renderChip,\n HTMLChip: HTMLChip\n });\n\n kendo.cssProperties.registerPrefix(\"HTMLChip\", \"k-chip-\");\n\n kendo.cssProperties.registerValues(\"HTMLChip\", [{\n prop: \"rounded\",\n values: kendo.cssProperties.roundedValues.concat([['full', 'full']])\n }]);\n\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.core.js';\nimport './kendo.html.chip.js';\n\nvar __meta__ = {\n id: \"chip\",\n name: \"Chip\",\n category: \"web\", // suite\n docsCategory: \"navigation\",\n description: \"Displays a Chip that represents an input, attribute or an action\",\n depends: [\"core\", \"html.chip\"] // dependencies\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo;\n var Widget = kendo.ui.Widget;\n var html = kendo.html;\n var ui = kendo.ui,\n keys = kendo.keys,\n SELECT = \"select\",\n CLICK = \"click\",\n REMOVE = \"remove\";\n\n var NS = \".kendoChip\",\n DOT = \".\";\n\n\n var chipStyles = {\n widget: \"k-chip\",\n iconElement: \"k-chip-icon\",\n removeIconElement: \"k-chip-remove-action\",\n selected: \"k-selected\",\n disabled: \"k-disabled\",\n focus: \"k-focus\",\n avatarClass: \"k-chip-avatar\"\n };\n\n var Chip = Widget.extend({\n init: function(element, options) {\n var that = this;\n\n Widget.fn.init.call(that, element, options);\n html.renderChip(element, $.extend({},that.options));\n\n that.wrapper = that.element.closest(\".k-chip\");\n that._enabled = that.options.enabled = options.enabled !== undefined$1 ? options.enabled : !(Boolean(that.element.is(\"[disabled]\")));\n that._selected = that.options.selected;\n that._selectable = that.options.selectable;\n\n that._setTabIndex();\n\n that._applyAriaAttributes();\n that._bindEvents();\n kendo.notify(that);\n },\n\n options: {\n name: 'Chip',\n enabled: true,\n selectable: false,\n selected: false,\n removable: false,\n icon: '',\n iconClass: '',\n avatarClass: '',\n label: '',\n removeIcon: 'x-circle',\n removeIconClass: '',\n fillMode: 'solid',\n rounded: 'medium',\n size: 'medium',\n themeColor: 'base'\n },\n\n events: [\n SELECT,\n CLICK,\n REMOVE\n ],\n\n destroy: function() {\n var that = this;\n\n that.wrapper.off(NS);\n Widget.fn.destroy.call(that);\n },\n\n setOptions: function(options) {\n var that = this;\n\n that.wrapper.off(NS);\n that.element.insertBefore(that.wrapper);\n that.wrapper.remove();\n\n Widget.fn.setOptions.call(that, options);\n\n that.element.empty();\n html.renderChip(that.element, that.options);\n\n that.wrapper = that.element.closest(\".k-chip\");\n\n that._setTabIndex();\n that._applyAriaAttributes();\n that._bindEvents();\n },\n\n enable: function(state) {\n var that = this;\n if (state === undefined$1) {\n return that._enabled;\n }\n\n that._enabled = state !== false;\n that.wrapper.toggleClass(chipStyles.disabled, !that._enabled);\n that.wrapper.attr(\"aria-disabled\", !that._enabled);\n },\n\n select: function(state) {\n var that = this;\n\n if (state == undefined$1) {\n return that._selected;\n }\n\n state = state !== false;\n\n if (that._selectable) {\n that._selected = state;\n that.wrapper.toggleClass(chipStyles.selected, state);\n }\n\n that._applyAriaAttributes();\n },\n\n focus: function() {\n if (this._enabled) {\n this.wrapper.focus();\n }\n },\n\n _bindEvents: function() {\n var that = this,\n clickProxy = that._click.bind(that),\n removeProxy = that._remove.bind(that),\n keydownProxy = that._keydown.bind(that);\n\n that.wrapper.on(CLICK + \" touchend\" + NS, clickProxy)\n .on(CLICK + \" touchend\" + NS, DOT + chipStyles.removeIconElement, removeProxy)\n .on(\"keydown\" + NS, keydownProxy);\n },\n\n _click: function(ev) {\n var that = this;\n\n if (!that.enable()) {\n ev.preventDefault();\n return;\n }\n\n if (that.trigger(CLICK, { originalEvent: ev })) {\n return;\n }\n\n that._triggerSelect(that, ev);\n },\n\n _remove: function(ev) {\n ev.preventDefault();\n ev.stopPropagation();\n\n var that = this;\n\n if (!that.enable()) {\n ev.preventDefault();\n return;\n }\n\n that.trigger(REMOVE, { originalEvent: ev });\n },\n\n _triggerSelect: function(item, ev) {\n var that = this;\n\n if (!that._selectable || !that._enabled || that.trigger(SELECT, { originalEvent: ev })) {\n return;\n }\n\n that._toggleSelect();\n },\n\n _toggleSelect: function() {\n var that = this;\n that.select(!that.select());\n },\n\n _keydown: function(ev) {\n var that = this,\n target = $(ev.target),\n key = ev.keyCode;\n\n if (key === keys.ENTER || key === keys.SPACEBAR) {\n if (!that.enable()) {\n ev.preventDefault();\n return;\n }\n\n if (that.trigger(CLICK, { originalEvent: ev })) {\n return;\n }\n\n that._triggerSelect(target, ev);\n\n if (key === keys.SPACEBAR) {\n ev.preventDefault();\n }\n } else if (key === keys.DELETE || key === keys.BACKSPACE) {\n if (that.options.removable) {\n that.trigger(REMOVE, { originalEvent: ev });\n }\n }\n },\n\n _setTabIndex: function() {\n var that = this;\n var tabindex = that.enable() ? that.options.tabindex || \"0\" : \"-1\";\n if (that.options.attributes && that.options.attributes.class) {\n that.options.attributes.class = `${that.wrapper.attr(\"class\") || ''} ${that.options.attributes.class}`;\n }\n\n that.wrapper.attr($.extend({}, that.options.attributes, {\n tabindex: tabindex,\n // skip rendering of this attribute\n ariaSelectedAttributeName: null\n }));\n },\n\n _applyAriaAttributes: function() {\n var that = this;\n var role = (that.options.attributes || {}).role || \"button\";\n\n that.wrapper.attr(\"role\", role);\n if (that._selectable && role == \"button\") {\n that.wrapper.attr(\"aria-pressed\", that._selected);\n }\n that.wrapper.attr(\"aria-disabled\", that.enable() === false);\n }\n });\n\n ui.plugin(Chip);\n\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.html.base.js';\n\nvar __meta__ = {\n id: \"html.chiplist\",\n name: \"Html.ChipList\",\n category: \"web\",\n description: \"HTML rendering utility for Kendo UI for jQuery.\",\n depends: [\"html.base\"],\n features: []\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n HTMLBase = kendo.html.HTMLBase;\n\n var renderChipList = function(element, options) {\n if (arguments[0] === undefined$1 || $.isPlainObject(arguments[0])) {\n options = element;\n element = $(\"
    \");\n }\n\n return (new HTMLChipList(element, options)).html();\n };\n\n var HTMLChipList = HTMLBase.extend({\n init: function(element, options) {\n var that = this;\n HTMLBase.fn.init.call(that, element, options);\n that.wrapper = that.element.addClass(\"k-chip-list\");\n that._applyAriaAttributes(options);\n that._addClasses();\n },\n options: {\n name: \"HTMLChipList\",\n size: \"medium\",\n stylingOptions: [\"size\"]\n },\n _applyAriaAttributes: function(options) {\n var that = this;\n options = $.extend({ selectable: \"none\" }, options);\n var ariaLabelOption = (options.attributes || {})[\"aria-label\"];\n\n if (options.selectable !== \"none\") {\n that.element.attr({\n \"aria-multiselectable\": options.selectable === \"multiple\",\n role: \"listbox\",\n \"aria-label\": ariaLabelOption || that.element.attr(\"id\") + \" listbox\",\n \"aria-orientation\": \"horizontal\"\n });\n } else {\n that.element.removeAttr(\"role aria-label aria-multiselectable aria-orientation\");\n }\n }\n });\n\n $.extend(kendo.html, {\n renderChipList: renderChipList,\n HTMLChipList: HTMLChipList\n });\n\n kendo.cssProperties.registerPrefix(\"HTMLChipList\", \"k-chip-list-\");\n\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.core.js';\nimport './kendo.chip.js';\nimport './kendo.html.chiplist.js';\n\nvar __meta__ = {\n id: \"chiplist\",\n name: \"ChipList\",\n category: \"web\",\n docsCategory: \"navigation\",\n description: \"The ChipList component.\",\n depends: [\"core\", \"chip\", \"html.chiplist\"]\n};\n(function($, undefined$1) {\n var kendo = window.kendo,\n ui = kendo.ui,\n Widget = ui.Widget,\n keys = kendo.keys,\n isPlainObject = $.isPlainObject,\n isEmptyObject = $.isEmptyObject,\n\n NS = \".kendoChipList\",\n PREFIX = \"k-chip-list-\",\n DOT = \".\",\n\n SELECT = \"select\",\n REMOVE = \"remove\";\n var html = kendo.html;\n\n var chipListStyles = {\n widget: \"k-chip-list\",\n item: \"k-chip\",\n selected: \"k-selected\",\n disabled: \"k-disabled\",\n enabledItemSelector: \"k-chip:not(.k-disabled)\"\n };\n\n var ChipList = Widget.extend({\n init: function(element, options) {\n var that = this;\n options = options || {};\n Widget.fn.init.call(that, element, options);\n\n html.renderChipList(element, $.extend({}, options));\n\n that._selectable = that.options.selectable;\n that._bindEvents();\n that._items();\n },\n\n options: {\n name: \"ChipList\",\n selectable: \"none\",\n items: [],\n fillMode: \"solid\",\n rounded: \"medium\",\n size: \"medium\",\n itemSize: \"medium\"\n },\n\n events: [\n SELECT,\n REMOVE\n ],\n\n destroy: function() {\n var that = this;\n\n if (that._keydownProxy) {\n that.unbind(that._keydownProxy);\n that._keydownProxy = null;\n }\n\n if (that._selectProxy) {\n that.unbind(that._selectProxy);\n that._selectProxy = null;\n }\n\n if (that._removeProxy) {\n that.unbind(that._removeProxy);\n that._removeProxy = null;\n }\n\n that.element.off(NS);\n that.element.find(\"[data-role='chip']\").each(function() {\n that._getChipFromElement(this).destroy();\n });\n\n Widget.fn.destroy.call(this);\n },\n\n _updateCssClasses: function() {\n var that = this,\n options = that.options,\n styles = chipListStyles;\n\n // Remove all class names\n that.element.removeClass(function(index, className) {\n if (className.indexOf('k-') === 0) {\n that.element.removeClass(className);\n }\n });\n\n that.element.addClass(styles.widget);\n that.element.addClass(kendo.getValidCssClass(PREFIX, \"size\", options.size));\n },\n\n _getInitializeChipOptions: function(itemOptions) {\n var that = this,\n options = that.options;\n\n var attributes = $.extend(itemOptions.attributes || {}, {\n tabindex: \"-1\"\n });\n\n if (options.selectable !== \"none\") {\n attributes.role = \"option\";\n attributes[\"aria-selected\"] = itemOptions.selected;\n }\n\n if (options.removable || itemOptions.removable) {\n attributes[\"aria-keyshortcuts\"] = \"Enter Delete\";\n }\n\n return $.extend({\n fillMode: options.fillMode,\n size: options.itemSize,\n rounded: options.rounded,\n selectable: options.selectable !== \"none\",\n removable: options.removable,\n remove: that._removeProxy,\n select: that._selectProxy,\n }, itemOptions, { attributes: attributes });\n },\n\n _getChipFromElement: function(element) {\n return $(element).getKendoChip() || $(element).find(\"[data-role='chip']\").getKendoChip();\n },\n\n _items: function() {\n var that = this,\n options = that.options,\n items = options.items,\n chipOptions,\n selectedItems,\n chipEl,\n firstNavigatableItem,\n item;\n\n for (var i = 0; i < items.length; i++) {\n chipOptions = that._getInitializeChipOptions(items[i]);\n chipEl = $(\"\");\n that.element.append(chipEl);\n item = that._createChip(chipEl, chipOptions);\n }\n\n firstNavigatableItem = that._getFirstNavigatableItem();\n if (firstNavigatableItem) {\n that._applyTabIndex(that.items().index(firstNavigatableItem));\n }\n\n if (that._selectable === \"single\") {\n selectedItems = that.items().filter(DOT + chipListStyles.selected);\n selectedItems.each(function(ind, ch) {\n if (ind !== selectedItems.length - 1) {\n var chip = that._getChipFromElement(ch);\n if (chip) {\n chip.select(false);\n }\n }\n });\n }\n },\n\n _isItem: function(item) {\n var that = this;\n\n item = $(item);\n\n return item.is(DOT + chipListStyles.item) && !!that.element.find(item).length;\n },\n\n _applyTabIndex: function(index) {\n var that = this;\n var itemElement = that.item(+index ? +index : 0);\n\n that.items().each(function(ind, el) {\n $(el).attr(\"tabindex\", \"-1\");\n });\n\n itemElement.attr(\"tabindex\", \"0\");\n },\n\n _createChip: function(element, chipOptions) {\n return element.kendoChip(chipOptions);\n },\n\n _bindEvents: function() {\n var that = this;\n that._keydownProxy = that._keydown.bind(that);\n that._selectProxy = that._select.bind(that);\n that._removeProxy = that._remove.bind(that);\n\n that.element.on(\"keydown\" + NS, DOT + chipListStyles.item, that._keydownProxy);\n },\n\n _select: function(ev) {\n var that = this,\n chip = ev.sender;\n\n if (that._selectable == \"none\") {\n ev.preventDefault();\n return;\n }\n\n that._triggerSelect(chip, ev);\n },\n\n _triggerSelect: function(item, ev) {\n var that = this,\n selectedItems;\n\n if (that.element.is(DOT + chipListStyles.disabled)) {\n return;\n }\n\n if (that.trigger(SELECT, { originalEvent: ev, item: item })) {\n return;\n }\n\n if (that._selectable === \"single\") {\n selectedItems = that.select();\n if (selectedItems.length > 0) {\n selectedItems.each(function(ind, selectedChipElement) {\n var chip = that._getChipFromElement(selectedChipElement);\n if (chip && chip !== item) {\n chip.select(false);\n }\n });\n }\n }\n },\n\n _remove: function(ev) {\n var that = this,\n chip = ev.sender;\n\n if (that.trigger(REMOVE, { originalEvent: ev, item: ev.sender })) {\n return;\n }\n\n that._removeItem(chip);\n },\n\n _removeItem: function(chip) {\n var that = this;\n if (chip) {\n var el = chip.wrapper;\n chip.destroy();\n el.remove();\n that._focusNavigatableItem();\n }\n },\n\n _keydown: function(ev) {\n // change the tabindex to the next/prev chip\n // and remove it from the others\n var that = this,\n target = $(ev.target).closest(DOT + chipListStyles.item),\n key = ev.keyCode;\n\n if (key === keys.LEFT || key === keys.RIGHT) {\n that._focusNavigatableItem(key, target);\n }\n // add support for Home and End keys?\n },\n\n _focusNavigatableItem: function(key, target) {\n var that = this;\n var nextCandidate = that._getNavigatableItem(key, target);\n if (nextCandidate) {\n that._applyTabIndex(that.items().index(nextCandidate));\n nextCandidate.focus();\n }\n },\n\n _getFirstNavigatableItem: function() {\n var that = this;\n return that.items().filter(DOT + chipListStyles.enabledItemSelector).first();\n },\n\n _getLastNavigatableItem: function() {\n var that = this;\n return that.items().filter(DOT + chipListStyles.enabledItemSelector).last();\n },\n\n _getNavigatableItem: function(key, target) {\n var that = this;\n var current;\n\n if (target) {\n current = target;\n } else {\n current = that._getFirstNavigatableItem();\n }\n\n if (key === keys.LEFT && target) {\n current = target.prevAll(DOT + chipListStyles.enabledItemSelector).first();\n }\n\n if (key === keys.RIGHT && target) {\n current = target.nextAll(DOT + chipListStyles.enabledItemSelector).first();\n }\n\n return current.length ? current : null;\n },\n\n items: function() {\n var that = this;\n return that.element.children();\n },\n\n select: function(item, state) {\n var that = this,\n chip,\n selectedItems = that.items().filter(DOT + chipListStyles.selected);\n\n if (!item) {\n return selectedItems;\n }\n\n state = state !== false;\n\n chip = that._getChipFromElement(item);\n if (chip) {\n if (that._selectable === \"single\") {\n selectedItems = that.select();\n if (selectedItems.length > 0) {\n selectedItems.each(function(ind, selectedChipElement) {\n var chip = that._getChipFromElement(selectedChipElement);\n if (chip && chip !== item) {\n chip.select(false);\n }\n });\n }\n }\n\n chip.select(state);\n }\n },\n\n enable: function(item, state) {\n var chip = this._getChipFromElement(item);\n state = state !== false;\n\n if (chip) {\n chip.enable(state);\n }\n },\n\n item: function(index) {\n var that = this;\n\n if (isNaN(index)) {\n return null;\n }\n\n return that.items().eq(index);\n },\n\n itemById: function(id) {\n var that = this;\n\n return that.element.find(\"#\" + id);\n },\n\n add: function(item, before) {\n // add validation to get element, options object and a Chip widget\n var that = this,\n method = \"append\",\n chip,\n chipEl,\n targetElement = that.element;\n\n if (before && that._isItem(before)) {\n method = \"before\";\n targetElement = $(before);\n }\n\n chip = that._getChipFromElement(item);\n if (chip) {\n if (that._selectable !== \"none\") {\n chip.wrapper.attr(\"role\", \"option\");\n }\n\n targetElement[method](chip.wrapper);\n } else if (item && isPlainObject(item) && !isEmptyObject(item)) {\n chipEl = $(\"\");\n targetElement[method](chipEl);\n that._createChip(chipEl, that._getInitializeChipOptions(item));\n }\n },\n\n remove: function(item) {\n var that = this;\n\n if (item && that._isItem(item)) {\n kendo.destroy(item);\n item.remove();\n that._focusNavigatableItem();\n }\n },\n\n setOptions: function(options) {\n var that = this;\n\n Widget.fn.setOptions.call(this, options);\n that._updateCssClasses();\n\n if (options.items) {\n that.element.empty();\n that._items();\n }\n }\n });\n\n ui.plugin(ChipList);\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.core.js';\nimport './kendo.draganddrop.js';\nimport './kendo.chip.js';\nimport './kendo.chiplist.js';\nimport './kendo.icons.js';\n\nvar __meta__ = {\n id: \"groupable\",\n name: \"Groupable\",\n category: \"framework\",\n depends: [ \"core\", \"draganddrop\", \"icons\" ],\n advanced: true\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n Widget = kendo.ui.Widget,\n outerWidth = kendo._outerWidth,\n kendoAttr = kendo.attr,\n extend = $.extend,\n each = $.each,\n isRtl = false,\n\n DIR = \"dir\",\n FIELD = \"field\",\n TITLE = \"title\",\n ASCENDING = \"asc\",\n DESCENDING = \"desc\",\n REMOVEGROUP = \"removeGroup\",\n GROUP_SORT = \"group-sort\",\n DROP_CONTAINER = \"k-grouping-drop-container\",\n NS = \".kendoGroupable\",\n CHANGE = \"change\",\n hint = function(target) {\n var title = target.attr(kendo.attr(\"title\"));\n if (title) {\n title = kendo.htmlEncode(title);\n }\n\n return $('
    ')\n .html(title || target.attr(kendo.attr(\"field\")))\n .prepend(kendo.ui.icon({ icon: \"cancel\", iconClass: \"k-drag-status\" }));\n },\n dropCue = $('
    ');\n\n\n function removeText(element) {\n element.contents().filter(function() {\n return this.nodeType === 3;\n }).remove();\n }\n\n var Groupable = Widget.extend({\n init: function(element, options) {\n var that = this,\n group = kendo.guid(),\n intializePositions = that._intializePositions.bind(that),\n draggable,\n horizontalCuePosition,\n dropCuePositions = that._dropCuePositions = [];\n\n Widget.fn.init.call(that, element, options);\n\n isRtl = kendo.support.isRtl(element);\n horizontalCuePosition = isRtl ? \"right\" : \"left\";\n\n that.draggable = draggable = that.options.draggable || new kendo.ui.Draggable(that.element, {\n filter: that.options.draggableElements,\n hint: hint,\n group: group\n });\n\n that.groupContainer = $(that.options.groupContainer, that.element)\n .kendoDropTarget({\n group: draggable.options.group,\n dragenter: function(e) {\n if (that._canDrag(e.draggable.currentTarget)) {\n kendo.ui.icon(e.draggable.hint.find(\".k-drag-status\"), { icon: \"plus\" });\n dropCue.css(horizontalCuePosition, 0).appendTo(that.groupContainer);\n }\n },\n dragleave: function(e) {\n kendo.ui.icon(e.draggable.hint.find(\".k-drag-status\"), { icon: \"cancel\" });\n\n dropCue.remove();\n },\n drop: function(e) {\n var targetElement = e.draggable.currentTarget,\n field = targetElement.attr(kendo.attr(\"field\")),\n title = targetElement.attr(kendo.attr(\"title\")),\n colID = targetElement.attr(\"id\"),\n sourceIndicator = that.indicator(field),\n dropCuePositions = that._dropCuePositions,\n lastCuePosition = dropCuePositions[dropCuePositions.length - 1],\n position,\n method = \"after\",\n parentLeft = isRtl || !lastCuePosition ? 0 : lastCuePosition.element.parent().position().left;\n var sortOptions = extend({}, that.options.sort, targetElement.data(GROUP_SORT));\n var dir = sortOptions.dir;\n\n if (!targetElement.hasClass(\"k-chip\") && !that._canDrag(targetElement)) {\n return;\n }\n if (lastCuePosition) {\n position = that._dropCuePosition(kendo.getOffset(dropCue).left + parentLeft + parseInt(lastCuePosition.element.css(\"marginLeft\"), 10) * (isRtl ? -1 : 1) + parseInt(lastCuePosition.element.css(\"marginRight\"), 10));\n if (position && that._canDrop($(sourceIndicator), position.element, position.left)) {\n if (position.before) {\n method = \"before\";\n }\n\n position.element[method](sourceIndicator || that.buildIndicator(field, title, dir, colID).wrapper);\n that._setIndicatorSortOptions(field, sortOptions);\n that._change();\n }\n } else {\n removeText(that._messageContainer);\n that._list.element.show();\n that._list.add(that.buildIndicator(field, title, dir, colID).element);\n that._setIndicatorSortOptions(field, sortOptions);\n that._change();\n }\n }\n })\n .kendoDraggable({\n filter: \"div.k-chip\",\n hint: hint,\n group: draggable.options.group,\n dragcancel: that._dragCancel.bind(that),\n dragstart: function(e) {\n var element = e.currentTarget,\n marginLeft = parseInt(element.css(\"marginLeft\"), 10),\n elementPosition = element.position(),\n left = isRtl ? elementPosition.left - marginLeft : elementPosition.left + outerWidth(element);\n\n intializePositions();\n dropCue.css(\"left\", left).appendTo(that.groupContainer);\n kendo.ui.icon(this.hint.find(\".k-drag-status\"), { icon: \"plus\" });\n },\n dragend: function() {\n that._dragEnd(this);\n },\n drag: that._drag.bind(that)\n });\n\n draggable.bind([ \"dragend\", \"dragcancel\", \"dragstart\", \"drag\" ],\n {\n dragend: function() {\n that._dragEnd(this);\n },\n dragcancel: that._dragCancel.bind(that),\n dragstart: function(e) {\n\n if (!that.options.allowDrag && !that._canDrag(e.currentTarget)) {\n e.preventDefault();\n return;\n }\n\n intializePositions();\n },\n drag: that._drag.bind(that)\n });\n\n that.dataSource = that.options.dataSource;\n that._messageContainer = that.groupContainer.find(\".\" + DROP_CONTAINER);\n\n if (!that._messageContainer.length) {\n that._messageContainer = $('
    ').addClass(DROP_CONTAINER).appendTo(that.groupContainer);\n }\n\n that._createList();\n\n if (that.dataSource && that._refreshHandler) {\n that.dataSource.unbind(CHANGE, that._refreshHandler);\n } else {\n that._refreshHandler = that.refresh.bind(that);\n }\n\n if (that.dataSource) {\n that.dataSource.bind(\"change\", that._refreshHandler);\n that.refresh();\n }\n },\n\n refresh: function() {\n var that = this,\n dataSource = that.dataSource;\n var groups = dataSource.group() || [];\n var fieldAttr = kendoAttr(FIELD);\n var titleAttr = kendoAttr(TITLE);\n\n if (that.groupContainer) {\n if (that._list) {\n that._list.remove(that._list.items());\n that._list.element.hide();\n }\n\n if (groups.length) {\n removeText(that._messageContainer);\n }\n\n each(groups, function(index, group) {\n var field = group.field;\n var dir = group.dir;\n var element = that.element\n .find(that.options.filter)\n .filter(function() {\n return $(this).attr(fieldAttr) === field;\n });\n var indicator = that.buildIndicator(field, element.attr(titleAttr), dir, element.attr(\"id\"));\n\n that._list.add(indicator.element);\n that._list.element.show();\n that._setIndicatorSortOptions(field, extend({}, that.options.sort, { dir: dir, compare: group.compare }));\n });\n }\n\n that._invalidateGroupContainer();\n },\n\n destroy: function() {\n var that = this;\n\n Widget.fn.destroy.call(that);\n\n that.groupContainer.off(NS);\n\n if (that.groupContainer.data(\"kendoDropTarget\")) {\n that.groupContainer.data(\"kendoDropTarget\").destroy();\n }\n\n if (that.groupContainer.data(\"kendoDraggable\")) {\n that.groupContainer.data(\"kendoDraggable\").destroy();\n }\n\n if (!that.options.draggable) {\n that.draggable.destroy();\n }\n\n if (that.dataSource && that._refreshHandler) {\n that.dataSource.unbind(\"change\", that._refreshHandler);\n that._refreshHandler = null;\n }\n\n if (that._list) {\n that._list.destroy();\n }\n\n that.groupContainer = that.element = that.draggable = null;\n },\n\n events: [\"change\", \"removeGroup\"],\n\n options: {\n name: \"Groupable\",\n filter: \"th\",\n draggableElements: \"th\",\n messages: {\n empty: \"Drag a column header and drop it here to group by that column\"\n },\n sort: {\n dir: ASCENDING,\n compare: null\n },\n enableContextMenu: false\n },\n\n indicator: function(field) {\n var indicators = $(\".k-chip\", this.groupContainer);\n return $.grep(indicators, function(item)\n {\n return $(item).attr(kendo.attr(\"field\")) === field;\n })[0];\n },\n\n removeHandler: function(e) {\n var that = this;\n\n that._removeIndicator(e.sender.wrapper);\n },\n\n clickHandler: function(e) {\n var that = this;\n var indicator = e.sender.wrapper;\n var dirIcon = indicator.find(\".k-chip-icon\");\n var newDir = dirIcon.attr(kendoAttr(DIR)) === ASCENDING ? DESCENDING : ASCENDING;\n\n if ($(e.originalEvent.target).closest('.k-groupable-context-menu').length) {\n return;\n }\n\n dirIcon.attr(kendoAttr(DIR), newDir);\n that._change();\n },\n\n buildIndicator: function(field, title, dir, id) {\n var that = this;\n var indicator;\n var icon;\n var wrapper;\n\n dir = dir || (that.options.sort || {}).dir || ASCENDING;\n indicator = $(`
    `)\n .kendoChip({\n icon: `sort-${(dir || \"asc\") == \"asc\" ? \"asc-small\" : \"desc-small\"}`,\n iconClass: 'k-chip-icon',\n label: `${title || field}`,\n removable: true,\n size: that.options.size || \"medium\",\n remove: that.removeHandler.bind(that),\n click: that.clickHandler.bind(that),\n actions: that.options.enableContextMenu ? [\n { icon: \"more-vertical\", iconClass: \"k-groupable-context-menu\" }\n ] : null\n }).data(\"kendoChip\");\n wrapper = indicator.wrapper;\n icon = wrapper.find(\".k-chip-icon\").first();\n wrapper.attr(`data-${kendo.ns}field`, field);\n wrapper.attr(`data-${kendo.ns}title`, title || \"\");\n\n if (id) {\n wrapper.attr(`data-${kendo.ns}id`, id);\n }\n\n icon.attr(\"title\", `(sorted ${dir == \"asc\" ? \"ascending\" : \"descending\"})`);\n icon.attr(`data-${kendo.ns}dir`, dir);\n\n return indicator;\n },\n\n _setIndicatorSortOptions: function(field, options) {\n var indicator = $(this.indicator(field));\n indicator.data(GROUP_SORT, options);\n },\n\n aggregates: function() {\n var that = this;\n var names;\n var idx;\n var length;\n\n return that.element.find(that.options.filter).map(function() {\n var cell = $(this),\n aggregate = cell.attr(kendo.attr(\"aggregates\")),\n member = cell.attr(kendo.attr(\"field\"));\n\n if (aggregate && aggregate !== \"\") {\n names = aggregate.split(\",\");\n aggregate = [];\n for (idx = 0, length = names.length; idx < length; idx++) {\n aggregate.push({ field: member, aggregate: names[idx] });\n }\n }\n return aggregate;\n }).toArray();\n },\n\n descriptors: function() {\n var that = this,\n indicators = $(\".k-chip\", that.groupContainer),\n field,\n aggregates = that.aggregates();\n\n return $.map(indicators, function(item) {\n item = $(item);\n field = item.attr(kendo.attr(\"field\"));\n var sortOptions = that.options.sort || {};\n var indicatorSortOptions = item.data(GROUP_SORT) || {};\n var dirIcon = item.find(\".k-chip-icon\");\n\n return {\n field: field,\n dir: dirIcon.attr(kendo.attr(\"dir\")),\n aggregates: aggregates || [],\n colID: item.attr(kendo.attr(\"id\")),\n compare: indicatorSortOptions.compare || sortOptions.compare\n };\n });\n },\n\n _removeIndicator: function(indicator) {\n var that = this;\n\n that.trigger(REMOVEGROUP, {\n field: indicator.attr(kendo.attr(\"field\")),\n colID: indicator.attr(kendo.attr(\"id\")),\n });\n that._list.remove(indicator);\n indicator.off();\n indicator.removeData();\n that._invalidateGroupContainer();\n that._change();\n },\n\n _change: function() {\n var that = this;\n if (that.dataSource) {\n var descriptors = that.descriptors();\n if (that.trigger(\"change\", { groups: descriptors })) {\n that.refresh();\n return;\n }\n that.dataSource.group(descriptors);\n }\n },\n\n _dropCuePosition: function(position) {\n var that = this;\n var dropCuePositions = this._dropCuePositions;\n if (!dropCue.is(\":visible\") || dropCuePositions.length === 0) {\n return;\n }\n\n position = Math.ceil(position);\n\n var lastCuePosition = dropCuePositions[dropCuePositions.length - 1],\n left = lastCuePosition.left,\n right = lastCuePosition.right,\n marginLeft = parseInt(lastCuePosition.element.css(\"marginLeft\"), 10),\n marginRight = parseInt(lastCuePosition.element.css(\"marginRight\"), 10),\n parentLeft = lastCuePosition.element.parent().position().left - parseInt(that.groupContainer.css(\"paddingLeft\"), 10);\n\n if (position >= right && !isRtl || position < left && isRtl) {\n position = {\n left: lastCuePosition.element.position().left + (!isRtl ? outerWidth(lastCuePosition.element) + marginRight : parentLeft - marginLeft),\n element: lastCuePosition.element,\n before: false\n };\n } else {\n position = $.grep(dropCuePositions, function(item) {\n return (item.left <= position && position <= item.right) || (isRtl && position > item.right);\n })[0];\n\n if (position) {\n position = {\n left: isRtl ? position.element.position().left + outerWidth(position.element) + marginRight + parentLeft : position.element.position().left - marginLeft,\n element: position.element,\n before: true\n };\n }\n }\n\n return position;\n },\n _drag: function(event) {\n var position = this._dropCuePosition(event.x.location);\n\n if (position) {\n dropCue.css({ left: position.left, right: \"auto\" });\n }\n },\n _canDrag: function(element) {\n var field = element.attr(kendo.attr(\"field\"));\n\n return element.attr(kendo.attr(\"groupable\")) != \"false\" &&\n field &&\n (element.hasClass(\"k-chip\") ||\n !this.indicator(field));\n },\n _canDrop: function(source, target, position) {\n var next = source.next(),\n result = source[0] !== target[0] && (!next[0] || target[0] !== next[0] || (!isRtl && position > next.position().left || isRtl && position < next.position().left));\n return result;\n },\n _dragEnd: function(draggable) {\n var that = this,\n field = draggable.currentTarget.attr(kendo.attr(\"field\")),\n sourceIndicator = that.indicator(field);\n\n if (draggable !== that.options.draggable && !draggable.dropped && sourceIndicator) {\n that._removeIndicator($(sourceIndicator));\n }\n\n that._dragCancel();\n },\n _dragCancel: function() {\n dropCue.remove();\n this._dropCuePositions = [];\n },\n _intializePositions: function() {\n var that = this,\n indicators = $(\".k-chip\", that.groupContainer),\n left;\n\n that._dropCuePositions = $.map(indicators, function(item) {\n item = $(item);\n left = kendo.getOffset(item).left;\n return {\n left: parseInt(left, 10),\n right: parseInt(left + outerWidth(item), 10),\n element: item\n };\n });\n },\n _invalidateGroupContainer: function() {\n var that = this;\n var groupContainer = that.groupContainer;\n var list = that._list;\n\n if (groupContainer && list && list.element.is(\":empty\")) {\n this._messageContainer.text(this.options.messages.empty);\n }\n },\n\n _createList: function() {\n var that = this;\n\n that.groupContainer.find(\".k-chip-list\").remove();\n that._list = $(\"
    \").kendoChipList({ selectable: \"none\", size: that.options.size || \"medium\" }).data(\"kendoChipList\");\n that._list.element.insertBefore(that._messageContainer);\n }\n });\n\n kendo.ui.plugin(Groupable);\n\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.core.js';\nimport './kendo.draganddrop.js';\nimport './kendo.icons.js';\n\nvar __meta__ = {\n id: \"reorderable\",\n name: \"Reorderable\",\n category: \"framework\",\n depends: [ \"core\", \"draganddrop\", \"icons\" ],\n advanced: true\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n outerWidth = kendo._outerWidth,\n outerHeight = kendo._outerHeight,\n getOffset = kendo.getOffset,\n Widget = kendo.ui.Widget,\n CHANGE = \"change\",\n KREORDERABLE = \"k-reorderable\";\n\n var Reorderable = Widget.extend({\n init: function(element, options) {\n var that = this,\n draggable,\n group = kendo.guid() + \"-reorderable\";\n\n Widget.fn.init.call(that, element, options);\n\n element = that.element.addClass(KREORDERABLE);\n options = that.options;\n\n that.draggable = draggable = options.draggable || new kendo.ui.Draggable(element, {\n group: group,\n autoScroll: true,\n filter: options.filter,\n hint: options.hint\n });\n\n if (!that.options.dropFilter) {\n that.options.dropFilter = draggable.options.filter;\n }\n\n that.reorderDropCue = that.options.reorderDropCue;\n\n element.find(options.dropFilter).kendoDropTarget({\n group: draggable.options.group,\n dragenter: function(e) {\n var externalDraggableInstance = that._externalDraggable(e);\n\n if (!that._draggable && !externalDraggableInstance) {\n return;\n }\n\n if (externalDraggableInstance) {\n that._handleExternalDraggable(externalDraggableInstance);\n }\n\n var dropTarget = this.element, offset;\n\n var denied = that._isPartOfSortable(that._draggable) ? (!that._dropTargetAllowed(dropTarget) || that._isLastDraggable()) : false;\n\n that.toggleHintClass(e.draggable.hint, denied);\n\n if (!denied) {\n offset = getOffset(dropTarget);\n var cueOffset = { top: offset.top, left: offset.left };\n var isHorizontal = options.orientation === \"horizontal\";\n\n if (!options.smartPosition || (options.inSameContainer && !options.inSameContainer({\n source: dropTarget,\n target: that._draggable,\n sourceIndex: that._index(dropTarget),\n targetIndex: that._index(that._draggable)\n }))) {\n that._dropTarget = dropTarget;\n } else {\n if (that._index(dropTarget) > that._index(that._draggable) && options.smartPosition) {\n cueOffset[isHorizontal ? \"left\" : \"top\"] += isHorizontal ? outerWidth(dropTarget) : outerHeight(dropTarget);\n }\n }\n\n that.reorderDropCue.css({\n height: outerHeight(dropTarget),\n top: cueOffset.top,\n left: cueOffset.left,\n zIndex: 19000\n })\n .appendTo(document.body);\n\n if (options.positionDropCue) {\n options.positionDropCue(that.reorderDropCue, dropTarget);\n }\n }\n },\n dragleave: function(e) {\n that.toggleHintClass(e.draggable.hint, true);\n that.reorderDropCue.remove();\n that._dropTarget = null;\n },\n drop: function() {\n that._dropTarget = null;\n\n if (!that._draggable) {\n return;\n }\n var dropTarget = this.element;\n var draggable = that._draggable;\n var dropIndex = that._index(dropTarget);\n\n var isAfter = that.options.orientation === \"horizontal\" ?\n getOffset(that.reorderDropCue).left > getOffset(dropTarget).left :\n getOffset(that.reorderDropCue).top > getOffset(dropTarget).top;\n\n dropIndex = isAfter ? dropIndex + 1 : dropIndex;\n\n if (that._dropTargetAllowed(dropTarget) && !that._isLastDraggable() && that._index(draggable) !== dropIndex) {\n that.trigger(CHANGE, {\n element: that._draggable,\n target: dropTarget,\n oldIndex: that._index(draggable),\n newIndex: that._index(dropTarget),\n position: isAfter ? \"after\" : \"before\"\n });\n }\n\n if (that.reorderDropCue) {\n that.reorderDropCue.remove();\n }\n }\n });\n\n draggable.bind([ \"dragcancel\", \"dragend\", \"dragstart\", \"drag\" ], {\n dragcancel: that._dragcancel.bind(that),\n dragend: that._dragend.bind(that),\n dragstart: that._dragstart.bind(that),\n drag: that._drag.bind(that)\n });\n },\n\n options: {\n name: \"Reorderable\",\n filter: \"*\",\n orientation: \"horizontal\",\n deniedIcon: \"cancel\",\n allowIcon: \"plus\",\n reorderDropCue: $('
    '),\n smartPosition: true\n },\n\n events: [\n CHANGE\n ],\n\n toggleHintClass: function(hint, denied) {\n var that = this,\n options = that.options;\n\n hint = $(hint);\n\n if (hint.find(\".k-drag-status\").length > 0) {\n kendo.ui.icon(hint.find(\".k-drag-status\").eq(0), { icon: denied ? options.deniedIcon : options.allowIcon });\n }\n },\n\n _handleExternalDraggable: function(draggable) {\n var that = this;\n var draggableFilter = that.options.dropFilter.trimStart();\n\n // make direct child selectors compatible with .closest()\n if (draggableFilter && draggableFilter[0] == \">\") {\n draggableFilter = draggableFilter.substring(1);\n }\n\n that._dragcancelHandler = that._dragcancel.bind(that);\n that._dragendHandler = that._dragend.bind(that);\n that._dragstartHandler = that._dragstart.bind(that);\n that._dragHandler = that._drag.bind(that);\n\n that._draggable = draggable.currentTarget.closest(draggableFilter);\n that._draggableInstance = draggable;\n that._elements = that.element.find(that.options.dropFilter);\n\n draggable.bind([ \"dragcancel\", \"dragend\", \"dragstart\", \"drag\" ], {\n dragcancel: that._dragcancelHandler,\n dragend: that._dragendHandler,\n dragstart: that._dragstartHandler,\n drag: that._dragHandler\n });\n },\n\n _dragcancel: function() {\n var that = this;\n\n if (that._draggableInstance && (that._dragcancelHandler || that._dragendHandler ||\n that._dragstartHandler || that._dragHandler)) {\n\n that._draggableInstance.unbind({\n dragcancel: that._dragcancelHandler,\n dragend: that._dragendHandler,\n dragstart: that._dragstartHandler,\n drag: that._dragHandler\n });\n }\n\n if (that.reorderDropCue) {\n that.reorderDropCue.remove();\n }\n\n that._draggable = null;\n that._elements = null;\n\n },\n _dragend: function() {\n var that = this;\n\n if (that._draggableInstance && (that._dragcancelHandler || that._dragendHandler ||\n that._dragstartHandler || that._dragHandler)) {\n\n that._draggableInstance.unbind({\n dragcancel: that._dragcancelHandler,\n dragend: that._dragendHandler,\n dragstart: that._dragstartHandler,\n drag: that._dragHandler\n });\n }\n\n if (that.reorderDropCue) {\n that.reorderDropCue.remove();\n }\n\n that._draggable = null;\n that._elements = null;\n },\n _dragstart: function(e) {\n var that = this;\n var target = $(e.currentTarget);\n var draggableFilter = that.options.dropFilter.trimStart();\n\n // make direct child selectors compatible with .closest()\n if (draggableFilter && draggableFilter[0] == \">\") {\n draggableFilter = draggableFilter.substring(1);\n }\n\n that._draggable = target.is(draggableFilter) ? target : target.closest(draggableFilter);\n that._elements = that.element.find(that.options.dropFilter);\n },\n _drag: function(e) {\n var that = this,\n dropIndex, sourceIndex, denied,\n offset = {},\n target,\n draggableFilter = that.options.dropFilter.trimStart();\n\n // make direct child selectors compatible with .closest()\n if (draggableFilter && draggableFilter[0] == \">\") {\n draggableFilter = draggableFilter.substring(1);\n }\n\n target = $(e.currentTarget).closest(draggableFilter);\n\n if (!that._dropTarget || (that.options.smartPosition && e.sender.hint.find(\".k-drag-status\").is(\".k-i-cancel,.k-svg-i-cancel\"))) {\n return;\n }\n\n dropIndex = that._index(that._dropTarget);\n sourceIndex = that._index(target);\n sourceIndex = dropIndex > sourceIndex ? sourceIndex + 1 : sourceIndex;\n\n if (that.options.orientation === \"horizontal\") {\n var dropStartOffset = getOffset(that._dropTarget).left;\n var width = outerWidth(that._dropTarget);\n\n if (e.pageX > dropStartOffset + width / 2) {\n offset.left = dropStartOffset + width;\n dropIndex += 1;\n } else {\n offset.left = dropStartOffset;\n }\n } else {\n var dropStartTop = getOffset(that._dropTarget).top;\n var height = outerHeight(that._dropTarget);\n\n if (e.pageY > dropStartTop + height / 2) {\n offset.top = dropStartTop + height;\n dropIndex += 1;\n } else {\n offset.top = dropStartTop;\n }\n }\n\n that.reorderDropCue.css(offset);\n\n if (that.options.positionDropCue) {\n that.options.positionDropCue(that.reorderDropCue, that._dropTarget);\n }\n\n if (that._isPartOfSortable(target)) {\n\n denied = sourceIndex === dropIndex ||\n (that.options.dragOverContainers && !that.options.dragOverContainers(sourceIndex, dropIndex)) ||\n e.clickMoveClick && e.currentTarget.hasClass(\"k-drag-cell\") && $(e.elementUnderCursor).closest(\".k-drag-cell\").length === 0;\n\n that.toggleHintClass(e.sender.hint, denied);\n }\n },\n\n _isPartOfSortable: function(draggable) {\n var that = this;\n\n return that._elements.index(draggable) >= 0;\n },\n\n _externalDraggable: function(e) {\n var that = this,\n options = that.options;\n\n if (!that._draggable && options.externalDraggable) {\n return options.externalDraggable(e);\n }\n\n return null;\n },\n\n _isLastDraggable: function() {\n var inSameContainer = this.options.inSameContainer,\n draggable = this._draggable[0],\n elements = this._elements.get(),\n found = false,\n item;\n\n if (!inSameContainer) {\n return false;\n }\n\n while (!found && elements.length > 0) {\n item = elements.pop();\n found = draggable !== item && inSameContainer({\n source: draggable,\n target: item,\n sourceIndex: this._index(draggable),\n targetIndex: this._index(item)\n });\n }\n\n return !found;\n },\n\n _dropTargetAllowed: function(dropTarget) {\n var inSameContainer = this.options.inSameContainer,\n dragOverContainers = this.options.dragOverContainers,\n draggable = this._draggable;\n\n if (draggable[0] === dropTarget[0]) {\n return false;\n }\n\n if (!inSameContainer || !dragOverContainers) {\n return true;\n }\n\n if (inSameContainer({ source: draggable,\n target: dropTarget,\n sourceIndex: this._index(draggable),\n targetIndex: this._index(dropTarget)\n })) {\n return true;\n }\n\n return dragOverContainers(this._index(draggable), this._index(dropTarget));\n },\n\n _index: function(element) {\n return this._elements.index(element);\n },\n\n destroy: function() {\n var that = this;\n\n\n Widget.fn.destroy.call(that);\n\n that.element.find(that.options.dropFilter).each(function() {\n var item = $(this);\n if (item.data(\"kendoDropTarget\")) {\n item.data(\"kendoDropTarget\").destroy();\n }\n });\n\n if (that.draggable) {\n that.draggable.destroy();\n\n that.draggable.element = that.draggable = null;\n }\n\n that.reorderDropCue.remove();\n that.elements = that.reorderDropCue = that._elements = that._draggable = null;\n }\n });\n\n kendo.ui.plugin(Reorderable);\n\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.core.js';\nimport './kendo.draganddrop.js';\n\nvar __meta__ = {\n id: \"resizable\",\n name: \"Resizable\",\n category: \"framework\",\n depends: [ \"core\", \"draganddrop\" ],\n advanced: true\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n ui = kendo.ui,\n Widget = ui.Widget,\n isFunction = kendo.isFunction,\n extend = $.extend,\n HORIZONTAL = \"horizontal\",\n VERTICAL = \"vertical\",\n START = \"start\",\n RESIZE = \"resize\",\n RESIZEEND = \"resizeend\";\n\n var Resizable = Widget.extend({\n init: function(element, options) {\n var that = this;\n\n Widget.fn.init.call(that, element, options);\n\n that.orientation = that.options.orientation.toLowerCase() != VERTICAL ? HORIZONTAL : VERTICAL;\n that._positionMouse = that.orientation == HORIZONTAL ? \"x\" : \"y\";\n that._position = that.orientation == HORIZONTAL ? \"left\" : \"top\";\n that._sizingDom = that.orientation == HORIZONTAL ? \"outerWidth\" : \"outerHeight\";\n\n that.draggable = new ui.Draggable(options.draggableElement || element, {\n distance: 1,\n filter: options.handle,\n drag: that._resize.bind(that),\n dragcancel: that._cancel.bind(that),\n dragstart: that._start.bind(that),\n dragend: that._dragend.bind(that),\n clickMoveClick: options.clickMoveClick\n });\n\n that.userEvents = that.draggable.userEvents;\n },\n\n events: [\n RESIZE,\n RESIZEEND,\n START\n ],\n\n options: {\n name: \"Resizable\",\n orientation: HORIZONTAL,\n clickMoveClick: false\n },\n\n resize: function() {\n // Overrides base widget resize\n },\n\n _max: function(e) {\n var that = this,\n hintSize = that.hint ? that.hint[that._sizingDom]() : 0,\n size = that.options.max;\n\n return isFunction(size) ? size(e) : size !== undefined$1 ? (that._initialElementPosition + size) - hintSize : size;\n },\n\n _min: function(e) {\n var that = this,\n size = that.options.min;\n\n return isFunction(size) ? size(e) : size !== undefined$1 ? that._initialElementPosition + size : size;\n },\n\n _start: function(e) {\n var that = this,\n hint = that.options.hint,\n el = $(e.currentTarget);\n\n that._initialElementPosition = el.position()[that._position];\n that._initialMousePosition = e[that._positionMouse].startLocation;\n\n if (hint) {\n that.hint = isFunction(hint) ? $(hint(el)) : hint;\n\n that.hint.css({\n position: \"absolute\"\n })\n .css(that._position, that._initialElementPosition)\n .appendTo(that.element);\n }\n\n that.trigger(START, e);\n\n that._maxPosition = that._max(e);\n that._minPosition = that._min(e);\n\n $(document.body).css(\"cursor\", el.css(\"cursor\"));\n },\n\n _resize: function(e) {\n var that = this,\n maxPosition = that._maxPosition,\n minPosition = that._minPosition,\n currentPosition = that._initialElementPosition + (e[that._positionMouse].location - that._initialMousePosition),\n position;\n\n position = minPosition !== undefined$1 ? Math.max(minPosition, currentPosition) : currentPosition;\n that.position = position = maxPosition !== undefined$1 ? Math.min(maxPosition, position) : position;\n\n if (that.hint) {\n that.hint.toggleClass(that.options.invalidClass || \"\", position == maxPosition || position == minPosition)\n .css(that._position, position);\n }\n\n that.resizing = true;\n that.trigger(RESIZE, extend(e, { position: position }));\n },\n\n _dragend: function(e) {\n this._stop();\n this.trigger(RESIZEEND, extend(e, { position: this.position }));\n },\n\n _stop: function() {\n var that = this;\n\n if (that.hint) {\n that.hint.remove();\n }\n\n that.resizing = false;\n $(document.body).css(\"cursor\", \"\");\n },\n\n _cancel: function(e) {\n var that = this;\n\n if (that.hint) {\n that.position = undefined$1;\n that.hint.css(that._position, that._initialElementPosition);\n that._stop();\n }\n },\n\n destroy: function() {\n var that = this;\n\n Widget.fn.destroy.call(that);\n\n if (that.draggable) {\n that.draggable.destroy();\n }\n },\n\n press: function(target) {\n if (!target) {\n return;\n }\n\n var position = target.position(),\n that = this;\n\n that.userEvents.press(position.left, position.top, target[0]);\n that.targetPosition = position;\n that.target = target;\n },\n\n move: function(delta) {\n var that = this,\n orientation = that._position,\n position = that.targetPosition,\n current = that.position;\n\n if (current === undefined$1) {\n current = position[orientation];\n }\n\n position[orientation] = current + delta;\n\n that.userEvents.move(position.left, position.top);\n },\n\n end: function() {\n this.userEvents.end();\n this.target = this.position = undefined$1;\n }\n });\n\n kendo.ui.plugin(Resizable);\n\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.draganddrop.js';\n\nvar __meta__ = {\n id: \"sortable\",\n name: \"Sortable\",\n category: \"framework\",\n depends: [ \"draganddrop\" ]\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n Widget = kendo.ui.Widget,\n outerWidth = kendo._outerWidth,\n outerHeight = kendo._outerHeight,\n\n START = \"start\",\n BEFORE_MOVE = \"beforeMove\",\n MOVE = \"move\",\n END = \"end\",\n CHANGE = \"change\",\n CANCEL = \"cancel\",\n\n ACTION_SORT = \"sort\",\n ACTION_REMOVE = \"remove\",\n ACTION_RECEIVE = \"receive\",\n\n DEFAULT_FILTER = \">*\",\n MISSING_INDEX = -1;\n\n function containsOrEqualTo(parent, child) {\n try {\n return $.contains(parent, child) || parent == child;\n } catch (e) {\n return false;\n }\n }\n\n function defaultHint(element) {\n return element.clone();\n }\n\n function defaultPlaceholder(element) {\n return element.clone().removeAttr(\"id\").css(\"visibility\", \"hidden\");\n }\n\n var Sortable = Widget.extend({\n init: function(element, options) {\n var that = this;\n\n Widget.fn.init.call(that, element, options);\n\n if (!that.options.placeholder) {\n that.options.placeholder = defaultPlaceholder;\n }\n\n if (!that.options.hint) {\n that.options.hint = defaultHint;\n }\n\n that.draggable = that._createDraggable();\n },\n\n events: [\n START,\n BEFORE_MOVE,\n MOVE,\n END,\n CHANGE,\n CANCEL\n ],\n\n options: {\n name: \"Sortable\",\n hint: null,\n placeholder: null,\n filter: DEFAULT_FILTER,\n holdToDrag: false,\n disabled: null,\n container: null,\n connectWith: null,\n handler: null,\n cursorOffset: null,\n axis: null,\n ignore: null,\n autoScroll: false,\n cursor: \"auto\",\n moveOnDragEnter: false\n },\n\n destroy: function() {\n this.draggable.destroy();\n Widget.fn.destroy.call(this);\n },\n\n _createDraggable: function() {\n var that = this,\n element = that.element,\n options = that.options;\n\n return new kendo.ui.Draggable(element, {\n filter: options.filter,\n hint: kendo.isFunction(options.hint) ? options.hint : $(options.hint),\n holdToDrag: options.holdToDrag,\n container: options.container ? $(options.container) : null,\n cursorOffset: options.cursorOffset,\n axis: options.axis,\n ignore: options.ignore,\n autoScroll: options.autoScroll,\n dragstart: that._dragstart.bind(that),\n dragcancel: that._dragcancel.bind(that),\n drag: that._drag.bind(that),\n dragend: that._dragend.bind(that)\n });\n },\n\n _dragstart: function(e) {\n var draggedElement = this.draggedElement = e.currentTarget,\n disabled = this.options.disabled,\n handler = this.options.handler,\n _placeholder = this.options.placeholder,\n placeholder = this.placeholder = kendo.isFunction(_placeholder) ? $(_placeholder.call(this, draggedElement)) : $(_placeholder);\n\n if (disabled && draggedElement.is(disabled)) {\n e.preventDefault();\n } else if (handler && !$(e.initialTarget).is(handler)) {\n e.preventDefault();\n } else {\n\n if (this.trigger(START, { item: draggedElement, draggableEvent: e })) {\n e.preventDefault();\n } else {\n draggedElement.css(\"display\", \"none\");\n draggedElement.before(placeholder);\n\n this._setCursor();\n }\n\n }\n },\n\n _dragcancel: function() {\n this._cancel();\n this.trigger(CANCEL, { item: this.draggedElement });\n\n this._resetCursor();\n },\n\n _drag: function(e) {\n var draggedElement = this.draggedElement,\n target = this._findTarget(e),\n targetCenter,\n cursorOffset = { left: e.x.location, top: e.y.location },\n offsetDelta,\n axisDelta = { x: e.x.delta, y: e.y.delta },\n direction,\n sibling,\n getSibling,\n axis = this.options.axis,\n moveOnDragEnter = this.options.moveOnDragEnter,\n eventData = { item: draggedElement, list: this, draggableEvent: e };\n\n if (axis === \"x\" || axis === \"y\") {\n this._movementByAxis(axis, cursorOffset, axisDelta[axis], eventData);\n return;\n }\n\n if (target) {\n targetCenter = this._getElementCenter(target.element);\n\n offsetDelta = {\n left: Math.round(cursorOffset.left - targetCenter.left),\n top: Math.round(cursorOffset.top - targetCenter.top)\n };\n\n $.extend(eventData, { target: target.element });\n\n if (target.appendToBottom) {\n this._movePlaceholder(target, null, eventData);\n return;\n }\n\n if (target.appendAfterHidden) {\n this._movePlaceholder(target, \"next\", eventData);\n }\n\n if (this._isFloating(target.element)) { //horizontal\n if ((axisDelta.x < 0 && moveOnDragEnter) || (!moveOnDragEnter && offsetDelta.left < 0)) {\n direction = \"prev\";\n } else if ((axisDelta.x > 0 && moveOnDragEnter) || (!moveOnDragEnter && offsetDelta.left > 0)) {\n direction = \"next\";\n }\n } else { //vertical\n if ((axisDelta.y < 0 && moveOnDragEnter) || (!moveOnDragEnter && offsetDelta.top < 0)) {\n direction = \"prev\";\n } else if ((axisDelta.y > 0 && moveOnDragEnter) || (!moveOnDragEnter && offsetDelta.top > 0)) {\n direction = \"next\";\n }\n }\n\n if (direction) {\n getSibling = (direction === \"prev\") ? jQuery.fn.prev : jQuery.fn.next;\n\n sibling = getSibling.call(target.element);\n\n //find the prev/next visible sibling\n while (sibling.length && !sibling.is(\":visible\")) {\n sibling = getSibling.call(sibling);\n }\n\n if (sibling[0] != this.placeholder[0]) {\n this._movePlaceholder(target, direction, eventData);\n }\n }\n }\n },\n\n _dragend: function(e) {\n var placeholder = this.placeholder,\n draggedElement = this.draggedElement,\n draggedIndex = this.indexOf(draggedElement),\n placeholderIndex = this.indexOf(placeholder),\n connectWith = this.options.connectWith,\n connectedList,\n isDefaultPrevented,\n eventData,\n connectedListEventData;\n\n this._resetCursor();\n\n eventData = {\n action: ACTION_SORT,\n item: draggedElement,\n oldIndex: draggedIndex,\n newIndex: placeholderIndex,\n draggableEvent: e\n };\n\n if (placeholderIndex >= 0) {\n isDefaultPrevented = this.trigger(END, eventData);\n } else {\n connectedList = placeholder.parents(connectWith).getKendoSortable();\n\n eventData.action = ACTION_REMOVE;\n connectedListEventData = $.extend({}, eventData, {\n action: ACTION_RECEIVE,\n oldIndex: MISSING_INDEX,\n newIndex: connectedList.indexOf(placeholder)\n });\n\n isDefaultPrevented = !(!this.trigger(END, eventData) && !connectedList.trigger(END, connectedListEventData));\n }\n\n if (isDefaultPrevented || placeholderIndex === draggedIndex) {\n this._cancel();\n return;\n }\n\n placeholder.replaceWith(draggedElement);\n\n draggedElement.show();\n this.draggable.dropped = true;\n\n eventData = {\n action: this.indexOf(draggedElement) != MISSING_INDEX ? ACTION_SORT : ACTION_REMOVE,\n item: draggedElement,\n oldIndex: draggedIndex,\n newIndex: this.indexOf(draggedElement),\n draggableEvent: e\n };\n\n this.trigger(CHANGE, eventData);\n\n if (connectedList) {\n connectedListEventData = $.extend({}, eventData, {\n action: ACTION_RECEIVE,\n oldIndex: MISSING_INDEX,\n newIndex: connectedList.indexOf(draggedElement)\n });\n\n connectedList.trigger(CHANGE, connectedListEventData);\n }\n\n },\n\n _findTarget: function(e) {\n var element = this._findElementUnderCursor(e),\n items,\n connectWith = this.options.connectWith,\n node;\n\n if ($.contains(this.element[0], element)) { //the element is part of the sortable container\n items = this.items();\n node = items.filter(element)[0] || items.has(element)[0];\n\n return node ? { element: $(node), sortable: this } : null;\n } else if (this.element[0] == element && this._isEmpty()) {\n return { element: this.element, sortable: this, appendToBottom: true };\n } else if (this.element[0] == element && this._isLastHidden()) {\n node = this.items().eq(0);\n return { element: node , sortable: this, appendAfterHidden: true };\n } else if (connectWith) { //connected lists are present\n return this._searchConnectedTargets(element, e);\n }\n },\n\n _findElementUnderCursor: function(e) {\n var elementUnderCursor = kendo.elementUnderCursor(e),\n draggable = e.sender;\n\n if (containsOrEqualTo(draggable.hint[0], elementUnderCursor)) {\n draggable.hint.hide();\n elementUnderCursor = kendo.elementUnderCursor(e);\n // IE8 does not return the element in iframe from first attempt\n if (!elementUnderCursor) {\n elementUnderCursor = kendo.elementUnderCursor(e);\n }\n draggable.hint.show();\n }\n\n return elementUnderCursor;\n },\n\n _searchConnectedTargets: function(element, e) {\n var connected = $(this.options.connectWith),\n sortableInstance,\n items,\n node;\n\n for (var i = 0; i < connected.length; i++) {\n sortableInstance = connected.eq(i).getKendoSortable();\n\n if ($.contains(connected[i], element)) {\n if (sortableInstance) {\n items = sortableInstance.items();\n node = items.filter(element)[0] || items.has(element)[0];\n\n if (node) {\n sortableInstance.placeholder = this.placeholder;\n return { element: $(node), sortable: sortableInstance };\n } else {\n return null;\n }\n }\n } else if (connected[i] == element) {\n if (sortableInstance && sortableInstance._isEmpty()) {\n return { element: connected.eq(i), sortable: sortableInstance, appendToBottom: true };\n } else if (this._isCursorAfterLast(sortableInstance, e)) {\n node = sortableInstance.items().last();\n return { element: node, sortable: sortableInstance };\n }\n }\n }\n\n },\n\n _isCursorAfterLast: function(sortable, e) {\n var lastItem = sortable.items().last(),\n cursorOffset = { left: e.x.location, top: e.y.location },\n lastItemOffset,\n delta;\n\n lastItemOffset = kendo.getOffset(lastItem);\n lastItemOffset.top += outerHeight(lastItem);\n lastItemOffset.left += outerWidth(lastItem);\n\n if (this._isFloating(lastItem)) { //horizontal\n delta = lastItemOffset.left - cursorOffset.left;\n } else { //vertical\n delta = lastItemOffset.top - cursorOffset.top;\n }\n\n return delta < 0 ? true : false;\n },\n\n _movementByAxis: function(axis, cursorOffset, delta, eventData) {\n var cursorPosition = (axis === \"x\") ? cursorOffset.left : cursorOffset.top,\n target = (delta < 0) ? this.placeholder.prev() : this.placeholder.next(),\n items = this.items(),\n targetCenter;\n\n if (target.length && !target.is(\":visible\")) {\n target = (delta < 0) ? target.prev() : target.next();\n }\n\n if (!items.filter(target).length) {\n return;\n }\n\n $.extend(eventData, { target: target });\n targetCenter = this._getElementCenter(target);\n\n if (targetCenter) {\n targetCenter = (axis === \"x\") ? targetCenter.left : targetCenter.top;\n }\n\n if (target.length && delta < 0 && cursorPosition - targetCenter < 0) { //prev\n this._movePlaceholder({ element: target, sortable: this }, \"prev\", eventData);\n } else if (target.length && delta > 0 && cursorPosition - targetCenter > 0) { //next\n this._movePlaceholder({ element: target, sortable: this }, \"next\", eventData);\n }\n },\n\n _movePlaceholder: function(target, direction, eventData) {\n var placeholder = this.placeholder;\n\n if (!target.sortable.trigger(BEFORE_MOVE, eventData)) {\n\n if (!direction) {\n target.element.append(placeholder);\n } else if (direction === \"prev\") {\n target.element.before(placeholder);\n } else if (direction === \"next\") {\n target.element.after(placeholder);\n }\n\n target.sortable.trigger(MOVE, eventData);\n }\n },\n\n _setCursor: function() {\n var cursor = this.options.cursor,\n body;\n\n if (cursor && cursor !== \"auto\") {\n body = $(document.body);\n\n this._originalCursorType = body.css(\"cursor\");\n body.css({ \"cursor\": cursor });\n\n if (!this._cursorStylesheet) {\n this._cursorStylesheet = $(\"\");\n }\n\n this._cursorStylesheet.appendTo(body);\n }\n },\n\n _resetCursor: function() {\n if (this._originalCursorType) {\n $(document.body).css(\"cursor\", this._originalCursorType);\n this._originalCursorType = null;\n\n this._cursorStylesheet.remove();\n }\n },\n\n _getElementCenter: function(element) {\n var center = element.length ? kendo.getOffset(element) : null;\n if (center) {\n center.top += outerHeight(element) / 2;\n center.left += outerWidth(element) / 2;\n }\n\n return center;\n },\n\n _isFloating: function(item) {\n var isFloating = /left|right/.test(item.css('float'));\n var isTable = /inline|table-cell/.test(item.css('display'));\n var isHorizontalFlex = /flex/.test(item.parent().css('display')) && (/row|row-reverse/.test(item.parent().css('flex-direction')) || !item.parent().css('flex-direction'));\n return isFloating || isTable || isHorizontalFlex;\n },\n\n _cancel: function() {\n if (this.draggedElement) {\n this.draggedElement.show();\n this.placeholder.remove();\n this.draggable.dropped = true;\n }\n },\n\n _items: function() {\n var filter = this.options.filter,\n items;\n\n if (filter) {\n items = this.element.find(filter);\n } else {\n items = this.element.children();\n }\n\n return items;\n },\n\n indexOf: function(element) {\n var items = this._items(),\n placeholder = this.placeholder,\n draggedElement = this.draggedElement;\n\n if (placeholder && element[0] == placeholder[0]) {\n return items.not(draggedElement).index(element);\n } else {\n return items.not(placeholder).index(element);\n }\n },\n\n items: function() {\n var placeholder = this.placeholder,\n items = this._items();\n\n if (placeholder) {\n items = items.not(placeholder);\n }\n\n return items;\n },\n\n _isEmpty: function() {\n return !this.items().length;\n },\n\n _isLastHidden: function() {\n return this.items().length === 1 && this.items().is(\":hidden\");\n }\n\n });\n\n kendo.ui.plugin(Sortable);\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.core.js';\nimport './kendo.userevents.js';\n\nvar __meta__ = {\n id: \"selectable\",\n name: \"Selectable\",\n category: \"framework\",\n depends: [ \"core\", \"userevents\" ],\n advanced: true\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n Widget = kendo.ui.Widget,\n abs = Math.abs,\n ARIASELECTED = \"aria-selected\",\n SELECTED = \"k-selected\",\n ACTIVE = \"k-selecting\",\n SELECTABLE = \"k-selectable\",\n CHANGE = \"change\",\n CHANGING = \"changing\",\n NS = \".kendoSelectable\",\n UNSELECT = \"unselect\",\n UNSELECTING = \"k-unselecting\",\n INPUTSELECTOR_ICONSSELECTOR_FONT = \"span.k-icon.k-i-caret-alt-down,span.k-icon.k-i-caret-alt-up,.k-icon.k-i-caret-alt-down,.k-icon.k-i-caret-alt-right,.k-icon.k-i-caret-alt-left\",\n INPUTSELECTOR_ICONSSELECTOR_SVG = INPUTSELECTOR_ICONSSELECTOR_FONT.replaceAll('k-i', 'k-svg-i'),\n INPUTSELECTOR_SVG_PARTS = INPUTSELECTOR_ICONSSELECTOR_SVG.split(\",\").map((selector) => selector + \" *\").join(\",\"),\n INPUTSELECTOR = `input,a,textarea,.k-multiselect-wrap,select,button,${INPUTSELECTOR_ICONSSELECTOR_FONT},${INPUTSELECTOR_ICONSSELECTOR_SVG},${INPUTSELECTOR_SVG_PARTS},.k-button>span,.k-button>span *,.k-button>img,label.k-checkbox-label.k-no-text,span.k-numeric-wrap,.k-focusable`,\n msie = kendo.support.browser.msie,\n supportEventDelegation = false,\n extend = $.extend;\n\n (function($) {\n (function() {\n $('
    ')\n .on(\"click\", \">*\", function() {\n supportEventDelegation = true;\n })\n .find(\"span\")\n .trigger(\"click\")\n .end()\n .off();\n })();\n })($);\n\n var Selectable = Widget.extend({\n init: function(element, options) {\n var that = this,\n multiple,\n dragToSelect;\n\n Widget.fn.init.call(that, element, options);\n\n that._marquee = $(\"
    \");\n that._lastActive = null;\n that.element.addClass(SELECTABLE);\n\n that.relatedTarget = that.options.relatedTarget;\n\n multiple = that.options.multiple;\n dragToSelect = that.options.dragToSelect;\n\n that.userEvents = new kendo.UserEvents(that.element, {\n global: true,\n allowSelection: true,\n filter: (!supportEventDelegation ? \".\" + SELECTABLE + \" \" : \"\") + that.options.filter,\n tap: that._tap.bind(that),\n touchAction: multiple ? \"none\" : \"pan-x pan-y\"\n });\n\n if (multiple) {\n if (dragToSelect) {\n that.userEvents\n .bind(\"hold\", that._hold.bind(that))\n .bind(\"start\", that._start.bind(that))\n .bind(\"move\", that._move.bind(that))\n .bind(\"end\", that._end.bind(that));\n }\n that.userEvents\n .bind(\"select\", that._select.bind(that));\n }\n },\n\n events: [CHANGE, CHANGING, UNSELECT],\n\n options: {\n name: \"Selectable\",\n filter: \">*\",\n inputSelectors: INPUTSELECTOR,\n multiple: false,\n holdToDrag: false,\n dragToSelect: true,\n relatedTarget: $.noop,\n ignoreOverlapped: false,\n addIdToRanges: false,\n toggleable: false,\n },\n\n _isElement: function(target) {\n var elements = this.element;\n var idx, length = elements.length, result = false;\n\n target = target[0];\n\n for (idx = 0; idx < length; idx ++) {\n if (elements[idx] === target) {\n result = true;\n break;\n }\n }\n\n return result;\n },\n\n _tap: function(e) {\n var target = $(e.target),\n that = this,\n options = that.options,\n ctrlKey = e.event.ctrlKey || e.event.metaKey,\n multiple = that.options.multiple,\n shiftKey = multiple && e.event.shiftKey,\n selectedClass = that.options.selectedClass || SELECTED,\n selected,\n whichCode = e.event.which,\n buttonCode = e.event.button;\n\n //in case of hierarchy or right-click\n if (!that._isElement(target.closest(\".\" + SELECTABLE)) || whichCode && whichCode == 3 || buttonCode && buttonCode == 2) {\n return;\n }\n\n if (!this._allowSelection(e.event.target)) {\n return;\n }\n\n if (that.trigger(CHANGING, { target: target, originalEvent: e.event })) {\n return;\n }\n\n selected = target.hasClass(selectedClass);\n\n target = target.add(that.relatedTarget(target));\n\n if (!multiple) {\n if (selected && ctrlKey) {\n that._unselect(target);\n that._notify(CHANGE, e);\n } else if (!selected) {\n that.clear();\n that.value(target, e);\n that._notify(CHANGE, e);\n }\n } else {\n if (shiftKey) {\n if (!that._lastRange || !compareElements(that._lastRange, target)) {\n that.selectRange(that._firstSelectee(), target, e);\n that._notify(CHANGE, e);\n }\n that._lastRange = target;\n } else {\n that._lastRange = null;\n if (selected && (ctrlKey || options.toggleable)) {\n that._unselect(target);\n that._notify(CHANGE, e);\n } else if (ctrlKey || options.toggleable) {\n that.value(target, e);\n that._notify(CHANGE, e);\n } else if (!selected || that.value().length > 1) {\n that.clear();\n that.value(target, e);\n that._notify(CHANGE, e);\n }\n\n that._lastActive = that._downTarget = target;\n }\n }\n },\n\n _hold: function(e) {\n if (this.options.holdToDrag) {\n // serves as a drag hint to indicate start of selection\n this._tap(e);\n }\n\n this._activated = true;\n },\n\n _isActivated: function() {\n return this.options.holdToDrag ? this._activated : true;\n },\n\n _start: function(e) {\n var that = this,\n target = $(e.target),\n selectedClass = that.options.selectedClass || SELECTED,\n selected = target.hasClass(selectedClass),\n currentElement,\n ctrlKey = e.event.ctrlKey || e.event.metaKey;\n\n if (!that._isActivated() || !this._allowSelection(e.event.target)) {\n return;\n }\n\n if (that.trigger(CHANGING, { target: target, originalEvent: e.event })) {\n that.userEvents.cancel();\n return;\n }\n\n that._downTarget = target;\n\n //in case of hierarchy\n if (!that._isElement(target.closest(\".\" + SELECTABLE))) {\n that.userEvents.cancel();\n return;\n }\n\n if (that.options.useAllItems) {\n that._items = that.element.find(that.options.filter);\n } else {\n currentElement = target.closest(that.element);\n that._items = currentElement.find(that.options.filter);\n }\n\n e.sender.capture();\n\n that._marquee\n .appendTo(document.body)\n .css({\n left: e.x.client + 1,\n top: e.y.client + 1,\n width: 0,\n height: 0\n });\n\n if (!ctrlKey) {\n that.clear();\n }\n\n target = target.add(that.relatedTarget(target));\n if (selected) {\n that._selectElement(target, true);\n if (ctrlKey) {\n target.addClass(UNSELECTING);\n }\n }\n },\n\n _move: function(e) {\n var that = this,\n position = {\n left: e.x.startLocation > e.x.location ? e.x.location : e.x.startLocation,\n top: e.y.startLocation > e.y.location ? e.y.location : e.y.startLocation,\n width: abs(e.x.initialDelta),\n height: abs(e.y.initialDelta)\n };\n\n if (!that._isActivated()) {\n return;\n }\n\n that._marquee.css(position);\n\n that._invalidateSelectables(position, (e.event.ctrlKey || e.event.metaKey));\n\n e.preventDefault();\n },\n\n _end: function(e) {\n var that = this,\n rangeSelectedAttr = kendo.attr(\"range-selected\"),\n uid = kendo.guid();\n\n if (!that._isActivated()) {\n return;\n }\n\n that._activated = false;\n\n that._marquee.remove();\n\n that._unselect(that.element\n .find(that.options.filter + \".\" + UNSELECTING))\n .removeClass(UNSELECTING);\n\n\n var target = that.element.find(that.options.filter + \".\" + ACTIVE);\n target = target.add(that.relatedTarget(target));\n\n if (that.options.addIdToRanges) {\n for (var i = 0; i < that._currentlyActive.length; i++) {\n $(that._currentlyActive[i]).attr(rangeSelectedAttr, uid);\n }\n }\n\n if (!that._lastRange || !compareElements(that._lastRange, target)) {\n that.value(target, e);\n that._notify(CHANGE, e);\n }\n that._lastRange = target;\n that._lastActive = that._downTarget;\n that._items = null;\n },\n\n _invalidateSelectables: function(position, ctrlKey) {\n var idx,\n length,\n target = this._downTarget[0],\n items = this._items,\n selectedClass = this.options.selectedClass || SELECTED,\n related,\n toSelect;\n\n this._currentlyActive = [];\n\n for (idx = 0, length = items.length; idx < length; idx ++) {\n toSelect = items.eq(idx);\n related = toSelect.add(this.relatedTarget(toSelect));\n\n if (collision(toSelect, position)) {\n if (toSelect.hasClass(selectedClass)) {\n if (ctrlKey && target !== toSelect[0]) {\n related.removeClass(selectedClass).addClass(UNSELECTING);\n }\n } else if (!toSelect.hasClass(ACTIVE) && !toSelect.hasClass(UNSELECTING) && !this._collidesWithActiveElement(related, position)) {\n related.addClass(ACTIVE);\n }\n this._currentlyActive.push(related[0]);\n } else {\n if (toSelect.hasClass(ACTIVE)) {\n related.removeClass(ACTIVE);\n } else if (ctrlKey && toSelect.hasClass(UNSELECTING)) {\n related.removeClass(UNSELECTING).addClass(selectedClass);\n }\n }\n }\n },\n\n _collidesWithActiveElement: function(element, marqueeRect) {\n if (!this.options.ignoreOverlapped) {\n return false;\n }\n\n var activeElements = this._currentlyActive;\n var elemRect = element[0].getBoundingClientRect();\n var activeElementRect;\n var collision = false;\n var isRtl = kendo.support.isRtl(element);\n var leftRight = isRtl ? \"right\" : \"left\";\n var tempRect = {};\n\n marqueeRect.right = marqueeRect.left + marqueeRect.width;\n marqueeRect.bottom = marqueeRect.top + marqueeRect.height;\n\n for (var i = 0; i < activeElements.length; i++) {\n activeElementRect = activeElements[i].getBoundingClientRect();\n if (overlaps(elemRect, activeElementRect)) {\n tempRect[leftRight] = leftRight === \"left\" ? activeElementRect.right : activeElementRect.left;\n elemRect = extend({}, elemRect, tempRect);\n if (elemRect.left > elemRect.right) {\n return true;\n }\n collision = !overlaps(elemRect, marqueeRect);\n }\n }\n return collision;\n },\n\n value: function(val) {\n var that = this,\n selectElement = that._selectElement.bind(that);\n\n if (val) {\n val.each(function() {\n selectElement(this);\n });\n\n return;\n }\n\n return that.element.find(that.options.filter + \".\" + (that.options.selectedClass || SELECTED));\n },\n\n selectedRanges: function() {\n var that = this;\n var rangeSelectedAttr = kendo.attr(\"range-selected\");\n var map = {};\n\n that.element.find(\"[\" + rangeSelectedAttr + \"]\").each(function(_, elem) {\n var rangeId = $(elem).attr(rangeSelectedAttr);\n var mapLocation = map[rangeId];\n\n if (!mapLocation) {\n mapLocation = map[rangeId] = [];\n }\n\n mapLocation.push($(elem));\n });\n\n return map;\n },\n\n selectedSingleItems: function() {\n var that = this;\n var rangeSelectedAttr = kendo.attr(\"range-selected\");\n\n return that.element.find(that.options.filter + \".\" + (that.options.selectedClass || SELECTED) + \":not([\" + rangeSelectedAttr + \"])\").toArray().map(function(elem) {\n return $(elem);\n });\n },\n\n _firstSelectee: function() {\n var that = this,\n selected;\n\n if (that._lastActive !== null) {\n return that._lastActive;\n }\n\n selected = that.value();\n return selected.length > 0 ?\n selected[0] :\n that.element.find(that.options.filter)[0];\n },\n\n _selectElement: function(element, preventNotify) {\n var toSelect = $(element),\n selectedClass = this.options.selectedClass || SELECTED,\n isPrevented = !preventNotify && this._notify(\"select\", { element: element });\n\n toSelect.removeClass(ACTIVE);\n if (!isPrevented) {\n toSelect.addClass(selectedClass);\n\n if (this.options.aria) {\n toSelect.attr(ARIASELECTED, true);\n }\n }\n },\n\n _notify: function(name, args) {\n args = args || { };\n return this.trigger(name, args);\n },\n\n _unselect: function(element) {\n if (this.trigger(UNSELECT, { element: element })) {\n return;\n }\n\n var rangeSelectedAttr = kendo.attr(\"range-selected\");\n\n element.removeClass(this.options.selectedClass || SELECTED).removeAttr(rangeSelectedAttr);\n\n if (this.options.aria) {\n element.attr(ARIASELECTED, false);\n }\n\n return element;\n },\n\n _select: function(e) {\n if (this._allowSelection(e.event.target)) {\n if (!msie || (msie && !$(kendo._activeElement()).is(this.options.inputSelectors))) {\n e.preventDefault();\n }\n }\n },\n\n _allowSelection: function(target) {\n if ($(target).is(this.options.inputSelectors)) {\n this.userEvents.cancel();\n this._downTarget = null;\n return false;\n }\n\n return true;\n },\n\n resetTouchEvents: function() {\n this.userEvents.cancel();\n },\n\n clear: function() {\n var items = this.element.find(this.options.filter + \".\" + (this.options.selectedClass || SELECTED));\n this._unselect(items);\n },\n\n selectRange: function(start, end) {\n var that = this,\n idx,\n tmp,\n items;\n\n that.clear();\n\n if (that.element.length > 1) {\n items = that.options.continuousItems();\n }\n\n if (!items || !items.length) {\n items = that.element.find(that.options.filter);\n }\n\n start = $.inArray($(start)[0], items);\n end = $.inArray($(end)[0], items);\n\n if (start > end) {\n tmp = start;\n start = end;\n end = tmp;\n }\n\n if (!that.options.useAllItems) {\n end += that.element.length - 1;\n }\n\n for (idx = start; idx <= end; idx ++ ) {\n that._selectElement(items[idx], true);\n }\n },\n\n destroy: function() {\n var that = this;\n\n Widget.fn.destroy.call(that);\n\n that.element.off(NS);\n\n that.userEvents.destroy();\n\n that._marquee = that._lastActive = that.element = that.userEvents = null;\n }\n });\n\n Selectable.parseOptions = function(selectable) {\n var selectableMode = selectable.mode || selectable;\n var asLowerString = typeof selectableMode === \"string\" && selectableMode.toLowerCase();\n return {\n multiple: asLowerString && asLowerString.indexOf(\"multiple\") > -1,\n cell: asLowerString && asLowerString.indexOf(\"cell\") > -1\n };\n };\n\n function compareElements(element, toCompare) {\n\n if (element.length !== toCompare.length) {\n return false;\n }\n\n for (var i = 0; i < element.length; i++) {\n if (element[i] !== toCompare[i]) {\n return false;\n }\n }\n\n return true;\n }\n\n function collision(element, position) {\n if (!element.is(\":visible\")) {\n return false;\n }\n\n var elementPosition = kendo.getOffset(element),\n right = position.left + position.width,\n bottom = position.top + position.height;\n\n elementPosition.right = elementPosition.left + kendo._outerWidth(element);\n elementPosition.bottom = elementPosition.top + kendo._outerHeight(element);\n\n return !(elementPosition.left > right ||\n elementPosition.right < position.left ||\n elementPosition.top > bottom ||\n elementPosition.bottom < position.top);\n }\n\n function overlaps(firstRect, secondRect) {\n return !(firstRect.right <= secondRect.left ||\n firstRect.left >= secondRect.right ||\n firstRect.bottom <= secondRect.top ||\n firstRect.top >= secondRect.bottom);\n }\n\n kendo.ui.plugin(Selectable);\n\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.html.base.js';\nimport './kendo.icons.js';\n\nvar __meta__ = {\n id: \"html.button\",\n name: \"Html.Button\",\n category: \"web\",\n description: \"HTML rendering utility for Kendo UI for jQuery.\",\n depends: [ \"html.base\", \"icons\" ],\n features: []\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n HTMLBase = kendo.html.HTMLBase,\n\n KBUTTON = \"k-button\",\n KBUTTONICON = \"k-button-icon\",\n KBUTTONTEXT = \"k-button-text\";\n\n var renderButton = function(element, options) {\n if (arguments[0] === undefined$1 || $.isPlainObject(arguments[0])) {\n options = element;\n element = $(\"\");\n }\n\n return (new HTMLButton(element, options)).html();\n };\n\n var HTMLButton = HTMLBase.extend({\n init: function(element, options) {\n var that = this;\n HTMLBase.fn.init.call(that, element, options);\n that.wrapper = that.element.addClass(KBUTTON);\n\n if (!that.element.attr(\"type\") && that.options.type) {\n that.element.attr(\"type\", that.options.type);\n }\n\n that._addClasses();\n that.iconElement();\n that._textElement();\n },\n options: {\n name: \"HTMLButton\",\n type: \"button\",\n icon: \"\",\n iconClass: \"\",\n spriteCssClass: \"\",\n imageUrl: \"\",\n size: \"medium\",\n rounded: \"medium\",\n fillMode: \"solid\",\n themeColor: \"base\",\n stylingOptions: [ \"size\", \"rounded\", \"fillMode\", \"themeColor\" ]\n },\n iconElement: function() {\n var that = this,\n element = that.element,\n options = that.options,\n icon = options.icon,\n iconClass = options.iconClass,\n spriteCssClass = options.spriteCssClass,\n imageUrl = options.imageUrl,\n span, img, isEmpty;\n\n if (spriteCssClass || imageUrl || icon || iconClass) {\n isEmpty = true;\n\n element.contents().filter(function() {\n return (!$(this).hasClass(\"k-sprite\") && !$(this).hasClass(\"k-icon\") && !$(this).hasClass(\"k-svg-icon\") && !$(this).hasClass(\"k-image\"));\n }).each(function(idx, el) {\n if (el.nodeType == 1 || el.nodeType == 3 && kendo.trim(el.nodeValue).length > 0) {\n isEmpty = false;\n }\n });\n }\n\n if (isEmpty) {\n that.element.addClass(\"k-icon-button\");\n }\n\n if (imageUrl) {\n img = element.children(\"img.k-image\").first();\n if (!img[0]) {\n img = $('\"icon\"').prependTo(element);\n }\n img.attr(\"src\", imageUrl);\n img.addClass(KBUTTONICON);\n } else if (icon || iconClass) {\n span = element.children(\"span.k-icon, span.k-svg-icon\").first();\n if (!span[0]) {\n span = $(kendo.ui.icon({ icon, iconClass })).prependTo(element);\n } else {\n kendo.ui.icon(span, { icon, iconClass });\n }\n\n span.addClass(KBUTTONICON);\n } else if (spriteCssClass) {\n span = element.children(\"span.k-sprite\").first();\n if (!span[0]) {\n span = $('').prependTo(element);\n }\n span.addClass(spriteCssClass + \" \" + KBUTTONICON);\n }\n },\n _textElement: function() {\n var element = this.element;\n\n element.contents().filter(function() {\n return (!$(this).hasClass(KBUTTONICON) && !$(this).hasClass(\"k-sprite\") && !$(this).hasClass(\"k-icon\") && !$(this).hasClass(\"k-image\"));\n }).each(function(idx, el) {\n if (el.nodeType == 1 || el.nodeType == 3 && kendo.trim(el.nodeValue).length > 0) {\n if (el.nodeType === 3) {\n var newSpan = document.createElement('span');\n\n el.parentNode.insertBefore(newSpan, el);\n newSpan.appendChild(el);\n el = newSpan;\n }\n\n el.classList.add(KBUTTONTEXT);\n }\n });\n }\n });\n\n $.extend(kendo.html, {\n renderButton: renderButton,\n HTMLButton: HTMLButton\n });\n\n kendo.cssProperties.registerPrefix(\"HTMLButton\", \"k-button-\");\n\n kendo.cssProperties.registerValues(\"HTMLButton\", [{\n prop: \"fillMode\",\n values: kendo.cssProperties.fillModeValues.concat([\"link\"])\n }, {\n prop: \"rounded\",\n values: kendo.cssProperties.roundedValues.concat([['full', 'full']])\n }]);\n\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.core.js';\nimport './kendo.html.button.js';\nimport './kendo.icons.js';\nimport './kendo.draganddrop.js';\n\n(function($, undefined$1) {\n\n var kendo = window.kendo;\n var Widget = kendo.ui.Widget;\n var extend = $.extend;\n var DOT = \".\";\n var NS = \".kendoChat\";\n var keys = kendo.keys;\n\n var messageBoxStyles = {\n input: \"k-input-inner\",\n inputWrapper: \"k-textbox k-input k-input-lg k-input-solid\",\n button: \"k-button\",\n buttonFlat: \"k-button-lg k-button-flat k-button-flat-base\",\n iconButton: \"k-icon-button\",\n buttonIcon: \"k-button-icon\",\n buttonSend: \"k-chat-send\",\n buttonSendIcon: \"paper-plane\",\n buttonToggle: \"k-button-toggle\",\n buttonToggleIcon: \"more-horizontal\",\n hidden: \"k-hidden\",\n inputSuffix: \"k-input-suffix\"\n };\n\n var ChatMessageBox = Widget.extend({\n init: function(element, options) {\n Widget.fn.init.call(this, element, options);\n\n this._wrapper();\n\n this._attachEvents();\n\n this._typing = false;\n },\n\n events: [\n \"focusToolbar\",\n \"sendMessage\",\n \"toggleToolbar\",\n \"typingEnd\",\n \"typingStart\"\n ],\n\n options: {\n messages: {\n placeholder: \"Type a message...\",\n toggleButton: \"Toggle toolbar\",\n sendButton: \"Send message\"\n }\n },\n\n destroy: function() {\n Widget.fn.destroy.call(this);\n\n if (this.input) {\n this.input.off(NS);\n this.input.remove();\n this.input = null;\n }\n\n this.element.off(NS);\n this.element.empty();\n },\n\n _wrapper: function() {\n var styles = ChatMessageBox.styles;\n var options = this.options;\n var messages = options.messages;\n var inputId = \"inputId_\" + kendo.guid();\n\n this.inputWrapper = this.element\n .addClass(styles.inputWrapper)\n .appendTo(this.element);\n\n this.input = $(\"\")\n .addClass(styles.input)\n .attr(\"id\", inputId)\n .attr(\"aria-label\", messages.placeholder)\n .attr(\"placeholder\", messages.placeholder)\n .appendTo(this.inputWrapper);\n\n this.inputSuffix = $(\"\")\n .addClass(styles.inputSuffix)\n .appendTo(this.inputWrapper);\n\n if (options.toolbar && options.toolbar.toggleable && options.toolbar.buttons && options.toolbar.buttons.length) {\n $(kendo.html.renderButton(``,\n {\n icon: styles.buttonToggleIcon,\n fillMode: \"flat\",\n size: \"large\"\n }))\n .appendTo(this.inputSuffix);\n }\n\n $(kendo.html.renderButton(``,\n {\n icon: styles.buttonSendIcon,\n fillMode: \"flat\",\n size: \"large\"\n }))\n .appendTo(this.inputSuffix);\n },\n\n _attachEvents: function() {\n var styles = ChatMessageBox.styles;\n\n this.input\n .on(\"keydown\" + NS, this._keydown.bind(this))\n .on(\"input\" + NS, this._input.bind(this))\n .on(\"focusout\" + NS, this._inputFocusout.bind(this));\n\n this.element\n .on(\"click\" + NS, DOT + styles.buttonSend, this._buttonClick.bind(this));\n\n this.element\n .on(\"click\" + NS, DOT + styles.buttonToggle, this._toggleToolbar.bind(this));\n },\n\n _input: function() {\n var currentValue = this.input.val();\n var start = currentValue.length > 0;\n\n this._triggerTyping(start);\n },\n\n _keydown: function(e) {\n var key = e.keyCode;\n\n switch (key) {\n case keys.ENTER:\n e.preventDefault();\n\n this._sendMessage();\n break;\n case keys.F10:\n e.preventDefault();\n\n this.trigger(\"focusToolbar\");\n break;\n }\n },\n\n _buttonClick: function(e) {\n e.preventDefault();\n\n this._sendMessage();\n },\n\n _sendMessage: function() {\n var value = this.input.val();\n\n if (!value.length) {\n return;\n }\n\n this._triggerTyping(false);\n\n var args = {\n text: value\n };\n\n this.trigger(\"sendMessage\", args);\n\n this.input.val(\"\");\n },\n\n _inputFocusout: function() {\n this._triggerTyping(false);\n },\n\n _triggerTyping: function(start) {\n if (start) {\n if (!this._typing) {\n this.trigger(\"typingStart\", {});\n this._typing = true;\n }\n } else {\n if (this._typing) {\n this.trigger(\"typingEnd\", {});\n this._typing = false;\n }\n }\n },\n\n _toggleToolbar: function(ev) {\n this.trigger(\"toggleToolbar\", { originalEvent: ev });\n }\n });\n\n extend(true, ChatMessageBox, { styles: messageBoxStyles });\n extend(kendo, {\n chat: {\n ChatMessageBox: ChatMessageBox\n }\n });\n})(window.kendo.jQuery);\n\n(function($, undefined$1) {\n\n var kendo = window.kendo;\n var Widget = kendo.ui.Widget;\n var extend = $.extend;\n var DOT = \".\";\n var NS = \".kendoChat\";\n\n var DATA_K_BUTTON_NAME = \"kButtonName\";\n var SCROLL_LEFT_NAME = \"chatToolbarScrollLeft\";\n var SCROLL_RIGHT_NAME = \"chatToolbarScrollRight\";\n var VISIBLE = \":visible\";\n var TABINDEX = \"tabindex\";\n\n var DEFAULT_ANIMATION = {\n effects: \"expand:vertical\",\n duration: 200\n };\n var NO_ANIMATION = {\n expand: {\n show: true\n },\n collapse: {\n hide: true\n }\n };\n\n var toolbarStyles = {\n button: \"k-button\",\n buttonDefaults: \"k-button-md k-rounded-md k-button-solid k-button-solid-base\",\n buttonList: \"k-button-list k-toolbar-group\",\n scrollButton: \"k-scroll-button\",\n scrollButtonLeft: \"k-scroll-button-left\",\n scrollButtonRight: \"k-scroll-button-right\",\n scrollButtonLeftIcon: \"chevron-left\",\n scrollButtonRightIcon: \"chevron-right\",\n iconButton: \"k-icon-button\"\n };\n\n var ChatToolBar = Widget.extend({\n init: function(element, options) {\n options = extend({}, options, { name: \"ChatToolbar\" });\n var toolbarOptions = options.toolbar;\n var buttonsDefined = toolbarOptions.buttons && toolbarOptions.buttons.length;\n\n Widget.fn.init.call(this, element, options);\n\n if (buttonsDefined) {\n this._createButtonList();\n }\n\n if (buttonsDefined && toolbarOptions.scrollable &&\n this.buttonsWidth() > this.element.width()) {\n this._initScrolling();\n }\n\n this._setupAnimation();\n\n if (buttonsDefined && toolbarOptions.toggleable) {\n this.toggle(true);\n }\n\n this.element\n .on(\"click\" + NS, this._onClick.bind(this))\n .on(\"keydown\" + NS, this._onKeydown.bind(this));\n },\n\n events: [\n \"click\"\n ],\n\n destroy: function() {\n Widget.fn.destroy.call(this);\n\n this.element.off(NS);\n this.element.empty();\n },\n\n _createButtonList: function() {\n var that = this;\n var styles = ChatToolBar.styles;\n var buttons = that.options.toolbar.buttons;\n var buttonList = $(\"
    \");\n\n for (var i = 0; i < buttons.length; i++) {\n var button = that._createButton(buttons[i]);\n buttonList.append(button);\n }\n\n buttonList.appendTo(this.element);\n\n this.buttonList = buttonList;\n this.buttons().first().removeAttr(TABINDEX);\n },\n\n _createButton: function(btnOptions) {\n var styles = ChatToolBar.styles;\n var buttonElm = $(\"`;\n\n function button(options) {\n return options.template( {\n idx: options.idx,\n text: options.text,\n ns: kendo.ns,\n numeric: options.numeric,\n size: options.size,\n title: options.title || \"\",\n tabindex: options.navigatable ? 0 : -1,\n navigatable: options.navigatable\n });\n }\n\n function selectOption(template, idx, text, selected) {\n return template( {\n idx: idx,\n text: text || idx,\n selected: selected || false\n });\n }\n\n function icon(className, text, wrapClassName, id, size) {\n return iconTemplate({\n className: className,\n text: text,\n wrapClassName: wrapClassName || \"\",\n id: id || \"\",\n size: size\n });\n }\n\n function update(element, className, page, disabled) {\n element.find(`[class*=\"-i-${className}\"]`)\n .parent()\n .attr(kendo.attr(\"page\"), page)\n .attr(\"tabindex\", disabled ? -1 : 0)\n .attr(\"aria-disabled\", disabled)\n .toggleClass(\"k-disabled\", disabled);\n }\n\n function first(element, page) {\n update(element, FIRST, 1, page <= 1);\n }\n\n function prev(element, page) {\n update(element, PREV, Math.max(1, page - 1), page <= 1);\n }\n\n function next(element, page, totalPages) {\n update(element, NEXT, Math.min(totalPages, page + 1), page >= totalPages);\n }\n\n function last(element, page, totalPages) {\n update(element, LAST, totalPages, page >= totalPages);\n }\n\n var Pager = Widget.extend( {\n init: function(element, options) {\n var that = this, page, totalPages;\n var buttonSize = \"\";\n var dropDownClasses = \"\";\n var width;\n var info;\n\n Widget.fn.init.call(that, element, options);\n\n options = that.options;\n that._createDataSource(options);\n that.linkTemplate = kendo.template(that.options.linkTemplate);\n that.selectTemplate = kendo.template(that.options.selectTemplate);\n that.numericSelectItemTemplate = kendo.template(that.options.numericSelectItemTemplate);\n\n page = that.page();\n totalPages = that.totalPages();\n\n that._refreshHandler = that.refresh.bind(that);\n\n that.dataSource.bind(CHANGE, that._refreshHandler);\n that.downEvent = kendo.applyEventMap(MOUSEDOWN, kendo.guid());\n\n isRtl = kendo.support.isRtl(element);\n\n if (isRtl) {\n FIRST = LAST_CONST;\n LAST = FIRST_CONST;\n PREV = NEXT_CONST;\n NEXT = PREV_CONST;\n } else {\n FIRST = FIRST_CONST;\n LAST = LAST_CONST;\n PREV = PREV_CONST;\n NEXT = NEXT_CONST;\n }\n\n if (options.size) {\n buttonSize = kendo.getValidCssClass(\"k-button-\", \"size\", options.size);\n dropDownClasses = \"k-rounded-md \" + kendo.getValidCssClass(\"k-picker-\", \"size\", options.size);\n }\n\n if (options.navigatable) {\n that._id = that.element.attr(\"id\") || kendo.guid();\n }\n that._template();\n\n if (options.previousNext || options.numeric) {\n that._numericWrap = that.element.find(\".k-pager-numbers-wrap\");\n\n if (that._numericWrap.length === 0) {\n that._numericWrap = $(\"
    \").appendTo(that.element);\n }\n }\n\n\n if (options.previousNext) {\n if (!that._numericWrap.find(\"[class*='-i-\" + FIRST + \"']\").length) {\n that._numericWrap.append(icon(FIRST, options.messages.first, \"k-pager-first\", that._id, buttonSize));\n\n first(that._numericWrap, page, totalPages);\n }\n\n if (!that._numericWrap.find(\"[class*='-i-\" + PREV + \"']\").length) {\n that._numericWrap.append(icon(PREV, options.messages.previous, null, that._id, buttonSize));\n\n prev(that._numericWrap, page, totalPages);\n }\n }\n\n if (options.numeric) {\n if (!that._numericSelect) {\n that._numericSelect = that._numericWrap.find(\".k-dropdown\");\n\n if (that._numericSelect.length === 0) {\n that._numericSelect = $(\"' +\n encode(kendo.format(options.messages.of, totalPages)) +\n '');\n }\n\n that.element.on(KEYDOWN + NS, \".k-pager-input input\", that._keydown.bind(that));\n }\n\n if (options.previousNext) {\n if (!that._numericWrap.find(\"[class*='-i-\" + NEXT + \"']\").length) {\n that._numericWrap.append(icon(NEXT, options.messages.next, null, that._id, buttonSize));\n\n next(that._numericWrap, page, totalPages);\n }\n\n if (!that._numericWrap.find(\"[class*='-i-\" + LAST + \"']\").length) {\n that._numericWrap.append(icon(LAST, options.messages.last, \"k-pager-last\", that._id, buttonSize));\n\n last(that._numericWrap, page, totalPages);\n }\n }\n\n if (options.pageSizes) {\n if (!that.element.find(\".k-pager-sizes\").length) {\n var pageSizes = options.pageSizes.length ? options.pageSizes : [\"all\", 5, 10, 20];\n var pageItems = $.map(pageSizes, function(size) {\n if (size.toLowerCase && size.toLowerCase() === \"all\") {\n return \"\";\n }\n\n return \"\";\n });\n\n $('' + encode(options.messages.itemsPerPage) + \"\")\n .appendTo(that.element)\n .find(\"select\").html(pageItems.join(\"\")).end()\n .appendTo(that.element);\n }\n\n that.element.find(\".k-pager-sizes select\").val(that.pageSize());\n\n if (kendo.ui.DropDownList) {\n that.element.find(\".k-pager-sizes select\").show().attr(\"aria-label\", options.messages.pageSizeDropDownLabel).kendoDropDownList({ size: options.size });\n }\n\n that.element.on(CHANGE + NS, \".k-pager-sizes select\", that._change.bind(that));\n }\n\n if (options.refresh) {\n if (!that.element.find(\".k-pager-refresh\").length) {\n that.element.append('');\n }\n\n that.element.on(CLICK + NS, \".k-pager-refresh\", that._refreshClick.bind(that));\n }\n\n if (options.info) {\n if (!that.element.find(\".k-pager-info\").length) {\n that.element.append('');\n }\n }\n\n that.element\n .on(CLICK + NS , \"button\", that._click.bind(that))\n .on(CHANGE + NS , \"select.k-dropdown\", that._numericSelectChange.bind(that))\n .addClass(\"k-pager\");\n\n if (options.autoBind) {\n that.refresh();\n }\n\n that._resizeHandler = that.resize.bind(that, true);\n $(window).on(\"resize\" + NS, that._resizeHandler);\n\n if (options.size) {\n that.element.addClass(kendo.getValidCssClass(\"k-pager-\", \"size\", options.size));\n }\n\n that._navigatable();\n\n if (that.options.responsive) {\n width = that.element.outerWidth();\n info = that.element.find(\".k-pager-info\");\n if (width <= 480) {\n info.hide();\n that.element.find(\".k-pager-sizes\").children().hide();\n if (options.numeric) {\n that._numericSelect.show();\n that.list.hide();\n }\n } else {\n if (width <= 600) {\n info.hide();\n }\n if (options.numeric) {\n that._numericSelect.hide();\n }\n }\n } else if (that._numericSelect) {\n that._numericSelect.hide();\n }\n\n kendo.notify(that);\n },\n\n destroy: function() {\n var that = this;\n\n Widget.fn.destroy.call(that);\n\n that.element.off(NS);\n that.dataSource.unbind(CHANGE, that._refreshHandler);\n that._refreshHandler = null;\n $(window).off(\"resize\" + NS, this._resizeHandler);\n\n kendo.destroy(that.element);\n that.element = that.list = null;\n },\n\n events: [\n CHANGE\n ],\n\n options: {\n name: \"Pager\",\n ARIATemplate: ({ page, totalPages }) => `Page navigation, page ${page} of ${totalPages}`,\n selectTemplate: ({ text, title, tabindex, size }) => ``,\n linkTemplate: ({ ns, idx, text, title, tabindex, size }) => ``,\n numericSelectItemTemplate: ({ idx, selected, text }) => ``,\n buttonCount: 10,\n autoBind: true,\n numeric: true,\n info: true,\n input: false,\n previousNext: true,\n pageSizes: false,\n refresh: false,\n responsive: true,\n navigatable: false,\n size: \"medium\",\n messages: {\n allPages: \"All\",\n display: \"{0} - {1} of {2} items\",\n empty: \"No items to display\",\n page: \"Page\",\n of: \"of {0}\",\n itemsPerPage: \"items per page\",\n pageButtonLabel: \"Page {0}\",\n pageSizeDropDownLabel: \"Page sizes drop down\",\n numbersSelectLabel: \"Page select\",\n first: \"Go to the first page\",\n previous: \"Go to the previous page\",\n next: \"Go to the next page\",\n last: \"Go to the last page\",\n refresh: \"Refresh\",\n morePages: \"More pages\"\n }\n },\n\n setDataSource: function(dataSource) {\n var that = this;\n\n that.dataSource.unbind(CHANGE, that._refreshHandler);\n that.dataSource = that.options.dataSource = dataSource;\n dataSource.bind(CHANGE, that._refreshHandler);\n\n if (that.options.autoBind) {\n dataSource.fetch();\n }\n },\n\n _aria: function() {\n this.element.attr({\n \"role\": \"application\",\n \"aria-roledescription\": \"pager\",\n \"aria-keyshortcuts\": \"Enter ArrowRight ArrowLeft\"\n });\n },\n\n _adaptiveStep: function(step, hide, availableWidth) {\n var that = this;\n switch (step) {\n case 0:\n return that._toggleButtons(hide, availableWidth);\n case 1:\n return that._toggleRefresh(hide, availableWidth);\n case 2:\n return that._togglePagerInfo(hide, availableWidth);\n case 3:\n return that._toggleInputSizesLabel(hide, availableWidth);\n case 4:\n return that._togglePageSizesLabel(hide, availableWidth);\n case 5:\n return that._togglePageSizesDropDown(hide, availableWidth);\n case 6:\n return that._togglePageInputs(hide, availableWidth);\n default:\n break;\n }\n },\n\n _calculateNeededWidth: function() {\n var sumWidth = 0;\n var gap = parseInt(this.element.css(\"gap\"));\n this.element.children().each(function() {\n const element = $(this);\n const pagerInfo = element.hasClass(\"k-pager-info\");\n if (pagerInfo) {\n element.removeClass(\"k-pager-info k-label\");\n }\n sumWidth += element.is(\":visible\") ? element.width() : 0;\n sumWidth += gap;\n if (pagerInfo) {\n element.addClass(\"k-pager-info k-label\");\n }\n });\n return sumWidth;\n },\n\n _resize: function(size) {\n var that = this;\n if (!that._lastWidth || !that.options.responsive) {\n return;\n }\n\n if (that._lastWidth < size.width) {\n for (let i = 6; i >= 0; i--) {\n const availableWidth = that._calculateNeededWidth();\n if (size.width < availableWidth) {\n break;\n }\n const shouldBreak = that._adaptiveStep(i, false, size.width - availableWidth);\n if (shouldBreak) {\n break;\n }\n }\n } else if (that._lastWidth > size.width) {\n for (let i = 0; i < 7; i++) {\n if (size.width > that._calculateNeededWidth()) {\n break;\n }\n that._adaptiveStep(i, true);\n }\n }\n that._lastWidth = size.width;\n },\n\n _toggleButtons: function(hide, availableWidth) {\n if (!this._numericWrap || !this.list || !this._numericSelect) {\n return;\n }\n\n if (hide) {\n this._numericSelect.show();\n this.list.hide();\n } else if (availableWidth && ((this.list.width() - this._numericSelect.width()) < availableWidth)) {\n this._numericSelect.hide();\n this.list.show();\n }\n },\n\n _toggleRefresh: function(hide, availableWidth) {\n if (!this.options.refresh) {\n return;\n }\n const refreshContainer = this.element.find(\".k-pager-refresh\");\n\n if (hide) {\n refreshContainer.hide();\n } else if (availableWidth && (refreshContainer.width() < availableWidth)) {\n refreshContainer.show();\n } else {\n return true;\n }\n },\n\n _togglePagerInfo: function(hide, availableWidth) {\n if (!this.options.info) {\n return;\n }\n const infoBox = this.element.find(\".k-pager-info\");\n if (hide) {\n infoBox.hide();\n } else if (availableWidth && (infoBox.width() < availableWidth)) {\n infoBox.show();\n } else if (!infoBox.is(\":visible\")) {\n return true;\n }\n },\n\n _toggleInputSizesLabel: function(hide, availableWidth) {\n if (!this.options.input) {\n return;\n }\n const inputElements = this.element.find(\".k-pager-input\").children();\n const labels = inputElements.eq(0).add(inputElements.eq(2));\n\n if (hide) {\n labels.hide();\n } else if (availableWidth && ((inputElements.eq(0).width() + inputElements.eq(2).width()) < availableWidth)) {\n labels.show();\n } else {\n return true;\n }\n },\n\n\n _togglePageSizesLabel: function(hide, availableWidth) {\n if (!this.options.pageSizes) {\n return;\n }\n const label = this.element.find(\".k-pager-sizes\").children().eq(1);\n\n if (hide) {\n label.hide();\n } else if (availableWidth && (label.width() < availableWidth)) {\n label.show();\n } else {\n return true;\n }\n },\n\n _togglePageSizesDropDown: function(hide, availableWidth) {\n if (!this.options.pageSizes) {\n return;\n }\n\n const picker = this.element.find(\".k-pager-sizes .k-picker\");\n\n if (hide) {\n picker.hide();\n } else if (availableWidth && (picker.width() < availableWidth)) {\n picker.show();\n } else {\n return true;\n }\n },\n\n\n _togglePageInputs: function(hide, availableWidth) {\n var options = this.options;\n\n if (!options.input || !this._numericSelect) {\n return;\n }\n\n if (hide) {\n this._numericSelect.hide();\n } else if (availableWidth && (this._numericSelect.width() < availableWidth) && !this.list.is(\":visible\")) {\n this._numericSelect.show();\n } else {\n return true;\n }\n },\n\n _createDataSource: function(options) {\n this.dataSource = kendo.data.DataSource.create(options.dataSource);\n },\n\n refresh: function(e) {\n var that = this,\n idx,\n end,\n start = 1,\n reminder,\n page = that.page(),\n html = \"\",\n selectHtml = \"\",\n options = that.options,\n pageSize = that.pageSize(),\n collapsedTotal = that._collapsedTotal(),\n total = that.dataSource._isGroupPaged() ? that.dataSource.groupsTotal(true) : that.dataSource.total(),\n totalPages = that.totalPages(),\n linkTemplate = that.linkTemplate,\n navigatable = options.navigatable,\n numericSelectItemTemplate = that.numericSelectItemTemplate,\n buttonSize = options.size ? kendo.getValidCssClass(\"k-button-\", \"size\", options.size) : \"\",\n buttonCount = options.buttonCount;\n\n if (e && e.action == \"itemchange\") {\n return;\n }\n\n if (options.numeric) {\n\n if (page > buttonCount) {\n reminder = (page % buttonCount);\n start = (reminder === 0) ? (page - buttonCount) + 1 : (page - reminder) + 1;\n }\n\n end = Math.min((start + buttonCount) - 1, totalPages);\n\n if (start > 1) {\n html += button({\n template: linkTemplate,\n navigatable: navigatable,\n size: buttonSize,\n idx: start - 1,\n text: \"...\",\n numeric: false,\n title: options.messages.morePages\n });\n selectHtml += selectOption(numericSelectItemTemplate, start - 1, options.messages.morePages);\n }\n\n for (idx = start; idx <= end; idx++) {\n html += button({\n template: idx == page ? that.selectTemplate : linkTemplate,\n navigatable: navigatable,\n idx: idx,\n text: idx,\n size: buttonSize,\n numeric: true,\n title: kendo.format(options.messages.pageButtonLabel, idx)\n });\n selectHtml += selectOption(numericSelectItemTemplate, idx, idx, idx == page);\n }\n\n if (end < totalPages) {\n html += button({\n template: linkTemplate,\n navigatable: navigatable,\n idx: idx,\n size: buttonSize,\n text: \"...\",\n numeric: numericSelectItemTemplate,\n title: options.messages.morePages\n });\n selectHtml += selectOption(numericSelectItemTemplate, idx, options.messages.morePages);\n }\n\n if (html === \"\") {\n html = that.selectTemplate({ text: 0, size: buttonSize, tabindex: navigatable ? 0 : -1, navigatable: navigatable, title: kendo.format(options.messages.pageButtonLabel, 0) });\n selectHtml = $(\"
  • \";\n var colGroup = \"\";\n var row = \"\";\n\n for (var idx = 0; idx < this.options.columns.length; idx++) {\n var currentColumn = this.options.columns[idx];\n var title = currentColumn.title || currentColumn.field || \"\";\n var titleFunc = () => title;\n var template = currentColumn.headerTemplate || titleFunc;\n var columnsHeaderTemplate = typeof template !== \"function\" ? kendo.template(template) : template;\n var currentWidth = currentColumn.width;\n var currentWidthInt = parseInt(currentWidth, 10);\n var widthStyle = '';\n\n if (currentWidth && !isNaN(currentWidthInt)) {\n widthStyle += `${kendo.attr('style-width')}=\"${currentWidthInt}${percentageUnitsRegex.test(currentWidth) ? \"%\" : \"px\"}\"`;\n }\n\n colGroup += \"\";\n\n row += \"\";\n }\n\n colGroup += \"\";\n row += \"\";\n header += colGroup;\n header += \"\";\n header += row;\n header += \"

    \";\n\n $header = $(header);\n kendo.applyStylesFromKendoAttributes($header, [\"width\"]);\n\n list.columnsHeader = columnsHeader = $header;\n list.list.prepend(columnsHeader);\n\n this._angularElement(list.columnsHeader, \"compile\");\n },\n\n _noData: function() {\n var list = this;\n var noData = $(list.noData);\n var template = list.options.noDataTemplate === true ? () => htmlEncode(list.options.messages.noData) : list.options.noDataTemplate;\n\n list.angular(\"cleanup\", function() { return { elements: noData }; });\n kendo.destroy(noData);\n noData.remove();\n\n if (!template) {\n list.noData = null;\n return;\n }\n\n list.noData = $(NO_DATA_EL).hide().appendTo(list.list);\n list.noDataTemplate = typeof template !== \"function\" ? kendo.template(template) : template;\n },\n\n _footer: function() {\n var list = this;\n var footer = $(list.footer);\n var template = list.options.footerTemplate;\n var footerEl = this.options.columns && this.options.columns.length ? TABLE_FOOTER_EL : LIST_FOOTER_EL;\n\n this._angularElement(footer, \"cleanup\");\n kendo.destroy(footer);\n footer.remove();\n\n if (!template) {\n list.footer = null;\n return;\n }\n\n list.footer = $(footerEl).appendTo(list.list);\n list.footerTemplate = typeof template !== \"function\" ? kendo.template(template) : template;\n },\n\n _listOptions: function(options) {\n var that = this;\n var currentOptions = that.options;\n var virtual = currentOptions.virtual;\n var changeEventOption = { change: that._listChange.bind(that) };\n var listBoundHandler = that._listBound.bind(that);\n var focusedElm = that._focused;\n var inputId = that.element.attr(\"id\");\n var labelElm = $(\"label[for=\\\"\" + that.element.attr(\"id\") + \"\\\"]\");\n var labelledBy = focusedElm.attr(ARIA_LABELLEDBY);\n\n if (!labelledBy && labelElm.length) {\n labelledBy = labelElm.attr(\"id\") || that._generateLabelId(labelElm, inputId || kendo.guid());\n }\n\n virtual = typeof virtual === \"object\" ? virtual : {};\n\n options = $.extend({\n autoBind: false,\n selectable: true,\n dataSource: that.dataSource,\n click: that._click.bind(that),\n activate: that._activateItem.bind(that),\n columns: currentOptions.columns,\n deactivate: that._deactivateItem.bind(that),\n dataBinding: function() {\n that.trigger(DATA_BINDING);\n },\n dataBound: listBoundHandler,\n height: currentOptions.height,\n dataValueField: currentOptions.dataValueField,\n dataTextField: currentOptions.dataTextField,\n groupTemplate: currentOptions.groupTemplate,\n fixedGroupTemplate: currentOptions.fixedGroupTemplate,\n template: currentOptions.template,\n ariaLabel: focusedElm.attr(ARIA_LABEL),\n ariaLabelledBy: labelledBy,\n listSize: that._listSize\n }, options, virtual, changeEventOption);\n\n if (!options.template) {\n options.template = (data) => htmlEncode(kendo.getter(options.dataTextField)(data));\n }\n\n if (currentOptions.$angular) {\n options.$angular = currentOptions.$angular;\n }\n\n return options;\n },\n\n _initList: function(opts) {\n var that = this;\n var skipValueUpdate = opts && opts.skipValueUpdate;\n var listOptions = that._listOptions({\n selectedItemChange: that._listChange.bind(that)\n });\n\n if (!that.options.virtual) {\n that.listView = new kendo.ui.StaticList(that.ul, listOptions);\n } else {\n that.listView = new kendo.ui.VirtualList(that.ul, Object.assign(listOptions, {\n height: that._hasActionSheet() ? 362 : that.options.height, // Hardcoded virtual list height for action sheet untill better solution is found\n }));\n that.list.addClass(\"k-virtual-list\");\n }\n\n that.listView.bind(\"listBound\", that._listBound.bind(that));\n\n if (!skipValueUpdate) {\n that._setListValue();\n }\n },\n\n _setListValue: function(value) {\n value = value || this.options.value;\n\n if (value !== undefined$1) {\n this.listView.value(value)\n .done(this._updateSelectionState.bind(this));\n }\n },\n\n _updateSelectionState: $.noop,\n\n _listMousedown: function(e) {\n if (!this.filterInput || this.filterInput[0] !== e.target) {\n e.preventDefault();\n }\n },\n\n _isFilterEnabled: function() {\n var filter = this.options.filter;\n return filter && filter !== \"none\";\n },\n\n _hideClear: function() {\n var list = this;\n\n if (list._clear) {\n list._clear.addClass(HIDDENCLASS);\n }\n },\n\n _showClear: function() {\n if (this._clear) {\n this._clear.removeClass(HIDDENCLASS);\n }\n },\n\n _clearValue: function() {\n this._clearText();\n this._accessor(\"\");\n this.listView.value([]);\n\n if (this._isSelect) {\n this._customOption = undefined$1;\n }\n\n if (this._isFilterEnabled() && !this.options.enforceMinLength) {\n this._filter({ word: \"\", open: false });\n\n if (this.options.highlightFirst) {\n this.listView.focus(0);\n }\n }\n this._change();\n },\n\n _clearText: function() {\n this.text(\"\");\n },\n\n _clearFilter: function() {\n if (!this.options.virtual) {\n this.listView.bound(false);\n }\n\n this._filterSource();\n },\n\n _filterSource: function(filter, force) {\n var that = this;\n var options = that.options;\n var isMultiColumnFiltering = options.filterFields && filter && filter.logic && filter.filters && filter.filters.length;\n var dataSource = that.dataSource;\n var expression = extend({}, dataSource.filter() || {});\n var resetPageSettings = filter || (expression.filters && expression.filters.length && !filter);\n\n var removed = removeFiltersForField(expression, options.dataTextField);\n\n this._clearFilterExpressions(expression);\n\n if ((filter || removed) && that.trigger(\"filtering\", { filter: filter })) {\n return $.Deferred().reject().promise();\n }\n\n var newExpression = {\n filters: [],\n logic: \"and\"\n };\n\n if (isMultiColumnFiltering) {\n newExpression.filters.push(filter);\n } else {\n this._pushFilterExpression(newExpression, filter);\n }\n\n if (isValidFilterExpr(expression)) {\n if (newExpression.logic === expression.logic) {\n newExpression.filters = newExpression.filters.concat(expression.filters);\n } else {\n newExpression.filters.push(expression);\n }\n }\n\n if (that._cascading) {\n this.listView.setDSFilter(newExpression);\n }\n\n var dataSourceState = extend({}, {\n page: resetPageSettings ? 1 : dataSource.page(),\n pageSize: resetPageSettings ? dataSource.options.pageSize : dataSource.pageSize(),\n sort: dataSource.sort(),\n filter: dataSource.filter(),\n group: dataSource.group(),\n aggregate: dataSource.aggregate()\n }, { filter: newExpression });\n\n return dataSource[force ? \"read\" : \"query\"](dataSource._mergeState(dataSourceState));\n },\n\n _pushFilterExpression: function(newExpression, filter) {\n if (isValidFilterExpr(filter) && filter.value !== \"\") {\n newExpression.filters.push(filter);\n }\n },\n\n _clearFilterExpressions: function(expression) {\n if (!expression.filters) {\n return;\n }\n\n var filtersToRemove;\n\n for (var i = 0; i < expression.filters.length; i++) {\n if (\"fromFilter\" in expression.filters[i]) {\n filtersToRemove = i;\n }\n }\n\n if (!isNaN(filtersToRemove)) {\n expression.filters.splice(filtersToRemove, 1);\n }\n },\n\n _angularElement: function(element, action) {\n if (!element) {\n return;\n }\n\n this.angular(action, function() {\n return { elements: element };\n });\n },\n\n _renderNoData: function() {\n var list = this;\n var noData = list.noData;\n\n if (!noData) {\n return;\n }\n\n this._angularElement(noData, \"cleanup\");\n noData.html(list.noDataTemplate({ instance: list }));\n this._angularElement(noData, \"compile\");\n },\n\n _toggleNoData: function(show) {\n $(this.noData).toggle(show);\n },\n\n _toggleHeader: function(show) {\n var groupHeader = this.listView.content.prev(FIXED_GROUP_HEADER);\n groupHeader.toggle(show);\n },\n\n _renderFooter: function() {\n var list = this,\n footer = list.footer ? this.options.columns && this.options.columns.length ? list.footer.children().first() : list.footer : null;\n\n if (!footer) {\n return;\n }\n\n this._angularElement(footer, \"cleanup\");\n footer.html(list.footerTemplate({ instance: list }));\n this._angularElement(footer, \"compile\");\n },\n\n _allowOpening: function() {\n return this.options.noDataTemplate || this.dataSource.flatView().length;\n },\n\n _initValue: function() {\n var that = this,\n value = that.options.value;\n\n if (value !== null) {\n that.element.val(value);\n } else {\n value = that._accessor();\n that.options.value = value;\n }\n\n that._old = value;\n },\n\n _ignoreCase: function() {\n var that = this,\n model = that.dataSource.reader.model,\n field;\n\n if (model && model.fields) {\n field = model.fields[that.options.dataTextField];\n\n if (field && field.type && field.type !== \"string\") {\n that.options.ignoreCase = false;\n }\n }\n },\n\n _focus: function(candidate) {\n return this.listView.focus(candidate);\n },\n\n _filter: function(options) {\n var that = this;\n var widgetOptions = that.options;\n var word = options.word;\n var filterFields = widgetOptions.filterFields;\n var field = widgetOptions.dataTextField;\n var expression;\n\n if (filterFields && filterFields.length) {\n expression = {\n logic: \"or\",\n filters: [],\n fromFilter: true\n };\n for (var i = 0; i < filterFields.length; i++) {\n this._pushFilterExpression(expression, that._buildExpression(word, filterFields[i]));\n }\n } else {\n expression = that._buildExpression(word, field);\n }\n\n that._open = options.open;\n that._filterSource(expression);\n },\n\n _buildExpression: function(value, field) {\n var that = this;\n var widgetOptions = that.options;\n var ignoreCase = widgetOptions.ignoreCase;\n var accentFoldingFiltering = that.dataSource.options.accentFoldingFiltering;\n\n return {\n value: ignoreCase ? (accentFoldingFiltering ? value.toLocaleLowerCase(accentFoldingFiltering) : value.toLowerCase()) : value,\n field: field,\n operator: widgetOptions.filter,\n ignoreCase: ignoreCase\n };\n },\n\n _clearButton: function() {\n var list = this;\n var clearTitle = list.options.messages.clear;\n\n if (!list._clear) {\n list._clear = $(`${kendo.ui.icon(\"x\")}`).attr({\n \"role\": \"button\",\n \"tabIndex\": -1\n });\n }\n\n if (!list.options.clearButton) {\n list._clear.remove();\n }\n this._hideClear();\n },\n\n search: function(word) {\n var options = this.options;\n\n word = typeof word === \"string\" ? word : this._inputValue();\n\n clearTimeout(this._typingTimeout);\n\n if ((!options.enforceMinLength && !word.length) || word.length >= options.minLength) {\n this._state = \"filter\";\n if (this.listView) {\n this.listView._emptySearch = !kendo.trim(word).length;\n }\n\n if (!this._isFilterEnabled()) {\n this._searchByWord(word);\n } else {\n this._filter({ word: word, open: true });\n }\n }\n },\n\n current: function(candidate) {\n return this._focus(candidate);\n },\n\n items: function() {\n return this.ul[0].children;\n },\n\n destroy: function() {\n var that = this;\n var ns = that.ns;\n\n Widget.fn.destroy.call(that);\n\n that._unbindDataSource();\n\n if (that.largeMQL || that.mediumMQL || that.smallMQL) {\n that.largeMQL.destroy();\n that.mediumMQL.destroy();\n that.smallMQL.destroy();\n }\n\n that.listView.destroy();\n that.list.off(ns);\n\n that.popup.destroy();\n\n if (that._form) {\n that._form.off(\"reset\", that._resetHandler);\n }\n\n if (that.label) {\n that.label.destroy();\n }\n },\n\n dataItem: function(index) {\n var that = this;\n\n if (index === undefined$1) {\n return that.listView.selectedDataItems()[0];\n }\n\n if (typeof index !== \"number\") {\n if (that.options.virtual) {\n return that.dataSource.getByUid($(index).data(\"uid\"));\n }\n\n index = $(that.items()).index(index);\n }\n\n return that.dataSource.flatView()[index];\n },\n\n _activateItem: function() {\n var current = this.listView.focus();\n if (current && this.popup.visible()) {\n this._focused.add(this.filterInput).attr(ARIA_ACTIVEDESCENDANT, current.attr(\"id\"));\n }\n },\n\n _deactivateItem: function() {\n this._focused.add(this.filterInput).removeAttr(ARIA_ACTIVEDESCENDANT);\n },\n\n _accessors: function() {\n var that = this;\n var element = that.element;\n var options = that.options;\n var getter = kendo.getter;\n var textField = element.attr(kendo.attr(\"text-field\"));\n var valueField = element.attr(kendo.attr(\"value-field\"));\n\n if (!options.dataTextField && textField) {\n options.dataTextField = textField;\n }\n\n if (!options.dataValueField && valueField) {\n options.dataValueField = valueField;\n }\n\n that._text = getter(options.dataTextField);\n that._value = getter(options.dataValueField);\n },\n\n _aria: function(id) {\n var that = this,\n options = that.options,\n element = that._focused,\n autocomplete;\n\n if (options.suggest !== undefined$1) {\n if (options.filter === \"none\") {\n if (options.suggest === true) {\n autocomplete = \"inline\";\n } else {\n autocomplete = \"none\";\n }\n } else {\n if (options.suggest === true) {\n autocomplete = \"both\";\n } else {\n autocomplete = \"list\";\n }\n }\n\n element.attr(ARIA_AUTOCOMPLETE, autocomplete);\n }\n\n id = id ? id + \" \" + that.ul[0].id : that.ul[0].id;\n\n element.attr({\n \"aria-controls\": id\n });\n\n if (that.filterInput && that.filterInput.length > 0) {\n that.filterInput.attr(ARIA_CONTROLS, id);\n }\n\n that.ul.attr(ARIA_LIVE, !that._isFilterEnabled() ? \"off\" : \"polite\");\n\n that._ariaLabel(that._focused);\n },\n\n _blur: function() {\n var that = this;\n\n that._change();\n that.close();\n that._userTriggered = false;\n },\n\n _isValueChanged: function(value) {\n return value !== unifyType(this._old, typeof value);\n },\n\n _change: function() {\n var that = this;\n var index = that.selectedIndex;\n var optionValue = that.options.value;\n var value = that.value();\n var trigger;\n\n if (that._isSelect && !that.listView.bound() && optionValue) {\n value = optionValue;\n }\n\n if (that._isValueChanged(value)) {\n trigger = true;\n } else if (that._valueBeforeCascade !== undefined$1 && that._valueBeforeCascade !== unifyType(that._old, typeof that._valueBeforeCascade) && that._userTriggered) {\n trigger = true;\n } else if (index !== undefined$1 && index !== that._oldIndex && !that.listView.isFiltered()) {\n trigger = true;\n }\n\n if (trigger) {\n\n if (that._old === null || that._old === \"\" || value === \"\") {\n that._valueBeforeCascade = that._old = value;\n } else {\n if (that.dataItem()) {\n that._valueBeforeCascade = that._old = that.options.dataValueField ? that.dataItem()[that.options.dataValueField] : that.dataItem();\n } else {\n that._valueBeforeCascade = that._old = null;\n }\n }\n that._oldIndex = index;\n\n if (!that._typing) {\n // trigger the DOM change event so any subscriber gets notified\n that.element.trigger(CHANGE);\n }\n\n that.trigger(CHANGE);\n }\n\n that.typing = false;\n },\n\n _data: function() {\n return this.dataSource.view();\n },\n\n _enable: function() {\n var that = this,\n options = that.options,\n disabled = that.element.is(\"[disabled]\");\n\n if (options.enable !== undefined$1) {\n options.enabled = options.enable;\n }\n\n if (!options.enabled || disabled) {\n that.enable(false);\n } else {\n that.readonly(that.element.is(\"[readonly]\"));\n }\n },\n\n _dataValue: function(dataItem) {\n var value = this._value(dataItem);\n\n if (value === undefined$1) {\n value = this._text(dataItem);\n }\n\n return value;\n },\n\n _offsetHeight: function() {\n var offsetHeight = 0;\n var siblings = this.listView.content.parent().prevAll(\":visible\");\n\n siblings.each(function() {\n var element = $(this);\n\n offsetHeight += outerHeight(element, true);\n });\n\n return offsetHeight;\n },\n\n _height: function(length) {\n var that = this;\n var list = that.list;\n var height = that.options.height;\n var visible = that.popup.visible();\n var isMccb = this.options.columns && this.options.columns.length;\n var offsetTop, popups;\n\n if (length || that.options.noDataTemplate) {\n // Check where animation container stays\n popups = list.parent().add(list.closest(\".k-animation-container\").add(list.closest(\".k-child-animation-container\"))).show();\n\n if (!list.parent().is(\":visible\")) {\n popups.hide();\n return;\n }\n\n height = that.listView.content[0].scrollHeight > height ? height : \"auto\";\n\n popups.height(height);\n\n if (height !== \"auto\") {\n offsetTop = that._offsetHeight();\n\n height = height - offsetTop;\n\n if (isMccb) {\n height = height - (outerHeight($(that.footer)) || 0) - (outerHeight($(that.columnsHeader)) || 0);\n }\n }\n\n if (isMccb) {\n that.listView.content.outerHeight(height);\n } else {\n that.listView.content.parent().outerHeight(height);\n }\n\n if (!visible) {\n list.parent().hide();\n }\n }\n\n return height;\n },\n\n _openHandler: function(e) {\n var current;\n\n this._adjustListWidth();\n\n if (this.trigger(OPEN)) {\n e.preventDefault();\n } else {\n this._focused.attr(ARIA_EXPANDED, true);\n this.ul.attr(ARIA_HIDDEN, false);\n\n current = this.listView.focus();\n if (current) {\n this._focused.add(this.filterInput).attr(ARIA_ACTIVEDESCENDANT, current.attr(\"id\"));\n }\n }\n },\n\n _adjustListWidth: function() {\n var that = this,\n list = that.list.parent(),\n width = list[0].style.width,\n wrapper = that.wrapper,\n computedStyle, computedWidth;\n\n if ((!list.data(WIDTH) && width) || that._hasActionSheet()) {\n return;\n }\n\n computedStyle = window.getComputedStyle ? window.getComputedStyle(wrapper[0], null) : 0;\n computedWidth = parseFloat(computedStyle && computedStyle.width) || outerWidth(wrapper);\n\n if (computedStyle && browser.msie) { // getComputedStyle returns different box in IE.\n computedWidth += parseFloat(computedStyle.paddingLeft) + parseFloat(computedStyle.paddingRight) + parseFloat(computedStyle.borderLeftWidth) + parseFloat(computedStyle.borderRightWidth);\n }\n\n if (list.css(\"box-sizing\") !== \"border-box\") {\n width = computedWidth - (outerWidth(list) - list.width());\n } else {\n width = computedWidth;\n }\n\n list.css({\n fontFamily: wrapper.css(\"font-family\"),\n width: that.options.autoWidth ? \"auto\" : width,\n minWidth: width,\n whiteSpace: that.options.autoWidth ? \"nowrap\" : \"normal\"\n })\n .data(WIDTH, width);\n\n return true;\n },\n\n _closeHandler: function(e) {\n if (e.closeButton) {\n this._onCloseButtonPressed();\n }\n\n\n if (this.trigger(CLOSE)) {\n e.preventDefault();\n } else {\n this._focused.attr(ARIA_EXPANDED, false);\n this.ul.attr(ARIA_HIDDEN, true);\n this._focused.add(this.filterInput).removeAttr(ARIA_ACTIVEDESCENDANT);\n }\n },\n\n _focusItem: function() {\n var listView = this.listView;\n var noFocusedItem = !listView.focus();\n var index = last(listView.select());\n\n if (index === undefined$1 && this.options.highlightFirst && noFocusedItem) {\n index = 0;\n }\n\n if (index !== undefined$1) {\n listView.focus(index);\n } else if (noFocusedItem) {\n listView.scrollToIndex(0);\n }\n },\n\n _calculateGroupPadding: function(height) {\n var li = this.ul.children(\".k-first\").first();\n var groupHeader = this.listView.content.prev(FIXED_GROUP_HEADER);\n var padding = 0;\n var direction = 'right';\n\n if (groupHeader[0] && groupHeader[0].style.display !== \"none\") {\n if (height !== \"auto\") {\n padding = kendo.support.scrollbar();\n }\n\n if (this.element.parents('.k-rtl').length) {\n direction = 'left';\n }\n\n padding += parseFloat(li.css(\"border-\" + direction + \"-width\"), 10) + parseFloat(li.children(GROUP_LABEL).css(\"padding-\" + direction), 10);\n groupHeader.css(\"padding-\" + direction, padding);\n }\n },\n\n _calculatePopupHeight: function(force) {\n var height = this._height(this.dataSource.flatView().length || force);\n this._calculateGroupPadding(height);\n this._calculateColumnsHeaderPadding(height);\n },\n\n _calculateColumnsHeaderPadding: function(height) {\n if (this.options.columns && this.options.columns.length) {\n var list = this;\n var isRtl = support.isRtl(list.wrapper);\n var scrollbar = kendo.support.scrollbar();\n\n list.columnsHeader.css((isRtl ? \"padding-left\" : \"padding-right\"), height !== \"auto\" ? scrollbar : 0);\n }\n },\n\n _refreshScroll: function() {\n var listView = this.listView;\n var enableYScroll = listView.element.height() > listView.content.height();\n\n if (this.options.autoWidth) {\n listView.content.css({\n overflowX: \"hidden\",\n overflowY: enableYScroll ? \"scroll\" : \"auto\"\n });\n }\n },\n\n _hasActionSheet: function() {\n return this.options.adaptiveMode === \"auto\" && (this.mediumMQL.mediaQueryList.matches\n || this.smallMQL.mediaQueryList.matches);\n },\n\n _resizePopup: function(force) {\n if (this.options.virtual\n || this._hasActionSheet()) {\n return;\n }\n\n if (!this.popup.element.is(\":visible\")) {\n this.popup.one(\"open\", (function(force) {\n return (function(e) {\n if (!e.isDefaultPrevented()) {\n this._calculatePopupHeight(force);\n }\n }).bind(this);\n }).call(this, force));\n\n this.popup.one(ACTIVATE, this._refreshScroll.bind(this));\n } else {\n this._calculatePopupHeight(force);\n }\n },\n\n _popup: function() {\n var list = this;\n\n list.list.wrap(\"
    \");\n\n if (list.options.adaptiveMode === \"auto\") {\n list.largeMQL.onEnter(list._createPopup.bind(list));\n list.mediumMQL.onEnter(list._createActionSheet.bind(list));\n list.smallMQL\n .onEnter(() => {\n if (!list.popup) {\n list._createActionSheet();\n }\n\n list.popup.fullscreen(true);\n });\n } else {\n list._createPopup();\n }\n },\n\n _createPopup: function() {\n var list = this;\n\n if (list.popup) {\n list._cachedFilterValue = list.filterInput ? list.filterInput.val() : null;\n list.popup.destroy();\n list._removeFilterHeader();\n list._removeStaticHeader();\n }\n\n list.popup = new ui.Popup(list.list.parent().addClass(\"k-list-container\"), extend({}, list.options.popup, {\n anchor: list.wrapper,\n open: list._openHandler.bind(list),\n close: list._closeHandler.bind(list),\n animation: list.options.animation,\n isRtl: support.isRtl(list.wrapper),\n autosize: list.options.autoWidth,\n activate: () => {\n this._refreshFloatingLabel();\n },\n deactivate: () => {\n this._refreshFloatingLabel();\n }\n }));\n\n list._addFilterHeader = list._isFilterEnabled() && list.options.popupFilter ? () => {\n list._filterHeader();\n list.list\n .parent()\n .prepend($(list.filterTemplate))\n .find(\".k-searchbox\")\n .append(list.filterInput);\n list._enable();\n } : $.noop;\n\n list._postCreatePopup();\n },\n\n _onActionSheetCreate: $.noop,\n _onCloseButtonPressed: $.noop,\n\n _createActionSheet: function() {\n var list = this;\n\n if (list.popup) {\n list._cachedFilterValue = list.filterInput ? list.filterInput.val() : null;\n list.popup.destroy();\n list._removeFilterHeader();\n list._removeStaticHeader();\n list.list.parent().css({\n width: \"\",\n height: \"\",\n minWidth: \"\"\n });\n }\n\n list.popup = new ui.ActionSheet(list.list.parent(), {\n headerTemplate: (options) =>\n `
    ` +\n '
    ' +\n `
    ` +\n (list.options.label ? `
    ${list.options.label}
    ` : '') +\n (list.options.placeholder ? `
    ${list.options.placeholder || \"\"}
    ` : \"\") +\n '
    ' +\n (options.closeButton ?\n '
    ' +\n kendo.html.renderButton(``, { icon: \"x\", fillMode: \"flat\", size: \"large\" }) +\n '
    '\n : \"\") +\n '
    ' +\n (this._isFilterEnabled() ? `
    ${list.filterTemplate}
    ` : '') +\n '
    ',\n open: list._openHandler.bind(list),\n close: list._closeHandler.bind(list),\n focusOnActivate: false,\n adaptive: true,\n appendTo: (list.options.popup && list.options.popup.appendTo) || document.body,\n closeButton: true,\n fullscreen: list.smallMQL.mediaQueryList.matches,\n activate: () => {\n this._refreshFloatingLabel();\n },\n deactivate: () => {\n this._refreshFloatingLabel();\n },\n popup: extend({}, list.options.popup, {\n autosize: list.options.autoWidth\n })\n });\n\n list._addFilterHeader = this._isFilterEnabled() ? () => {\n list._filterHeader();\n list.popup.element\n .find(\".k-searchbox\")\n .append(list.filterInput);\n list._enable();\n } : $.noop;\n\n\n list._postCreatePopup();\n list._onActionSheetCreate();\n },\n\n _removeFilterHeader: function() {\n if (this.filterInput) {\n this.filterInput\n .off(this.ns)\n .closest(\".k-list-filter\")\n .remove();\n\n this.filterInput = null;\n }\n },\n\n _removeStaticHeader: function() {\n this.listView.header.remove();\n },\n\n _postCreatePopup: function() {\n var list = this;\n var listViewValue;\n\n list._addFilterHeader();\n\n if (list.filterInput && list._cachedFilterValue) {\n list.filterInput.val(list._cachedFilterValue);\n }\n\n list.popup.element.prepend(list.header)\n .on(MOUSEDOWN + this.ns, this._listMousedown.bind(this));\n\n if (list.listView) {\n listViewValue = list.listView.value();\n\n if (list.listView._clean) {\n list.listView._clean();\n }\n\n // Dirty hack to clean MultiSelect taglist\n if (list.tagList && list.options.virtual) {\n list.tagList.empty();\n }\n\n list.listView.destroy();\n list._initList({ skipValueUpdate: true });\n list.listView.value(listViewValue);\n }\n },\n\n _toggleHover: function(e) {\n $(e.currentTarget).toggleClass(HOVER, e.type === MOUSEENTER);\n },\n\n _toggle: function(open, preventFocus) {\n var that = this;\n var touchEnabled = support.mobileOS && (support.touch || support.MSPointers || support.pointers);\n\n open = open !== undefined$1 ? open : !that.popup.visible();\n\n if (!preventFocus && !touchEnabled && that._focused[0] !== activeElement()) {\n that._prevent = true;\n that._focused.trigger(FOCUS);\n that._prevent = false;\n }\n\n that[open ? OPEN : CLOSE]();\n },\n\n _triggerCascade: function() {\n var that = this;\n\n if (!that._cascadeTriggered || that.value() !== unifyType(that._cascadedValue, typeof that.value())) {\n that._cascadedValue = that.value();\n that._cascadeTriggered = true;\n that.trigger(CASCADE, { userTriggered: that._userTriggered });\n }\n },\n\n _triggerChange: function() {\n if (this._valueBeforeCascade !== this.value()) {\n this.trigger(CHANGE);\n }\n },\n\n _unbindDataSource: function() {\n var that = this;\n\n that.dataSource.unbind(REQUESTSTART, that._requestStartHandler)\n .unbind(REQUESTEND, that._requestEndHandler)\n .unbind(\"error\", that._errorHandler);\n },\n\n requireValueMapper: function(options, value) {\n var hasValue = (options.value instanceof Array ? options.value.length : options.value) || (value instanceof Array ? value.length : value);\n if (hasValue && options.virtual && typeof options.virtual.valueMapper !== \"function\") {\n throw new Error(\"ValueMapper is not provided while the value is being set. See http://docs.telerik.com/kendo-ui/controls/editors/combobox/virtualization#the-valuemapper-function\");\n }\n }\n });\n\n function unifyType(value, type) {\n if (value !== undefined$1 && value !== \"\" && value !== null) {\n if (type === \"boolean\") {\n if (typeof value !== \"boolean\") {\n value = value.toString().toLowerCase() === \"true\";\n }\n value = Boolean(value);\n } else if (type === \"number\") {\n value = Number(value);\n } else if (type === \"string\") {\n value = value.toString();\n }\n }\n\n return value;\n }\n\n extend(List, {\n inArray: function(node, parentNode) {\n var idx, length, siblings = parentNode.children;\n\n if (!node || node.parentNode !== parentNode) {\n return -1;\n }\n\n for (idx = 0, length = siblings.length; idx < length; idx++) {\n if (node === siblings[idx]) {\n return idx;\n }\n }\n\n return -1;\n },\n unifyType: unifyType\n });\n\n kendo.ui.List = List;\n\n ui.Select = List.extend({\n init: function(element, options) {\n List.fn.init.call(this, element, options);\n this._initial = this.element.val();\n },\n\n setDataSource: function(dataSource) {\n var that = this;\n var parent;\n\n that.options.dataSource = dataSource;\n\n that._dataSource();\n\n if (that.listView.bound()) {\n that._initialIndex = null;\n that.listView._current = null;\n }\n\n that.listView.setDataSource(that.dataSource);\n\n if (that.options.autoBind) {\n that.dataSource.fetch();\n }\n\n parent = that._parentWidget();\n\n if (parent) {\n that._cascadeSelect(parent);\n }\n },\n\n close: function() {\n this.popup.close();\n },\n\n select: function(candidate) {\n var that = this;\n\n if (candidate === undefined$1) {\n return that.selectedIndex;\n } else {\n return that._select(candidate).done(function() {\n that._cascadeValue = that._old = that._accessor();\n that._oldIndex = that.selectedIndex;\n\n that._refreshFloatingLabel();\n });\n }\n },\n\n _accessor: function(value, idx) {\n return this[this._isSelect ? \"_accessorSelect\" : \"_accessorInput\"](value, idx);\n },\n\n _accessorInput: function(value) {\n var element = this.element[0];\n\n if (value === undefined$1) {\n return element.value;\n } else {\n if (value === null) {\n value = \"\";\n }\n element.value = value;\n }\n },\n\n _accessorSelect: function(value, idx) {\n var element = this.element[0];\n var hasValue;\n\n if (value === undefined$1) {\n return getSelectedOption(element).value || \"\";\n }\n\n getSelectedOption(element).selected = false;\n\n if (idx === undefined$1) {\n idx = -1;\n }\n\n hasValue = (value !== null && value !== \"\");\n\n if (hasValue && idx == -1) {\n this._custom(value);\n } else {\n if (value) {\n element.value = value;\n } else {\n element.selectedIndex = idx;\n }\n }\n },\n\n _syncValueAndText: function() {\n return true;\n },\n\n _custom: function(value) {\n var that = this;\n var element = that.element;\n var custom = that._customOption;\n\n if (!custom) {\n custom = $(\"\";\n options += option;\n }\n\n element.html(options);\n\n if (value !== undefined$1) {\n htmlElement.value = value;\n if (htmlElement.value && !value) {\n htmlElement.selectedIndex = -1;\n }\n }\n\n if (htmlElement.selectedIndex !== -1) {\n option = getSelectedOption(htmlElement);\n\n if (option) {\n option.setAttribute(SELECTED, SELECTED);\n }\n }\n },\n\n _reset: function() {\n var that = this,\n element = that.element,\n formId = element.attr(\"form\"),\n form = formId ? $(\"#\" + formId) : element.closest(\"form\");\n\n if (form[0]) {\n that._resetHandler = function() {\n setTimeout(function() {\n that.value(that._initial);\n });\n };\n\n that._form = form.on(\"reset\", that._resetHandler);\n }\n },\n\n _parentWidget: function() {\n var name = this.options.name;\n\n if (!this.options.cascadeFrom) {\n return;\n }\n\n var parentElement = $(\"#\" + this.options.cascadeFrom);\n var parent = parentElement.data(\"kendo\" + name);\n\n if (!parent) {\n for (var i = 0; i < alternativeNames[name].length; i += 1) {\n parent = parentElement.data(\"kendo\" + alternativeNames[name][i]);\n\n if (!!parent) {\n break;\n }\n }\n }\n\n return parent;\n },\n\n _cascade: function() {\n var that = this;\n var options = that.options;\n var cascade = options.cascadeFrom;\n var parent;\n\n if (cascade) {\n parent = that._parentWidget();\n\n if (!parent) {\n return;\n }\n\n that._cascadeHandlerProxy = that._cascadeHandler.bind(that);\n that._cascadeFilterRequests = [];\n\n options.autoBind = false;\n\n parent.bind(\"set\", function() { //will cascade\n that.one(\"set\", function(e) { //get your value\n that._selectedValue = e.value || that._accessor();\n });\n });\n\n parent.first(CASCADE, that._cascadeHandlerProxy);\n\n //refresh was called\n if (parent.listView.bound()) {\n that._toggleCascadeOnFocus();\n that._cascadeSelect(parent);\n } else {\n parent.one(DATA_BOUND, function() {\n that._toggleCascadeOnFocus();\n if (parent.popup.visible()) {\n parent._focused.trigger(FOCUS);\n }\n });\n\n if (!parent.value()) {\n that.enable(false);\n }\n }\n }\n },\n\n _toggleCascadeOnFocus: function() {\n var that = this;\n var parent = that._parentWidget();\n var focusout = isIE && parent instanceof ui.DropDownList ? BLUR : FOCUSOUT;\n\n parent._focused.add(parent.filterInput).on(FOCUS, function() {\n parent.unbind(CASCADE, that._cascadeHandlerProxy);\n parent.unbind(CHANGE, that._cascadeHandlerProxy);\n parent.first(CHANGE, that._cascadeHandlerProxy);\n });\n\n parent._focused.add(parent.filterInput).on(focusout, function() {\n parent.unbind(CHANGE, that._cascadeHandlerProxy);\n parent.unbind(CASCADE, that._cascadeHandlerProxy);\n parent.first(CASCADE, that._cascadeHandlerProxy);\n });\n },\n\n _cascadeHandler: function(e) {\n var parent = this._parentWidget();\n var valueBeforeCascade = this.value();\n\n this._userTriggered = e.userTriggered || parent._userTriggered;\n\n if (this.listView.bound()) {\n this._clearSelection(parent, true);\n }\n\n this._cascadeSelect(parent, valueBeforeCascade);\n },\n\n _cascadeChange: function(parent) {\n var that = this;\n var value = that._accessor() || that._selectedValue;\n\n if (!that._cascadeFilterRequests.length) {\n that._selectedValue = null;\n }\n\n if (that._userTriggered) {\n that._clearSelection(parent, true);\n } else if (value) {\n if (value !== unifyType(that.listView.value()[0], typeof value)) {\n that.value(value);\n }\n\n if (!that.dataSource.view()[0] || that.selectedIndex === -1) {\n that._clearSelection(parent, true);\n }\n } else if (that.dataSource.flatView().length) {\n that.select(that.options.index);\n }\n\n that.enable();\n that._triggerCascade();\n that._triggerChange();\n that._userTriggered = false;\n },\n\n _cascadeSelect: function(parent, valueBeforeCascade) {\n var that = this;\n var dataItem = parent.dataItem();\n var filterValue = dataItem ? dataItem[that.options.cascadeFromParentField] || parent._value(dataItem) : null;\n var valueField = that.options.cascadeFromField || parent.options.dataValueField;\n var expressions;\n\n // Applicable only when parent is ComboBox or MultiColumnComboBox\n if (parent.options.cascadeOnCustomValue &&\n filterValue === null &&\n (!that.options.cascadeFromParentField || that.options.cascadeFromParentField === parent.options.dataValueField)) {\n filterValue = parent.value();\n }\n\n that._valueBeforeCascade = valueBeforeCascade !== undefined$1 ? valueBeforeCascade : that.value();\n\n if (filterValue || filterValue === 0) {\n expressions = that.dataSource.filter() || {};\n removeFiltersForField(expressions, valueField);\n\n var handler = function() {\n var currentHandler = that._cascadeFilterRequests.shift();\n if (currentHandler) {\n that.unbind('dataBound', currentHandler);\n }\n\n currentHandler = that._cascadeFilterRequests[0];\n if (currentHandler) {\n that.first('dataBound', currentHandler);\n }\n\n that._cascadeChange(parent);\n };\n\n that._cascadeFilterRequests.push(handler);\n\n if (that._cascadeFilterRequests.length === 1) {\n that.first('dataBound', handler);\n }\n\n that._cascading = true;\n that._filterSource({\n field: valueField,\n operator: \"eq\",\n value: filterValue\n });\n that._cascading = false;\n } else {\n that.enable(false);\n that._clearSelection(parent);\n that._triggerCascade();\n that._triggerChange();\n that._userTriggered = false;\n }\n\n that._refreshFloatingLabel();\n }\n });\n\n var STATIC_LIST_NS = \".StaticList\";\n\n var StaticList = kendo.ui.DataBoundWidget.extend({\n init: function(element, options) {\n Widget.fn.init.call(this, element, options);\n\n this.element.attr(\"role\", (options.aria && options.aria.role) || 'listbox')\n .on(CLICK + STATIC_LIST_NS, \"li\", this._click.bind(this))\n .on(MOUSEENTER + STATIC_LIST_NS, \"li\", function() { $(this).addClass(HOVER); })\n .on(MOUSELEAVE + STATIC_LIST_NS, \"li\", function() { $(this).removeClass(HOVER); });\n\n if (options && options.ariaLabel) {\n this.element.attr(ARIA_LABEL, options.ariaLabel);\n } else if (options && options.ariaLabelledBy) {\n this.element.attr(ARIA_LABELLEDBY, options.ariaLabelledBy);\n }\n\n if (support.touch) {\n this._touchHandlers();\n }\n\n if (this.options.selectable === \"multiple\") {\n this.element.attr(ARIA_MULTISELECTABLE, true);\n }\n\n if (this.options.columns && this.options.columns.length) {\n var thead = this.element.parent().find('.k-table-thead');\n var row = $('' +\n '' +\n '');\n\n thead.append(row);\n\n this.header = row.find(\".k-table-th\");\n\n this.content = this.element.wrap(\"
    \").parent();\n\n this.element.addClass(TABLE_LIST);\n } else {\n this.content = this.element.wrap(\"
    \").parent();\n this.header = this.content.before($('
    ').hide()).prev();\n this.element.addClass(LIST_UL);\n }\n\n this.bound(false);\n\n this._optionID = kendo.guid();\n\n this._selectedIndices = [];\n\n this._view = [];\n this._dataItems = [];\n this._values = [];\n\n var value = this.options.value;\n\n if (value) {\n this._values = Array.isArray(value) ? value.slice(0) : [value];\n }\n\n this._getter();\n this._templates();\n\n this.setDataSource(this.options.dataSource);\n\n this._createOnScrollProxy();\n },\n\n options: {\n name: \"StaticList\",\n dataValueField: null,\n valuePrimitive: false,\n selectable: true,\n template: null,\n groupTemplate: null,\n fixedGroupTemplate: null,\n ariaLabel: null,\n ariaLabelledBy: null\n },\n\n events: [\n CLICK,\n CHANGE,\n ACTIVATE,\n DEACTIVATE,\n DATA_BINDING,\n DATA_BOUND,\n SELECTED_ITEM_CHANGE\n ],\n\n setDataSource: function(source) {\n var that = this;\n var dataSource = source || {};\n var value;\n\n dataSource = Array.isArray(dataSource) ? { data: dataSource } : dataSource;\n dataSource = kendo.data.DataSource.create(dataSource);\n\n if (that.dataSource) {\n that.dataSource.unbind(CHANGE, that._refreshHandler);\n\n value = that.value();\n\n that.value([]);\n that.bound(false);\n\n that.value(value);\n } else {\n that._refreshHandler = that.refresh.bind(that);\n }\n\n that.setDSFilter(dataSource.filter());\n\n that.dataSource = dataSource.bind(CHANGE, that._refreshHandler);\n that._fixedHeader();\n },\n\n _touchHandlers: function() {\n var that = this,\n itemSelector = this.options.columns && this.options.columns.length ? ITEMSELECTORTABLE : ITEMSELECTOR,\n startY, endY,\n tapPosition = function(event) {\n return (event.originalEvent || event).changedTouches[0].pageY;\n };\n\n that.element.on(\"touchstart\" + STATIC_LIST_NS, function(e) {\n startY = tapPosition(e);\n });\n\n that.element.on(\"touchend\" + STATIC_LIST_NS, function(e) {\n if (e.isDefaultPrevented()) {\n return;\n }\n\n endY = tapPosition(e);\n\n if (Math.abs(endY - startY) < 10) {\n that._touchTriggered = true;\n that._triggerClick($(e.target).closest(itemSelector).get(0));\n }\n });\n },\n\n skip: function() {\n return this.dataSource.skip();\n },\n\n setOptions: function(options) {\n Widget.fn.setOptions.call(this, options);\n\n this._getter();\n this._templates();\n this._render();\n\n if (this.label && options.label) {\n this.label.setOptions(options.label);\n } else if (this.label && options.label === false) {\n this.label._unwrapFloating();\n this._inputLabel.remove();\n delete this._inputLabel;\n }\n },\n\n destroy: function() {\n this.element.off(STATIC_LIST_NS);\n\n if (this._refreshHandler) {\n this.dataSource.unbind(CHANGE, this._refreshHandler);\n }\n\n clearTimeout(this._scrollId);\n\n Widget.fn.destroy.call(this);\n },\n\n dataItemByIndex: function(index) {\n return this.dataSource.flatView()[index];\n },\n\n screenHeight: function() {\n return this.content[0].clientHeight;\n },\n\n scrollToIndex: function(index) {\n var item = this.element[0].children[index];\n\n if (item) {\n this.scroll(item);\n }\n },\n\n scrollWith: function(value) {\n this.content.scrollTop(this.content.scrollTop() + value);\n },\n\n scroll: function(item) {\n if (!item) {\n return;\n }\n\n if (item[0]) {\n item = item[0];\n }\n\n var content = this.content[0],\n itemOffsetTop = item.offsetTop,\n itemOffsetHeight = item.offsetHeight,\n contentScrollTop = content.scrollTop,\n contentOffsetHeight = content.clientHeight,\n bottomDistance = itemOffsetTop + itemOffsetHeight;\n\n if (contentScrollTop > itemOffsetTop) {\n contentScrollTop = itemOffsetTop;\n } else if (bottomDistance > (contentScrollTop + contentOffsetHeight)) {\n contentScrollTop = (bottomDistance - contentOffsetHeight);\n }\n\n content.scrollTop = contentScrollTop;\n },\n\n selectedDataItems: function(dataItems) {\n if (dataItems === undefined$1) {\n return this._dataItems.slice();\n }\n\n this._dataItems = dataItems;\n this._values = this._getValues(dataItems);\n },\n\n _getValues: function(dataItems) {\n var getter = this._valueGetter;\n\n return $.map(dataItems, function(dataItem) {\n return getter(dataItem);\n });\n },\n\n focusNext: function() {\n var current = this.focus();\n\n if (!current) {\n current = 0;\n } else {\n current = current.next();\n }\n\n this.focus(current);\n },\n\n focusPrev: function() {\n var current = this.focus();\n\n if (!current) {\n current = this.element[0].children.length - 1;\n } else {\n current = current.prev();\n }\n\n this.focus(current);\n },\n\n focusFirst: function() {\n this.focus(this.element[0].children[0]);\n },\n\n focusLast: function() {\n this.focus(last(this.element[0].children));\n },\n\n focus: function(candidate) {\n var that = this;\n var id = that._optionID;\n var hasCandidate;\n\n if (candidate === undefined$1) {\n return that._current;\n }\n\n candidate = last(that._get(candidate));\n candidate = $(this.element[0].children[candidate]);\n\n if (that._current) {\n that._current\n .removeClass(FOCUSED)\n .removeAttr(ID);\n\n that.trigger(DEACTIVATE);\n }\n\n hasCandidate = !!candidate[0];\n\n if (hasCandidate) {\n candidate.addClass(FOCUSED);\n that.scroll(candidate);\n\n candidate.attr(\"id\", id);\n }\n\n that._current = hasCandidate ? candidate : null;\n that.trigger(ACTIVATE);\n },\n\n focusIndex: function() {\n return this.focus() ? this.focus().index() : undefined$1;\n },\n\n skipUpdate: function(skipUpdate) {\n this._skipUpdate = skipUpdate;\n },\n\n select: function(indices) {\n var that = this;\n var selectable = that.options.selectable;\n var singleSelection = selectable !== \"multiple\" && selectable !== false;\n var selectedIndices = that._selectedIndices;\n var uiSelectedIndices = [this.element.find(\".k-selected\").index()];\n\n var added = [];\n var removed = [];\n var result;\n\n if (indices === undefined$1) {\n return selectedIndices.slice();\n }\n\n indices = that._get(indices);\n\n if (indices.length === 1 && indices[0] === -1) {\n indices = [];\n }\n\n var deferred = $.Deferred().resolve();\n var filtered = that.isFiltered();\n\n if (filtered && !singleSelection && that._deselectFiltered(indices)) {\n return deferred;\n }\n\n if (singleSelection && !filtered &&\n $.inArray(last(indices), selectedIndices) !== -1 && $.inArray(last(indices), uiSelectedIndices) !== -1) {\n\n if (that._dataItems.length && that._view.length) {\n that._dataItems = [that._view[selectedIndices[0]].item];\n }\n\n return deferred;\n }\n\n result = that._deselect(indices);\n\n removed = result.removed;\n indices = result.indices;\n\n if (indices.length) {\n if (singleSelection) {\n indices = [last(indices)];\n }\n\n added = that._select(indices);\n }\n\n if (added.length || removed.length) {\n that._valueComparer = null;\n that.trigger(CHANGE, {\n added: added,\n removed: removed\n });\n }\n\n return deferred;\n },\n\n removeAt: function(position) {\n this._selectedIndices.splice(position, 1);\n this._values.splice(position, 1);\n this._valueComparer = null;\n\n return {\n position: position,\n dataItem: this._dataItems.splice(position, 1)[0]\n };\n },\n\n setValue: function(value) {\n value = Array.isArray(value) || value instanceof ObservableArray ? value.slice(0) : [value];\n\n this._values = value;\n\n this._valueComparer = null;\n },\n\n value: function(value) {\n var that = this;\n var deferred = that._valueDeferred;\n var indices;\n\n if (value === undefined$1) {\n return that._values.slice();\n }\n\n that.setValue(value);\n\n if (!deferred || deferred.state() === \"resolved\") {\n that._valueDeferred = deferred = $.Deferred();\n }\n\n if (that.bound()) {\n indices = that._valueIndices(that._values);\n\n if (that.options.selectable === \"multiple\") {\n that.select(-1);\n }\n\n that.select(indices);\n\n deferred.resolve();\n }\n\n that._skipUpdate = false;\n\n return deferred;\n },\n\n items: function() {\n return this.element.children(ITEMSELECTOR);\n },\n\n _click: function(e) {\n if (this._touchTriggered)\n {\n this._touchTriggered = false;\n return;\n }\n\n if (!e.isDefaultPrevented()) {\n this._triggerClick(e.currentTarget);\n }\n },\n\n _createOnScrollProxy: function() {\n var onScrollProxy = function() {\n var that = this;\n clearTimeout(that._scrollId);\n\n that._scrollId = setTimeout(function() {\n that._renderHeader();\n }, 50);\n };\n\n this._onScroll = onScrollProxy.bind(this);\n },\n\n _triggerClick: function(item) {\n if (!this.trigger(CLICK, { item: $(item) })) {\n this.select(item);\n }\n },\n\n _valueExpr: function(type, values) {\n var that = this;\n var idx = 0;\n var comparer;\n var normalized = [];\n\n if (!that._valueComparer || that._valueType !== type) {\n that._valueType = type;\n\n for (; idx < values.length; idx++) {\n normalized.push(unifyType(values[idx], type));\n }\n\n comparer = (current, values) => {\n for (var idx = 0; idx < normalized.length; idx++) {\n if (current === values[idx]) {\n return idx;\n }\n }\n return -1;\n };\n\n that._valueComparer = function(current) {\n return comparer(current, normalized);\n };\n }\n\n return that._valueComparer;\n },\n\n _dataItemPosition: function(dataItem, values) {\n var value = this._valueGetter(dataItem);\n\n var valueExpr = this._valueExpr(typeof value, values);\n\n return valueExpr(value);\n },\n\n _getter: function() {\n this._valueGetter = kendo.getter(this.options.dataValueField);\n },\n\n _deselect: function(indices) {\n var that = this;\n var children = that.element[0].children;\n var selectable = that.options.selectable;\n var selectedIndices = that._selectedIndices;\n var dataItems = that._dataItems;\n var values = that._values;\n var removed = [];\n var i = 0;\n var j;\n\n var index, selectedIndex;\n var removedIndices = 0;\n\n indices = indices.slice();\n\n if (selectable === true || !indices.length) {\n for (; i < selectedIndices.length; i++) {\n $(children[selectedIndices[i]]).removeClass(KSELECTED).attr(ARIA_SELECTED, false);\n\n removed.push({\n position: i,\n dataItem: dataItems[i]\n });\n }\n\n that._values = [];\n that._dataItems = [];\n that._selectedIndices = [];\n } else if (selectable === \"multiple\") {\n for (; i < indices.length; i++) {\n index = indices[i];\n\n if (!$(children[index]).hasClass(KSELECTED)) {\n continue;\n }\n\n for (j = 0; j < selectedIndices.length; j++) {\n selectedIndex = selectedIndices[j];\n\n if (selectedIndex === index) {\n $(children[selectedIndex]).removeClass(KSELECTED).attr(ARIA_SELECTED, false);\n var dataItem = this._view[index].item;\n var position = this._dataItemPosition(dataItem, this._values);\n\n removed.push({\n position: position,\n dataItem: dataItem\n });\n\n dataItems.splice(j, 1);\n selectedIndices.splice(j, 1);\n indices.splice(i, 1);\n values.splice(j, 1);\n\n removedIndices += 1;\n i -= 1;\n j -= 1;\n break;\n }\n }\n }\n }\n\n return {\n indices: indices,\n removed: removed\n };\n },\n\n _deselectFiltered: function(indices) {\n var children = this.element[0].children;\n var dataItem, index, position;\n var removed = [];\n var idx = 0;\n\n for (; idx < indices.length; idx++) {\n index = indices[idx];\n\n dataItem = this._view[index].item;\n position = this._dataItemPosition(dataItem, this._values);\n\n if (position > -1) {\n removed.push(this.removeAt(position));\n $(children[index]).removeClass(KSELECTED);\n }\n }\n\n if (removed.length) {\n this.trigger(CHANGE, {\n added: [],\n removed: removed\n });\n\n return true;\n }\n\n return false;\n },\n\n _select: function(indices) {\n var that = this;\n var children = that.element[0].children;\n var data = that._view;\n var dataItem, index;\n var added = [];\n var idx = 0;\n\n if (last(indices) !== -1) {\n that.focus(indices);\n }\n\n for (; idx < indices.length; idx++) {\n index = indices[idx];\n dataItem = data[index];\n\n if (index === -1 || !dataItem) {\n continue;\n }\n\n dataItem = dataItem.item;\n\n that._selectedIndices.push(index);\n that._dataItems.push(dataItem);\n that._values.push(that._valueGetter(dataItem));\n\n $(children[index]).addClass(KSELECTED).attr(ARIA_SELECTED, true);\n\n added.push({\n dataItem: dataItem\n });\n }\n\n return added;\n },\n\n getElementIndex: function(element) {\n return $(element).data(\"offset-index\");\n },\n\n _get: function(candidate) {\n if (typeof candidate === \"number\") {\n candidate = [candidate];\n } else if (!isArray(candidate)) {\n candidate = this.getElementIndex(candidate);\n candidate = [candidate !== undefined$1 ? candidate : -1];\n }\n\n return candidate;\n },\n\n _templates: function() {\n var template;\n var options = this.options;\n var templates = {\n template: options.template,\n groupTemplate: options.groupTemplate,\n fixedGroupTemplate: options.fixedGroupTemplate\n };\n\n if (options.columns) {\n options.columns.forEach((column, i) => {\n var templateText = column.field ? column.field.toString() : TEXT;\n var templateFunc = data => htmlEncode(kendo.getter(templateText)(data));\n\n templates[\"column\" + i] = column.template || templateFunc;\n });\n }\n\n for (var key in templates) {\n template = templates[key];\n if (template && typeof template !== \"function\") {\n templates[key] = kendo.template(template);\n }\n }\n\n this.templates = templates;\n },\n\n _normalizeIndices: function(indices) {\n var newIndices = [];\n var idx = 0;\n\n for (; idx < indices.length; idx++) {\n if (indices[idx] !== undefined$1) {\n newIndices.push(indices[idx]);\n }\n }\n\n return newIndices;\n },\n\n _valueIndices: function(values, indices) {\n var data = this._view;\n var idx = 0;\n var index;\n\n indices = indices ? indices.slice() : [];\n\n if (!values.length) {\n return [];\n }\n\n for (; idx < data.length; idx++) {\n index = this._dataItemPosition(data[idx].item, values);\n\n if (index !== -1) {\n indices[index] = idx;\n }\n }\n\n return this._normalizeIndices(indices);\n },\n\n _firstVisibleItem: function() {\n var element = this.element[0];\n var content = this.content[0];\n var scrollTop = content.scrollTop;\n var itemHeight = $(element.children[0]).height();\n var itemIndex = Math.floor(scrollTop / itemHeight) || 0;\n var item = element.children[itemIndex] || element.lastChild;\n var forward = item.offsetTop < scrollTop;\n\n while (item) {\n if (forward) {\n if ((item.offsetTop + itemHeight) > scrollTop || !item.nextSibling) {\n break;\n }\n\n item = item.nextSibling;\n } else {\n if (item.offsetTop <= scrollTop || !item.previousSibling) {\n break;\n }\n\n item = item.previousSibling;\n }\n }\n\n return this._view[$(item).data(\"offset-index\")];\n },\n\n _fixedHeader: function() {\n if (this.isGrouped() && this.templates.fixedGroupTemplate) {\n if (this.header.closest(GROUP_ROW_SEL).length) {\n this.header.closest(GROUP_ROW_SEL).show();\n } else {\n this.header.show();\n }\n\n this.content.scroll(this._onScroll);\n } else {\n if (this.header.closest(GROUP_ROW_SEL).length) {\n this.header.closest(GROUP_ROW_SEL).hide();\n } else {\n this.header.hide();\n }\n\n this.content.off(\"scroll\", this._onScroll);\n }\n },\n\n _renderHeader: function() {\n var template = this.templates.fixedGroupTemplate;\n if (!template) {\n return;\n }\n\n var visibleItem = this._firstVisibleItem();\n\n if (visibleItem && visibleItem.group.toString().length) {\n this.header.html(template(visibleItem.group));\n }\n },\n\n _renderItem: function(context) {\n var item = `
  • ';\n if (hasColumns) {\n item += this._renderColumns(dataItem);\n } else {\n item += '';\n item += this.templates.template(dataItem);\n item += '';\n }\n\n if (notFirstItem && context.newGroup) {\n if (hasColumns) {\n item += '' + this.templates.groupTemplate(context.group) + '';\n } else {\n item += '
    ' + this.templates.groupTemplate(context.group) + '
    ';\n }\n } else if (isGrouped && hasColumns) {\n item += '';\n }\n\n return item + \"
  • \";\n },\n\n _renderColumns: function(dataItem) {\n var item = \"\";\n\n for (var i = 0; i < this.options.columns.length; i++) {\n var currentWidth = this.options.columns[i].width;\n var currentWidthInt = parseInt(currentWidth, 10);\n var widthStyle = '';\n\n if (currentWidth && !isNaN(currentWidthInt)) {\n widthStyle += `${kendo.attr('style-width')}=\"${currentWidthInt}${percentageUnitsRegex.test(currentWidth) ? \"%\" : \"px\"}\"`;\n }\n\n item += \"\";\n item += this.templates[\"column\" + i](dataItem);\n item += \"\";\n }\n\n return item;\n },\n\n _render: function() {\n var html = \"\";\n var cspCompliantHtml;\n var i = 0;\n var idx = 0;\n var context;\n var dataContext = [];\n var view = this.dataSource.view();\n var values = this.value();\n\n var group, newGroup, j;\n var isGrouped = this.isGrouped();\n\n if (isGrouped) {\n for (i = 0; i < view.length; i++) {\n group = view[i];\n newGroup = true;\n\n for (j = 0; j < group.items.length; j++) {\n context = {\n selected: this._selected(group.items[j], values),\n item: group.items[j],\n group: group.value,\n newGroup: newGroup,\n isLastGroupedItem: j === group.items.length - 1,\n index: idx };\n dataContext[idx] = context;\n idx += 1;\n\n html += this._renderItem(context);\n newGroup = false;\n }\n }\n } else {\n for (i = 0; i < view.length; i++) {\n context = { selected: this._selected(view[i], values), item: view[i], index: i };\n\n dataContext[i] = context;\n\n html += this._renderItem(context);\n }\n }\n\n this._view = dataContext;\n\n cspCompliantHtml = $(html);\n kendo.applyStylesFromKendoAttributes(cspCompliantHtml, [\"width\", \"background-color\"]);\n\n this.element.empty().append(cspCompliantHtml);\n\n if (isGrouped && dataContext.length) {\n this._renderHeader();\n }\n },\n\n _selected: function(dataItem, values) {\n var select = !this.isFiltered() || this.options.selectable === \"multiple\";\n return select && this._dataItemPosition(dataItem, values) !== -1;\n },\n\n setDSFilter: function(filter) {\n this._lastDSFilter = extend({}, filter);\n },\n\n isFiltered: function() {\n if (!this._lastDSFilter) {\n this.setDSFilter(this.dataSource.filter());\n }\n\n return !kendo.data.Query.compareFilters(this.dataSource.filter(), this._lastDSFilter);\n },\n\n refresh: function(e) {\n var that = this;\n var action = e && e.action;\n var skipUpdateOnBind = that.options.skipUpdateOnBind;\n var isItemChange = action === \"itemchange\";\n var result;\n\n that.trigger(DATA_BINDING);\n that._angularItems(\"cleanup\");\n\n that._fixedHeader();\n\n that._render();\n\n that.bound(true);\n\n if (isItemChange || action === \"remove\") {\n result = mapChangedItems(that._dataItems, e.items);\n\n if (result.changed.length) {\n if (isItemChange) {\n that.trigger(SELECTED_ITEM_CHANGE, {\n items: result.changed\n });\n } else {\n that.value(that._getValues(result.unchanged));\n }\n }\n } else if (that.isFiltered() || that._skipUpdate || that._emptySearch) {\n that.focus(0);\n if (that._skipUpdate) {\n that._skipUpdate = false;\n that._selectedIndices = that._valueIndices(that._values, that._selectedIndices);\n }\n } else if (!skipUpdateOnBind && (!action || action === \"add\")) {\n that.value(that._values);\n }\n\n if (that._valueDeferred) {\n that._valueDeferred.resolve();\n }\n\n that._angularItems(\"compile\");\n that.trigger(DATA_BOUND);\n },\n\n bound: function(bound) {\n if (bound === undefined$1) {\n return this._bound;\n }\n\n this._bound = bound;\n },\n\n isGrouped: function() {\n return (this.dataSource.group() || []).length;\n }\n });\n\n ui.plugin(StaticList);\n\n function last(list) {\n return list[list.length - 1];\n }\n\n function getSelectedOption(select) {\n var index = select.selectedIndex;\n return index > -1 ? select.options[index] : {};\n }\n\n function mapChangedItems(selected, itemsToMatch) {\n var itemsLength = itemsToMatch.length;\n var selectedLength = selected.length;\n var dataItem;\n var found;\n var i, j;\n\n var changed = [];\n var unchanged = [];\n\n if (selectedLength) {\n for (i = 0; i < selectedLength; i++) {\n dataItem = selected[i];\n found = false;\n\n for (j = 0; j < itemsLength; j++) {\n if (dataItem === itemsToMatch[j]) {\n found = true;\n changed.push({ index: i, item: dataItem });\n break;\n }\n }\n\n if (!found) {\n unchanged.push(dataItem);\n }\n }\n }\n\n return {\n changed: changed,\n unchanged: unchanged\n };\n }\n\n function isValidFilterExpr(expression) {\n if (!expression || $.isEmptyObject(expression)) {\n return false;\n }\n\n if (expression.filters && !expression.filters.length) {\n return false;\n }\n\n return true;\n }\n\n function removeFiltersForField(expression, field) {\n var filters;\n var found = false;\n\n if (expression.filters) {\n filters = $.grep(expression.filters, function(filter) {\n found = removeFiltersForField(filter, field);\n if (filter.filters) {\n return filter.filters.length;\n } else {\n return filter.field != field;\n }\n });\n\n if (!found && expression.filters.length !== filters.length) {\n found = true;\n }\n\n expression.filters = filters;\n }\n\n return found;\n }\n\n kendo.cssProperties.registerPrefix(\"List\", \"k-list-\");\n\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.core.js';\nimport './kendo.selectable.js';\nimport './kendo.icons.js';\n\nvar __meta__ = {\n id: \"calendar\",\n name: \"Calendar\",\n category: \"web\",\n description: \"The Calendar widget renders a graphical calendar that supports navigation and selection.\",\n depends: [ \"core\", \"selectable\" ]\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n support = kendo.support,\n ui = kendo.ui,\n Widget = ui.Widget,\n keys = kendo.keys,\n parse = kendo.parseDate,\n encode = kendo.htmlEncode,\n adjustDST = kendo.date.adjustDST,\n weekInYear = kendo.date.weekInYear,\n Selectable = kendo.ui.Selectable,\n extractFormat = kendo._extractFormat,\n template = kendo.template,\n getCulture = kendo.getCulture,\n transitions = kendo.support.transitions,\n transitionOrigin = transitions ? transitions.css + \"transform-origin\" : \"\",\n cellTemplate = template((data) => `${data.value}`),\n emptyCellTemplate = template(() => ''),\n otherMonthCellTemplate = template(() => ' '),\n weekNumberTemplate = template((data) => `${data.weekNumber}`),\n outerWidth = kendo._outerWidth,\n ns = \".kendoCalendar\",\n CLICK = \"click\" + ns,\n KEYDOWN_NS = \"keydown\" + ns,\n ID = \"id\",\n MIN = \"min\",\n LEFT = \"left\",\n SLIDE = \"slideIn\",\n MONTH = \"month\",\n CENTURY = \"century\",\n CHANGE = \"change\",\n NAVIGATE = \"navigate\",\n VALUE = \"value\",\n HOVER = \"k-hover\",\n DISABLED = \"k-disabled\",\n FOCUSED = \"k-focus\",\n OTHERMONTH = \"k-other-month\",\n OUTOFRANGE = \"k-out-of-range\",\n TODAY = \"k-calendar-nav-today\",\n CELLSELECTOR = \"td:has(.k-link)\",\n CELLSELECTORVALID = \"td:has(.k-link):not(.\" + DISABLED + \"):not(.\" + OUTOFRANGE + \")\",\n WEEKCOLUMNSELECTOR = \"td:not(:has(.k-link))\",\n SELECTED = \"k-selected\",\n BLUR = \"blur\" + ns,\n FOCUS = \"focus\",\n FOCUS_WITH_NS = FOCUS + ns,\n MOUSEENTER = support.touch ? \"touchstart\" : \"mouseenter\",\n MOUSEENTER_WITH_NS = support.touch ? \"touchstart\" + ns : \"mouseenter\" + ns,\n MOUSELEAVE = support.touch ? \"touchend\" + ns + \" touchmove\" + ns : \"mouseleave\" + ns,\n MS_PER_MINUTE = 60000,\n MS_PER_DAY = 86400000,\n PREVARROW = \"_prevArrow\",\n NEXTARROW = \"_nextArrow\",\n ARIA_DISABLED = \"aria-disabled\",\n ARIA_SELECTED = \"aria-selected\",\n ARIA_LABEL = \"aria-label\",\n extend = $.extend,\n DATE = Date,\n views = {\n month: 0,\n year: 1,\n decade: 2,\n century: 3\n },\n HEADERSELECTOR = '.k-header, .k-calendar-header',\n CLASSIC_HEADER_TEMPLATE = ({ actionAttr, size, isRtl }) => ``,\n MODERN_HEADER_TEMPLATE = ({ actionAttr, size, messages, isRtl }) => `
    \n \n \n \n \n \n \n \n
    `;\n\n var Calendar = Widget.extend({\n init: function(element, options) {\n var that = this, value, id;\n options = options || {};\n options.componentType = options.componentType || \"classic\";\n Widget.fn.init.call(that, element, options);\n\n element = that.wrapper = that.element;\n options = that.options;\n\n options.url = kendo.unescape(options.url);\n\n that.options.disableDates = getDisabledExpr(that.options.disableDates);\n\n that._templates();\n\n that._selectable();\n\n that._header();\n\n that._viewWrapper();\n\n if (that.options.hasFooter) {\n that._footer(that.footer);\n } else {\n that._today = that.element.find('.k-calendar-nav-today');\n that._toggle();\n }\n\n id = element\n .addClass(\"k-widget k-calendar \" + (options.weekNumber ? \" k-week-number\" : \"\"))\n .on(MOUSEENTER_WITH_NS + \" \" + MOUSELEAVE, CELLSELECTOR, mousetoggle)\n .on(KEYDOWN_NS, \"table.k-content\", that._move.bind(that))\n .on(CLICK + \" touchend\", CELLSELECTOR, function(e) {\n var link = e.currentTarget.firstChild,\n value = toDateObject(link);\n\n if (link.href.indexOf(\"#\") != -1) {\n e.preventDefault();\n }\n\n if (that._view.name == \"month\" && that.options.disableDates(value)) {\n return;\n }\n if (that._view.name != \"month\" || options.selectable == \"single\") {\n that._click($(link));\n }\n })\n .on(\"mouseup\" + ns, \"table.k-content, .k-footer\", function() {\n that._focusView(that.options.focusOnNav !== false);\n })\n .attr(ID);\n\n if (that._isMultipleSelection() && that.options.weekNumber) {\n element.on(CLICK, WEEKCOLUMNSELECTOR, function(e) {\n var first = $(e.currentTarget).closest(\"tr\").find(CELLSELECTORVALID).first(),\n last = that.selectable._lastActive = $(e.currentTarget).closest(\"tr\").find(CELLSELECTORVALID).last();\n that.selectable.selectRange(first, last);\n that.selectable.trigger(CHANGE, { event: e });\n that._current = that._value = toDateObject(last.find(\"a\"));\n that._setCurrent(that._current);\n });\n }\n\n normalize(options);\n value = parse(options.value, options.format, options.culture);\n that._selectDates = [];\n\n that._index = views[options.start];\n\n that._current = new DATE(+restrictValue(value, options.min, options.max));\n\n that._addClassProxy = function() {\n that._active = true;\n\n if (that._cell.hasClass(DISABLED)) {\n var todayString = that._view.toDateString(getToday());\n that._cell = that._cellByDate(todayString);\n }\n\n that._cell.addClass(FOCUSED);\n };\n\n that._removeClassProxy = function() {\n that._active = false;\n if (that._cell) {\n that._cell.removeClass(FOCUSED);\n }\n };\n\n that.value(value);\n\n if (that._isMultipleSelection() && options.selectDates.length > 0) {\n that.selectDates(options.selectDates);\n }\n kendo.notify(that);\n },\n\n options: {\n name: \"Calendar\",\n value: null,\n min: new DATE(1900, 0, 1),\n max: new DATE(2099, 11, 31),\n dates: [],\n disableDates: null,\n url: \"\",\n culture: \"\",\n footer: \"\",\n format: \"\",\n month: {},\n weekNumber: false,\n selectable: \"single\",\n selectDates: [],\n start: MONTH,\n depth: MONTH,\n size: \"medium\",\n animation: {\n horizontal: {\n effects: SLIDE,\n reverse: true,\n duration: 500,\n divisor: 2\n },\n vertical: {\n effects: \"zoomIn\",\n duration: 400\n }\n },\n messages: {\n weekColumnHeader: \"\",\n today: \"Today\",\n navigateTo: \"Navigate to \",\n parentViews: {\n month: \"year view\",\n year: \"decade view\",\n decade: \"century view\"\n }\n },\n componentType: \"classic\"\n },\n\n events: [\n CHANGE,\n NAVIGATE\n ],\n\n componentTypes: {\n \"classic\": {\n header: {\n template: CLASSIC_HEADER_TEMPLATE\n },\n hasFooter: true,\n linksSelector: \".k-button\",\n contentClasses: \"k-calendar-table k-content\"\n },\n \"modern\": {\n header: {\n template: MODERN_HEADER_TEMPLATE\n },\n hasFooter: false,\n linksSelector: \".k-button\",\n contentClasses: \"k-calendar-table k-content k-calendar-content\"\n }\n },\n\n setOptions: function(options) {\n var that = this;\n\n normalize(options);\n\n options.disableDates = getDisabledExpr(options.disableDates);\n that._destroySelectable();\n\n if (options.messages) {\n options.messages = $.extend({}, true, that.options.messages, options.messages);\n }\n\n Widget.fn.setOptions.call(that, options);\n\n that._templates();\n\n that._selectable();\n\n that._viewWrapper();\n\n if (that.options.hasFooter) {\n that._footer(that.footer);\n } else {\n that.element.find(\".k-footer\").hide();\n that._toggle();\n }\n that._index = views[that.options.start];\n\n that.navigate();\n\n if (options.weekNumber) {\n that.element.addClass('k-week-number');\n }\n },\n\n destroy: function() {\n var that = this,\n today = that._today;\n\n that.element.off(ns);\n that._title.off(ns);\n that[PREVARROW].off(ns);\n that[NEXTARROW].off(ns);\n that._destroySelectable();\n kendo.destroy(that._table);\n\n if (today) {\n kendo.destroy(today.off(ns));\n }\n\n Widget.fn.destroy.call(that);\n },\n\n current: function() {\n return this._current;\n },\n\n view: function() {\n return this._view;\n },\n\n focus: function(table) {\n table = table || this._table;\n this._bindTable(table);\n table.trigger(\"focus\");\n },\n\n min: function(value) {\n return this._option(MIN, value);\n },\n\n max: function(value) {\n return this._option(\"max\", value);\n },\n\n navigateToPast: function() {\n this._navigate(PREVARROW, -1);\n },\n\n navigateToFuture: function() {\n this._navigate(NEXTARROW, 1);\n },\n\n navigateUp: function() {\n var that = this,\n index = that._index;\n\n if (that._title.hasClass(DISABLED)) {\n return;\n }\n\n that.navigate(that._current, ++index);\n },\n\n navigateDown: function(value) {\n var that = this,\n index = that._index,\n depth = that.options.depth;\n\n if (!value) {\n return;\n }\n\n if (index === views[depth]) {\n if (!isEqualDate(that._value, that._current) || !isEqualDate(that._value, value)) {\n that.value(value);\n that.trigger(CHANGE);\n }\n return;\n }\n\n that.navigate(value, --index);\n },\n\n navigate: function(value, view) {\n view = isNaN(view) ? views[view] : view;\n\n var that = this,\n options = that.options,\n culture = options.culture,\n min = options.min,\n max = options.max,\n title = that._title,\n from = that._table,\n old = that._oldTable,\n currentValue = that._current,\n future = value && +value > +currentValue,\n vertical = view !== undefined$1 && view !== that._index,\n to, currentView, compare,\n disabled,\n viewWrapper = that.element.children(\".k-calendar-view\");\n\n if (!value) {\n value = currentValue;\n }\n\n that._current = value = new DATE(+restrictValue(value, min, max));\n\n if (view === undefined$1) {\n view = that._index;\n } else {\n that._index = view;\n }\n\n that._view = currentView = calendar.views[view];\n compare = currentView.compare;\n\n disabled = view === views[CENTURY];\n title.toggleClass(DISABLED, disabled).attr(ARIA_DISABLED, disabled);\n\n disabled = compare(value, min) < 1;\n that[PREVARROW].toggleClass(DISABLED, disabled).attr(ARIA_DISABLED, disabled);\n\n disabled = compare(value, max) > -1;\n that[NEXTARROW].toggleClass(DISABLED, disabled).attr(ARIA_DISABLED, disabled);\n\n if (from && old && old.data(\"animating\")) {\n old.kendoStop(true, true);\n from.kendoStop(true, true);\n }\n\n that._oldTable = from;\n\n if (!from || that._changeView) {\n title.html('' + currentView.title(value, min, max, culture) + '');\n\n if (that.options.messages.parentViews && that._view.name !== CENTURY) {\n title.attr(\"title\", encode(that.options.messages.navigateTo + that.options.messages.parentViews[that._view.name]));\n } else {\n title.removeAttr(\"title\");\n }\n\n that._table = to = $(currentView.content(extend({\n min: min,\n max: max,\n date: value,\n url: options.url,\n dates: options.dates,\n format: options.format,\n otherMonth: true,\n culture: culture,\n disableDates: options.disableDates,\n isWeekColumnVisible: options.weekNumber,\n messages: options.messages,\n contentClasses: that.options.contentClasses\n }, that[currentView.name])));\n\n that._aria();\n\n addClassToViewContainer(to, currentView.name);\n var replace = from && from.data(\"start\") === to.data(\"start\");\n that._animate({\n from: from,\n to: to,\n vertical: vertical,\n future: future,\n replace: replace\n });\n\n viewWrapper.removeClass(\"k-calendar-monthview k-calendar-yearview k-calendar-decadeview k-calendar-centuryview\");\n viewWrapper.addClass(\"k-calendar-\" + currentView.name + \"view\");\n\n that.trigger(NAVIGATE);\n\n that._focus(value);\n }\n\n if (view === views[options.depth] && that._selectDates.length > 0) {\n that._visualizeSelectedDatesInView();\n }\n\n if (that.options.selectable === \"single\") {\n if (view === views[options.depth] && that._value && !that.options.disableDates(that._value)) {\n that._selectCell(that._value);\n }\n }\n\n that._setCurrent(value);\n\n if (!from && that._cell) {\n that._cell.removeClass(FOCUSED);\n }\n\n that._changeView = true;\n },\n\n selectDates: function(dates) {\n var that = this,\n validSelectedDates,\n datesUnique;\n\n if (dates === undefined$1) {\n return that._selectDates;\n }\n\n datesUnique = dates\n .map(function(date) { return date.getTime(); })\n .filter(function(date, position, array) {\n return array.indexOf(date) === position;\n })\n .map(function(time) { return new Date(time); });\n\n validSelectedDates = $.grep(datesUnique, function(value) {\n if (value) {\n return +that._validateValue(new Date(value.setHours(0, 0, 0, 0))) === +value;\n }\n });\n that._selectDates = validSelectedDates.length > 0 ? validSelectedDates : (datesUnique.length === 0 ? datesUnique : that._selectDates);\n that._visualizeSelectedDatesInView();\n },\n\n value: function(value) {\n var that = this,\n old = that._view,\n view = that._view;\n\n if (value === undefined$1) {\n return that._value;\n }\n\n value = that._validateValue(value);\n if (value && that._isMultipleSelection()) {\n var date = new Date(+value);\n date.setHours(0, 0, 0, 0);\n that._selectDates = [date];\n that.selectable._lastActive = null;\n }\n if (old && value === null && that._cell) {\n that._cell.removeClass(SELECTED);\n } else {\n that._changeView = !value || view && view.compare(value, that._current) !== 0;\n that.navigate(value);\n }\n },\n\n isRtl: function() {\n return kendo.support.isRtl(this.wrapper);\n },\n\n _aria: function() {\n var table = this._table;\n\n table.attr(\"aria-labelledby\", this._title.attr(\"id\"));\n\n if (this._view.name === \"month\" && this.options.selectable === \"multiple\") {\n table.attr(\"aria-multiselectable\", \"true\");\n }\n },\n\n _validateValue: function(value) {\n var that = this,\n options = that.options,\n min = options.min,\n max = options.max;\n\n if (value === null) {\n that._current = createDate(that._current.getFullYear(), that._current.getMonth(), that._current.getDate());\n }\n\n value = parse(value, options.format, options.culture);\n\n if (value !== null) {\n value = new DATE(+value);\n\n if (!isInRange(value, min, max)) {\n value = null;\n }\n }\n\n if (value === null || !that.options.disableDates(new Date(+value))) {\n that._value = value;\n } else if (that._value === undefined$1) {\n that._value = null;\n }\n\n return that._value;\n },\n\n _visualizeSelectedDatesInView: function() {\n var that = this;\n var selectedDates = {};\n $.each(that._selectDates, function(index, value) {\n selectedDates[kendo.calendar.views[0].toDateString(value)] = value;\n });\n that.selectable.clear();\n var cells = that._table\n .find(CELLSELECTOR)\n .filter(function(index, element) {\n return selectedDates[$(element.firstChild).attr(kendo.attr(VALUE))];\n });\n if (cells.length > 0) {\n that.selectable._selectElement(cells, true);\n }\n },\n\n _isMultipleSelection: function() {\n var that = this;\n return that.options.selectable === \"multiple\";\n },\n\n _selectable: function() {\n var that = this;\n if (!that._isMultipleSelection()) {\n return;\n }\n\n var selectable = that.options.selectable,\n selectableOptions = Selectable.parseOptions(selectable);\n\n that.selectable = new Selectable(that.wrapper, {\n aria: true,\n //excludes the anchor element\n inputSelectors: \"input,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-caret-alt-down,span.k-icon.k-i-caret-alt-up,span.k-svg-icon.k-svg-i-caret-alt-down,span.k-svg-icon.k-svg-i-caret-alt-up\",\n multiple: selectableOptions.multiple,\n filter: \"table.k-month:eq(0) \" + CELLSELECTORVALID,\n change: that._onSelect.bind(that),\n relatedTarget: that._onRelatedTarget.bind(that)\n });\n },\n\n _onRelatedTarget: function(target) {\n var that = this;\n\n if (that.selectable.options.multiple && target.is(CELLSELECTORVALID)) {\n that._current = toDateObject(target.find(\"a\"));\n that._setCurrent(that._current);\n }\n\n },\n\n _onSelect: function(e) {\n var that = this,\n eventArgs = e,\n selectableOptions = Selectable.parseOptions(that.options.selectable);\n\n if (!selectableOptions.multiple) {\n if ($(eventArgs.event.currentTarget).is(\"td\") && !$(eventArgs.event.currentTarget).hasClass(\"k-selected\")) {\n $(eventArgs.event.currentTarget).addClass(\"k-selected\");\n }\n else {\n that._click($(eventArgs.event.currentTarget).find(\"a\"));\n }\n return;\n }\n\n if (eventArgs.event.ctrlKey || eventArgs.event.metaKey) {\n if ($(eventArgs.event.currentTarget).is(CELLSELECTORVALID)) {\n that._toggleSelection($(eventArgs.event.currentTarget));\n }\n else {\n that._cellsBySelector(CELLSELECTORVALID).each(function(index, element) {\n var value = toDateObject($(element).find(\"a\"));\n that._deselect(value);\n });\n that._addSelectedCellsToArray();\n }\n }\n else if (eventArgs.event.shiftKey) {\n that._rangeSelection(that._cell);\n }\n else if ($(eventArgs.event.currentTarget).is(CELLSELECTOR)) {\n that.value(toDateObject($(eventArgs.event.currentTarget).find(\"a\")));\n }\n else {\n that._selectDates = [];\n that._addSelectedCellsToArray();\n }\n that.trigger(CHANGE);\n },\n\n _destroySelectable: function() {\n var that = this;\n\n if (that.selectable) {\n that.selectable.destroy();\n that.selectable = null;\n }\n },\n\n //when ctrl key is clicked\n _toggleSelection: function(currentCell) {\n var that = this,\n date = toDateObject(currentCell.find(\"a\"));\n if (currentCell.hasClass(\"k-selected\")) {\n that._selectDates.push(date);\n }\n else {\n that._deselect(date);\n }\n },\n\n //shift selection\n _rangeSelection: function(toDateCell, startDate) {\n var that = this,\n fromDate = startDate || toDateObject(that.selectable.value().first().find(\"a\")),\n toDate = toDateObject(toDateCell.find(\"a\")),\n daysDifference;\n\n if (that.selectable._lastActive || that._value) {\n fromDate = that.selectable._lastActive ? toDateObject(that.selectable._lastActive.find(\"a\")) : new Date(+that._value);\n } else {\n that.selectable._lastActive = startDate ? that._cellByDate(that._view.toDateString(startDate), CELLSELECTORVALID) : that.selectable.value().first();\n }\n\n that._selectDates = [];\n daysDifference = daysBetweenTwoDates(fromDate, toDate);\n addDaysToArray(that._selectDates, daysDifference, fromDate, that.options.disableDates);\n\n that._visualizeSelectedDatesInView();\n },\n\n _cellsBySelector: function(selector) {\n var that = this;\n return that._table.find(selector);\n },\n\n _addSelectedCellsToArray: function() {\n var that = this;\n that.selectable.value().each(function(index, item) {\n var date = toDateObject($(item.firstChild));\n if (!that.options.disableDates(date)) {\n that._selectDates.push(date);\n }\n });\n },\n\n _deselect: function(date) {\n var that = this;\n var currentDateIndex = that._selectDates.map(Number).indexOf(+date);\n if (currentDateIndex != -1) {\n that._selectDates.splice(currentDateIndex, 1);\n }\n },\n\n _dateInView: function(date) {\n var that = this,\n firstDateInView = toDateObject(that._cellsBySelector(CELLSELECTORVALID).first().find(\"a\")),\n lastDateInView = toDateObject(that._cellsBySelector(CELLSELECTORVALID).last().find(\"a\"));\n\n return +date <= +lastDateInView && +date >= +firstDateInView;\n },\n\n _isNavigatable: function(currentValue, cellIndex) {\n var that = this;\n var isDisabled = that.options.disableDates;\n var cell;\n var index;\n\n if (that._view.name == \"month\") {\n return !isDisabled(currentValue);\n } else {\n index = that.wrapper.find(\".\" + FOCUSED).index();\n cell = that.wrapper.find(\".k-content td\").eq(index + cellIndex);\n return cell.is(CELLSELECTORVALID) || !isDisabled(currentValue);\n }\n },\n\n _move: function(e) {\n var that = this,\n options = that.options,\n key = e.keyCode,\n view = that._view,\n index = that._index,\n min = that.options.min,\n max = that.options.max,\n currentValue = new DATE(+that._current),\n isRtl = that.isRtl(),\n isDisabled = that.options.disableDates,\n value, prevent, method, temp;\n\n if (e.target === that._table[0]) {\n that._active = true;\n }\n\n if (key == keys.RIGHT && !isRtl || key == keys.LEFT && isRtl) {\n value = 1;\n prevent = true;\n } else if (key == keys.LEFT && !isRtl || key == keys.RIGHT && isRtl) {\n value = -1;\n prevent = true;\n } else if (key == keys.UP) {\n value = index === 0 ? -7 : -4;\n prevent = true;\n } else if (key == keys.DOWN) {\n value = index === 0 ? 7 : 4;\n prevent = true;\n } else if (key == keys.SPACEBAR) {\n value = 0;\n prevent = true;\n } else if (key == keys.HOME || key == keys.END) {\n method = key == keys.HOME ? \"first\" : \"last\";\n temp = view[method](currentValue);\n currentValue = new DATE(temp.getFullYear(), temp.getMonth(), temp.getDate(), currentValue.getHours(), currentValue.getMinutes(), currentValue.getSeconds(), currentValue.getMilliseconds());\n currentValue.setFullYear(temp.getFullYear());\n prevent = true;\n } else if (key === 84) {\n that._todayClick(e);\n prevent = true;\n }\n\n if (e.ctrlKey || e.metaKey) {\n if (key == keys.RIGHT && !isRtl || key == keys.LEFT && isRtl) {\n that.navigateToFuture();\n prevent = true;\n } else if (key == keys.LEFT && !isRtl || key == keys.RIGHT && isRtl) {\n that.navigateToPast();\n prevent = true;\n } else if (key == keys.UP) {\n that.navigateUp();\n prevent = true;\n } else if (key == keys.DOWN) {\n that._click($(that._cell[0].firstChild));\n prevent = true;\n }\n else if ((key == keys.ENTER || key == keys.SPACEBAR) && that._isMultipleSelection()) {\n that._keyboardToggleSelection(e);\n\n var focusedDate = toDateObject($(that._cell[0]).find(\"a\"));\n that._setCurrent(focusedDate);\n\n }\n } else if (e.shiftKey) {\n if (value !== undefined$1 || method) {\n if (!method) {\n view.setDate(currentValue, value);\n }\n\n if (!isInRange(currentValue, min, max)) {\n currentValue = restrictValue(currentValue, options.min, options.max);\n }\n\n if (isDisabled(currentValue)) {\n currentValue = that._nextNavigatable(currentValue, value);\n }\n\n min = createDate(min.getFullYear(), min.getMonth(), min.getDate());\n if (that._isMultipleSelection()) {\n that._keyboardRangeSelection(e, currentValue);\n }\n else {\n that._focus(currentValue);\n }\n }\n } else {\n if (key == keys.ENTER || key == keys.SPACEBAR) {\n if (view.name == \"month\" && that._isMultipleSelection()) {\n that.value(toDateObject($(that._cell.find(\"a\"))));\n that.selectable._lastActive = $(that._cell[0]);\n that.trigger(CHANGE);\n }\n else {\n that._click($(that._cell[0].firstChild));\n }\n prevent = true;\n } else if (key == keys.PAGEUP) {\n prevent = true;\n that.navigateToPast();\n } else if (key == keys.PAGEDOWN) {\n prevent = true;\n that.navigateToFuture();\n }\n\n if (value || method) {\n if (!method) {\n view.setDate(currentValue, value);\n }\n\n min = createDate(min.getFullYear(), min.getMonth(), min.getDate());\n\n if (!isInRange(currentValue, min, max)) {\n currentValue = restrictValue(currentValue, options.min, options.max);\n }\n\n if (!that._isNavigatable(currentValue, value)) {\n currentValue = that._nextNavigatable(currentValue, value);\n }\n\n if (that._isMultipleSelection()) {\n if (!that._dateInView(currentValue)) {\n that.navigate(currentValue);\n }\n else {\n that._current = currentValue;\n that._setCurrent(currentValue);\n }\n }\n else {\n that._focus(currentValue);\n }\n }\n }\n\n if (prevent) {\n e.preventDefault();\n }\n\n return that._current;\n },\n\n _keyboardRangeSelection: function(event, currentValue) {\n var that = this,\n fromDate,\n daysDifference;\n\n if (!that._dateInView(currentValue)) {\n that._selectDates = [];\n\n fromDate = that.selectable._lastActive ? toDateObject(that.selectable._lastActive.find(\"a\")) : currentValue;\n daysDifference = daysBetweenTwoDates(fromDate, new Date(+currentValue));\n\n addDaysToArray(that._selectDates, daysDifference, fromDate, that.options.disableDates);\n\n that.navigate(currentValue);\n that._current = currentValue;\n that.selectable._lastActive = that.selectable._lastActive || that._cellByDate(that._view.toDateString(currentValue), CELLSELECTORVALID);\n that.trigger(CHANGE);\n return;\n }\n that.selectable.options.filter = that.wrapper.find(\"table\").length > 1 && +currentValue > +that._current ? \"table.k-month:eq(1) \" + CELLSELECTORVALID : \"table.k-month:eq(0) \" + CELLSELECTORVALID;\n that._setCurrent(currentValue);\n that._current = currentValue;\n\n that._rangeSelection(that._cellByDate(that._view.toDateString(currentValue), CELLSELECTORVALID), currentValue);\n\n that.trigger(CHANGE);\n\n that.selectable.options.filter = \"table.k-month:eq(0) \" + CELLSELECTORVALID;\n },\n\n _keyboardToggleSelection: function(event) {\n var that = this;\n\n event.currentTarget = that._cell[0];\n that.selectable._lastActive = $(that._cell[0]);\n\n if ($(that._cell[0]).hasClass(SELECTED)) {\n that.selectable._unselect($(that._cell[0]));\n }\n else {\n that.selectable.value($(that._cell[0]));\n }\n that.selectable.trigger(CHANGE, { event: event });\n },\n\n _nextNavigatable: function(currentValue, value) {\n var that = this,\n disabled = true,\n view = that._view,\n min = that.options.min,\n max = that.options.max,\n isDisabled = that.options.disableDates,\n navigatableDate = new Date(currentValue.getTime());\n\n view.setDate(navigatableDate, -value);\n\n while (disabled) {\n view.setDate(currentValue, value);\n\n if (!isInRange(currentValue, min, max)) {\n currentValue = navigatableDate;\n break;\n }\n disabled = isDisabled(currentValue);\n }\n return currentValue;\n },\n\n _animate: function(options) {\n var that = this;\n var from = options.from;\n var to = options.to;\n var active = that._active;\n var viewWrapper = that.element.children(\".k-calendar-view\");\n\n if (!from) {\n viewWrapper.append(to);\n that._bindTable(to);\n } else if (from.parent().data(\"animating\")) {\n from.off(ns);\n from.parent().kendoStop(true, true).remove();\n from.remove();\n\n viewWrapper.append(to);\n that._focusView(active);\n } else if (!from.is(\":visible\") || that.options.animation === false || options.replace) {\n to.insertAfter(from);\n from.off(ns).remove();\n\n that._focusView(active);\n } else {\n that[options.vertical ? \"_vertical\" : \"_horizontal\"](from, to, options.future);\n }\n },\n\n _horizontal: function(from, to, future) {\n var that = this,\n active = that._active,\n horizontal = that.options.animation.horizontal,\n effects = horizontal.effects,\n viewWidth = outerWidth(from),\n margin = (outerWidth(from, true) - viewWidth);\n\n if (effects && effects.indexOf(SLIDE) != -1) {\n from.add(to).css({ width: viewWidth });\n\n from.wrap(\"
    \");\n\n that._focusView(active, from);\n\n from.parent()\n .css({\n position: \"relative\",\n width: (viewWidth * 2) + (2 * margin),\n display: \"flex\",\n \"margin-left\": future ? 0 : (-viewWidth - margin)\n });\n\n to[future ? \"insertAfter\" : \"insertBefore\"](from);\n\n extend(horizontal, {\n effects: SLIDE + \":\" + (future ? \"right\" : LEFT),\n complete: function() {\n from.off(ns).remove();\n that._oldTable = null;\n\n to.unwrap();\n\n that._focusView(active);\n\n }\n });\n\n from.parent().kendoStop(true, true).kendoAnimate(horizontal);\n }\n },\n\n _vertical: function(from, to) {\n var that = this,\n vertical = that.options.animation.vertical,\n effects = vertical.effects,\n active = that._active, //active state before from's blur\n cell, position;\n\n if (effects && effects.indexOf(\"zoom\") != -1) {\n to.insertBefore(from);\n\n from.css({\n position: \"absolute\",\n width: to.width()\n });\n\n if (transitionOrigin) {\n cell = that._cellByDate(that._view.toDateString(that._current));\n position = cell.position();\n position = (position.left + parseInt(cell.width() / 2, 10)) + \"px\" + \" \" + (position.top + parseInt(cell.height() / 2, 10) + \"px\");\n to.css(transitionOrigin, position);\n }\n\n from.kendoStop(true, true).kendoAnimate({\n effects: \"fadeOut\",\n duration: 600,\n complete: function() {\n from.off(ns).remove();\n that._oldTable = null;\n\n that._focusView(active);\n }\n });\n\n to.kendoStop(true, true).kendoAnimate(vertical);\n }\n },\n\n _cellByDate: function(value, selector) {\n return this._table.find(selector ? selector : \"td:not(.\" + OTHERMONTH + \")\")\n .filter(function() {\n return $(this.firstChild).attr(kendo.attr(VALUE)) === value;\n });\n },\n\n _selectCell: function(date) {\n var that = this,\n cell = that._selectedCell,\n value = that._view.toDateString(date);\n\n if (cell && cell[0]) {\n cell[0].removeAttribute(ARIA_SELECTED);\n cell.removeClass(SELECTED);\n }\n\n cell = that._cellByDate(value, that.options.selectable == \"multiple\" ? CELLSELECTOR : \"td:not(.\" + OTHERMONTH + \")\");\n\n that._selectedCell = cell;\n cell.addClass(SELECTED)\n .attr(ARIA_SELECTED, true);\n },\n\n _setCurrent: function(date) {\n var that = this,\n id = kendo.guid(),\n cell = that._cell,\n value = that._view.toDateString(date);\n\n if (cell && cell[0]) {\n cell.removeClass(FOCUSED);\n cell[0].removeAttribute(ARIA_LABEL);\n cell[0].removeAttribute(ID);\n }\n\n cell = that._cellByDate(value, that.options.selectable == \"multiple\" ? CELLSELECTOR : \"td:not(.\" + OTHERMONTH + \")\");\n\n that._cell = cell;\n\n cell.attr(ID, id)\n .addClass(FOCUSED);\n\n if (that._table[0]) {\n that._table[0].removeAttribute(\"aria-activedescendant\");\n that._table.attr(\"aria-activedescendant\", id);\n }\n },\n\n _bindTable: function(table) {\n table\n .on(FOCUS_WITH_NS, this._addClassProxy)\n .on(BLUR, this._removeClassProxy);\n },\n\n _click: function(link) {\n var that = this,\n options = that.options,\n currentValue = new Date(+that._current),\n value = toDateObject(link);\n\n adjustDST(value, 0);\n\n if (that._view.name == \"month\" && that.options.disableDates(value)) {\n value = that._value;\n }\n\n that._view.setDate(currentValue, value);\n\n that.navigateDown(restrictValue(currentValue, options.min, options.max));\n },\n\n _focus: function(value) {\n var that = this,\n view = that._view;\n\n if (view.compare(value, that._current) !== 0) {\n that.navigate(value);\n } else {\n that._current = value;\n that._setCurrent(value);\n }\n },\n\n _focusView: function(active, table) {\n if (active) {\n this.focus(table);\n }\n },\n\n _viewWrapper: function() {\n var that = this;\n var element = that.element;\n var viewWrapper = element.children(\".k-calendar-view\");\n\n if (!viewWrapper[0]) {\n viewWrapper = $(\"
    \").insertAfter(element.find(HEADERSELECTOR));\n }\n },\n\n _footer: function(template) {\n var that = this,\n today = getToday(),\n element = that.element,\n footer = element.find(\".k-footer\");\n\n if (!template) {\n that._toggle(false);\n footer.hide();\n return;\n }\n\n if (!footer[0]) {\n footer = $(`
    \n \n
    `).appendTo(element);\n }\n\n that._today = footer.show()\n .find(\".k-button-flat-primary\")\n .attr(\"title\", kendo.toString(today, \"D\", that.options.culture));\n\n footer.find(\".k-button-text\")\n .html(template(today));\n\n that._toggle();\n },\n\n _header: function() {\n var that = this,\n element = that.element,\n linksSelector = that.options.linksSelector;\n\n if (!element.find(HEADERSELECTOR)[0]) {\n element.html(kendo.template(that.options.header.template)($.extend(true,{}, that.options, {\n actionAttr: kendo.attr(\"action\"),\n size: kendo.getValidCssClass(\"k-button-\", \"size\", that.options.size),\n isRtl: that.isRtl()\n })));\n }\n\n element.find(linksSelector)\n .on(CLICK + \" touchend\" + ns, function() { return false; } );\n\n that._title = element.find('[' + kendo.attr(\"action\") + '=\"nav-up\"]').on(CLICK + \" touchend\" + ns, function() {\n that._active = that.options.focusOnNav !== false;\n that.navigateUp();\n });\n that[PREVARROW] = element.find('[' + kendo.attr(\"action\") + '=\"prev\"]').on(CLICK + \" touchend\" + ns, function() {\n that._active = that.options.focusOnNav !== false;\n that.navigateToPast();\n });\n that[NEXTARROW] = element.find('[' + kendo.attr(\"action\") + '=\"next\"]').on(CLICK + \" touchend\" + ns, function() {\n that._active = that.options.focusOnNav !== false;\n that.navigateToFuture();\n });\n element.find('[' + kendo.attr(\"action\") + '=\"today\"]').on(CLICK + \" touchend\" + ns, that._todayClick.bind(that));\n\n },\n\n _navigate: function(arrow, modifier) {\n var that = this,\n index = that._index + 1,\n currentValue = new DATE(+that._current);\n\n if (that._isMultipleSelection()) {\n var firstDayCurrentMonth = that._table.find(\"td:not(.k-other-month):not(.k-out-of-range)\").has(\".k-link\").first();\n currentValue = toDateObject(firstDayCurrentMonth.find(\"a\"));\n that._current = new Date(+currentValue);\n }\n\n arrow = that[arrow];\n\n if (!arrow.hasClass(DISABLED)) {\n if (index > 3) {\n currentValue.setFullYear(currentValue.getFullYear() + 100 * modifier);\n } else {\n calendar.views[index].setDate(currentValue, modifier);\n }\n\n that.navigate(currentValue);\n }\n },\n\n _option: function(option, value) {\n var that = this,\n options = that.options,\n currentValue = that._value || that._current,\n isBigger;\n\n if (value === undefined$1) {\n return options[option];\n }\n\n value = parse(value, options.format, options.culture);\n\n if (!value) {\n return;\n }\n\n options[option] = new DATE(+value);\n\n if (option === MIN) {\n isBigger = value > currentValue;\n } else {\n isBigger = currentValue > value;\n }\n\n if (isBigger || isEqualMonth(currentValue, value)) {\n if (isBigger) {\n that._value = null;\n }\n that._changeView = true;\n }\n\n if (!that._changeView) {\n that._changeView = !!(options.month.content || options.month.empty);\n }\n\n that.navigate(that._value);\n\n that._toggle();\n },\n\n _toggle: function(toggle) {\n var that = this,\n options = that.options,\n isTodayDisabled = that.options.disableDates(getToday()),\n link = that._today,\n todayClass = that._todayClass();\n\n if (toggle === undefined$1) {\n toggle = isInRange(getToday(), options.min, options.max);\n }\n\n if (link) {\n link.off(CLICK);\n\n if (toggle && !isTodayDisabled) {\n link.addClass(todayClass)\n .removeClass(DISABLED)\n .on(CLICK, that._todayClick.bind(that));\n } else {\n link.removeClass(todayClass)\n .addClass(DISABLED)\n .on(CLICK, prevent);\n }\n }\n },\n\n _todayClass: function() {\n return TODAY;\n },\n\n _todayClick: function(e) {\n var that = this,\n depth = views[that.options.depth],\n disabled = that.options.disableDates,\n today = getToday();\n\n e.preventDefault();\n\n if (disabled(today)) {\n return;\n }\n\n if (that._view.compare(that._current, today) === 0 && that._index == depth) {\n that._changeView = false;\n }\n\n if (that._isMultipleSelection()) {\n that._selectDates = [today];\n that.selectable._lastActive = null;\n }\n\n that._value = today;\n that.navigate(today, depth);\n\n that.trigger(CHANGE);\n },\n\n _templates: function() {\n var that = this,\n options = that.options,\n footer = options.footer,\n month = options.month,\n content = month.content,\n weekNumber = month.weekNumber,\n empty = month.empty,\n footerTemplate = (data) => `${kendo.toString(data,\"D\",options.culture)}`;\n\n that.month = {\n content: (data) => `${executeTemplate(content, data) || data.value}`,\n empty: (data) => `${executeTemplate(empty, data) || \" \"}`,\n weekNumber: (data) => `${executeTemplate(weekNumber, data) || data.weekNumber}`\n };\n\n that.year = {\n content: template((data) => `${data.value}`)\n };\n\n if (footer && footer !== true) {\n footerTemplate = footer;\n }\n\n that.footer = footer !== false ? template(footerTemplate, { useWithBlock: false }) : null;\n },\n\n _updateAria: function(ariaTemplate, date) {\n var that = this;\n var cell = that._cell;\n var valueType = that.view().valueType();\n var current = date || that.current();\n var text;\n\n if (valueType === \"month\") {\n text = kendo.toString(current, \"MMMM\");\n } else if (valueType === \"date\") {\n text = kendo.toString(current, \"D\");\n } else {\n text = cell.text();\n }\n\n cell.attr(\"aria-label\", ariaTemplate({ current: current, valueType: valueType, text: text }));\n\n return cell.attr(\"id\");\n }\n });\n\n ui.plugin(Calendar);\n\n var calendar = {\n firstDayOfMonth: function(date) {\n return createDate(\n date.getFullYear(),\n date.getMonth(),\n 1\n );\n },\n\n firstVisibleDay: function(date, calendarInfo) {\n calendarInfo = calendarInfo || kendo.culture().calendar;\n\n var firstDay = calendarInfo.firstDay,\n firstVisibleDay = new DATE(date.getFullYear(), date.getMonth(), 1, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n firstVisibleDay.setFullYear(date.getFullYear());\n\n while (firstVisibleDay.getDay() != firstDay) {\n calendar.setTime(firstVisibleDay, -1 * MS_PER_DAY);\n }\n\n return firstVisibleDay;\n },\n\n setTime: function(date, time) {\n var tzOffsetBefore = date.getTimezoneOffset(),\n resultDATE = new DATE(date.getTime() + time),\n tzOffsetDiff = resultDATE.getTimezoneOffset() - tzOffsetBefore;\n\n date.setTime(resultDATE.getTime() + tzOffsetDiff * MS_PER_MINUTE);\n },\n views: [{\n name: MONTH,\n title: function(date, min, max, culture) {\n return getCalendarInfo(culture).months.names[date.getMonth()] + \" \" + date.getFullYear();\n },\n content: function(options) {\n var that = this,\n idx = 0,\n min = options.min,\n max = options.max,\n date = options.date,\n dates = options.dates,\n format = options.format,\n culture = options.culture,\n navigateUrl = options.url,\n showHeader = options.showHeader,\n otherMonth = options.otherMonth,\n isWeekColumnVisible = options.isWeekColumnVisible,\n hasUrl = navigateUrl && dates[0],\n currentCalendar = getCalendarInfo(culture),\n firstDayIdx = currentCalendar.firstDay,\n days = currentCalendar.days,\n names = shiftArray(days.names, firstDayIdx),\n shortNames = shiftArray(days.namesShort, firstDayIdx),\n start = calendar.firstVisibleDay(date, currentCalendar),\n firstDayOfMonth = that.first(date),\n lastDayOfMonth = that.last(date),\n toDateString = that.toDateString,\n today = getToday(),\n contentClasses = options.contentClasses,\n html = '';\n\n if (showHeader) {\n html += '';\n }\n\n html += '';\n\n if (isWeekColumnVisible) {\n html += '';\n }\n\n for (; idx < 7; idx++) {\n html += '';\n }\n\n adjustDST(today, 0);\n today = +today;\n\n return view({\n cells: 42,\n perRow: 7,\n html: html += '',\n start: createDate(start.getFullYear(), start.getMonth(), start.getDate()),\n isWeekColumnVisible: isWeekColumnVisible,\n weekNumber: options.weekNumber,\n min: createDate(min.getFullYear(), min.getMonth(), min.getDate()),\n max: createDate(max.getFullYear(), max.getMonth(), max.getDate()),\n otherMonth: otherMonth,\n content: options.content,\n lastDayOfMonth: lastDayOfMonth,\n empty: options.empty,\n setter: that.setDate,\n disableDates: options.disableDates,\n build: function(date, idx, disableDates) {\n var cssClass = [ \"k-calendar-td\" ],\n day = date.getDay(),\n linkClass = \"\",\n url = \"#\";\n\n if (date < firstDayOfMonth || date > lastDayOfMonth) {\n cssClass.push(OTHERMONTH);\n }\n\n if (disableDates(date)) {\n cssClass.push(DISABLED);\n }\n\n if (+date === today) {\n cssClass.push(\"k-today\");\n }\n\n if (day === 0 || day === 6) {\n cssClass.push(\"k-weekend\");\n }\n\n if (hasUrl && inArray(+date, dates)) {\n url = navigateUrl.replace(\"{0}\", kendo.toString(date, format, culture));\n linkClass = \" k-action-link\";\n }\n\n return {\n date: date,\n dates: dates,\n ns: kendo.ns,\n title: kendo.toString(date, \"D\", culture),\n value: date.getDate(),\n dateString: toDateString(date),\n cssClass: cssClass.join(\" \"),\n linkClass: linkClass,\n url: url\n };\n },\n weekNumberBuild: function(date) {\n return {\n weekNumber: weekInYear(date, kendo.culture().calendar.firstDay),\n currentDate: date\n };\n }\n });\n },\n first: function(date) {\n return calendar.firstDayOfMonth(date);\n },\n last: function(date) {\n var last = createDate(date.getFullYear(), date.getMonth() + 1, 0),\n first = calendar.firstDayOfMonth(date),\n timeOffset = Math.abs(last.getTimezoneOffset() - first.getTimezoneOffset());\n\n if (timeOffset) {\n last.setHours(first.getHours() + (timeOffset / 60));\n }\n\n return last;\n },\n compare: function(date1, date2) {\n var result,\n month1 = date1.getMonth(),\n year1 = date1.getFullYear(),\n month2 = date2.getMonth(),\n year2 = date2.getFullYear();\n\n if (year1 > year2) {\n result = 1;\n } else if (year1 < year2) {\n result = -1;\n } else {\n result = month1 == month2 ? 0 : month1 > month2 ? 1 : -1;\n }\n\n return result;\n },\n setDate: function(date, value) {\n var hours = date.getHours();\n if (value instanceof DATE) {\n date.setFullYear(value.getFullYear(), value.getMonth(), value.getDate());\n } else {\n calendar.setTime(date, value * MS_PER_DAY);\n }\n adjustDST(date, hours);\n },\n toDateString: function(date) {\n return date.getFullYear() + \"/\" + date.getMonth() + \"/\" + date.getDate();\n },\n valueType: function() {\n return \"date\";\n }\n },\n {\n name: \"year\",\n title: function(date) {\n return date.getFullYear();\n },\n content: function(options) {\n var calendarMonths = getCalendarInfo(options.culture).months,\n namesAbbr = calendarMonths.namesAbbr,\n namesFull = calendarMonths.names,\n toDateString = this.toDateString,\n min = options.min,\n max = options.max,\n html = \"\";\n\n if (options.showHeader) {\n html += '
    ' + this.title(date, min, max, culture) + '
    ' + encode(options.messages.weekColumnHeader) + '' + shortNames[idx] + '
    ';\n html += '';\n html += '';\n html += '';\n }\n\n return view({\n min: createDate(min.getFullYear(), min.getMonth(), 1),\n max: createDate(max.getFullYear(), max.getMonth(), 1),\n start: createDate(options.date.getFullYear(), 0, 1),\n html: html,\n setter: this.setDate,\n content: options.content,\n build: function(date) {\n var cssClass = [ \"k-calendar-td\" ];\n\n return {\n value: namesAbbr[date.getMonth()],\n label: namesFull[date.getMonth()],\n ns: kendo.ns,\n dateString: toDateString(date),\n cssClass: cssClass.join(\" \")\n };\n }\n });\n },\n first: function(date) {\n return createDate(date.getFullYear(), 0, date.getDate());\n },\n last: function(date) {\n return createDate(date.getFullYear(), 11, date.getDate());\n },\n compare: function(date1, date2) {\n return compare(date1, date2);\n },\n setDate: function(date, value) {\n var month,\n hours = date.getHours();\n\n if (value instanceof DATE) {\n month = value.getMonth();\n\n date.setFullYear(value.getFullYear(), month, date.getDate());\n\n if (month !== date.getMonth()) {\n date.setDate(0);\n }\n } else {\n month = date.getMonth() + value;\n\n date.setMonth(month);\n\n if (month > 11) {\n month -= 12;\n }\n\n if (month > 0 && date.getMonth() != month) {\n date.setDate(0);\n }\n }\n\n adjustDST(date, hours);\n },\n toDateString: function(date) {\n return date.getFullYear() + \"/\" + date.getMonth() + \"/1\";\n },\n valueType: function() {\n return \"month\";\n }\n },\n {\n name: \"decade\",\n title: function(date, min, max) {\n return title(date, min, max, 10);\n },\n content: function(options) {\n var year = options.date.getFullYear(),\n toDateString = this.toDateString,\n html = \"\";\n\n if (options.showHeader) {\n html += '
    ';\n html += this.title(options.date);\n html += '
    ';\n html += '';\n html += '';\n html += '';\n }\n\n return view({\n start: createDate(year - year % 10 - 1, 0, 1),\n min: createDate(options.min.getFullYear(), 0, 1),\n max: createDate(options.max.getFullYear(), 0, 1),\n otherMonth: options.otherMonth,\n html: html,\n setter: this.setDate,\n build: function(date, idx) {\n var cssClass = [ \"k-calendar-td\" ];\n\n if (idx === 0 || idx === 11) {\n cssClass.push(OTHERMONTH);\n }\n\n return {\n value: date.getFullYear(),\n ns: kendo.ns,\n dateString: toDateString(date),\n cssClass: cssClass.join(\" \")\n };\n }\n });\n },\n first: function(date) {\n var year = date.getFullYear();\n return createDate(year - year % 10, date.getMonth(), date.getDate());\n },\n last: function(date) {\n var year = date.getFullYear();\n return createDate(year - year % 10 + 9, date.getMonth(), date.getDate());\n },\n compare: function(date1, date2) {\n return compare(date1, date2, 10);\n },\n setDate: function(date, value) {\n setDate(date, value, 1);\n },\n toDateString: function(date) {\n return date.getFullYear() + \"/0/1\";\n },\n valueType: function() {\n return \"year\";\n }\n },\n {\n name: CENTURY,\n title: function(date, min, max) {\n return title(date, min, max, 100);\n },\n content: function(options) {\n var year = options.date.getFullYear(),\n min = options.min.getFullYear(),\n max = options.max.getFullYear(),\n toDateString = this.toDateString,\n minYear = min,\n maxYear = max,\n html = \"\";\n\n minYear = minYear - minYear % 10;\n maxYear = maxYear - maxYear % 10;\n\n if (maxYear - minYear < 10) {\n maxYear = minYear + 9;\n }\n\n if (options.showHeader) {\n html += '
    ';\n html += this.title(options.date, options.min, options.max);\n html += '
    ';\n html += '';\n html += '';\n html += '';\n }\n\n return view({\n start: createDate(year - year % 100 - 10, 0, 1),\n min: createDate(minYear, 0, 1),\n max: createDate(maxYear, 0, 1),\n otherMonth: options.otherMonth,\n html: html,\n setter: this.setDate,\n build: function(date, idx) {\n var cssClass = [ \"k-calendar-td\" ];\n var start = date.getFullYear(),\n end = start + 9;\n\n if (idx === 0 || idx === 11) {\n cssClass.push(OTHERMONTH);\n }\n\n if (start < min) {\n start = min;\n }\n\n if (end > max) {\n end = max;\n }\n\n return {\n ns: kendo.ns,\n value: start + \" - \" + end,\n dateString: toDateString(date),\n cssClass: cssClass.join(\" \")\n };\n }\n });\n },\n first: function(date) {\n var year = date.getFullYear();\n return createDate(year - year % 100, date.getMonth(), date.getDate());\n },\n last: function(date) {\n var year = date.getFullYear();\n return createDate(year - year % 100 + 99, date.getMonth(), date.getDate());\n },\n compare: function(date1, date2) {\n return compare(date1, date2, 100);\n },\n setDate: function(date, value) {\n setDate(date, value, 10);\n },\n toDateString: function(date) {\n var year = date.getFullYear();\n return (year - year % 10) + \"/0/1\";\n },\n valueType: function() {\n return \"decade\";\n }\n }]\n };\n\n function title(date, min, max, modular) {\n var start = date.getFullYear(),\n minYear = min.getFullYear(),\n maxYear = max.getFullYear(),\n end;\n\n start = start - start % modular;\n end = start + (modular - 1);\n\n if (start < minYear) {\n start = minYear;\n }\n if (end > maxYear) {\n end = maxYear;\n }\n\n return start + \"-\" + end;\n }\n\n function view(options) {\n var idx = 0,\n data,\n min = options.min,\n max = options.max,\n start = options.start,\n setter = options.setter,\n build = options.build,\n weekNumberBuild = options.weekNumberBuild,\n length = options.cells || 12,\n isWeekColumnVisible = options.isWeekColumnVisible,\n cellsPerRow = options.perRow || 4,\n otherMonth = options.otherMonth,\n lastDayOfMonth = options.lastDayOfMonth,\n weekNumber = options.weekNumber || weekNumberTemplate,\n content = options.content || cellTemplate,\n empty = options.empty || emptyCellTemplate,\n otherMonthTemplate = options.otherMonthCellTemplate || otherMonthCellTemplate,\n html = options.html || '
    ';\n html += this.title(options.date, options.min, options.max);\n html += '
    ';\n\n if (isWeekColumnVisible) {\n html += weekNumber(weekNumberBuild(start));\n }\n\n\n for (; idx < length; idx++) {\n if (idx > 0 && idx % cellsPerRow === 0) {\n html += '';\n if (isWeekColumnVisible) {\n html += otherMonth || (+start <= +lastDayOfMonth) ? weekNumber(weekNumberBuild(start)) : weekNumber({ weekNumber: \" \" });\n }\n }\n\n start = createDate(start.getFullYear(), start.getMonth(), start.getDate());\n adjustDST(start, 0);\n\n data = build(start, idx, options.disableDates);\n\n html += (data.cssClass.indexOf(OTHERMONTH) !== -1 && !otherMonth) ? otherMonthTemplate(data) : isInRange(start, min, max) ? content(data) : empty(data);\n\n setter(start, 1);\n }\n\n return html + \"
    \";\n }\n\n function compare(date1, date2, modifier) {\n var year1 = date1.getFullYear(),\n start = date2.getFullYear(),\n end = start,\n result = 0;\n\n if (modifier) {\n start = start - start % modifier;\n end = start - start % modifier + modifier - 1;\n }\n\n if (year1 > end) {\n result = 1;\n } else if (year1 < start) {\n result = -1;\n }\n\n return result;\n }\n\n function getToday() {\n var today = new DATE();\n return new DATE(today.getFullYear(), today.getMonth(), today.getDate());\n }\n\n function restrictValue(value, min, max) {\n var today = getToday();\n\n if (value) {\n today = new DATE(+value);\n }\n\n if (min > today) {\n today = new DATE(+min);\n } else if (max < today) {\n today = new DATE(+max);\n }\n return today;\n }\n\n function isInRange(date, min, max) {\n return +date >= +min && +date <= +max;\n }\n\n function shiftArray(array, idx) {\n return array.slice(idx).concat(array.slice(0, idx));\n }\n\n function setDate(date, value, multiplier) {\n value = value instanceof DATE ? value.getFullYear() : date.getFullYear() + multiplier * value;\n date.setFullYear(value);\n }\n\n function daysBetweenTwoDates(startDate, endDate) {\n if (+endDate < +startDate) {\n var temp = +startDate;\n calendar.views[0].setDate(startDate, endDate);\n calendar.views[0].setDate(endDate, new Date(temp));\n }\n var fromDateUTC = Date.UTC(startDate.getFullYear(), startDate.getMonth(), startDate.getDate());\n var endDateUTC = Date.UTC(endDate.getFullYear(), endDate.getMonth(), endDate.getDate());\n\n return Math.ceil((+endDateUTC - +fromDateUTC) / kendo.date.MS_PER_DAY);\n }\n\n function addDaysToArray(array, numberOfDays, fromDate, disableDates) {\n for (var i = 0; i <= numberOfDays; i++) {\n var nextDay = new Date(fromDate.getTime());\n nextDay = new Date(nextDay.setDate(nextDay.getDate() + i));\n if (!disableDates(nextDay)) {\n array.push(nextDay);\n }\n }\n }\n\n function mousetoggle(e) {\n var disabled = $(this).hasClass(\"k-disabled\");\n\n if (!disabled) {\n $(this).toggleClass(HOVER, MOUSEENTER.indexOf(e.type) > -1 || e.type == FOCUS);\n }\n }\n\n function prevent(e) {\n e.preventDefault();\n }\n\n // creates date with full year\n function createDate(year, month, date) {\n var dateObject = new DATE(year, month, date);\n dateObject.setFullYear(year, month, date);\n return dateObject;\n }\n\n function getCalendarInfo(culture) {\n return getCulture(culture).calendars.standard;\n }\n\n function normalize(options) {\n var start = views[options.start],\n depth = views[options.depth],\n culture = getCulture(options.culture);\n\n options.format = extractFormat(options.format || culture.calendars.standard.patterns.d);\n\n if (isNaN(start)) {\n start = 0;\n options.start = MONTH;\n }\n\n if (depth === undefined$1 || depth > start) {\n options.depth = MONTH;\n }\n\n if (options.dates === null) {\n options.dates = [];\n }\n }\n\n function addClassToViewContainer(element, currentView) {\n element.addClass(\"k-\" + currentView);\n }\n\n function inArray(date, dates) {\n for (var i = 0, length = dates.length; i < length; i++) {\n if (date === +dates[i]) {\n return true;\n }\n }\n return false;\n }\n\n function isEqualDatePart(value1, value2) {\n if (value1) {\n return value1.getFullYear() === value2.getFullYear() &&\n value1.getMonth() === value2.getMonth() &&\n value1.getDate() === value2.getDate();\n }\n\n return false;\n }\n\n function isEqualMonth(value1, value2) {\n if (value1) {\n return value1.getFullYear() === value2.getFullYear() &&\n value1.getMonth() === value2.getMonth();\n }\n\n return false;\n }\n\n\n function getDisabledExpr(option) {\n if (kendo.isFunction(option)) {\n return option;\n }\n\n if (Array.isArray(option)) {\n return createDisabledExpr(option);\n }\n return $.noop;\n }\n\n function convertDatesArray(dates) {\n var result = [];\n for (var i = 0; i < dates.length; i++) {\n result.push(dates[i].setHours(0, 0, 0, 0));\n }\n return result;\n }\n\n function createDisabledExpr(dates) {\n var callback,\n disabledDates = [],\n days = [\"su\", \"mo\", \"tu\", \"we\", \"th\", \"fr\", \"sa\"];\n\n if (dates[0] instanceof DATE) {\n disabledDates = convertDatesArray(dates);\n callback = (date) => !!(date && disabledDates.indexOf((new Date(date)).setHours(0, 0, 0, 0)) > -1);\n } else {\n disabledDates = dates.map(day => {\n day = day.slice(0,2).toLowerCase();\n let index = days.indexOf(day);\n if (index > -1) {\n return index;\n }\n });\n\n callback = (date) => !!(date && disabledDates.indexOf((new Date(date)).getDay()) > -1);\n }\n\n return callback;\n }\n\n function isEqualDate(oldValue, newValue) {\n if (oldValue instanceof Date && newValue instanceof Date) {\n oldValue = oldValue.getTime();\n newValue = newValue.getTime();\n }\n\n return oldValue === newValue;\n }\n\n function toDateObject(link) {\n var value = $(link).attr(kendo.attr(VALUE)).split(\"/\");\n //Safari cannot create correctly date from \"1/1/2090\"\n value = createDate(value[0], value[1], value[2]);\n\n return value;\n }\n\n // Backwards compatibility after CSP changes.\n function executeTemplate(tmpl, data) {\n if (tmpl) {\n if (kendo.isFunction(tmpl)) {\n return tmpl(data);\n }\n return template(tmpl)(data);\n }\n return undefined$1;\n }\n\n calendar.isEqualDatePart = isEqualDatePart;\n calendar.isEqualDate = isEqualDate;\n calendar.restrictValue = restrictValue;\n calendar.isInRange = isInRange;\n calendar.addClassToViewContainer = addClassToViewContainer;\n calendar.normalize = normalize;\n calendar.viewsEnum = views;\n calendar.disabled = getDisabledExpr;\n calendar.toDateObject = toDateObject;\n calendar.getToday = getToday;\n calendar.createDate = createDate;\n\n kendo.calendar = calendar;\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.core.js';\n\n/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nfunction __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nvar __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\nfunction __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nfunction __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nfunction __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nfunction __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nfunction __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nfunction __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nfunction __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nfunction __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nfunction __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nfunction __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nvar __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nfunction __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nfunction __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nfunction __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nfunction __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nfunction __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nfunction __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nfunction __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nfunction __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nfunction __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nfunction __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nfunction __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nfunction __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nfunction __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nfunction __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nfunction __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nfunction __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nvar tslib_es6 = {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n};\n\n/**\n * A function that clones the passed date. The parameter could be `null`.\n *\n * @param date - The initial date value.\n * @returns - A new `Date` instance.\n *\n * @example\n * ```ts-no-run\n * cloneDate(new Date(2016, 0, 1)); // returns new Date(2016, 0, 1);\n * cloneDate(null); // returns null\n * ```\n */\nvar cloneDate = function (date) { return date ? new Date(date.getTime()) : null; };\n\n/**\n * @hidden\n */\nvar adjustDST = function (date, hour) {\n var newDate = cloneDate(date);\n if (hour === 0 && newDate.getHours() === 23) {\n newDate.setHours(newDate.getHours() + 2);\n }\n return newDate;\n};\n\n/**\n * A function that adds and subtracts days from a `Date` object.\n *\n * @param date - The initial date value.\n * @param offset - The number of days to add and subtract from the date.\n * @returns - A new `Date` instance.\n *\n * @example\n * ```ts-no-run\n * addDays(new Date(2016, 0, 1), 5); // 2016-1-6\n * addDays(new Date(2016, 0, 1), -5); // 2015-12-26\n * ```\n */\nvar addDays = function (date, offset) {\n var newDate = cloneDate(date);\n newDate.setDate(newDate.getDate() + offset);\n return adjustDST(newDate, date.getHours());\n};\n\n/**\n * A function which returns a new `Date` instance.\n *\n * @param year - The year value.\n * @param month - The month value.\n * @param day - The day value.\n * @param hours - The hours value.\n * @param minutes - The minutes value.\n * @param seconds - The seconds value.\n * @param milliseconds - milliseconds value.\n * @returns The date instance.\n *\n * @example\n * ```ts-no-run\n * createDate(2016, 0, 15); // 2016-01-15 00:00:00\n * createDate(2016, 0, 15, 22, 22, 20); // 2016-01-15 22:22:20\n * ```\n */\nvar createDate = function (year, month, day, hours, minutes, seconds, milliseconds) {\n if (hours === void 0) { hours = 0; }\n if (minutes === void 0) { minutes = 0; }\n if (seconds === void 0) { seconds = 0; }\n if (milliseconds === void 0) { milliseconds = 0; }\n var date = new Date(year, month, day, hours, minutes, seconds, milliseconds);\n if (year > -1 && year < 100) {\n date.setFullYear(date.getFullYear() - 1900);\n }\n return adjustDST(date, hours);\n};\n\n/**\n * A function which returns the last date of the month.\n *\n * @param date - The initial date.\n * @returns - The last date of the initial date month.\n *\n * @example\n * ```ts-no-run\n * lastDayOfMonth(new Date(2016, 0, 15)); // 2016-01-31\n * ```\n */\nvar lastDayOfMonth = function (date) {\n var newDate = createDate(date.getFullYear(), date.getMonth() + 1, 1, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n return addDays(newDate, -1);\n};\n\nvar MONTHS_LENGTH = 12;\nvar normalize = function (date, expectedMonth) { return (date.getMonth() !== expectedMonth ? lastDayOfMonth(addMonths(date, -1)) : date //tslint:disable-line:no-use-before-declare\n); };\n/**\n * A function that adds and subtracts months from a `Date` object.\n *\n * @param date - The initial date value.\n * @param offset - The number of months to add or subtract from the date.\n * @returns - A new `Date` instance.\n *\n * @example\n * ```ts-no-run\n * addMonths(new Date(2016, 5, 1), 5); // 2016-11-1\n * addMonths(new Date(2016, 5, 1), -5); // 2015-1-1\n * ```\n */\nvar addMonths = function (date, offset) {\n var newDate = cloneDate(date);\n var diff = (newDate.getMonth() + offset) % MONTHS_LENGTH;\n var expectedMonth = (MONTHS_LENGTH + diff) % MONTHS_LENGTH;\n newDate.setMonth(newDate.getMonth() + offset);\n return normalize(adjustDST(newDate, date.getHours()), expectedMonth);\n};\n\n/**\n * @hidden\n */\nvar setYear = function (value, year) {\n var month = value.getMonth();\n var candidate = createDate(year, month, value.getDate(), value.getHours(), value.getMinutes(), value.getSeconds(), value.getMilliseconds());\n return candidate.getMonth() === month ? candidate : lastDayOfMonth(addMonths(candidate, -1));\n};\n\n/**\n * A function that adds and subtracts years from a `Date` object.\n *\n * @param date - The initial date value.\n * @param offset - The number of years to add or subtract from the date.\n * @returns - A new `Date` instance.\n *\n * @example\n * ```ts-no-run\n * addYears(new Date(2016, 5, 1), 5); // 2011-6-1\n * addYears(new Date(2016, 5, 1), -5); // 2021-6-1\n * ```\n */\nvar addYears = function (value, offset) {\n return adjustDST(setYear(value, value.getFullYear() + offset), value.getHours());\n};\n\n/**\n * A function that adds and subtracts centuries from a `Date` object.\n *\n * @param date - The initial date value.\n * @param offset - The number of centuries to add or subtract from the date.\n * @returns - A new `Date` instance.\n *\n * @example\n * ```ts-no-run\n * addCenturies(new Date(2016, 5, 1), 5); // 2516-6-1\n * addCenturies(new Date(2016, 5, 1), -5); // 1516-6-1\n * ```\n */\nvar addCenturies = function (value, offset) {\n return addYears(value, 100 * offset);\n};\n\n/**\n * A function that adds and subtracts decades from a `Date` object.\n *\n * @param date - The initial date value.\n * @param offset - The number of decades to add or subtract from the date.\n * @returns - A new `Date` instance.\n *\n * @example\n * ```ts-no-run\n * addDecades(new Date(2016, 5, 1), 5); // 2066-6-1\n * addDecades(new Date(2016, 5, 1), -5); // 1966-6-1\n * ```\n */\nvar addDecades = function (value, offset) {\n return addYears(value, 10 * offset);\n};\n\n/**\n * A function that adds and subtracts weeks from a Date object.\n *\n * @param date - The initial date value.\n * @param offset - The number of weeks to add/subtract from the date.\n * @returns - A new `Date` instance.\n *\n * @example\n * ```ts-no-run\n * addWeeks(new Date(2016, 5, 1), 3); // 2016-6-22\n * addWeeks(new Date(2016, 5, 1), -3); // 2015-5-11\n * ```\n */\nvar addWeeks = function (date, offset) {\n return addDays(date, offset * 7);\n};\n\n/**\n * The number of milliseconds in one minute.\n */\nvar MS_PER_MINUTE$1 = 60000;\n/**\n * The number of milliseconds in one hour.\n */\nvar MS_PER_HOUR = 3600000;\n/**\n * The number of milliseconds in one standard day.\n */\nvar MS_PER_DAY = 86400000;\n\n// tslint:disable:max-line-length\n/**\n * An enumeration which represents the horizontal direction. The `Forward` option moves forward. The `Backward` option moves backward.\n */\nvar Direction;\n(function (Direction) {\n /**\n * The `Forward` value with an underlying `1` number value.\n */\n Direction[Direction[\"Forward\"] = 1] = \"Forward\";\n /**\n * The `Backward` value with an underlying `-1` (minus one) number value.\n */\n Direction[Direction[\"Backward\"] = -1] = \"Backward\";\n})(Direction || (Direction = {}));\n// tslint:enable:max-line-length\n\n/**\n * @hidden\n *\n * A function which returns the next or previous date for a specific week day. For example, `Day.Monday`.\n *\n * @param date - The date to calculate from.\n * @param weekDay - The `Day` enum specifying the desired week day.\n * @param direction - The `Direction` enum specifying the calculation direction.\n * @returns - A `Date` instance.\n *\n * @example\n * ```ts-no-run\n * dayOfWeek(new Date(2016, 0, 1), Day.Wednesday, Direction.Forward); // 2016-01-06, Wednesday\n * dayOfWeek(new Date(2016, 0, 1), Day.Wednesday, Direction.Backward); // 2015-12-30, Wednesday\n * ```\n */\nvar dayOfWeek = function (date, weekDay, direction) {\n if (direction === void 0) { direction = Direction.Forward; }\n var newDate = cloneDate(date);\n var newDay = ((weekDay - newDate.getDay()) + (7 * direction)) % 7;\n newDate.setDate(newDate.getDate() + newDay);\n return adjustDST(newDate, date.getHours());\n};\n\n/**\n * Enumeration which represents the week days.\n */\nvar Day;\n(function (Day) {\n /**\n * The Sunday value with an underlying `0` number value.\n */\n Day[Day[\"Sunday\"] = 0] = \"Sunday\";\n /**\n * The Monday value with an underlying `1` number value.\n */\n Day[Day[\"Monday\"] = 1] = \"Monday\";\n /**\n * The Tuesday value with an underlying `2` number value.\n */\n Day[Day[\"Tuesday\"] = 2] = \"Tuesday\";\n /**\n * The Wednesday value with an underlying `3` number value.\n */\n Day[Day[\"Wednesday\"] = 3] = \"Wednesday\";\n /**\n * The Thursday value with an underlying `4` number value.\n */\n Day[Day[\"Thursday\"] = 4] = \"Thursday\";\n /**\n * The Friday value with an underlying `5` number value.\n */\n Day[Day[\"Friday\"] = 5] = \"Friday\";\n /**\n * The Saturday value with an underlying `6` number value.\n */\n Day[Day[\"Saturday\"] = 6] = \"Saturday\";\n})(Day || (Day = {}));\n\n/**\n * @hidden\n */\nvar normalizeYear = function (value, year) { return (setYear(value, year(value.getFullYear()))); };\n\n/**\n * A function that returns a `Date` object of the first decade in a century.\n *\n * @param date - The start date value.\n * @returns - The first year in a century.\n *\n * @example\n * ```ts-no-run\n * firstDecadeOfCentury(new Date(2017, 0, 1)); // 2000-1-1\n * firstDecadeOfCentury(new Date(2007, 10, 22)); // 2000-11-22\n * firstDecadeOfCentury(new Date(2126, 0, 1)); // 2100-1-1\n * ```\n */\nvar firstDecadeOfCentury = function (value) { return (normalizeYear(value, function (y) { return y - (y % 100); })); };\n\n/**\n * A function that calculates duration in centuries between two `Date` objects.\n *\n * @param start - The start date value.\n * @param end - The end date value.\n * @returns - The duration in months.\n *\n * @example\n * ```ts-no-run\n * durationInCenturies(new Date(2016, 0, 1), new Date(3216, 0, 1)); // 12\n * durationInCenturies(new Date(2016, 6, 1), new Date(2617, 0, 1)); // 6\n * durationInCenturies(new Date(2016, 0, 1), new Date(2016, 0, 1)); // 0\n * ```\n */\nvar durationInCenturies = function (start, end) { return ((firstDecadeOfCentury(end).getFullYear() - firstDecadeOfCentury(start).getFullYear()) / 100); };\n\n/**\n * A function that returns a `Date` object of the first year in a decade.\n *\n * @param date - The start date value.\n * @returns - The first year in a decade.\n *\n * @example\n * ```ts-no-run\n * firstYearOfDecade(new Date(2017, 0, 1)); // 2010-1-1\n * firstYearOfDecade(new Date(2007, 10, 22)); // 2000-11-22\n * firstYearOfDecade(new Date(2026, 0, 1)); // 2020-1-1\n * ```\n */\nvar firstYearOfDecade = function (value) { return (normalizeYear(value, function (y) { return y - (y % 10); })); };\n\n/**\n * A function that calculates duration in decades between two `Date` objects.\n *\n * @param start - The start date value.\n * @param end - The end date value.\n * @returns - The duration in months.\n *\n * @example\n * ```ts-no-run\n * durationInDecades(new Date(2016, 0, 1), new Date(2136, 0, 1)); // 12\n * durationInDecades(new Date(2016, 0, 1), new Date(2016, 0, 1)); // 0\n * ```\n */\nvar durationInDecades = function (start, end) { return ((firstYearOfDecade(end).getFullYear() - firstYearOfDecade(start).getFullYear()) / 10); };\n\n/**\n * A function that calculates duration in months between two `Date` objects.\n *\n * @param start - The start date value.\n * @param end - The end date value.\n * @returns - The duration in months.\n *\n * @example\n * ```ts-no-run\n * durationInMonths(new Date(2016, 0, 1), new Date(2017, 0, 1)); // 12\n * durationInMonths(new Date(2016, 6, 1), new Date(2017, 0, 1)); // 6\n * durationInMonths(new Date(2016, 0, 1), new Date(2016, 0, 1)); // 0\n * ```\n */\nvar durationInMonths = function (start, end) { return (((end.getFullYear() - start.getFullYear())) * 12 + (end.getMonth() - start.getMonth())); };\n\n/**\n * A function that calculates duration in years between two `Date` objects.\n *\n * @param start - The start date value.\n * @param end - The end date value.\n * @returns - The duration in years.\n *\n * @example\n * ```ts-no-run\n * durationInYears(new Date(2016, 0, 1), new Date(2028, 0, 1)); // 12\n * durationInYears(new Date(2016, 0, 1), new Date(2022, 0, 1)); // 6\n * durationInYears(new Date(2016, 0, 1), new Date(2016, 0, 1)); // 0\n * ```\n */\nvar durationInYears = function (start, end) { return (end.getFullYear() - start.getFullYear()); };\n\n/**\n * A function which returns the first date of the current week.\n *\n * @param date - The initial date.\n * @param weekStartDay [default: Day.Sunday] - The first day of the week.\n * @returns - The first date of the current week.\n *\n * @example\n * ```ts-no-run\n * firstDayInWeek(new Date(2016, 0, 15)); // 2016-01-10\n * firstDayInWeek(new Date(2016, 0, 15), Day.Monday); // 2016-01-11\n * ```\n */\nvar firstDayInWeek = function (date, weekStartDay) {\n if (weekStartDay === void 0) { weekStartDay = Day.Sunday; }\n var first = cloneDate(date);\n while (first.getDay() !== weekStartDay) {\n first.setDate(first.getDate() - 1);\n }\n return first;\n};\n\n/**\n * A function which returns the first date of the month.\n *\n * @param date - The initial date.\n * @returns - The first date of the initial date month.\n *\n * @example\n * ```ts-no-run\n * firstDayOfMonth(new Date(2016, 0, 15)); // 2016-01-01\n * ```\n */\nvar firstDayOfMonth = function (date) {\n return createDate(date.getFullYear(), date.getMonth(), 1, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n};\n\n/**\n * @hidden\n */\nvar setMonth = function (value, month) {\n var day = value.getDate();\n var candidate = createDate(value.getFullYear(), month, day, value.getHours(), value.getMinutes(), value.getSeconds(), value.getMilliseconds());\n return candidate.getDate() === day ? candidate : lastDayOfMonth(addMonths(candidate, -1));\n};\n\n/**\n * A function that returns a `Date` object of the first month in a year.\n *\n * @param date - The start date value.\n * @returns - The first month in a year.\n *\n * @example\n * ```ts-no-run\n * firstMonthOfYear(new Date(2017, 11, 1)); // 2017-1-1\n * firstMonthOfYear(new Date(2017, 0, 1)); // 2017-1-1\n * ```\n */\nvar firstMonthOfYear = function (value) { return setMonth(value, 0); };\n\n/**\n * A function which returns the passed date with a midnight time portion.\n *\n * @param date - The initial date.\n * @returns - The date with a midnight time portion.\n *\n * @example\n * ```ts-no-run\n * getDate(new Date(2016, 0, 15, 14, 30, 30)); // 2016-01-15 00:00:00\n * ```\n */\nvar getDate = function (date) {\n return createDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);\n};\n\n/**\n * A function that compares two dates. The comparison also includes the time portion.\n *\n * @param candidate - The candidate date.\n * @param expected - The expected date.\n * @returns - A Boolean value indicating whether the values are equal.\n *\n * @example\n * ```ts-no-run\n * isEqual(new Date(2016, 0, 1), new Date(2016, 0, 1)); // true\n * isEqual(new Date(2016, 0, 1), new Date(2016, 0, 2)); // false\n * isEqual(new Date(2016, 0, 1, 10), new Date(2016, 0, 1, 20)); // false\n * ```\n */\nvar isEqual = function (candidate, expected) {\n if (!candidate && !expected) {\n return true;\n }\n return candidate && expected && candidate.getTime() === expected.getTime();\n};\n\n/**\n * A function that compares the date portions of 2 dates.\n *\n * @param candidate - The candidate date.\n * @param expected - The expected date.\n * @returns - A Boolean value whether the values are equal.\n *\n * @example\n * ```ts-no-run\n * isEqualDate(new Date(2016, 0, 1, 10), new Date(2016, 0, 1, 20)); // true\n * isEqualDate(new Date(2016, 0, 1, 10), new Date(2016, 0, 2, 10)); // false\n * ```\n */\nvar isEqualDate = function (candidate, expected) {\n if (!candidate && !expected) {\n return true;\n }\n return candidate && expected && isEqual(getDate(candidate), getDate(expected));\n};\n\n/**\n * A function that returns a `Date` object of the last decade in a century.\n *\n * @param date - The start date value.\n * @returns - The last year in a decade.\n *\n * @example\n * ```ts-no-run\n * lastDecadeOfCentury(new Date(2017, 0, 1)); // 2090-1-1\n * lastDecadeOfCentury(new Date(2007, 10, 22)); // 2090-11-22\n * lastDecadeOfCentury(new Date(2126, 0, 1)); // 2190-1-1\n * ```\n */\nvar lastDecadeOfCentury = function (value) { return (normalizeYear(value, function (y) { return y - (y % 100) + 90; })); };\n\n/**\n * A function that returns a `Date` object of the last month in a year.\n *\n * @param date - The start date value.\n * @returns - The last month in a year.\n *\n * @example\n * ```ts-no-run\n * lastMonthOfYear(new Date(2017, 5, 3)); // 2017-12-3\n * lastMonthOfYear(new Date(2017, 11, 3)); // 2017-12-3\n * ```\n */\nvar lastMonthOfYear = function (value) { return setMonth(value, 11); };\n\n/**\n * A function that returns a `Date` object of the last year in a decade.\n *\n * @param date - The start date value.\n * @returns - The last year in a decade.\n *\n * @example\n * ```ts-no-run\n * lastYearOfDecade(new Date(2017, 0, 1)); // 2019-1-1\n * lastYearOfDecade(new Date(2007, 10, 22)); // 2009-11-22\n * lastYearOfDecade(new Date(2026, 0, 1)); // 2029-1-1\n * ```\n */\nvar lastYearOfDecade = function (value) { return (normalizeYear(value, function (y) { return y - (y % 10) + 9; })); };\n\n/**\n * A function which returns a date by a specific week name. For example, `Day.Monday`.\n *\n * @param date - The date to calculate from.\n * @param weekDay - The `Day` enum specifying the desired week day.\n * @returns - A `Date` instance.\n *\n * @example\n * ```ts-no-run\n * nextDayOfWeek(new Date(2016, 0, 1), Day.Wednesday); // 2016-01-06, Wednesday\n * ```\n */\nvar nextDayOfWeek = function (date, weekDay) {\n return dayOfWeek(date, weekDay, Direction.Forward);\n};\n\n/**\n * A function which returns a date by a specific week name. For example, `Day.Monday`.\n *\n * @param date - The date to calculate from.\n * @param weekDay - The `Day` enum specifying the desired week day.\n * @returns - A `Date` instance.\n *\n * @example\n * ```ts-no-run\n * prevDayOfWeek(new Date(2016, 0, 1), Day.Wednesday); // 2015-12-30, Wednesday\n * ```\n */\nvar prevDayOfWeek = function (date, weekDay) {\n return dayOfWeek(date, weekDay, Direction.Backward);\n};\n\n/**\n * @hidden\n *\n * An object which contains the information about the cities within the timezone.\n */\nvar timezones = {\n rules: {},\n titles: {},\n zones: {}\n};\n\nvar MONTHS = { Jan: 0, Feb: 1, Mar: 2, Apr: 3, May: 4, Jun: 5, Jul: 6, Aug: 7, Sep: 8, Oct: 9, Nov: 10, Dec: 11 };\nvar DAYS = { Sun: 0, Mon: 1, Tue: 2, Wed: 3, Thu: 4, Fri: 5, Sat: 6 };\nvar MS_PER_MINUTE = 60000;\n/**\n * @hidden\n *\n * A function that finds zone rules which become applicable after a specific time.\n *\n * @param year - The value of the year.\n * @param rule - A specific zone rule.\n * @param zone - The definition of the zone.\n *\n * @return - Returns an extended rule.\n *\n * @example\n * ```ts-no-run\n * ruleToDate(2018, rule); // A rule that contains {'2018': |2018 DST date| }\n * ```\n */\nvar ruleToDate = function (year, rule, zoneOffset) {\n var month = rule[3];\n var on = rule[4];\n var time = rule[5];\n var date;\n var ruleOffset = time[3] === 'u' ? -zoneOffset * MS_PER_MINUTE : 0;\n if (!isNaN(on)) {\n date = new Date(Date.UTC(year, MONTHS[month], on, time[0], time[1], time[2]) + ruleOffset);\n }\n else if (on.indexOf('last') === 0) {\n date = new Date(Date.UTC(year, MONTHS[month] + 1, 1, time[0] - 24, time[1], time[2]) + ruleOffset);\n var targetDay = DAYS[on.substr(4, 3)];\n var ourDay = date.getUTCDay();\n date.setUTCDate(date.getUTCDate() + targetDay - ourDay - (targetDay > ourDay ? 7 : 0));\n }\n else if (on.indexOf('>=') >= 0) {\n date = new Date(Date.UTC(year, MONTHS[month], on.substr(5), time[0], time[1], time[2], 0) + ruleOffset);\n var targetDay = DAYS[on.substr(0, 3)];\n var ourDay = date.getUTCDay();\n date.setUTCDate(date.getUTCDate() + targetDay - ourDay + (targetDay < ourDay ? 7 : 0));\n }\n return date;\n};\n\nvar CURRENT_UTC_TIME = (new Date()).getTime();\n/**\n * @hidden\n *\n * A function that finds zone rules which become applicable after a specific time.\n *\n * @param timezone - The timezone name. For example, `America/Chicago`, `Europe/Sofia`.\n * @param utcTime - The UTC time boundary for a zone rule. Defaults to the current UTC time.\n *\n * @return - Returns a zone rule for the specific zone name.\n *\n * @example\n * ```ts-no-run\n * findZone('Europe/Sofia'); //[-120,\"EU\",\"EE%sT\",null]\n * ```\n */\nvar findRule = function (zoneRule, utcTime, zoneOffset) {\n if (utcTime === void 0) { utcTime = CURRENT_UTC_TIME; }\n if (zoneOffset === void 0) { zoneOffset = 0; }\n var rules = timezones.rules[zoneRule];\n if (!rules) {\n var time = zoneRule.split(\":\");\n var offset = 0;\n if (time.length > 1) {\n offset = time[0] * 60 + Number(time[1]);\n }\n return [-1000000, 'max', '-', 'Jan', 1, [0, 0, 0], offset, '-'];\n }\n var year = new Date(utcTime).getUTCFullYear();\n rules = rules.filter(function (currentRule) {\n var from = currentRule[0];\n var to = currentRule[1];\n return from <= year && (to >= year || (from === year && to === \"only\") || to === \"max\");\n });\n rules.push(utcTime);\n rules.sort(function (a, b) {\n if (typeof a !== \"number\") {\n a = Number(ruleToDate(year, a, zoneOffset));\n }\n if (typeof b !== \"number\") {\n b = Number(ruleToDate(year, b, zoneOffset));\n }\n return a - b;\n });\n var rule = rules[rules.indexOf(utcTime) - 1] || rules[rules.length - 1];\n return isNaN(rule) ? rule : null;\n};\n\n/** @hidden */\nvar NO_TZ_INFO = 'The required {0} timezone information is not provided!';\n/** @hidden */\nvar INVALID_TZ_STRUCTURE = 'The provided timezone information has invalid stucture!';\nvar formatRegExp = /\\{(\\d+)}?\\}/g;\nvar flatten = function (arr) { return arr.reduce(function (a, b) { return a.concat(b); }, []); };\n/** @hidden */\nvar formatMessage = function (message) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n var flattenValues = flatten(values);\n return message.replace(formatRegExp, function (_, index) { return flattenValues[parseInt(index, 10)]; });\n};\n\n/**\n * @hidden\n *\n * A function that gets all zone rules for a specific zone.\n *\n * @param timezone - The timezone name. For example, `America/Chicago`, `Europe/Sofia`.\n *\n * @return - Returns all zone rules for the specific zone name.\n *\n * @example\n * ```ts-no-run\n * findZone('Europe/Sofia'); //[[-120,\"E-Eur\",\"EE%sT\",883526400000], [-120,\"EU\",\"EE%sT\",null]]\n * ```\n */\nvar getZoneRules = function (timezone) {\n var zones = timezones.zones;\n if (!zones) {\n throw new Error(formatMessage(NO_TZ_INFO, timezone));\n }\n var zoneRules = zones[timezone];\n var result = typeof zoneRules === \"string\" ? zones[zoneRules] : zoneRules;\n if (!result) {\n throw new Error(formatMessage(NO_TZ_INFO, timezone));\n }\n return result;\n};\n\n/**\n * @hidden\n *\n * A function that finds zone rules which become applicable after specific time.\n */\nvar findZone = function (timezone, utcTime) {\n if (utcTime === void 0) { utcTime = new Date().getTime(); }\n if (timezone === 'Etc/UTC' || timezone === 'Etc/GMT') {\n return [0, \"-\", \"UTC\", null];\n }\n var zoneRules = getZoneRules(timezone);\n var idx = zoneRules.length - 1;\n for (; idx >= 0; idx--) {\n var until = zoneRules[idx][3];\n if (until && utcTime > until) {\n break;\n }\n }\n var zone = zoneRules[idx + 1];\n if (!zone) {\n throw new Error(formatMessage(NO_TZ_INFO, timezone));\n }\n return zone;\n};\n\n/**\n * @hidden\n *\n * A function that gets the information about the zone and the rule for a specific timezone.\n *\n */\nvar zoneAndRule = function (timezone, date) {\n var utcTime = date.getTime();\n var zone = findZone(timezone, utcTime);\n return {\n rule: findRule(zone[1], utcTime, zone[0]),\n zone: zone\n };\n};\n\n// tslint:disable:max-line-length\n/**\n * A function which returns the abbreviated name of the timezone. You can specify an optional date for returning the timezone name at a different point in time. The corresponding UTC date is used for locating the relevant rule. Timezone names change both historically and when they reflect the Daylight Savings Time rules.\n *\n * @param timezone - The timezone name. For example, `America/Chicago`, `Europe/Sofia`.\n * @param date - A date for which to locate the zone rule. By default, the current time is used.\n *\n * @return - The abbreviated name of the timezone at the specified date or, if not set, returns now.\n *\n * @example\n * ```ts-no-run\n * import { abbrTimezone } from '@progress/kendo-date-math';\n * import '@progress/kendo-date-math/tz/Europe/Sofia';\n *\n * const dstDate = new Date('2018-04-01T00:00:00Z');\n * console.log(abbrTimezone('Europe/Sofia', dstDate)); // EEST\n *\n * const date = new Date('2018-01-01T00:00:00Z');\n * console.log(abbrTimezone('Europe/Sofia', date)); // EET\n * ```\n */\n// tslint:enable:max-line-length\nvar abbrTimezone = function (timezone, date) {\n if (date === void 0) { date = new Date(); }\n if (timezone === \"Etc/UTC\") {\n return 'UTC';\n }\n if (timezone === \"Etc/GMT\") {\n return 'GMT';\n }\n if (timezone === '') {\n return '';\n }\n var _a = zoneAndRule(timezone, date), zone = _a.zone, rule = _a.rule;\n var base = zone[2];\n if (base.indexOf(\"/\") >= 0) {\n return base.split(\"/\")[rule && +rule[6] ? 1 : 0];\n }\n else if (base.indexOf(\"%s\") >= 0) {\n return base.replace(\"%s\", (!rule || rule[7] === \"-\") ? '' : rule[7]);\n }\n return base;\n};\n\n// tslint:disable:max-line-length\n/**\n * A function that loads the information about the provided timezone. The details for the loaded timezone will be available to all functions that are related to the manipulation of the timezone.\n *\n * @param timezoneInfo - The information about the timezone that will be loaded.\n *\n * @example\n * ```ts-no-run\n * loadTimezone({ zones: [...], rules: [...]});\n * ```\n */\n// tslint:enable:max-line-length\nvar loadTimezone = function (tzInfo) {\n if (!tzInfo) {\n throw new Error(formatMessage(NO_TZ_INFO, ''));\n }\n var rules = tzInfo.rules, titles = tzInfo.titles, zones = tzInfo.zones;\n if (rules === undefined || zones === undefined) {\n throw new Error(INVALID_TZ_STRUCTURE);\n }\n Object.assign(timezones.rules, rules);\n Object.assign(timezones.titles, titles || {});\n Object.assign(timezones.zones, zones);\n};\n\n/**\n * @hidden\n *\n * A function that calculates the time offset based on zone name.\n *\n * @param timezone - The timezone name. For example, `America/Chicago`, `Europe/Sofia`.\n * @param date - A date for which the zone rule will be located.\n *\n * @return - Returns the timezone offset in minutes at the specified time.\n */\nvar offset = function (timezone, date) {\n if (date === void 0) { date = new Date(); }\n if (timezone === 'Etc/UTC' || timezone === 'Etc/GMT') {\n return 0;\n }\n if (timezone === '') {\n return date.getTimezoneOffset();\n }\n var _a = zoneAndRule(timezone, date), rule = _a.rule, zone = _a.zone;\n return parseFloat(rule ? zone[0] - rule[6] : zone[0]);\n};\n\n/**\n * A function that returns a list of grouped timezone names.\n *\n * @return - Returns a list of grouped timezone names.\n *\n * @example\n * ```ts-no-run\n * import '@progress/kendo-date-math/timezones/europe-berlin';\n * import '@progress/kendo-date-math/timezones/europe-sofia';\n *\n * timezoneGroupNames(); // ['(GMT+01:00) Amsterdam, Berlin, ...', '(GMT+02:00) Sofia, Tallinn...']\n * ```\n */\nvar timezoneGroupNames = function () {\n var groups = Object.keys(timezones.titles).reduce(function (tmp, t) {\n var group = timezones.titles[t].group;\n tmp[group] = group;\n return tmp;\n }, {});\n return Object.keys(groups);\n};\n\n/**\n * A function that returns the list of all timezones that are loaded.\n *\n * @return - Returns the list of all timezones that are loaded.\n *\n * @example\n * ```ts-no-run\n * import '@progress/kendo-date-math/timezones/europe-berlin';\n * import '@progress/kendo-date-math/timezones/europe-sofia';\n *\n * timezoneNames(); // ['Europe/Berlin', 'Europe/Sofia']\n * ```\n */\nvar timezoneNames = function () { return Object.keys(timezones.zones); };\n\n/**\n * A function that returns the full name of the timezone.\n *\n * @param timezone - The timezone name. For example, `America/Chicago`, `Europe/Sofia`.\n *\n * @return - Returns the full names of the timezone and the group.\n *\n * @example\n * ```ts-no-run\n * timezoneTitle('America/Chicago'); // Central Standard Time\n * ```\n */\nvar timezoneTitle = function (timezone) {\n var titles = timezones.titles;\n var info = titles[timezone] || {};\n return info.long || timezone;\n};\n\n/**\n * A function that creates a local date from the UTC date parts of the input.\n *\n * @param date - The date value that will be converted. Only the UTC date parts are read.\n * @return Date - A local date with the UTC time parts of the supplied date.\n *\n * @example\n * ```ts-no-run\n * import { toLocalDate } from '@progress/kendo-date-math'\n *\n * const date = new Date('2016-11-05');\n * const local = toLocalDate(date);\n *\n * // For example, if the browser is in GMT+0200,\n * // the local date will be shifted 2 hours back:\n * //\n * // \"Fri Nov 04 2016 22:00:00 GMT+0200\"\n * console.log(local);\n *\n * // This is the same as the UTC parts of the input date:\n * //\n * // \"2016-11-05T22:00:00.000Z\"\n * console.log(date.toISOString());\n * ```\n */\nfunction toLocalDate(date) {\n return new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds());\n}\n\nvar addMinutes = function (date, minutes) { return new Date(date.getTime() + minutes * MS_PER_MINUTE$1); };\nvar addHours = function (date, hours) { return new Date(date.getTime() + hours * MS_PER_HOUR); };\nvar dayAbbr = [\n 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'\n];\nvar monthAbbr = [\n 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dev'\n];\nvar datePrefix = function (utcDate) {\n return dayAbbr[utcDate.getUTCDay()] + ' ' + monthAbbr[utcDate.getUTCMonth()];\n};\nvar padNumber = function (num, len) {\n if (len === void 0) { len = 2; }\n var sign = num < 0 ? '-' : '';\n return sign + new Array(len).concat([Math.abs(num)]).join('0').slice(-len);\n};\nfunction isZoneMissingHour(date, timezone) {\n var currentOffset = offset(timezone, date);\n var prevHour = addHours(date, -1);\n var prevOffset = offset(timezone, prevHour);\n return currentOffset < prevOffset;\n}\nfunction shiftZoneMissingHour(utcDate, timezone) {\n // Adjust for missing hour during DST transition in timezone.\n var dstOffset = isZoneMissingHour(utcDate, timezone) ? 1 : 0;\n return addHours(utcDate, dstOffset);\n}\nfunction convertTimezoneUTC(utcLocal, fromTimezone, toTimezone) {\n if (fromTimezone === toTimezone) {\n return utcLocal;\n }\n var fromOffset = offset(fromTimezone, utcLocal);\n var toOffset = offset(toTimezone, utcLocal);\n var baseDiff = fromOffset - toOffset;\n var midDate = addMinutes(utcLocal, baseDiff);\n var midOffset = offset(toTimezone, midDate);\n var dstDiff = toOffset - midOffset;\n return addMinutes(utcLocal, baseDiff + dstDiff);\n}\nfunction formatOffset(tzOffset) {\n var sign = tzOffset <= 0 ? '+' : '-';\n var value = Math.abs(tzOffset);\n var hours = padNumber(Math.floor(value / 60));\n var minutes = padNumber(value % 60);\n return \"GMT\" + sign + hours + minutes;\n}\n/**\n * Represents a local date in a specified timezone.\n *\n * The following example demonstrates how to convert a local date to the specified timezone.\n *\n * @example\n * ```ts-no-run\n * import { ZonedDate } from '@progress/kendo-date-math';\n * import '@progress/kendo-date-math/tz/America/New_York';\n *\n * const date = new Date('2018-03-13T00:00:00Z');\n * const tzDate = ZonedDate.fromLocalDate(date, 'America/New_York');\n *\n * // If you run this example in GMT+0200,\n * // the output will be '2018-03-12T22:00:00.000Z'.\n * console.log(tzDate.toISOString());\n * ```\n *\n * The following example demonstrates how to convert between timezones.\n *\n * @example\n * ```ts-no-run\n * import { ZonedDate } from '@progress/kendo-date-math';\n * import '@progress/kendo-date-math/tz/America/New_York';\n * import '@progress/kendo-date-math/tz/America/Los_Angeles';\n *\n * // Note the \"Z\" suffix for UTC dates.\n * const date = new Date('2018-03-12T22:00:00Z');\n *\n * const tzDate = ZonedDate.fromLocalDate(date, 'America/New_York');\n * const result = tzDate.toTimezone('America/Los_Angeles');\n *\n * // Regardless of the browser timezone\n * // the output will be '2018-03-12T15:00:00.000Z'.\n * console.log(tzDate.toUTCDate());\n * ```\n */\nvar ZonedDate = /** @class */ (function () {\n // The constructor is aliased as a static fromUTCDate method\n // to clarify the meaning of the utcDate parameter.\n //\n // It can be confused for a local date time while it is in fact\n // treated as a UTC date that represents the local date in the timezone.\n function ZonedDate(utcDate, timezone) {\n this._utcDate = cloneDate(utcDate);\n this.timezone = timezone;\n var tzOffset = offset(timezone, utcDate);\n this.timezoneOffset = tzOffset;\n var localDate = shiftZoneMissingHour(utcDate, timezone);\n this._localDate = convertTimezoneUTC(localDate, timezone, 'Etc/UTC');\n }\n Object.defineProperty(ZonedDate.prototype, \"cachedLocalDate\", {\n /**\n * Returns a cached local date that denotes the exact time in the set timezone.\n *\n * @return Date - A local date that denotes the exact time in the set timezone.\n *\n * This property is an alternative to `toLocalDate()` that returns a cached value instead of cloning it.\n *\n * > Modifying the returned instance will corrupt the `ZonedDate` state.\n */\n get: function () {\n return this._localDate;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ZonedDate.prototype, \"cachedUTCDate\", {\n /**\n * Returns a cached `Date` instance with UTC date parts that are set to the local time in the set timezone.\n *\n * @returns Date - A `Date` with UTC date parts that are set to the local time in the set timezone.\n *\n * This property is an alternative to `toUTCDate()` that returns a cached value instead of cloning it.\n *\n * > Modifying the returned instance will corrupt the `ZonedDate` state.\n */\n get: function () {\n return this._utcDate;\n },\n enumerable: true,\n configurable: true\n });\n // tslint:disable:max-line-length\n /**\n * Converts an existing date to a specified timezone.\n *\n * If the `timezone` parameter is omitted, the `ZonedDate` defaults to the timezone of the browser. This concept is known as \"floating date\" because it does not represent a particular moment in time. Instead, its actual value depends on the current timezone of the browser.\n *\n * @param date - The local date that represents the actual time instance.\n * @param timezone - The ID of the timezone that will be assumed. For example, `Europe/Sofia`.\n * @return ZonedDate - The date in the specified timezone.\n *\n * @example\n * ```ts-no-run\n * import { ZonedDate } from '@progress/kendo-date-math';\n * import '@progress/kendo-date-math/tz/America/New_York';\n *\n * const date = new Date('2018-03-13T00:00:00');\n * const tzDate = ZonedDate.fromLocalDate(date, 'America/New_York');\n *\n * // If you run this example in GMT+0200,\n * // the output will be 'Mon Mar 12 2018 18:00:00 GMT+0200 (EET)'.\n * console.log(tzDate.toString());\n *\n * // If you run this example in UTC,\n * // the output will be '2018-03-12T22:00:00.000Z'.\n * console.log(tzDate.toISOString());\n * ```\n */\n // tslint:enable:max-line-length\n ZonedDate.fromLocalDate = function (date, timezone) {\n if (timezone === void 0) { timezone = ''; }\n var utcDate = convertTimezoneUTC(date, 'Etc/UTC', timezone);\n var shiftZone = isZoneMissingHour(utcDate, timezone);\n var zoneOffset = offset(timezone, utcDate);\n var fixedOffset = 0;\n if (shiftZone) {\n // Adjust for the missing hour during the DST transition in the timezone.\n fixedOffset = zoneOffset > 0 ? -1 : 1;\n }\n var adjDate = addHours(utcDate, fixedOffset);\n return ZonedDate.fromUTCDate(adjDate, timezone);\n };\n // tslint:disable:max-line-length\n /**\n * Creates a date in a specific timezone from the UTC date parts of the supplied `Date`.\n *\n * If the `timezone` parameter is omitted, the `ZonedDate` defaults to the timezone of the browser. This concept is known as \"floating date\" because it does not represent a particular moment in time. Instead, its actual value depends on the current timezone of the browser.\n *\n * @param date - The UTC date that represents the time in the target zone. This time is not the actual time instant in UTC.\n * @param timezone - The ID of the timezone that will be assumed. For example, `Europe/Sofia`.\n * @return ZonedDate - The date in the specified timezone.\n *\n * @example\n * ```ts-no-run\n * import { ZonedDate } from '@progress/kendo-date-math';\n * import '@progress/kendo-date-math/tz/America/New_York';\n *\n * // Note the \"Z\" suffix for UTC dates.\n * const date = new Date('2018-03-12T18:00:00Z');\n *\n * // Alternative syntax using Date.UTC\n * // const date = new Date(Date.UTC(2018, 2, 12, 18, 0));\n *\n * const tzDate = ZonedDate.fromUTCDate(date, 'America/New_York');\n *\n * // Regardless of the browser timezone\n * // the output will be 'Mon Mar 12 2018 18:00:00 GMT+0200 (EET)'.\n * console.log(tzDate.toString());\n *\n * // Regardless of the browser timezone\n * // the output in UTC will be '2018-03-12T22:00:00.000Z'.\n * console.log(tzDate.toISOString());\n * ```\n */\n // tslint:enable:max-line-length\n ZonedDate.fromUTCDate = function (utcDate, timezone) {\n if (timezone === void 0) { timezone = ''; }\n return new ZonedDate(utcDate, timezone);\n };\n /**\n * Returns a local date that denotes the exact time in the set timezone.\n *\n * @return Date - A local date that denotes the exact time in the set timezone.\n *\n * @example\n * ```ts-no-run\n * import { ZonedDate } from '@progress/kendo-date-math';\n * import '@progress/kendo-date-math/tz/America/New_York';\n *\n * // Note the \"Z\" suffix for UTC dates.\n * const date = new Date('2018-03-12T18:00:00Z');\n * const tzDate = ZonedDate.fromUTCDate(date, 'America/New_York');\n *\n * // The local date represents the same moment in time as the ZonedDate:\n * // `2018-03-12T22:00:00.000Z`.\n * console.log(tzDate.toLocalDate().toISOString());\n *\n * // The local date will apply the timezone of the browser. For example,\n * // `Tue Mar 13 2018 00:00:00 GMT+0200 (Eastern European Standard Time)`.\n * console.log(tzDate.toLocalDate().toString())\n * ```\n */\n ZonedDate.prototype.toLocalDate = function () {\n return cloneDate(this._localDate);\n };\n /**\n * Returns a `Date` instance with UTC date parts that are set to the local time in the set timezone.\n *\n * @returns Date - A `Date` with UTC date parts that are set to the local time in the set timezone.\n *\n * @example\n * ```ts-no-run\n * import { ZonedDate } from '@progress/kendo-date-math';\n * import '@progress/kendo-date-math/tz/America/New_York';\n *\n * // Note the \"Z\" suffix for UTC dates.\n * const date = new Date('2018-03-12T18:00:00Z');\n * const tzDate = ZonedDate.fromUTCDate(date, 'America/New_York');\n *\n * // Regardless of the browser timezone\n * // the output will be '2018-03-12T18:00:00.000Z'.\n * console.log(tzDate.toUTCDate());\n * ```\n */\n ZonedDate.prototype.toUTCDate = function () {\n return cloneDate(this._utcDate);\n };\n /**\n * Converts the date to the specified timezone.\n *\n * @param toTimezone - The timezone to which the values will be converted. For example, `America/Los_Angeles`.\n * @returns ZonedDate - The resulting zoned date.\n *\n * @example\n * ```ts-no-run\n * import { ZonedDate } from '@progress/kendo-date-math';\n * import '@progress/kendo-date-math/tz/America/New_York';\n * import '@progress/kendo-date-math/tz/America/Los_Angeles';\n *\n * // Note the \"Z\" suffix for UTC dates.\n * const date = new Date('2018-03-12T22:00:00Z');\n *\n * const tzDate = ZonedDate.fromLocalDate(date, 'America/New_York');\n * const result = tzDate.toTimezone('America/Los_Angeles');\n *\n * // Regardless of the browser timezone\n * // the output will be '2018-03-12T15:00:00.000Z'.\n * console.log(tzDate.toUTCDate());\n * ```\n */\n ZonedDate.prototype.toTimezone = function (toTimezone) {\n if (this.timezone === toTimezone) {\n return this.clone();\n }\n var tzOffset = offset(this.timezone, this._utcDate);\n var date = addMinutes(this._utcDate, tzOffset);\n return ZonedDate.fromLocalDate(date, toTimezone);\n };\n /**\n * Returns a new instance that represents the same date.\n *\n * @returns Date - A copy of the instance of the current zoned date.\n */\n ZonedDate.prototype.clone = function () {\n return ZonedDate.fromUTCDate(this._utcDate, this.timezone);\n };\n // tslint:disable:max-line-length\n /**\n * Adds the specified number of days and returns a new instance with the resulting date in the same timezone.\n *\n * @param days - The number of days that will be added.\n * @returns ZonedDate - The resulting date.\n */\n // tslint:enable:max-line-length\n ZonedDate.prototype.addDays = function (days) {\n var newDate = new Date(this._utcDate.getTime());\n newDate.setUTCDate(newDate.getUTCDate() + days);\n return ZonedDate.fromUTCDate(newDate, this.timezone);\n };\n // tslint:disable:max-line-length\n /**\n * Adds the specified number of milliseconds and returns a new instance with the resulting date in the same timezone.\n *\n * The method compensates for DST transitions and ensures that the resulting date occurs exactly after the set amount of time in the timezone.\n *\n * @param milliseconds - The number of days that will be added.\n * @returns ZonedDate - The resulting date.\n */\n // tslint:enable:max-line-length\n ZonedDate.prototype.addTime = function (milliseconds) {\n var utcDate = new Date(this._utcDate.getTime());\n var utcMid = shiftZoneMissingHour(utcDate, this.timezone);\n utcMid.setTime(utcMid.getTime() + milliseconds);\n var utcResult = shiftZoneMissingHour(utcMid, this.timezone);\n return ZonedDate.fromUTCDate(utcResult, this.timezone);\n };\n // tslint:disable:max-line-length\n /**\n * Returns a new instance of the same zoned date having its time parts set to `00:00:00.000`.\n *\n * @returns ZonedDate - The same date having its time parts set to `00:00:00.000`.\n */\n // tslint:enable:max-line-length\n ZonedDate.prototype.stripTime = function () {\n var date = this._utcDate;\n var ticks = Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0);\n return ZonedDate.fromUTCDate(new Date(ticks), this.timezone);\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.getTime = function () {\n return this._localDate.getTime();\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.getTimezoneOffset = function () {\n return this.timezoneOffset;\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.getFullYear = function () {\n return this._utcDate.getUTCFullYear();\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.getMonth = function () {\n return this._utcDate.getUTCMonth();\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.getDate = function () {\n return this._utcDate.getUTCDate();\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.getDay = function () {\n return this._utcDate.getUTCDay();\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.getHours = function () {\n return this._utcDate.getUTCHours();\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.getMinutes = function () {\n return this._utcDate.getUTCMinutes();\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.getSeconds = function () {\n return this._utcDate.getUTCSeconds();\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.getMilliseconds = function () {\n return this._utcDate.getUTCMilliseconds();\n };\n // The local date UTC parts represent actual UTC time\n /**\n * @hidden\n */\n ZonedDate.prototype.getUTCDate = function () {\n return this._localDate.getUTCDate();\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.getUTCDay = function () {\n return this._localDate.getUTCDay();\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.getUTCFullYear = function () {\n return this._localDate.getUTCFullYear();\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.getUTCHours = function () {\n return this._localDate.getUTCHours();\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.getUTCMilliseconds = function () {\n return this._localDate.getUTCMilliseconds();\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.getUTCMinutes = function () {\n return this._localDate.getUTCMinutes();\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.getUTCMonth = function () {\n return this._localDate.getUTCMonth();\n };\n /** @hidden */\n ZonedDate.prototype.getUTCSeconds = function () {\n return this._localDate.getUTCSeconds();\n };\n /** @hidden */\n ZonedDate.prototype.setTime = function (time) {\n throw new Error(\"Method not implemented.\");\n };\n /** @hidden */\n ZonedDate.prototype.setMilliseconds = function (ms) {\n throw new Error(\"Method not implemented.\");\n };\n /** @hidden */\n ZonedDate.prototype.setUTCMilliseconds = function (ms) {\n throw new Error(\"Method not implemented.\");\n };\n /** @hidden */\n ZonedDate.prototype.setSeconds = function (sec, ms) {\n throw new Error(\"Method not implemented.\");\n };\n /** @hidden */\n ZonedDate.prototype.setUTCSeconds = function (sec, ms) {\n throw new Error(\"Method not implemented.\");\n };\n /** @hidden */\n ZonedDate.prototype.setMinutes = function (min, sec, ms) {\n throw new Error(\"Method not implemented.\");\n };\n /** @hidden */\n ZonedDate.prototype.setUTCMinutes = function (min, sec, ms) {\n throw new Error(\"Method not implemented.\");\n };\n /** @hidden */\n ZonedDate.prototype.setHours = function (hours, min, sec, ms) {\n throw new Error(\"Method not implemented.\");\n };\n /** @hidden */\n ZonedDate.prototype.setUTCHours = function (hours, min, sec, ms) {\n throw new Error(\"Method not implemented.\");\n };\n /** @hidden */\n ZonedDate.prototype.setDate = function (date) {\n throw new Error(\"Method not implemented.\");\n };\n /** @hidden */\n ZonedDate.prototype.setUTCDate = function (date) {\n throw new Error(\"Method not implemented.\");\n };\n /** @hidden */\n ZonedDate.prototype.setMonth = function (month, date) {\n throw new Error(\"Method not implemented.\");\n };\n /** @hidden */\n ZonedDate.prototype.setUTCMonth = function (month, date) {\n throw new Error(\"Method not implemented.\");\n };\n /** @hidden */\n ZonedDate.prototype.setFullYear = function (year, month, date) {\n throw new Error(\"Method not implemented.\");\n };\n /** @hidden */\n ZonedDate.prototype.setUTCFullYear = function (year, month, date) {\n throw new Error(\"Method not implemented.\");\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.toISOString = function () {\n return this._localDate.toISOString();\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.toJSON = function () {\n return this._localDate.toJSON();\n };\n /**\n * @hidden\n */\n ZonedDate.prototype.toString = function () {\n var dateString = datePrefix(this._utcDate);\n var timeString = this.toTimeString();\n return dateString + \" \" + this.getDate() + \" \" + this.getFullYear() + \" \" + timeString;\n };\n /** @hidden */\n ZonedDate.prototype.toDateString = function () {\n return toLocalDate(this._utcDate).toDateString();\n };\n /** @hidden */\n ZonedDate.prototype.toTimeString = function () {\n var hours = padNumber(this.getHours());\n var minutes = padNumber(this.getMinutes());\n var seconds = padNumber(this.getSeconds());\n var time = hours + \":\" + minutes + \":\" + seconds;\n var tzOffset = formatOffset(this.timezoneOffset);\n var abbrev = abbrTimezone(this.timezone, this._utcDate);\n if (abbrev) {\n abbrev = \" (\" + abbrev + \")\";\n }\n return time + \" \" + tzOffset + abbrev;\n };\n ZonedDate.prototype.toLocaleString = function (locales, options) {\n return this._localDate.toLocaleString(locales, options);\n };\n ZonedDate.prototype.toLocaleDateString = function (locales, options) {\n return this._localDate.toLocaleDateString(locales, options);\n };\n ZonedDate.prototype.toLocaleTimeString = function (locales, options) {\n return this._localDate.toLocaleTimeString(locales, options);\n };\n /** @hidden */\n ZonedDate.prototype.toUTCString = function () {\n return this.toTimezone('Etc/UTC').toString();\n };\n ZonedDate.prototype[Symbol.toPrimitive] = function (hint) {\n if (hint === 'string' || hint === 'default') {\n return this.toString();\n }\n return this._localDate.getTime();\n };\n /** @hidden */\n ZonedDate.prototype.valueOf = function () {\n return this.getTime();\n };\n /** @hidden */\n ZonedDate.prototype.getVarDate = function () {\n throw new Error('Not implemented.');\n };\n /** @hidden */\n ZonedDate.prototype.format = function (_) {\n throw new Error('Not implemented.');\n };\n /** @hidden */\n ZonedDate.prototype.formatUTC = function (_) {\n throw new Error('Not implemented.');\n };\n return ZonedDate;\n}());\n\n/**\n * A function that returns all timezones which match the title of the zone.\n *\n * @param group - The fully qualified zone title. For example, Central Standard Time.\n *\n * @return - Returns the list of all matching timezone names. For example, `[America/Chicago, ...]`.\n *\n * @example\n * ```ts-no-run\n * zonesPerGroup('(GMT+01:00) Amsterdam, Berlin'); // ['Europe/Amsterdam', 'Europe/Berlin'...]\n * ```\n */\nvar zonesPerGroup = function (group) {\n var titles = timezones.titles;\n return Object.keys(titles).reduce(function (result, title) {\n var info = titles[title] || {};\n return info.group === group ? result.concat(title.split(' ')) : result;\n }, []);\n};\n\nvar moveDateToWeekStart = function (date, weekStartDay) {\n if (weekStartDay !== Day.Monday) {\n return addDays(prevDayOfWeek(date, weekStartDay), 4);\n }\n return addDays(date, (4 - (date.getDay() || 7)));\n};\nvar calcWeekInYear = function (date, weekStartDay) {\n var firstWeekInYear = createDate(date.getFullYear(), 0, 1, -6);\n var newDate = moveDateToWeekStart(date, weekStartDay);\n var diffInMS = newDate.getTime() - firstWeekInYear.getTime();\n var days = Math.floor(diffInMS / MS_PER_DAY);\n return 1 + Math.floor(days / 7);\n};\n/**\n * A function that returns the number of the week within a year, which is calculated in relation to the date.\n *\n * For more information, refer to the [**ISO week date**](https://en.wikipedia.org/wiki/ISO_week_date) article.\n *\n * @param date - The date used for the week number calculation.\n * @param weekStartDay - The first day of the week. By default, the first week day is Monday.\n * @returns - The number of the week within the year.\n *\n * @example\n * ```ts-no-run\n * weekInYear(new Date(2016, 0, 1)); // Week 53, 2015\n * weekInYear(new Date(2016, 0, 5)); // Week 1, 2016\n * weekInYear(new Date(2017, 0, 1)); // Week 52, 2016\n * weekInYear(new Date(2017, 0, 2)); // Week 1, 2017\n * ```\n */\nvar weekInYear = function (date, weekStartDay) {\n if (weekStartDay === void 0) { weekStartDay = Day.Monday; }\n date = getDate(date);\n var prevWeekDate = addDays(date, -7);\n var nextWeekDate = addDays(date, 7);\n var weekNumber = calcWeekInYear(date, weekStartDay);\n if (weekNumber === 0) {\n return calcWeekInYear(prevWeekDate, weekStartDay) + 1;\n }\n if (weekNumber === 53 && calcWeekInYear(nextWeekDate, weekStartDay) > 1) {\n return 1;\n }\n return weekNumber;\n};\n\nvar Mask = /** @class */ (function () {\n function Mask() {\n this.symbols = '';\n this.partMap = [];\n }\n return Mask;\n}());\n\nvar Constants = {\n formatSeparator: \"_\",\n twoDigitYearMax: 68,\n defaultDateFormat: \"d\",\n defaultLocaleId: \"en\"\n};\n\nvar Key = {\n DELETE: \"Delete\",\n BACKSPACE: \"Backspace\",\n TAB: \"Tab\",\n ENTER: \"Enter\",\n ESCAPE: \"Escape\",\n ARROW_LEFT: \"ArrowLeft\",\n ARROW_UP: \"ArrowUp\",\n ARROW_RIGHT: \"ArrowRight\",\n ARROW_DOWN: \"ArrowDown\",\n SPACE: \" \",\n END: \"End\",\n HOME: \"Home\",\n PAGE_UP: \"PageUp\",\n PAGE_DOWN: \"PageDown\"\n};\n\n/**\n * @hidden\n */\nvar padZero = function (length) { return new Array(Math.max(length, 0)).fill('0').join(''); };\n/**\n * @hidden\n */\nvar unpadZero = function (value) { return value.replace(/^0*/, ''); };\n/**\n * @hidden\n */\nvar approximateStringMatching = function (_a) {\n /*\n Remove the right part of the cursor.\n oldFormat = oldFormat.substring(0, caret + oldText.length - newText.length);\n */\n var oldText = _a.oldText, newText = _a.newText, formatPattern = _a.formatPattern, selectionStart = _a.selectionStart, isInCaretMode = _a.isInCaretMode, keyEvent = _a.keyEvent;\n var oldTextSeparator = oldText[selectionStart + oldText.length - newText.length];\n var oldSegmentText = oldText.substring(0, selectionStart + oldText.length - newText.length);\n var newSegmentText = newText.substring(0, selectionStart);\n var diff = [];\n /* Handle the typing of a single character over the same selection. */\n if (oldSegmentText === newSegmentText && selectionStart > 0) {\n diff.push([formatPattern[selectionStart - 1], newSegmentText[selectionStart - 1]]);\n return diff;\n }\n if (oldSegmentText.indexOf(newSegmentText) === 0 && (isInCaretMode &&\n (keyEvent.key === Key.DELETE || keyEvent.key === Key.BACKSPACE)) ||\n (oldSegmentText.indexOf(newSegmentText) === 0 && !isInCaretMode &&\n (newSegmentText.length === 0 ||\n formatPattern[newSegmentText.length - 1] !== formatPattern[newSegmentText.length]))) {\n /* Handle Delete/Backspace. */\n var deletedSymbol = '';\n /*\n The whole text is replaced by the same character.\n A nasty patch is required to keep the selection in the first segment.\n */\n if (!isInCaretMode && newSegmentText.length === 1) {\n diff.push([formatPattern[0], newSegmentText[0]]);\n }\n for (var i = newSegmentText.length; i < oldSegmentText.length; i++) {\n if (formatPattern[i] !== deletedSymbol && formatPattern[i] !== Constants.formatSeparator) {\n deletedSymbol = formatPattern[i];\n diff.push([deletedSymbol, '']);\n }\n }\n return diff;\n }\n /*\n Handle the insertion of the text (the new text is longer than the previous one).\n Handle the typing over a literal as well.\n */\n if ((isInCaretMode &&\n (newSegmentText.indexOf(oldSegmentText) === 0 ||\n formatPattern[selectionStart - 1] === Constants.formatSeparator)) ||\n (!isInCaretMode &&\n (newSegmentText.indexOf(oldSegmentText) === 0 ||\n formatPattern[selectionStart - 1] === Constants.formatSeparator))) {\n var symbol = formatPattern[0];\n for (var i = Math.max(0, oldSegmentText.length - 1); i < formatPattern.length; i++) {\n if (formatPattern[i] !== Constants.formatSeparator) {\n symbol = formatPattern[i];\n break;\n }\n }\n return [[symbol, newSegmentText[selectionStart - 1]]];\n }\n /* Handle the entering of a space or a separator for navigating to the next item. */\n if ((newSegmentText[newSegmentText.length - 1] === ' ') ||\n (newSegmentText[newSegmentText.length - 1] === oldTextSeparator)) {\n return [[formatPattern[selectionStart - 1], Constants.formatSeparator]];\n }\n /* Handle typing over a correctly selected part. */\n var result = [[formatPattern[selectionStart - 1], newSegmentText[selectionStart - 1]]];\n return result;\n};\n/**\n * @hidden\n */\nvar dateSymbolMap = function (map, part) {\n map[part.pattern[0]] = part.type;\n return map;\n};\n/**\n * @hidden\n */\nvar isInRange = function (candidate, min, max) { return (candidate === null || !((min && min > candidate) || (max && max < candidate))); };\n\nvar isObject = function (value) { return value && typeof (value) === \"object\" && !Array.isArray(value); };\nvar isHtmlElement = function (element) { return element instanceof HTMLElement; };\nvar dateSetter = function (method) { return function (date, value) {\n var clone = cloneDate(date);\n clone[method](value);\n return clone;\n}; };\n/**\n * @hidden\n */\nvar isPresent = function (value) { return value !== undefined && value !== null; };\n/**\n * @hidden\n */\nvar isDocumentAvailable = function () { return !!document; };\n/**\n * @hidden\n */\nvar isNumber = function (value) { return isPresent(value) && typeof (value) === \"number\" && !Number.isNaN(value); };\n/**\n * @hidden\n */\nvar parseToInt = function (value) { return parseInt(value, 10); };\n/**\n * @hidden\n */\nvar clamp = function (value, min, max) { return Math.min(max, Math.max(min, value)); };\n/**\n * @hidden\n */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nvar extend = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return Object.assign.apply(Object, args);\n};\n/**\n * @hidden\n */\nvar deepExtend = function (target) {\n var _a, _b;\n var sources = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n sources[_i - 1] = arguments[_i];\n }\n if (!sources.length) {\n return target;\n }\n var source = sources.shift();\n if (isObject(target) && isObject(source)) {\n for (var key in source) {\n if (isHtmlElement(source[key])) {\n target[key] = source[key];\n }\n else if (isObject(source[key]) && !(source[key] instanceof Date)) {\n if (!target[key] || !isObject(target[key])) {\n extend(target, (_a = {}, _a[key] = {}, _a));\n }\n deepExtend(target[key], source[key]);\n }\n else {\n extend(target, (_b = {}, _b[key] = source[key], _b));\n }\n }\n }\n return deepExtend.apply(void 0, [target].concat(sources));\n};\n/**\n * @hidden\n */\nvar noop = function () { };\n/**\n * @hidden\n */\nvar isFunction = function (fn) { return typeof (fn) === \"function\"; };\n/**\n * @hidden\n */\nvar cropTwoDigitYear = function (date) {\n if (!isPresent(date) || isNaN(date.getTime())) {\n return 0;\n }\n return Number(date\n .getFullYear()\n .toString()\n .slice(-2));\n};\n/**\n * @hidden\n */\nvar setYears = dateSetter('setFullYear');\n/**\n * @hidden\n */\nvar millisecondDigitsInFormat = function (format) {\n var result = format && format.match(/S+(\\1)/);\n return result ? result[0].length : 0;\n};\n/**\n * @hidden\n */\nvar millisecondStepFor = function (digits) {\n return Math.pow(10, 3 - digits);\n};\n/**\n * @hidden\n */\nvar areDatePartsEqualTo = function (date, year, month, day, hour, minutes, seconds, milliseconds) {\n if (date &&\n date.getFullYear() === year &&\n date.getMonth() === month &&\n date.getDate() === day &&\n date.getHours() === hour &&\n date.getMinutes() === minutes &&\n date.getSeconds() === seconds &&\n date.getMilliseconds() === milliseconds) {\n return true;\n }\n return false;\n};\n/**\n * @hidden\n */\nvar isValidDate = function (value) { return isPresent(value) && value.getTime && isNumber(value.getTime()); };\n\nvar PREVIOUS_CENTURY_BASE = 1900;\nvar CURRENT_CENTURY_BASE = 2000;\nvar SHORT_PATTERN_LENGTH_REGEXP = /d|M|H|h|m|s/;\nvar MONTH_PART_WITH_WORDS_THRESHOLD = 2;\nvar MONTH_SYMBOL = \"M\";\n// JS months start from 0 (January) instead of 1 (January)\nvar JS_MONTH_OFFSET = 1;\nvar DateObject = /** @class */ (function () {\n function DateObject(_a) {\n var intlService = _a.intlService, formatPlaceholder = _a.formatPlaceholder, format = _a.format, _b = _a.cycleTime, cycleTime = _b === void 0 ? false : _b, _c = _a.twoDigitYearMax, twoDigitYearMax = _c === void 0 ? Constants.twoDigitYearMax : _c, _d = _a.value, value = _d === void 0 ? null : _d, _e = _a.autoCorrectParts, autoCorrectParts = _e === void 0 ? true : _e;\n this.year = true;\n this.month = true;\n this.date = true;\n this.hours = true;\n this.minutes = true;\n this.seconds = true;\n this.milliseconds = true;\n this.dayperiod = true;\n this.leadingZero = null;\n this.typedMonthPart = '';\n this.knownParts = 'adHhmMsEyS';\n this.symbols = {\n 'E': 'E',\n 'H': 'H',\n 'M': 'M',\n 'a': 'a',\n 'd': 'd',\n 'h': 'h',\n 'm': 'm',\n 's': 's',\n 'y': 'y',\n 'S': 'S'\n };\n this._value = getDate(new Date());\n this.cycleTime = false;\n this._partiallyInvalidDate = {\n startDate: null,\n invalidDateParts: {\n 'E': { value: null, date: null, startDateOffset: 0 },\n 'H': { value: null, date: null, startDateOffset: 0 },\n 'M': { value: null, date: null, startDateOffset: 0 },\n 'a': { value: null, date: null, startDateOffset: 0 },\n 'd': { value: null, date: null, startDateOffset: 0 },\n 'h': { value: null, date: null, startDateOffset: 0 },\n 'm': { value: null, date: null, startDateOffset: 0 },\n 's': { value: null, date: null, startDateOffset: 0 },\n 'y': { value: null, date: null, startDateOffset: 0 },\n 'S': { value: null, date: null, startDateOffset: 0 }\n }\n };\n this.setOptions({\n intlService: intlService,\n formatPlaceholder: formatPlaceholder,\n format: format,\n cycleTime: cycleTime,\n twoDigitYearMax: twoDigitYearMax,\n value: value,\n autoCorrectParts: autoCorrectParts\n });\n if (!value) {\n this._value = getDate(new Date());\n var sampleFormat = this.dateFormatString(this.value, this.format).symbols;\n for (var i = 0; i < sampleFormat.length; i++) {\n this.setExisting(sampleFormat[i], false);\n }\n }\n else {\n this._value = cloneDate(value);\n }\n }\n Object.defineProperty(DateObject.prototype, \"value\", {\n get: function () {\n return this._value;\n },\n set: function (value) {\n if (value && !(value instanceof Date)) {\n // throw new Error(\"The 'value' should be a valid JavaScript Date instance.\");\n return;\n }\n this._value = value;\n this.resetInvalidDate();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DateObject.prototype, \"localeId\", {\n get: function () {\n var localeId = Constants.defaultLocaleId;\n var cldrKeys = Object.keys(this.intl.cldr);\n for (var i = 0; i < cldrKeys.length; i++) {\n var key = cldrKeys[i];\n var value = this.intl.cldr[key];\n if (value.name && value.calendar && value.numbers &&\n value.name !== Constants.defaultLocaleId) {\n localeId = value.name;\n break;\n }\n }\n return localeId;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @hidden\n */\n DateObject.prototype.setOptions = function (options) {\n this.intl = options.intlService;\n this.formatPlaceholder = options.formatPlaceholder || 'wide';\n this.format = options.format;\n this.cycleTime = options.cycleTime;\n this.monthNames = this.allFormattedMonths(this.localeId);\n this.dayPeriods = this.allDayPeriods(this.localeId);\n this.twoDigitYearMax = options.twoDigitYearMax;\n this.autoCorrectParts = options.autoCorrectParts;\n };\n DateObject.prototype.setValue = function (value) {\n if (!value) {\n this._value = getDate(new Date());\n this.modifyExisting(false);\n }\n else if (!isEqual(value, this._value)) {\n this._value = cloneDate(value);\n this.modifyExisting(true);\n }\n this.resetInvalidDate();\n };\n /**\n * @hidden\n */\n DateObject.prototype.hasValue = function () {\n var _this = this;\n var pred = function (a, p) { return a || p.type !== 'literal' && p.type !== 'dayperiod' && _this.getExisting(p.pattern[0]); };\n return this.intl.splitDateFormat(this.format, this.localeId).reduce(pred, false);\n };\n /**\n * @hidden\n */\n DateObject.prototype.getValue = function () {\n for (var i = 0; i < this.knownParts.length; i++) {\n if (!this.getExisting(this.knownParts[i])) {\n return null;\n }\n }\n return cloneDate(this.value);\n };\n /**\n * @hidden\n */\n DateObject.prototype.getFormattedDate = function (format) {\n return this.intl.formatDate(this.getValue(), format, this.localeId);\n };\n /**\n * @hidden\n */\n DateObject.prototype.getTextAndFormat = function (customFormat) {\n if (customFormat === void 0) { customFormat = \"\"; }\n var format = customFormat || this.format;\n var text = this.intl.formatDate(this.value, format, this.localeId);\n var mask = this.dateFormatString(this.value, format);\n if (!this.autoCorrectParts && this._partiallyInvalidDate.startDate) {\n var partiallyInvalidText = \"\";\n var formattedDate = this.intl.formatDate(this.value, format, this.localeId);\n var formattedDates = this.getFormattedInvalidDates(format);\n for (var i = 0; i < formattedDate.length; i++) {\n var symbol = mask.symbols[i];\n if (mask.partMap[i].type === \"literal\") {\n partiallyInvalidText += text[i];\n }\n else if (this.getInvalidDatePartValue(symbol)) {\n var partsForSegment = this.getPartsForSegment(mask, i);\n if (symbol === \"M\") {\n var datePartText = (parseToInt(this.getInvalidDatePartValue(symbol)) + JS_MONTH_OFFSET).toString();\n if (partsForSegment.length > MONTH_PART_WITH_WORDS_THRESHOLD) {\n partiallyInvalidText += formattedDates[symbol][i];\n }\n else {\n if (this.getInvalidDatePartValue(symbol)) {\n var formattedDatePart = padZero(partsForSegment.length - datePartText.length) + datePartText;\n partiallyInvalidText += formattedDatePart;\n // add -1 as the first character in the segment is at index i\n i += partsForSegment.length - 1;\n }\n else {\n partiallyInvalidText += formattedDates[symbol][i];\n }\n }\n }\n else {\n if (this.getInvalidDatePartValue(symbol)) {\n var datePartText = this.getInvalidDatePartValue(symbol).toString();\n var formattedDatePart = padZero(partsForSegment.length - datePartText.length) + datePartText;\n partiallyInvalidText += formattedDatePart;\n // add -1 as the first character in the segment is at index i\n i += partsForSegment.length - 1;\n }\n else {\n partiallyInvalidText += formattedDates[symbol][i];\n }\n }\n }\n else {\n partiallyInvalidText += text[i];\n }\n }\n text = partiallyInvalidText;\n }\n var result = this.merge(text, mask);\n return result;\n };\n /**\n * @hidden\n */\n DateObject.prototype.getFormattedInvalidDates = function (customFormat) {\n var _this = this;\n if (customFormat === void 0) { customFormat = \"\"; }\n var format = customFormat || this.format;\n var formattedDatesForSymbol = {\n 'E': '',\n 'H': '',\n 'M': '',\n 'a': '',\n 'd': '',\n 'h': '',\n 'm': '',\n 's': '',\n 'y': '',\n 'S': ''\n };\n Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(function (key) {\n var date = _this.getInvalidDatePart(key).date;\n if (date) {\n var formattedInvalidDate = _this.intl.formatDate(date, format, _this.localeId);\n formattedDatesForSymbol[key] = formattedInvalidDate;\n }\n });\n return formattedDatesForSymbol;\n };\n DateObject.prototype.modifyExisting = function (value) {\n var sampleFormat = this.dateFormatString(this.value, this.format).symbols;\n for (var i = 0; i < sampleFormat.length; i++) {\n this.setExisting(sampleFormat[i], value);\n }\n };\n /**\n * @hidden\n */\n DateObject.prototype.getExisting = function (symbol) {\n switch (symbol) {\n case 'y': return this.year;\n case 'M':\n case 'L': return this.month;\n case 'd': return this.date;\n case 'E': return this.date && this.month && this.year;\n case 'h':\n case 'H': return this.hours;\n case 't':\n case 'a': return this.dayperiod;\n case 'm': return this.minutes;\n case 's': return this.seconds;\n case \"S\": return this.milliseconds;\n default:\n return true;\n }\n };\n DateObject.prototype.setExisting = function (symbol, value) {\n switch (symbol) {\n case 'y':\n // allow 2/29 dates\n this.year = value;\n if (value === false) {\n this._value.setFullYear(2000);\n }\n break;\n case 'M':\n // make sure you can type 31 in the day part\n this.month = value;\n if (value === false) {\n if (this.autoCorrectParts) {\n this._value.setMonth(0);\n }\n }\n break;\n case 'd':\n this.date = value;\n break;\n case 'h':\n case 'H':\n this.hours = value;\n break;\n case 't':\n case 'a':\n this.dayperiod = value;\n break;\n case 'm':\n this.minutes = value;\n break;\n case 's':\n this.seconds = value;\n break;\n case \"S\":\n this.milliseconds = value;\n break;\n default:\n break;\n }\n if (this.getValue()) {\n this.resetInvalidDate();\n }\n };\n DateObject.prototype.modifyPart = function (symbol, offset) {\n if (!isPresent(symbol) || !isPresent(offset) || offset === 0) {\n return;\n }\n var newValue = cloneDate(this.value);\n var timeModified = false;\n var invalidDateFound;\n var isMonth = symbol === \"M\";\n var isDay = symbol === \"d\" || symbol === \"E\";\n var symbolExists = this.getExisting(symbol);\n if (!this.autoCorrectParts && (isDay || isMonth)) {\n var invalidDateParts = this._partiallyInvalidDate.invalidDateParts || {};\n var invalidDatePartValue = this.getInvalidDatePartValue(symbol);\n var year = invalidDateParts.y.value || newValue.getFullYear();\n var month = invalidDateParts.M.value || newValue.getMonth();\n var day = invalidDateParts.d.value || invalidDateParts.E.value || newValue.getDate();\n var hour = invalidDateParts.h.value || invalidDateParts.H.value || newValue.getHours();\n var minutes = invalidDateParts.m.value || newValue.getMinutes();\n var seconds = invalidDateParts.s.value || newValue.getSeconds();\n var milliseconds = invalidDateParts.S.value || newValue.getMilliseconds();\n switch (symbol) {\n case 'y':\n year += offset;\n break;\n case 'M':\n month += offset;\n break;\n case 'd':\n case 'E':\n day += offset;\n break;\n // case 'h':\n // case 'H': hour += offset; break;\n // case 'm': minutes += offset; break;\n // case 's': seconds += offset; break;\n // case 'S': milliseconds += offset; break;\n default: break;\n }\n if (symbol === \"M\") {\n if ((month < 0 || month > 11)) {\n if (symbolExists) {\n this.setExisting(symbol, false);\n this.resetInvalidDateSymbol(symbol);\n return;\n }\n }\n if (!symbolExists) {\n if (month < 0) {\n month = clamp(11 + ((month % 11) + 1), 0, 11);\n }\n else {\n var monthValue = isPresent(invalidDatePartValue) ?\n month :\n ((offset - JS_MONTH_OFFSET) % 12);\n month = clamp(monthValue, 0, 11);\n }\n month = clamp(month, 0, 11);\n }\n month = clamp(month, 0, 11);\n }\n else if (symbol === \"d\") {\n if (symbolExists) {\n if (day <= 0 || day > 31) {\n this.setExisting(symbol, false);\n this.resetInvalidDateSymbol(symbol);\n return;\n }\n }\n else if (!symbolExists) {\n if (isPresent(invalidDatePartValue)) {\n if (day <= 0 || day > 31) {\n this.setExisting(symbol, false);\n this.resetInvalidDateSymbol(symbol);\n return;\n }\n }\n if (offset < 0) {\n var dayValue = isPresent(invalidDatePartValue) ? day : 1 + (31 - Math.abs(offset % 31));\n day = clamp(dayValue, 1, 31);\n }\n else {\n var dayValue = isPresent(invalidDatePartValue) ? day : offset % 31;\n day = clamp(dayValue, 1, 31);\n }\n day = clamp(day, 1, 31);\n }\n }\n var dateCandidate = createDate(year, month, day, hour, minutes, seconds, milliseconds);\n var newValueCandidate = isMonth || isDay ?\n this.modifyDateSymbolWithValue(newValue, symbol, isMonth ? month : day) :\n null;\n var dateCandidateExists = areDatePartsEqualTo(dateCandidate, year, month, day, hour, minutes, seconds, milliseconds);\n if (this.getValue() && areDatePartsEqualTo(dateCandidate, year, month, day, hour, minutes, seconds, milliseconds)) {\n newValue = cloneDate(dateCandidate);\n this.markDatePartsAsExisting();\n }\n else if (isMonth && newValueCandidate) {\n if (newValueCandidate.getMonth() === month) {\n if (this.getExisting(\"d\")) {\n if (dateCandidateExists) {\n newValue = cloneDate(dateCandidate);\n this.resetInvalidDateSymbol(symbol);\n }\n else {\n invalidDateFound = true;\n this.setInvalidDatePart(symbol, {\n value: month,\n date: cloneDate(newValueCandidate),\n startDateOffset: offset,\n startDate: cloneDate(this.value)\n });\n this.setExisting(symbol, false);\n }\n }\n else if (dateCandidateExists) {\n this.resetInvalidDateSymbol(symbol);\n newValue = cloneDate(dateCandidate);\n if (this.getExisting(\"M\") && this.getExisting(\"y\")) {\n // changing from 28/Feb to 29/Feb to 29/March\n this.setExisting(\"d\", true);\n this.resetInvalidDateSymbol(\"d\");\n }\n }\n else {\n this.resetInvalidDateSymbol(symbol);\n newValue = cloneDate(newValueCandidate);\n }\n }\n else {\n invalidDateFound = true;\n this.setInvalidDatePart(symbol, {\n value: month,\n date: cloneDate(newValueCandidate),\n startDateOffset: offset,\n startDate: cloneDate(this.value)\n });\n this.setExisting(symbol, false);\n }\n }\n else if (isDay && newValueCandidate) {\n if (newValueCandidate.getDate() === day) {\n if (this.getExisting(\"M\")) {\n if (dateCandidateExists) {\n newValue = cloneDate(dateCandidate);\n this.resetInvalidDateSymbol(symbol);\n }\n else {\n invalidDateFound = true;\n this.setInvalidDatePart(symbol, {\n value: day,\n date: cloneDate(newValueCandidate),\n startDateOffset: offset,\n startDate: cloneDate(this.value)\n });\n this.setExisting(symbol, false);\n }\n }\n else if (dateCandidateExists) {\n newValue = cloneDate(dateCandidate);\n this.resetInvalidDateSymbol(symbol);\n if (this.getExisting(\"d\") && this.getExisting(\"y\")) {\n // changing from 31/Jan to 31/Feb to 28/Feb\n this.setExisting(\"M\", true);\n this.resetInvalidDateSymbol(\"M\");\n }\n }\n else {\n this.resetInvalidDateSymbol(symbol);\n newValue = cloneDate(newValueCandidate);\n }\n }\n else {\n invalidDateFound = true;\n this.setInvalidDatePart(symbol, {\n value: day,\n date: cloneDate(this.value),\n startDateOffset: offset,\n startDate: cloneDate(this.value)\n });\n this.setExisting(symbol, false);\n }\n }\n }\n else {\n switch (symbol) {\n case 'y':\n newValue.setFullYear(newValue.getFullYear() + offset);\n break;\n case 'M':\n newValue = addMonths(this.value, offset);\n break;\n case 'd':\n case 'E':\n newValue.setDate(newValue.getDate() + offset);\n break;\n case 'h':\n case 'H':\n newValue.setHours(newValue.getHours() + offset);\n timeModified = true;\n break;\n case 'm':\n newValue.setMinutes(newValue.getMinutes() + offset);\n timeModified = true;\n break;\n case 's':\n newValue.setSeconds(newValue.getSeconds() + offset);\n timeModified = true;\n break;\n case \"S\":\n newValue.setMilliseconds(newValue.getMilliseconds() + offset);\n break;\n case 'a':\n newValue.setHours(newValue.getHours() + (12 * offset));\n timeModified = true;\n break;\n default: break;\n }\n }\n if (this.shouldNormalizeCentury()) {\n newValue = this.normalizeCentury(newValue);\n }\n if (timeModified && !this.cycleTime && newValue.getDate() !== this._value.getDate()) {\n // todo: blazor has this fix, but this fails a unit test\n // newValue.setDate(this._value.getDate());\n // newValue.setMonth(this._value.getMonth());\n // newValue.setFullYear(this._value.getFullYear());\n }\n if (!invalidDateFound) {\n this.setExisting(symbol, true);\n this._value = newValue;\n if (this.getValue()) {\n this.resetInvalidDate();\n }\n }\n };\n /**\n * @hidden\n */\n DateObject.prototype.parsePart = function (_a) {\n var symbol = _a.symbol, currentChar = _a.currentChar, resetSegmentValue = _a.resetSegmentValue, cycleSegmentValue = _a.cycleSegmentValue, rawInputValue = _a.rawTextValue, isDeleting = _a.isDeleting, originalFormat = _a.originalFormat;\n var isInCaretMode = !cycleSegmentValue;\n var dateParts = this.dateFormatString(this.value, this.format);\n var datePartsLiterals = dateParts.partMap\n .filter(function (x) { return x.type === \"literal\"; })\n .map(function (x, index) {\n return {\n datePartIndex: index,\n type: x.type,\n pattern: x.pattern,\n literal: \"\"\n };\n });\n var flatDateParts = dateParts.partMap\n .map(function (x) {\n return {\n type: x.type,\n pattern: x.pattern,\n text: \"\"\n };\n });\n for (var i = 0; i < datePartsLiterals.length; i++) {\n var datePart = datePartsLiterals[i];\n for (var j = 0; j < datePart.pattern.length; j++) {\n if (datePartsLiterals[i + j]) {\n datePartsLiterals[i + j].literal = datePart.pattern[j];\n }\n }\n i += datePart.pattern.length - 1;\n }\n for (var i = 0; i < flatDateParts.length; i++) {\n var datePart = flatDateParts[i];\n for (var j = 0; j < datePart.pattern.length; j++) {\n if (flatDateParts[i + j]) {\n flatDateParts[i + j].text = datePart.pattern[j];\n }\n }\n i += datePart.pattern.length - 1;\n }\n var shouldResetPart = isInCaretMode && symbol === \"M\" && dateParts.partMap\n .filter(function (x) { return x.type === \"month\"; })\n .some(function (x) { return x.pattern.length > MONTH_PART_WITH_WORDS_THRESHOLD; });\n var parseResult = {\n value: null,\n switchToNext: false,\n resetPart: shouldResetPart,\n hasInvalidDatePart: false\n };\n if (!currentChar) {\n if (isInCaretMode) {\n for (var i = 0; i < datePartsLiterals.length; i++) {\n var literal = datePartsLiterals[i].literal;\n var rawValueStartsWithLiteral = rawInputValue.startsWith(literal);\n var rawValueEndsWithLiteral = rawInputValue.endsWith(literal);\n var rawValueHasConsecutiveLiterals = rawInputValue.indexOf(literal + literal) >= 0;\n if (rawValueStartsWithLiteral || rawValueEndsWithLiteral || rawValueHasConsecutiveLiterals) {\n this.resetLeadingZero();\n this.setExisting(symbol, false);\n this.resetInvalidDateSymbol(symbol);\n return extend(parseResult, { value: null, switchToNext: false });\n }\n }\n }\n else {\n this.resetLeadingZero();\n this.setExisting(symbol, false);\n this.resetInvalidDateSymbol(symbol);\n return extend(parseResult, { value: null, switchToNext: false });\n }\n }\n var baseDate = this.intl.formatDate(this.value, this.format, this.localeId);\n var baseFormat = dateParts.symbols;\n var replaced = false;\n var prefix = '';\n var current = '';\n var datePartText = '';\n var basePrefix = '';\n var baseSuffix = '';\n var suffix = '';\n var convertedBaseFormat = \"\";\n for (var i = 0; i < flatDateParts.length; i++) {\n convertedBaseFormat += flatDateParts[i].text;\n }\n var hasFixedFormat = (this.format === baseFormat) ||\n (this.format === convertedBaseFormat) ||\n (this.format === originalFormat) ||\n (this.format.length === originalFormat.length);\n var datePartStartIndex = (hasFixedFormat ? convertedBaseFormat : originalFormat).indexOf(symbol);\n var datePartEndIndex = (hasFixedFormat ? convertedBaseFormat : originalFormat).lastIndexOf(symbol);\n var segmentLength = datePartEndIndex - datePartStartIndex + 1;\n var formatToTextLengthDiff = originalFormat.length - rawInputValue.length;\n if (isInCaretMode || (!isInCaretMode && !this.autoCorrectParts)) {\n for (var i = 0; i < baseDate.length; i++) {\n if (baseFormat[i] === symbol) {\n var existing = this.getExisting(symbol);\n current += existing ? baseDate[i] : '0';\n if (formatToTextLengthDiff > 0) {\n if (datePartText.length + formatToTextLengthDiff < segmentLength) {\n datePartText += rawInputValue[i] || \"\";\n }\n }\n else {\n datePartText += rawInputValue[i] || \"\";\n }\n replaced = true;\n }\n else if (!replaced) {\n prefix += baseDate[i];\n basePrefix += baseDate[i];\n }\n else {\n suffix += baseDate[i];\n baseSuffix += baseDate[i];\n }\n }\n if (hasFixedFormat) {\n if (convertedBaseFormat.length < rawInputValue.length) {\n datePartText += currentChar;\n }\n else if (!isDeleting && originalFormat.length > rawInputValue.length) {\n // let the parsing to determine if the incomplete value is valid\n }\n if (datePartText.length > segmentLength) {\n return extend(parseResult, { value: null, switchToNext: false });\n }\n }\n if (!hasFixedFormat || (hasFixedFormat && !this.autoCorrectParts)) {\n current = \"\";\n datePartText = \"\";\n prefix = \"\";\n suffix = \"\";\n replaced = false;\n for (var i = 0; i < originalFormat.length; i++) {\n if (originalFormat[i] === symbol) {\n var existing = this.getExisting(symbol);\n current += existing ? baseDate[i] || \"\" : '0';\n if (formatToTextLengthDiff > 0) {\n if (datePartText.length + formatToTextLengthDiff < segmentLength) {\n datePartText += rawInputValue[i] || \"\";\n }\n }\n else {\n datePartText += rawInputValue[i] || \"\";\n }\n replaced = true;\n }\n else if (!replaced) {\n prefix += rawInputValue[i] || \"\";\n }\n else {\n suffix += rawInputValue[i - formatToTextLengthDiff] || \"\";\n }\n }\n if (originalFormat.length < rawInputValue.length) {\n datePartText += currentChar;\n }\n }\n }\n if (!isInCaretMode) {\n if (this.autoCorrectParts) {\n current = \"\";\n datePartText = \"\";\n prefix = \"\";\n suffix = \"\";\n replaced = false;\n for (var i = 0; i < baseDate.length; i++) {\n if (baseFormat[i] === symbol) {\n var existing = this.getExisting(symbol);\n current += existing ? baseDate[i] : '0';\n replaced = true;\n }\n else if (!replaced) {\n prefix += baseDate[i];\n }\n else {\n suffix += baseDate[i];\n }\n }\n }\n else {\n current = resetSegmentValue ? datePartText : current;\n }\n }\n var parsedDate = null;\n var month = this.matchMonth(currentChar);\n var dayPeriod = this.matchDayPeriod(currentChar, symbol);\n var isZeroCurrentChar = currentChar === '0';\n var leadingZero = this.leadingZero || {};\n if (isZeroCurrentChar) {\n if (datePartText === \"0\") {\n datePartText = current;\n }\n var valueNumber = parseToInt(resetSegmentValue ?\n currentChar :\n (isInCaretMode ? datePartText : current) + currentChar);\n if (valueNumber === 0 && !this.isAbbrMonth(dateParts.partMap, symbol)) {\n this.incrementLeadingZero(symbol);\n }\n }\n else {\n this.resetLeadingZero();\n }\n var partPattern = this.partPattern(dateParts.partMap, symbol);\n var patternValue = partPattern ? partPattern.pattern : null;\n var patternLength = this.patternLength(patternValue) || patternValue.length;\n if (isInCaretMode) {\n if (isDeleting && !datePartText) {\n this.setExisting(symbol, false);\n return extend(parseResult, { value: null, switchToNext: false });\n }\n }\n var currentMaxLength = current.length - 3;\n var tryParse = true;\n var middle = isInCaretMode ? datePartText : current;\n for (var i = Math.max(0, currentMaxLength); i <= current.length; i++) {\n if (!tryParse) {\n break;\n }\n middle = resetSegmentValue ?\n currentChar :\n isInCaretMode ?\n datePartText :\n (current.substring(i) + currentChar);\n if (isInCaretMode || !this.autoCorrectParts) {\n tryParse = false;\n middle = unpadZero(middle);\n // middle = padZero(segmentLength - middle.length) + middle;\n middle = padZero(patternLength - middle.length) + middle;\n }\n var middleNumber = parseInt(middle, 10);\n var candidateDateString = prefix + middle + suffix;\n parsedDate = this.intl.parseDate(candidateDateString, this.format, this.localeId);\n var autoCorrectedPrefixAndSuffix = false;\n if (isInCaretMode && !isValidDate(parsedDate)) {\n // if part of the date is not available, e.g. \"d\"\n // but an expanded format like \"F\" is used\n // the element value can be \"EEEE, February 1, 2022 3:04:05 AM\"\n // which is not parsable by intl\n // use the base prefix and suffix, e.g. convert the candidate date string\n // to \"Thursday, February 1, 2022 3:04:05 AM\"\n // as \"EEEE, February...\" is not parsable\n if (this.autoCorrectParts) {\n parsedDate = this.intl.parseDate(basePrefix + middle + baseSuffix, this.format, this.localeId);\n autoCorrectedPrefixAndSuffix = true;\n }\n }\n var isCurrentCharParsable = !isNaN(parseInt(currentChar, 10)) || (isInCaretMode && isDeleting && currentChar === \"\");\n if (!parsedDate && !isNaN(middleNumber) && isCurrentCharParsable && this.autoCorrectParts) {\n if (symbol === MONTH_SYMBOL && !month) {\n // JS months start from 0 (January) instead of 1 (January)\n var monthNumber = middleNumber - JS_MONTH_OFFSET;\n if (monthNumber > -1 && monthNumber < 12) {\n parsedDate = cloneDate(this.value);\n parsedDate.setMonth(monthNumber);\n if (parsedDate.getMonth() !== monthNumber) {\n parsedDate = lastDayOfMonth(addMonths(parsedDate, -1));\n }\n }\n }\n if (symbol === 'y') {\n parsedDate = createDate(parseInt(middle, 10), this.month ? this.value.getMonth() : 0, this.date ? this.value.getDate() : 1, this.hours ? this.value.getHours() : 0, this.minutes ? this.value.getMinutes() : 0, this.seconds ? this.value.getSeconds() : 0, this.milliseconds ? this.value.getMilliseconds() : 0);\n if (((isInCaretMode && isValidDate(parsedDate)) ||\n (!isInCaretMode && parsedDate)) && this.date && parsedDate.getDate() !== this.value.getDate()) {\n parsedDate = lastDayOfMonth(addMonths(parsedDate, -1));\n }\n }\n }\n if ((isInCaretMode && isValidDate(parsedDate)) || (!isInCaretMode && parsedDate)) {\n // move to next segment if the part will overflow with next char\n // when start from empty date (01, then 010), padded zeros should be trimmed\n var peekedValue = this.peek(middle, patternValue);\n var peekedDateString = autoCorrectedPrefixAndSuffix ?\n \"\" + basePrefix + peekedValue + baseSuffix :\n \"\" + prefix + peekedValue + suffix;\n var peekedDate = this.intl.parseDate(peekedDateString, this.format, this.localeId);\n var leadingZeroOffset = (this.leadingZero || {})[symbol] || 0;\n var patternSatisfied = (leadingZeroOffset + unpadZero(middle).length) >= patternLength;\n var switchToNext = peekedDate === null ||\n (leadingZero[symbol] ?\n patternValue.length <= middle.length :\n patternSatisfied);\n if (this.shouldNormalizeCentury()) {\n parsedDate = this.normalizeCentury(parsedDate);\n }\n this._value = parsedDate;\n this.setExisting(symbol, true);\n this.resetInvalidDateSymbol(symbol);\n if (!this.autoCorrectParts) {\n if (symbol === \"M\") {\n if (this.getExisting(\"M\") && this.getExisting(\"y\")) {\n // changing from 28/Feb to 29/Feb to 29/March\n this.setExisting(\"d\", true);\n this.resetInvalidDateSymbol(\"d\");\n }\n }\n else if (symbol === \"d\") {\n if (this.getExisting(\"d\") && this.getExisting(\"y\")) {\n // changing from 31/Jan to 31/Feb to 28/Feb\n this.setExisting(\"M\", true);\n this.resetInvalidDateSymbol(\"M\");\n }\n }\n if (!this.hasInvalidDatePart()) {\n this.markDatePartsAsExisting();\n }\n }\n return extend(parseResult, { value: this.value, switchToNext: switchToNext });\n }\n }\n if (month) {\n parsedDate = this.intl.parseDate(prefix + month + suffix, this.format, this.localeId);\n if (parsedDate) {\n this._value = parsedDate;\n this.setExisting(symbol, true);\n return extend(parseResult, { value: this.value, switchToNext: false });\n }\n }\n if (dayPeriod) {\n parsedDate = this.intl.parseDate(prefix + dayPeriod + suffix, this.format);\n if (parsedDate) {\n this._value = parsedDate;\n return extend(parseResult, { value: this.value, switchToNext: true });\n }\n }\n if (isZeroCurrentChar) {\n this.setExisting(symbol, false);\n }\n if (!this.autoCorrectParts) {\n var datePartValue = void 0;\n var textToParse = isInCaretMode ? datePartText : middle;\n var parsedValue = parseToInt(textToParse);\n if (isNumber(parsedValue)) {\n if ((symbol === \"d\" && (parsedValue <= 0 || parsedValue > 31)) ||\n (symbol === \"M\" && (parsedValue < 0 || parsedValue > 11))) {\n return extend(parseResult, { value: null, switchToNext: false });\n }\n datePartValue = symbol === \"M\" ?\n parsedValue - JS_MONTH_OFFSET :\n parsedValue;\n var isMonth = symbol === \"M\";\n var isDay = symbol === \"d\";\n var newValue = cloneDate(this._value);\n var invalidDateParts = this._partiallyInvalidDate.invalidDateParts || {};\n var year = invalidDateParts.y.value || newValue.getFullYear();\n /* tslint:disable:no-shadowed-variable */\n var month_1 = isMonth ? datePartValue : invalidDateParts.M.value || newValue.getMonth();\n /* tslint:enable:no-shadowed-variable */\n var day = isDay ? datePartValue : invalidDateParts.d.value || invalidDateParts.E.value || newValue.getDate();\n var hour = invalidDateParts.h.value || invalidDateParts.H.value || newValue.getHours();\n var minutes = invalidDateParts.m.value || newValue.getMinutes();\n var seconds = invalidDateParts.s.value || newValue.getSeconds();\n var milliseconds = invalidDateParts.S.value || newValue.getMilliseconds();\n var dateCandidate = createDate(year, month_1, day, hour, minutes, seconds, milliseconds);\n var dateCandidateExists = areDatePartsEqualTo(dateCandidate, year, month_1, day, hour, minutes, seconds, milliseconds);\n var newValueCandidate = isMonth || isDay ?\n this.modifyDateSymbolWithValue(newValue, symbol, isMonth ? month_1 : day) :\n null;\n var invalidDateFound = false;\n if (isMonth && newValueCandidate) {\n if (newValueCandidate.getMonth() === month_1) {\n if (this.getExisting(\"d\")) {\n if (dateCandidateExists) {\n newValue = cloneDate(dateCandidate);\n this.resetInvalidDateSymbol(symbol);\n }\n else {\n invalidDateFound = true;\n this.setInvalidDatePart(symbol, {\n value: month_1,\n date: cloneDate(newValueCandidate),\n startDate: cloneDate(this.value)\n });\n this.setExisting(symbol, false);\n }\n }\n else if (dateCandidateExists) {\n this.resetInvalidDateSymbol(symbol);\n newValue = cloneDate(dateCandidate);\n if (this.getExisting(\"M\") && this.getExisting(\"y\")) {\n // changing from 28/Feb to 29/Feb to 29/March\n this.setExisting(\"d\", true);\n this.resetInvalidDateSymbol(\"d\");\n }\n }\n else {\n this.resetInvalidDateSymbol(symbol);\n newValue = cloneDate(newValueCandidate);\n }\n }\n else {\n invalidDateFound = true;\n this.setInvalidDatePart(symbol, {\n value: month_1,\n date: cloneDate(newValueCandidate),\n startDate: cloneDate(this.value)\n });\n this.setExisting(symbol, false);\n }\n }\n else if (isDay && newValueCandidate) {\n if (newValueCandidate.getDate() === day) {\n if (this.getExisting(\"M\")) {\n if (dateCandidateExists) {\n newValue = cloneDate(dateCandidate);\n this.resetInvalidDateSymbol(symbol);\n }\n else {\n invalidDateFound = true;\n this.setInvalidDatePart(symbol, {\n value: day,\n date: cloneDate(newValueCandidate),\n startDate: cloneDate(this.value)\n });\n this.setExisting(symbol, false);\n }\n }\n else if (dateCandidateExists) {\n newValue = cloneDate(dateCandidate);\n this.resetInvalidDateSymbol(symbol);\n if (this.getExisting(\"d\") && this.getExisting(\"y\")) {\n // changing from 31/Jan to 31/Feb to 28/Feb\n this.setExisting(\"M\", true);\n this.resetInvalidDateSymbol(\"M\");\n }\n }\n else {\n this.resetInvalidDateSymbol(symbol);\n newValue = cloneDate(newValueCandidate);\n }\n }\n else {\n invalidDateFound = true;\n this.setInvalidDatePart(symbol, {\n value: day,\n date: cloneDate(this.value),\n startDate: cloneDate(this.value)\n });\n this.setExisting(symbol, false);\n }\n }\n if (!invalidDateFound) {\n this.setExisting(symbol, true);\n if (isInCaretMode && !isValidDate(parsedDate)) {\n var valueCandidate = this.intl.parseDate(basePrefix + middle + baseSuffix, this.format, this.localeId);\n if (isValidDate(valueCandidate)) {\n this._value = valueCandidate;\n }\n }\n else {\n this._value = newValue;\n }\n if (this.getValue()) {\n this.resetInvalidDate();\n }\n }\n var switchToNext = false;\n if (symbol === \"M\") {\n if (parsedValue >= 2 || textToParse.length >= 2) {\n switchToNext = true;\n }\n else {\n switchToNext = false;\n }\n }\n else {\n switchToNext = hasFixedFormat ?\n textToParse.length === segmentLength :\n textToParse.length > segmentLength;\n }\n return extend(parseResult, {\n value: null,\n switchToNext: switchToNext,\n hasInvalidDatePart: invalidDateFound\n });\n }\n }\n return extend(parseResult, { value: null, switchToNext: false });\n };\n /**\n * @hidden\n */\n DateObject.prototype.symbolMap = function (symbol) {\n return this.intl.splitDateFormat(this.format, this.localeId).reduce(dateSymbolMap, {})[symbol];\n };\n /**\n * @hidden\n */\n DateObject.prototype.resetLeadingZero = function () {\n var hasLeadingZero = this.leadingZero !== null;\n this.setLeadingZero(null);\n return hasLeadingZero;\n };\n DateObject.prototype.setLeadingZero = function (leadingZero) {\n this.leadingZero = leadingZero;\n };\n /**\n * @hidden\n */\n DateObject.prototype.getLeadingZero = function () {\n return this.leadingZero || {};\n };\n /**\n * @hidden\n */\n DateObject.prototype.normalizeCentury = function (date) {\n if (!isPresent(date)) {\n return date;\n }\n var twoDigitYear = cropTwoDigitYear(date);\n var centuryBase = this.getNormalizedCenturyBase(twoDigitYear);\n var normalizedDate = setYears(date, centuryBase + twoDigitYear);\n return normalizedDate;\n };\n DateObject.prototype.incrementLeadingZero = function (symbol) {\n var leadingZero = this.leadingZero || {};\n leadingZero[symbol] = (leadingZero[symbol] || 0) + 1;\n this.leadingZero = leadingZero;\n };\n /**\n * @hidden\n */\n DateObject.prototype.isAbbrMonth = function (parts, symbol) {\n var pattern = this.partPattern(parts, symbol);\n return pattern.type === 'month' && pattern.names;\n };\n /**\n * @hidden\n */\n DateObject.prototype.partPattern = function (parts, symbol) {\n return parts.filter(function (part) { return part.pattern.indexOf(symbol) !== -1; })[0];\n };\n /**\n * @hidden\n */\n DateObject.prototype.peek = function (value, pattern) {\n var peekValue = value.replace(/^0*/, '') + '0';\n return padZero(pattern.length - peekValue.length) + peekValue;\n };\n /**\n * @hidden\n */\n DateObject.prototype.matchMonth = function (typedChar) {\n this.typedMonthPart += typedChar.toLowerCase();\n if (this.monthNames.length === 0) {\n return '';\n }\n while (this.typedMonthPart.length > 0) {\n for (var i = 0; i < this.monthNames.length; i++) {\n if (this.monthNames[i].toLowerCase().indexOf(this.typedMonthPart) === 0) {\n return this.monthNames[i];\n }\n }\n var monthAsNum = parseInt(this.typedMonthPart, 10);\n /* ensure they exact match */\n if (monthAsNum >= 1 && monthAsNum <= 12 && monthAsNum.toString() === this.typedMonthPart) {\n return this.monthNames[monthAsNum - 1];\n }\n this.typedMonthPart = this.typedMonthPart.substring(1, this.typedMonthPart.length);\n }\n return '';\n };\n /**\n * @hidden\n */\n DateObject.prototype.matchDayPeriod = function (typedChar, symbol) {\n var lowerChart = typedChar.toLowerCase();\n if (symbol === 'a' && this.dayPeriods) {\n if (this.dayPeriods.am.toLowerCase().startsWith(lowerChart)) {\n return this.dayPeriods.am;\n }\n else if (this.dayPeriods.pm.toLowerCase().startsWith(lowerChart)) {\n return this.dayPeriods.pm;\n }\n }\n return '';\n };\n /**\n * @hidden\n */\n DateObject.prototype.allFormattedMonths = function (locale) {\n if (locale === void 0) { locale = \"en\"; }\n var dateFormatParts = this.intl.splitDateFormat(this.format, this.localeId);\n for (var i = 0; i < dateFormatParts.length; i++) {\n if (dateFormatParts[i].type === 'month' && dateFormatParts[i].names) {\n return this.intl.dateFormatNames(locale, dateFormatParts[i].names);\n }\n }\n return [];\n };\n /**\n * @hidden\n */\n DateObject.prototype.allDayPeriods = function (locale) {\n if (locale === void 0) { locale = \"en\"; }\n var dateFormatParts = this.intl.splitDateFormat(this.format);\n for (var i = 0; i < dateFormatParts.length; i++) {\n if (dateFormatParts[i].type === \"dayperiod\" && dateFormatParts[i].names) {\n return this.intl.dateFormatNames(locale, dateFormatParts[i].names);\n }\n }\n return null;\n };\n /**\n * @hidden\n */\n DateObject.prototype.patternLength = function (pattern) {\n if (pattern[0] === 'y') {\n return 4;\n }\n if (SHORT_PATTERN_LENGTH_REGEXP.test(pattern)) {\n return 2;\n }\n return 0;\n };\n /**\n * @hidden\n */\n DateObject.prototype.dateFormatString = function (date, format) {\n var dateFormatParts = this.intl.splitDateFormat(format, this.localeId);\n var parts = [];\n var partMap = [];\n for (var i = 0; i < dateFormatParts.length; i++) {\n var partLength = this.intl.formatDate(date, { pattern: dateFormatParts[i].pattern }, this.localeId).length;\n while (partLength > 0) {\n parts.push(this.symbols[dateFormatParts[i].pattern[0]] || Constants.formatSeparator);\n partMap.push(dateFormatParts[i]);\n partLength--;\n }\n }\n var returnValue = new Mask();\n returnValue.symbols = parts.join('');\n returnValue.partMap = partMap;\n return returnValue;\n };\n /**\n * @hidden\n */\n DateObject.prototype.merge = function (text, mask) {\n // Important: right to left.\n var resultText = '';\n var resultFormat = '';\n var format = mask.symbols;\n var processTextSymbolsEnded = false;\n var ignoreFormatSymbolsCount = 0;\n var formattedDates = this.getFormattedInvalidDates(format);\n for (var formatSymbolIndex = format.length - 1; formatSymbolIndex >= 0; formatSymbolIndex--) {\n var partsForSegment = this.getPartsForSegment(mask, formatSymbolIndex);\n if (this.knownParts.indexOf(format[formatSymbolIndex]) === -1 || this.getExisting(format[formatSymbolIndex])) {\n if (this.autoCorrectParts) {\n resultText = text[formatSymbolIndex] + resultText;\n }\n else {\n if (text.length !== format.length) {\n if (processTextSymbolsEnded) {\n resultText = text[formatSymbolIndex] + resultText;\n }\n else if (ignoreFormatSymbolsCount > 0) {\n resultText = text[formatSymbolIndex] + resultText;\n ignoreFormatSymbolsCount--;\n if (ignoreFormatSymbolsCount <= 0) {\n processTextSymbolsEnded = true;\n }\n }\n else {\n resultText = (text[formatSymbolIndex + text.length - format.length] || \"\") + resultText;\n }\n }\n else {\n resultText = text[formatSymbolIndex] + resultText;\n }\n }\n resultFormat = format[formatSymbolIndex] + resultFormat;\n }\n else {\n var symbol = format[formatSymbolIndex];\n var formatSymbolIndexModifier = 0;\n if (this.autoCorrectParts || (!this.autoCorrectParts && !this.getInvalidDatePartValue(symbol))) {\n while (formatSymbolIndex >= 0 && symbol === format[formatSymbolIndex]) {\n formatSymbolIndex--;\n }\n formatSymbolIndex++;\n }\n if (this.leadingZero && this.leadingZero[symbol]) {\n resultText = '0' + resultText;\n }\n else {\n if (!this.autoCorrectParts && this.getInvalidDatePartValue(symbol)) {\n var datePartText = this.getInvalidDatePartValue(symbol).toString();\n if (symbol === \"M\") {\n datePartText = (parseToInt(this.getInvalidDatePartValue(symbol)) + JS_MONTH_OFFSET).toString();\n if (partsForSegment.length > MONTH_PART_WITH_WORDS_THRESHOLD) {\n resultText = formattedDates[symbol][formatSymbolIndex] + resultText;\n }\n else {\n datePartText = (parseToInt(this.getInvalidDatePartValue(symbol)) + JS_MONTH_OFFSET).toString();\n var formattedDatePart = padZero(partsForSegment.length - datePartText.length) + datePartText;\n resultText = formattedDatePart + resultText;\n formatSymbolIndexModifier = partsForSegment.length - 1;\n ignoreFormatSymbolsCount = datePartText.length - partsForSegment.length;\n }\n }\n else {\n var formattedDatePart = padZero(partsForSegment.length - datePartText.length) + datePartText;\n resultText = formattedDatePart + resultText;\n formatSymbolIndexModifier = partsForSegment.length - 1;\n ignoreFormatSymbolsCount = datePartText.length - partsForSegment.length;\n }\n }\n else {\n resultText = this.dateFieldName(mask.partMap[formatSymbolIndex]) + resultText;\n }\n }\n while (resultFormat.length < resultText.length) {\n resultFormat = format[formatSymbolIndex] + resultFormat;\n }\n if (formatSymbolIndexModifier !== 0) {\n formatSymbolIndex = (formatSymbolIndex - formatSymbolIndexModifier) + (text.length - format.length);\n }\n }\n }\n return { text: resultText, format: resultFormat };\n };\n /**\n * @hidden\n */\n DateObject.prototype.dateFieldName = function (part) {\n var formatPlaceholder = this.formatPlaceholder || 'wide';\n if (formatPlaceholder[part.type]) {\n return formatPlaceholder[part.type];\n }\n if (formatPlaceholder === 'formatPattern') {\n return part.pattern;\n }\n return this.intl.dateFieldName(Object.assign(part, { nameType: formatPlaceholder }));\n };\n /**\n * @hidden\n */\n DateObject.prototype.getNormalizedCenturyBase = function (twoDigitYear) {\n return twoDigitYear > this.twoDigitYearMax ?\n PREVIOUS_CENTURY_BASE :\n CURRENT_CENTURY_BASE;\n };\n /**\n * @hidden\n */\n DateObject.prototype.shouldNormalizeCentury = function () {\n return this.intl.splitDateFormat(this.format).some(function (part) { return part.pattern === 'yy'; });\n };\n DateObject.prototype.resetInvalidDate = function () {\n var _this = this;\n this._partiallyInvalidDate.startDate = null;\n Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(function (key) {\n _this.resetInvalidDatePart(key);\n });\n };\n DateObject.prototype.resetInvalidDateSymbol = function (symbol) {\n var _this = this;\n this.resetInvalidDatePart(symbol);\n var shouldResetInvalidDate = true;\n Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(function (key) {\n if (_this._partiallyInvalidDate.invalidDateParts[key] &&\n isPresent(_this._partiallyInvalidDate.invalidDateParts[key].value)) {\n shouldResetInvalidDate = false;\n }\n });\n if (shouldResetInvalidDate) {\n this.resetInvalidDate();\n }\n };\n DateObject.prototype.resetInvalidDatePart = function (symbol) {\n if (this._partiallyInvalidDate.invalidDateParts[symbol]) {\n this._partiallyInvalidDate.invalidDateParts[symbol] = {\n value: null,\n date: null,\n startDateOffset: 0\n };\n }\n };\n /**\n * @hidden\n */\n DateObject.prototype.getInvalidDatePart = function (symbol) {\n var invalidDatePart = this._partiallyInvalidDate.invalidDateParts[symbol];\n return invalidDatePart || {};\n };\n /**\n * @hidden\n */\n DateObject.prototype.getInvalidDatePartValue = function (symbol) {\n var invalidDatePart = this._partiallyInvalidDate.invalidDateParts[symbol];\n return (invalidDatePart || {}).value;\n };\n DateObject.prototype.setInvalidDatePart = function (symbol, _a) {\n var _b = _a.value, value = _b === void 0 ? null : _b, _c = _a.date, date = _c === void 0 ? null : _c, _d = _a.startDateOffset, startDateOffset = _d === void 0 ? 0 : _d, _e = _a.startDate, startDate = _e === void 0 ? null : _e;\n if (this._partiallyInvalidDate.invalidDateParts[symbol]) {\n this._partiallyInvalidDate.invalidDateParts[symbol].value = value;\n this._partiallyInvalidDate.invalidDateParts[symbol].date = date;\n this._partiallyInvalidDate.invalidDateParts[symbol].startDateOffset = startDateOffset;\n this._partiallyInvalidDate.startDate = startDate;\n }\n };\n /**\n * @hidden\n */\n DateObject.prototype.hasInvalidDatePart = function () {\n var _this = this;\n var hasInvalidDatePart = false;\n Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(function (key) {\n if (_this._partiallyInvalidDate.invalidDateParts[key] &&\n isPresent(_this._partiallyInvalidDate.invalidDateParts[key].value)) {\n hasInvalidDatePart = true;\n }\n });\n return hasInvalidDatePart;\n };\n /**\n * @hidden\n */\n DateObject.prototype.modifyDateSymbolWithOffset = function (date, symbol, offset) {\n var newValue = cloneDate(date);\n var timeModified = false;\n switch (symbol) {\n case 'y':\n newValue.setFullYear(newValue.getFullYear() + offset);\n break;\n case 'M':\n newValue = addMonths(this.value, offset);\n break;\n case 'd':\n case 'E':\n newValue.setDate(newValue.getDate() + offset);\n break;\n case 'h':\n case 'H':\n newValue.setHours(newValue.getHours() + offset);\n timeModified = true;\n break;\n case 'm':\n newValue.setMinutes(newValue.getMinutes() + offset);\n timeModified = true;\n break;\n case 's':\n newValue.setSeconds(newValue.getSeconds() + offset);\n timeModified = true;\n break;\n case \"S\":\n newValue.setMilliseconds(newValue.getMilliseconds() + offset);\n break;\n case 'a':\n newValue.setHours(newValue.getHours() + (12 * offset));\n timeModified = true;\n break;\n default: break;\n }\n return {\n date: newValue,\n timeModified: timeModified\n };\n };\n /**\n * @hidden\n */\n DateObject.prototype.modifyDateSymbolWithValue = function (date, symbol, value) {\n var newValue = cloneDate(date);\n switch (symbol) {\n case 'y':\n newValue.setFullYear(value);\n break;\n case 'M':\n newValue = addMonths(date, value - date.getMonth());\n break;\n case 'd':\n case 'E':\n newValue.setDate(value);\n break;\n case 'h':\n case 'H':\n newValue.setHours(value);\n break;\n case 'm':\n newValue.setMinutes(value);\n break;\n case 's':\n newValue.setSeconds(value);\n break;\n case \"S\":\n newValue.setMilliseconds(value);\n break;\n case 'a':\n newValue.setHours(value);\n break;\n default: break;\n }\n return newValue;\n };\n DateObject.prototype.markDatePartsAsExisting = function () {\n this.modifyExisting(true);\n };\n /**\n * @hidden\n */\n DateObject.prototype.getPartsForSegment = function (mask, partIndex) {\n var segmentPart = mask.partMap[partIndex];\n var partsForSegment = [];\n for (var maskPartIndex = partIndex; maskPartIndex < mask.partMap.length; maskPartIndex++) {\n var part = mask.partMap[maskPartIndex];\n if (segmentPart.type === part.type && segmentPart.pattern === part.pattern) {\n partsForSegment.push(part);\n }\n else {\n break;\n }\n }\n for (var maskPartIndex = partIndex - 1; maskPartIndex >= 0; maskPartIndex--) {\n var part = mask.partMap[maskPartIndex];\n if (segmentPart.type === part.type && segmentPart.pattern === part.pattern) {\n partsForSegment.unshift(part);\n }\n else {\n break;\n }\n }\n return partsForSegment;\n };\n return DateObject;\n}());\n\nvar KeyCode = {\n BACKSPACE: 8,\n DELETE: 46,\n TAB: 9,\n ENTER: 13,\n ESCAPE: 27,\n ARROW_LEFT: 37,\n ARROW_UP: 38,\n ARROW_RIGHT: 39,\n ARROW_DOWN: 40,\n SPACE: 32,\n END: 35,\n HOME: 36,\n PAGE_UP: 33,\n PAGE_DOWN: 34\n};\n\nvar defaultOptions = {\n events: {}\n};\nvar Observable = /** @class */ (function () {\n function Observable(options) {\n this.options = deepExtend({}, defaultOptions, options);\n }\n Observable.prototype.destroy = function () {\n };\n /**\n * @hidden\n */\n Observable.prototype.trigger = function (eventName, args) {\n if (args === void 0) { args = {}; }\n var eventData = {\n defaultPrevented: false,\n preventDefault: function () {\n eventData.defaultPrevented = true;\n }\n };\n if (isFunction(this.options.events[eventName])) {\n this.options.events[eventName](extend(eventData, args, {\n sender: this\n }));\n return eventData.defaultPrevented;\n }\n return false;\n };\n return Observable;\n}());\n\nvar DateInputInteractionMode;\n(function (DateInputInteractionMode) {\n DateInputInteractionMode[\"None\"] = \"none\";\n DateInputInteractionMode[\"Caret\"] = \"caret\";\n DateInputInteractionMode[\"Selection\"] = \"selection\";\n})(DateInputInteractionMode || (DateInputInteractionMode = {}));\n\nvar _a;\nvar DEFAULT_SEGMENT_STEP = 1;\nvar DRAG_START = \"dragStart\";\nvar DROP = \"drop\";\nvar TOUCH_START = \"touchstart\";\nvar MOUSE_DOWN = \"mousedown\";\nvar MOUSE_UP = \"mouseup\";\nvar CLICK = \"click\";\nvar INPUT = \"input\";\nvar KEY_DOWN = \"keydown\";\nvar FOCUS = \"focus\";\nvar BLUR = \"blur\";\nvar PASTE = \"paste\";\nvar MOUSE_SCROLL = \"DOMMouseScroll\";\nvar MOUSE_WHEEL = \"mousewheel\";\nvar VALUE_CHANGE = \"valueChange\";\nvar INPUT_END = \"inputEnd\";\nvar BLUR_END = \"blurEnd\";\nvar FOCUS_END = \"focusEnd\";\nvar CHANGE = \"change\";\nvar defaultDateInputOptions = {\n format: \"d\",\n hasPlaceholder: false,\n placeholder: null,\n cycleTime: true,\n locale: null,\n steps: {\n millisecond: DEFAULT_SEGMENT_STEP,\n second: DEFAULT_SEGMENT_STEP,\n minute: DEFAULT_SEGMENT_STEP,\n hour: DEFAULT_SEGMENT_STEP,\n day: DEFAULT_SEGMENT_STEP,\n month: DEFAULT_SEGMENT_STEP,\n year: DEFAULT_SEGMENT_STEP\n },\n formatPlaceholder: null,\n events: (_a = {},\n _a[VALUE_CHANGE] = null,\n _a[INPUT] = null,\n _a[INPUT_END] = null,\n _a[FOCUS] = null,\n _a[FOCUS_END] = null,\n _a[BLUR] = null,\n _a[BLUR_END] = null,\n _a[KEY_DOWN] = null,\n _a[MOUSE_WHEEL] = null,\n _a[CHANGE] = null,\n _a),\n selectNearestSegmentOnFocus: false,\n selectPreviousSegmentOnBackspace: false,\n enableMouseWheel: false,\n allowCaretMode: false,\n autoSwitchParts: true,\n autoSwitchKeys: [],\n twoDigitYearMax: Constants.twoDigitYearMax,\n autoCorrectParts: true,\n autoFill: false\n};\nvar DateInput = /** @class */ (function (_super) {\n __extends(DateInput, _super);\n function DateInput(element, options) {\n var _this = _super.call(this, options) || this;\n _this.dateObject = null;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n _this.currentText = '';\n _this.currentFormat = '';\n _this.interactionMode = DateInputInteractionMode.None;\n _this.previousElementSelection = { start: 0, end: 0 };\n _this.init(element, options);\n return _this;\n }\n Object.defineProperty(DateInput.prototype, \"value\", {\n get: function () {\n return this.dateObject && this.dateObject.getValue();\n },\n enumerable: true,\n configurable: true\n });\n DateInput.prototype.init = function (element, options) {\n var dateValue = isValidDate(this.options.value) ? cloneDate(this.options.value) : new Date(options.formattedValue);\n if (!isValidDate(dateValue)) {\n dateValue = null;\n }\n this.element = element;\n // this.element._kendoWidget = this;\n this.options = deepExtend({}, defaultDateInputOptions, options);\n this.intl = this.options.intlService;\n this.dateObject = this.createDateObject();\n this.dateObject.setValue(dateValue);\n this.setTextAndFormat();\n this.bindEvents();\n this.resetSegmentValue = true;\n this.interactionMode = DateInputInteractionMode.None;\n this.forceUpdate();\n };\n DateInput.prototype.destroy = function () {\n this.unbindEvents();\n this.dateObject = null;\n _super.prototype.destroy.call(this);\n };\n DateInput.prototype.bindEvents = function () {\n this.onElementDragStart = this.onElementDragStart.bind(this);\n this.element.addEventListener(DRAG_START, this.onElementDragStart);\n this.onElementDrop = this.onElementDrop.bind(this);\n this.element.addEventListener(DROP, this.onElementDrop);\n this.onElementClick = this.onElementClick.bind(this);\n this.element.addEventListener(CLICK, this.onElementClick);\n this.onElementMouseDown = this.onElementMouseDown.bind(this);\n this.element.addEventListener(MOUSE_DOWN, this.onElementMouseDown);\n this.element.addEventListener(TOUCH_START, this.onElementMouseDown);\n this.onElementMouseUp = this.onElementMouseUp.bind(this);\n this.element.addEventListener(MOUSE_UP, this.onElementMouseUp);\n this.onElementInput = this.onElementInput.bind(this);\n this.element.addEventListener(INPUT, this.onElementInput);\n this.onElementKeyDown = this.onElementKeyDown.bind(this);\n this.element.addEventListener(KEY_DOWN, this.onElementKeyDown);\n this.onElementFocus = this.onElementFocus.bind(this);\n this.element.addEventListener(FOCUS, this.onElementFocus);\n this.onElementBlur = this.onElementBlur.bind(this);\n this.element.addEventListener(BLUR, this.onElementBlur);\n this.onElementChange = this.onElementChange.bind(this);\n this.element.addEventListener(CHANGE, this.onElementChange);\n this.onElementPaste = this.onElementPaste.bind(this);\n this.element.addEventListener(PASTE, this.onElementPaste);\n this.onElementMouseWheel = this.onElementMouseWheel.bind(this);\n this.element.addEventListener(MOUSE_SCROLL, this.onElementMouseWheel);\n this.element.addEventListener(MOUSE_WHEEL, this.onElementMouseWheel);\n };\n DateInput.prototype.unbindEvents = function () {\n this.element.removeEventListener(DRAG_START, this.onElementDragStart);\n this.element.removeEventListener(DROP, this.onElementDrop);\n this.element.removeEventListener(TOUCH_START, this.onElementMouseDown);\n this.element.removeEventListener(MOUSE_DOWN, this.onElementMouseDown);\n this.element.removeEventListener(MOUSE_UP, this.onElementMouseUp);\n this.element.removeEventListener(CLICK, this.onElementClick);\n this.element.removeEventListener(INPUT, this.onElementInput);\n this.element.removeEventListener(KEY_DOWN, this.onElementKeyDown);\n this.element.removeEventListener(FOCUS, this.onElementFocus);\n this.element.removeEventListener(BLUR, this.onElementBlur);\n this.element.removeEventListener(CHANGE, this.onElementChange);\n this.element.removeEventListener(PASTE, this.onElementPaste);\n this.element.removeEventListener(MOUSE_SCROLL, this.onElementMouseWheel);\n this.element.removeEventListener(MOUSE_WHEEL, this.onElementMouseWheel);\n };\n DateInput.prototype.setOptions = function (options, refresh) {\n if (refresh === void 0) { refresh = false; }\n this.options = deepExtend({}, this.options, options);\n this.setDateObjectOptions();\n if (refresh) {\n this.unbindEvents();\n this.init(this.element, this.options);\n }\n };\n /**\n * @hidden\n */\n DateInput.prototype.setDateObjectOptions = function () {\n if (this.dateObject) {\n var newOptions = this.getDateObjectOptions();\n this.dateObject.setOptions(newOptions);\n }\n };\n /**\n * @hidden\n */\n DateInput.prototype.resetLocale = function () {\n this.unbindEvents();\n this.init(this.element, this.options);\n };\n /**\n * @hidden\n */\n DateInput.prototype.isInCaretMode = function () {\n return this.interactionMode === DateInputInteractionMode.Caret;\n };\n DateInput.prototype.focus = function () {\n this.element.focus();\n if (this.options.selectNearestSegmentOnFocus) {\n this.selectNearestSegment(0);\n }\n };\n /**\n * @hidden\n */\n DateInput.prototype.onElementDragStart = function (e) {\n e.preventDefault();\n };\n /**\n * @hidden\n */\n DateInput.prototype.onElementDrop = function (e) {\n e.preventDefault();\n };\n /**\n * @hidden\n */\n DateInput.prototype.onElementMouseDown = function () {\n this.mouseDownStarted = true;\n this.focusedPriorToMouseDown = this.isActive;\n };\n /**\n * @hidden\n */\n DateInput.prototype.onElementMouseUp = function (e) {\n this.mouseDownStarted = false;\n e.preventDefault();\n };\n /**\n * @hidden\n */\n DateInput.prototype.onElementClick = function (e) {\n this.mouseDownStarted = false;\n this.switchedPartOnPreviousKeyAction = false;\n var selection = this.selection;\n if (this.isInCaretMode()) {\n // explicitly refresh the input element value\n // caret mode can change the number of symbols in the element\n // thus clicking on a segment can result in incorrect selection\n this.forceUpdate();\n }\n if (e.detail === 3) {\n // when 3 clicks occur, leave the native event to handle the change\n // this results in selecting the whole element value\n }\n else {\n if (this.isActive && this.options.selectNearestSegmentOnFocus) {\n var selectionPresent = this.element.selectionStart !== this.element.selectionEnd;\n var placeholderToggled = isPresent(this.options.placeholder) &&\n !this.dateObject.hasValue() &&\n !this.focusedPriorToMouseDown;\n // focus first segment if the user hasn't selected something during mousedown and if the placeholder was just toggled\n var selectFirstSegment = !selectionPresent && placeholderToggled;\n var index = selectFirstSegment ? 0 : this.caret()[0];\n this.selectNearestSegment(index);\n }\n else {\n this.setSelection(this.selectionByIndex(selection.start));\n }\n }\n };\n /**\n * @hidden\n */\n DateInput.prototype.onElementInput = function (e) {\n this.triggerInput({ event: e });\n if (!this.element || !this.dateObject) {\n return;\n }\n var switchedPartOnPreviousKeyAction = this.switchedPartOnPreviousKeyAction;\n if (this.isPasteInProgress) {\n if (this.options.allowCaretMode) {\n // pasting should leave the input with caret\n // thus allow direct input instead of selection mode\n this.resetSegmentValue = false;\n }\n this.updateOnPaste(e);\n this.isPasteInProgress = false;\n return;\n }\n var keyDownEvent = this.keyDownEvent || {};\n var isBackspaceKey = keyDownEvent.keyCode === KeyCode.BACKSPACE || keyDownEvent.key === Key.BACKSPACE;\n var isDeleteKey = keyDownEvent.keyCode === KeyCode.DELETE || keyDownEvent.key === Key.DELETE;\n var originalInteractionMode = this.interactionMode;\n if (this.options.allowCaretMode &&\n originalInteractionMode !== DateInputInteractionMode.Caret &&\n !isDeleteKey && !isBackspaceKey) {\n this.resetSegmentValue = true;\n }\n if (this.options.allowCaretMode) {\n this.interactionMode = DateInputInteractionMode.Caret;\n }\n else {\n this.interactionMode = DateInputInteractionMode.Selection;\n }\n var hasCaret = this.isInCaretMode();\n if (hasCaret && this.keyDownEvent.key === Key.SPACE) {\n // do not allow custom \"holes\" in the date segments\n this.restorePreviousInputEventState();\n return;\n }\n var oldExistingDateValue = this.dateObject && this.dateObject.getValue();\n var oldDateValue = this.dateObject ? this.dateObject.value : null;\n var _a = this.dateObject.getTextAndFormat(), currentText = _a.text, currentFormat = _a.format;\n this.currentFormat = currentFormat;\n var oldText = \"\";\n if (hasCaret) {\n if (isBackspaceKey || isDeleteKey) {\n oldText = this.previousElementValue;\n }\n else if (originalInteractionMode === DateInputInteractionMode.Caret) {\n oldText = this.previousElementValue;\n }\n else {\n oldText = currentText;\n }\n }\n else {\n oldText = currentText;\n }\n var newText = this.elementValue;\n var diff = approximateStringMatching({\n oldText: oldText,\n newText: newText,\n formatPattern: this.currentFormat,\n selectionStart: this.selection.start,\n isInCaretMode: hasCaret,\n keyEvent: this.keyDownEvent\n });\n if (diff && diff.length && diff[0] && diff[0][1] !== Constants.formatSeparator) {\n this.switchedPartOnPreviousKeyAction = false;\n }\n if (hasCaret && (!diff || diff.length === 0)) {\n this.restorePreviousInputEventState();\n return;\n }\n else if (hasCaret && diff.length === 1) {\n if (!diff[0] || !diff[0][0]) {\n this.restorePreviousInputEventState();\n return;\n }\n else if (hasCaret && diff[0] &&\n (diff[0][0] === Constants.formatSeparator || diff[0][1] === Constants.formatSeparator)) {\n this.restorePreviousInputEventState();\n return;\n }\n }\n var navigationOnly = (diff.length === 1 && diff[0][1] === Constants.formatSeparator);\n var parsePartsResults = [];\n var switchPart = false;\n var error = null;\n if (!navigationOnly) {\n for (var i = 0; i < diff.length; i++) {\n var parsePartResult = this.dateObject.parsePart({\n symbol: diff[i][0],\n currentChar: diff[i][1],\n resetSegmentValue: this.resetSegmentValue,\n cycleSegmentValue: !this.isInCaretMode(),\n rawTextValue: this.element.value,\n isDeleting: isBackspaceKey || isDeleteKey,\n originalFormat: this.currentFormat\n });\n parsePartsResults.push(parsePartResult);\n if (!parsePartResult.value) {\n error = { type: \"parse\" };\n }\n switchPart = parsePartResult.switchToNext;\n }\n }\n if (!this.options.autoSwitchParts) {\n switchPart = false;\n }\n this.resetSegmentValue = false;\n var hasFixedFormat = this.options.format === this.currentFormat ||\n // all not fixed formats are 1 symbol, e.g. \"d\"\n (isPresent(this.options.format) && this.options.format.length > 1);\n var lastParseResult = parsePartsResults[parsePartsResults.length - 1];\n var lastParseResultHasNoValue = lastParseResult && !isPresent(lastParseResult.value);\n var parsingFailedOnDelete = (hasCaret && (isBackspaceKey || isDeleteKey) && lastParseResultHasNoValue);\n var resetPart = lastParseResult ? lastParseResult.resetPart : false;\n var newExistingDateValue = this.dateObject.getValue();\n var hasExistingDateValueChanged = !isEqual(oldExistingDateValue, newExistingDateValue);\n var newDateValue = this.dateObject.value;\n var symbolForSelection;\n var currentSelection = this.selection;\n if (hasCaret) {\n var diffChar = diff && diff.length > 0 ? diff[0][0] : null;\n var hasLeadingZero = this.dateObject.getLeadingZero()[diffChar];\n if (diff.length && diff[0][0] !== Constants.formatSeparator) {\n if (switchPart) {\n this.forceUpdateWithSelection();\n this.switchDateSegment(1);\n }\n else if (resetPart) {\n symbolForSelection = this.currentFormat[currentSelection.start];\n if (symbolForSelection) {\n this.forceUpdate();\n this.setSelection(this.selectionBySymbol(symbolForSelection));\n }\n else {\n this.restorePreviousInputEventState();\n }\n }\n else if (parsingFailedOnDelete) {\n this.forceUpdate();\n if (diff.length && diff[0][0] !== Constants.formatSeparator) {\n this.setSelection(this.selectionBySymbol(diff[0][0]));\n }\n }\n else if (lastParseResultHasNoValue) {\n if (e.data === \"0\" && hasLeadingZero) {\n // do not reset element value on a leading zero\n // wait for consecutive input to determine the value\n }\n else if (isPresent(oldExistingDateValue) && !isPresent(newExistingDateValue)) {\n this.restorePreviousInputEventState();\n }\n else if (!isPresent(oldExistingDateValue) && isPresent(newExistingDateValue)) {\n this.forceUpdateWithSelection();\n }\n else if (isPresent(oldExistingDateValue) && isPresent(newExistingDateValue)) {\n if (hasExistingDateValueChanged) {\n this.forceUpdateWithSelection();\n }\n else {\n this.restorePreviousInputEventState();\n }\n }\n else if (!isPresent(oldExistingDateValue) && !isPresent(newExistingDateValue)) {\n this.forceUpdateWithSelection();\n }\n else if (oldDateValue !== newDateValue) {\n // this can happen on auto correct when no valid value is parsed\n }\n else {\n this.restorePreviousInputEventState();\n }\n }\n else if (!lastParseResultHasNoValue) {\n // the user types a valid but incomplete date (e.g. year \"123\" with format \"yyyy\")\n // let them continue typing, but refresh for not fixed formats\n if (!hasFixedFormat) {\n this.forceUpdateWithSelection();\n }\n }\n }\n else {\n if (!this.options.autoSwitchParts && diff[0][1] === Constants.formatSeparator) {\n // do not change the selection when a separator is pressed\n // this should happen only if autoSwitchKeys contains the separator explicitly\n }\n else {\n this.setSelection(this.selectionBySymbol(diff[0][0]));\n }\n }\n }\n else if (!hasCaret) {\n this.forceUpdate();\n if (diff.length && diff[0][0] !== Constants.formatSeparator) {\n this.setSelection(this.selectionBySymbol(diff[0][0]));\n }\n if (this.options.autoSwitchParts) {\n if (navigationOnly) {\n this.resetSegmentValue = true;\n if (!switchedPartOnPreviousKeyAction) {\n this.switchDateSegment(1);\n }\n this.switchedPartOnPreviousKeyAction = true;\n }\n else if (switchPart) {\n this.switchDateSegment(1);\n this.switchedPartOnPreviousKeyAction = true;\n }\n }\n else {\n if (lastParseResult && lastParseResult.switchToNext) {\n // the value is complete and should be switched, but the \"autoSwitchParts\" option prevents this\n // ensure that the segment value can be reset on next input\n this.resetSegmentValue = true;\n }\n else if (navigationOnly) {\n this.resetSegmentValue = true;\n if (!switchedPartOnPreviousKeyAction) {\n this.switchDateSegment(1);\n }\n this.switchedPartOnPreviousKeyAction = true;\n }\n }\n if (isBackspaceKey && this.options.selectPreviousSegmentOnBackspace) {\n // kendo angular have this UX\n this.switchDateSegment(-1);\n }\n }\n this.tryTriggerValueChange({\n oldValue: oldExistingDateValue,\n event: e\n });\n this.triggerInputEnd({ event: e, error: error });\n if (hasCaret) {\n // a format like \"F\" can dynamically change the resolved format pattern based on the value, e.g.\n // \"Tuesday, February 1, 2022 3:04:05 AM\" becomes\n // \"Wednesday, February 2, 2022 3:04:05 AM\" giving a diff of 2 (\"Tuesday\".length - \"Wednesday\".length)\n this.setTextAndFormat();\n }\n };\n /**\n * @hidden\n */\n DateInput.prototype.onElementFocus = function (e) {\n if (this.triggerFocus({ event: e })) {\n return;\n }\n this.isActive = true;\n this.interactionMode = DateInputInteractionMode.None;\n this.switchedPartOnPreviousKeyAction = false;\n this.refreshElementValue();\n if (!this.mouseDownStarted) {\n this.caret(0, this.elementValue.length);\n }\n this.mouseDownStarted = false;\n this.triggerFocusEnd({ event: e });\n };\n /**\n * @hidden\n */\n DateInput.prototype.onElementBlur = function (e) {\n this.resetSegmentValue = true;\n this.isActive = false;\n if (this.triggerBlur({ event: e })) {\n return;\n }\n if (this.options.autoFill) {\n this.autoFill();\n }\n this.interactionMode = DateInputInteractionMode.None;\n this.switchedPartOnPreviousKeyAction = false;\n this.refreshElementValue();\n this.triggerBlurEnd({ event: e });\n };\n /**\n * @hidden\n */\n DateInput.prototype.onElementChange = function (e) {\n this.triggerChange({ event: e });\n };\n /**\n * @hidden\n */\n DateInput.prototype.onElementKeyDown = function (e) {\n if (this.triggerKeyDown({ event: e })) {\n return;\n }\n var _a = this.selection, start = _a.start, end = _a.end;\n this.keyDownEvent = e;\n this.previousElementValue = this.element.value;\n this.previousElementSelection = { start: start, end: end };\n if (this.keyEventMatchesAutoSwitchKeys(e)) {\n var isTabKey = e.keyCode === KeyCode.TAB;\n if (isTabKey) {\n var _b = this.selection, selectionStart = _b.start, selectionEnd = _b.end;\n if (e.shiftKey && isTabKey) {\n this.switchDateSegment(-1);\n }\n else {\n this.switchDateSegment(1);\n }\n if (selectionStart !== this.selection.start || selectionEnd !== this.selection.end) {\n // when the selection changes, prevent the default Tab behavior\n e.preventDefault();\n return;\n }\n }\n else {\n // do not allow the \"input\" event to be triggered\n e.preventDefault();\n this.switchDateSegment(1);\n return;\n }\n }\n var symbol = this.currentFormat[this.selection.start];\n var step = this.getStepFromSymbol(symbol);\n var shouldPreventDefault = false;\n if (e.altKey || e.ctrlKey || e.metaKey || e.keyCode === KeyCode.TAB) {\n return;\n }\n switch (e.keyCode) {\n case KeyCode.ARROW_LEFT:\n this.switchDateSegment(-1);\n shouldPreventDefault = true;\n this.switchedPartOnPreviousKeyAction = false;\n break;\n case KeyCode.ARROW_UP:\n this.modifyDateSegmentValue(step, symbol, event);\n shouldPreventDefault = true;\n this.switchedPartOnPreviousKeyAction = false;\n break;\n case KeyCode.ARROW_RIGHT:\n this.switchDateSegment(1);\n shouldPreventDefault = true;\n this.switchedPartOnPreviousKeyAction = false;\n break;\n case KeyCode.ARROW_DOWN:\n this.modifyDateSegmentValue(-step, symbol, event);\n shouldPreventDefault = true;\n this.switchedPartOnPreviousKeyAction = false;\n break;\n case KeyCode.ENTER:\n // todo: handle \"change\" event\n break;\n case KeyCode.HOME:\n this.selectNearestSegment(0);\n shouldPreventDefault = true;\n this.switchedPartOnPreviousKeyAction = false;\n this.resetSegmentValue = true;\n break;\n case KeyCode.END:\n this.selectNearestSegment(this.elementValue.length);\n shouldPreventDefault = true;\n this.switchedPartOnPreviousKeyAction = false;\n this.resetSegmentValue = true;\n break;\n default:\n // allow the \"input\" event to handle the change\n return;\n }\n if (shouldPreventDefault) {\n e.preventDefault();\n }\n };\n /**\n * @hidden\n */\n DateInput.prototype.onElementPaste = function () {\n this.isPasteInProgress = true;\n };\n /**\n * @hidden\n */\n DateInput.prototype.onElementMouseWheel = function (e) {\n if (!this.options.enableMouseWheel || this.triggerMouseWheel({ event: e })) {\n return;\n }\n if (!this.isActive) {\n return;\n }\n var event = e;\n if (event.shiftKey) {\n this.switchDateSegment((event.wheelDelta || -event.detail) > 0 ? -1 : 1);\n }\n else {\n this.modifyDateSegmentValue((event.wheelDelta || -event.detail) > 0 ? 1 : -1);\n }\n event.returnValue = false;\n if (event.preventDefault) {\n event.preventDefault();\n }\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n };\n DateInput.prototype.updateOnPaste = function (e) {\n var value = this.intl.parseDate(this.elementValue, this.inputFormat) || this.value;\n if (isPresent(value) && this.dateObject.shouldNormalizeCentury()) {\n value = this.dateObject.normalizeCentury(value);\n }\n var oldDateObjectValue = this.dateObject && this.dateObject.getValue();\n this.writeValue(value);\n this.tryTriggerValueChange({\n oldValue: oldDateObjectValue,\n event: e\n });\n };\n Object.defineProperty(DateInput.prototype, \"elementValue\", {\n get: function () {\n return (this.element || {}).value || '';\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DateInput.prototype, \"inputFormat\", {\n get: function () {\n if (!this.options.format) {\n return Constants.defaultDateFormat;\n }\n if (typeof this.options.format === 'string') {\n return this.options.format;\n }\n else {\n return this.options.format.inputFormat;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DateInput.prototype, \"displayFormat\", {\n get: function () {\n if (!this.options.format) {\n return Constants.defaultDateFormat;\n }\n if (typeof this.options.format === 'string') {\n return this.options.format;\n }\n else {\n return this.options.format.displayFormat;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DateInput.prototype, \"selection\", {\n get: function () {\n var returnValue = { start: 0, end: 0 };\n if (this.element !== null && this.element.selectionStart !== undefined) {\n returnValue = {\n start: this.element.selectionStart,\n end: this.element.selectionEnd\n };\n }\n return returnValue;\n },\n enumerable: true,\n configurable: true\n });\n DateInput.prototype.setSelection = function (selection) {\n if (this.element && document.activeElement === this.element) {\n this.element.setSelectionRange(selection.start, selection.end);\n if (selection.start !== selection.end) {\n this.interactionMode = DateInputInteractionMode.Selection;\n }\n }\n };\n /**\n * @hidden\n */\n DateInput.prototype.selectionBySymbol = function (symbol) {\n var start = -1;\n var end = 0;\n for (var i = 0; i < this.currentFormat.length; i++) {\n if (this.currentFormat[i] === symbol) {\n end = i + 1;\n if (start === -1) {\n start = i;\n }\n }\n }\n if (start < 0) {\n start = 0;\n }\n if (!this.options.autoCorrectParts && this.currentFormat.length !== this.currentText.length) {\n if (this.currentFormat.length < this.currentText.length) {\n end += this.currentText.length - this.currentFormat.length;\n }\n else {\n end = Math.max(0, end - (this.currentFormat.length - this.currentText.length));\n }\n }\n return { start: start, end: end };\n };\n /**\n * @hidden\n */\n DateInput.prototype.selectionByIndex = function (index) {\n var selection = { start: index, end: index };\n for (var i = index, j = index - 1; i < this.currentFormat.length || j >= 0; i++, j--) {\n if (i < this.currentFormat.length && this.currentFormat[i] !== Constants.formatSeparator) {\n selection = this.selectionBySymbol(this.currentFormat[i]);\n break;\n }\n if (j >= 0 && this.currentFormat[j] !== Constants.formatSeparator) {\n selection = this.selectionBySymbol(this.currentFormat[j]);\n break;\n }\n }\n return selection;\n };\n DateInput.prototype.switchDateSegment = function (offset) {\n var selection = this.selection;\n if (this.isInCaretMode()) {\n var start = selection.start;\n var currentSymbol = this.currentFormat[start - 1];\n var symbol = \"\";\n var symbolCandidate = \"\";\n if (offset < 0) {\n for (var i = start + offset; i >= 0; i--) {\n symbolCandidate = this.currentFormat[i];\n if (symbolCandidate !== Constants.formatSeparator &&\n symbolCandidate !== currentSymbol) {\n start = i;\n symbol = symbolCandidate;\n break;\n }\n }\n }\n else {\n for (var i = start + offset; i < this.currentFormat.length; i++) {\n symbolCandidate = this.currentFormat[i];\n if (symbolCandidate !== Constants.formatSeparator &&\n symbolCandidate !== currentSymbol) {\n start = i;\n symbol = symbolCandidate;\n break;\n }\n }\n }\n if (symbol) {\n this.forceUpdate();\n this.setSelection(this.selectionBySymbol(symbol));\n this.interactionMode = DateInputInteractionMode.Selection;\n return;\n }\n }\n this.interactionMode = DateInputInteractionMode.None;\n var _a = this.selection, selectionStart = _a.start, selectionEnd = _a.end;\n if (selectionStart < selectionEnd &&\n this.currentFormat[selectionStart] !== this.currentFormat[selectionEnd - 1]) {\n this.setSelection(this.selectionByIndex(offset > 0 ? selectionStart : selectionEnd - 1));\n this.resetSegmentValue = true;\n this.interactionMode = DateInputInteractionMode.None;\n return;\n }\n var previousFormatSymbol = this.currentFormat[selectionStart];\n var a = selectionStart + offset;\n while (a > 0 && a < this.currentFormat.length) {\n if (this.currentFormat[a] !== previousFormatSymbol &&\n this.currentFormat[a] !== Constants.formatSeparator) {\n break;\n }\n a += offset;\n }\n if (this.currentFormat[a] === Constants.formatSeparator) {\n // no known symbol is found\n return;\n }\n var b = a;\n while (b >= 0 && b < this.currentFormat.length) {\n if (this.currentFormat[b] !== this.currentFormat[a]) {\n break;\n }\n b += offset;\n }\n if (a > b && (b + 1 !== selectionStart || a + 1 !== selectionEnd)) {\n this.setSelection({ start: b + 1, end: a + 1 });\n this.resetSegmentValue = true;\n }\n else if (a < b && (a !== selectionStart || b !== selectionEnd)) {\n this.setSelection({ start: a, end: b });\n this.resetSegmentValue = true;\n }\n this.interactionMode = DateInputInteractionMode.None;\n };\n DateInput.prototype.modifyDateSegmentValue = function (offset, symbol, event) {\n if (symbol === void 0) { symbol = \"\"; }\n if (event === void 0) { event = {}; }\n if (!this.dateObject || this.options.readonly) {\n return;\n }\n var oldValue = this.value;\n var step = DEFAULT_SEGMENT_STEP * offset;\n var caret = this.caret();\n symbol = symbol || this.currentFormat[caret[0]];\n if (symbol === \"S\" && !this.options.steps.millisecond) {\n var msDigits = millisecondDigitsInFormat(this.inputFormat);\n step = millisecondStepFor(msDigits);\n }\n this.dateObject.modifyPart(symbol, step);\n this.tryTriggerValueChange({\n oldValue: oldValue,\n event: event\n });\n this.forceUpdate();\n this.setSelection(this.selectionBySymbol(symbol));\n };\n /**\n * @hidden\n */\n DateInput.prototype.tryTriggerValueChange = function (args) {\n if (args === void 0) { args = { oldValue: null, event: {} }; }\n if (!isEqual(this.value, args.oldValue)) {\n return this.triggerValueChange(args);\n }\n };\n /**\n * @hidden\n */\n DateInput.prototype.triggerValueChange = function (args) {\n if (args === void 0) { args = { oldValue: null, event: {} }; }\n return this.trigger(VALUE_CHANGE, extend(args, {\n value: this.value\n }));\n };\n /**\n * @hidden\n */\n DateInput.prototype.triggerInput = function (args) {\n if (args === void 0) { args = { event: {} }; }\n return this.trigger(INPUT, extend(args, {\n value: this.value\n }));\n };\n /**\n * @hidden\n */\n DateInput.prototype.triggerInputEnd = function (args) {\n if (args === void 0) { args = { event: {}, error: null }; }\n return this.trigger(INPUT_END, extend(args, {\n value: this.value\n }));\n };\n /**\n * @hidden\n */\n DateInput.prototype.triggerFocus = function (args) {\n if (args === void 0) { args = { event: {} }; }\n return this.trigger(FOCUS, extend({}, args));\n };\n /**\n * @hidden\n */\n DateInput.prototype.triggerFocusEnd = function (args) {\n if (args === void 0) { args = { event: {} }; }\n return this.trigger(FOCUS_END, extend({}, args));\n };\n /**\n * @hidden\n */\n DateInput.prototype.triggerBlur = function (args) {\n if (args === void 0) { args = { event: {} }; }\n return this.trigger(BLUR, extend({}, args));\n };\n /**\n * @hidden\n */\n DateInput.prototype.triggerBlurEnd = function (args) {\n if (args === void 0) { args = { event: {} }; }\n return this.trigger(BLUR_END, extend({}, args));\n };\n /**\n * @hidden\n */\n DateInput.prototype.triggerChange = function (args) {\n if (args === void 0) { args = { event: {} }; }\n return this.trigger(CHANGE, extend(args, {\n value: this.value\n }));\n };\n /**\n * @hidden\n */\n DateInput.prototype.triggerKeyDown = function (args) {\n if (args === void 0) { args = { event: {} }; }\n return this.trigger(KEY_DOWN, extend({}, args));\n };\n /**\n * @hidden\n */\n DateInput.prototype.triggerMouseWheel = function (args) {\n if (args === void 0) { args = { event: {} }; }\n return this.trigger(MOUSE_WHEEL, extend({}, args));\n };\n /**\n * @hidden\n */\n DateInput.prototype.forceUpdate = function () {\n this.setTextAndFormat();\n this.refreshElementValue();\n };\n /**\n * @hidden\n */\n DateInput.prototype.forceUpdateWithSelection = function () {\n var _a = this.selection, start = _a.start, end = _a.end;\n var elementValueLength = this.elementValue.length;\n this.forceUpdate();\n var selectionOffset = this.elementValue.length - elementValueLength;\n this.setSelection({\n start: start + selectionOffset,\n end: end + selectionOffset\n });\n };\n /**\n * @hidden\n */\n DateInput.prototype.setTextAndFormat = function () {\n var _a = this.dateObject.getTextAndFormat(), currentText = _a.text, currentFormat = _a.format;\n this.currentFormat = currentFormat;\n this.currentText = currentText;\n };\n /**\n * @hidden\n */\n DateInput.prototype.setElementValue = function (value) {\n this.element.value = value;\n };\n /**\n * @hidden\n */\n DateInput.prototype.getStepFromSymbol = function (symbol) {\n /* eslint-disable no-fallthrough */\n switch (symbol) {\n case \"S\":\n return Number(this.options.steps.millisecond);\n case \"s\":\n return Number(this.options.steps.second);\n case \"m\":\n return Number(this.options.steps.minute);\n // represents hour as value from 01 through 12\n case \"h\":\n // represents hour as value from 01 through 23\n case \"H\":\n return Number(this.options.steps.hour);\n case \"M\":\n return Number(this.options.steps.month);\n // there is no 'D' format specifier for day\n case \"d\":\n // used for formats such as \"EEEE, MMMM d, yyyy\",\n // where \"EEEE\" stands for full name of the day e.g. Monday\n case \"E\":\n return Number(this.options.steps.day);\n // there is no 'Y' format specifier for year\n case \"y\":\n return Number(this.options.steps.year);\n default:\n return DEFAULT_SEGMENT_STEP;\n }\n /* eslint-enable no-fallthrough */\n };\n /**\n * @hidden\n */\n DateInput.prototype.restorePreviousInputEventState = function () {\n this.restorePreviousElementValue();\n this.restorePreviousElementSelection();\n };\n /**\n * @hidden\n */\n DateInput.prototype.restorePreviousElementValue = function () {\n this.setElementValue(this.previousElementValue || '');\n };\n /**\n * @hidden\n */\n DateInput.prototype.restorePreviousElementSelection = function () {\n var _a = this.previousElementSelection, start = _a.start, end = _a.end;\n this.setSelection({ start: start || 0, end: end || 0 });\n };\n DateInput.prototype.writeValue = function (value) {\n this.verifyValue(value);\n this.dateObject = this.getDateObject(value);\n this.refreshElementValue();\n };\n DateInput.prototype.verifyValue = function (value) {\n if (value && !isValidDate(value)) {\n throw new Error(\"The 'value' should be a valid JavaScript Date instance.\");\n }\n };\n DateInput.prototype.refreshElementValue = function () {\n var start = this.caret()[0];\n var element = this.element;\n var format = this.isActive ? this.inputFormat : this.displayFormat;\n var _a = this.dateObject.getTextAndFormat(format), currentText = _a.text, currentFormat = _a.format;\n this.currentFormat = currentFormat;\n this.currentText = currentText;\n var hasPlaceholder = this.options.hasPlaceholder || isPresent(this.options.placeholder);\n var showPlaceholder = !this.isActive &&\n hasPlaceholder &&\n !this.dateObject.hasValue();\n if (hasPlaceholder && isPresent(this.options.placeholder)) {\n element.placeholder = this.options.placeholder;\n }\n var newElementValue = showPlaceholder ? \"\" : currentText;\n this.previousElementValue = this.elementValue;\n this.setElementValue(newElementValue);\n if (this.isActive && !this.options.allowCaretMode && this.options.selectNearestSegmentOnFocus) {\n this.selectNearestSegment(start);\n }\n };\n /**\n * @hidden\n */\n DateInput.prototype.caret = function (start, end) {\n if (end === void 0) { end = start; }\n var isPosition = start !== undefined;\n var returnValue = [start, start];\n var element = this.element;\n if (isPosition && (this.options.disabled || this.options.readonly)) {\n return undefined;\n }\n try {\n if (element.selectionStart !== undefined) {\n if (isPosition) {\n if (isDocumentAvailable() && document.activeElement !== element) {\n element.focus();\n }\n element.setSelectionRange(start, end);\n }\n returnValue = [element.selectionStart, element.selectionEnd];\n }\n }\n catch (e) {\n returnValue = [];\n }\n return returnValue;\n };\n DateInput.prototype.selectNearestSegment = function (index) {\n // Finds the nearest (in both directions) known part.\n for (var i = index, j = index - 1; i < this.currentFormat.length || j >= 0; i++, j--) {\n if (i < this.currentFormat.length && this.currentFormat[i] !== \"_\") {\n this.selectDateSegment(this.currentFormat[i]);\n return;\n }\n if (j >= 0 && this.currentFormat[j] !== \"_\") {\n this.selectDateSegment(this.currentFormat[j]);\n return;\n }\n }\n };\n DateInput.prototype.selectDateSegment = function (symbol) {\n var begin = -1;\n var end = 0;\n for (var i = 0; i < this.currentFormat.length; i++) {\n if (this.currentFormat[i] === symbol) {\n end = i + 1;\n if (begin === -1) {\n begin = i;\n }\n }\n }\n if (begin < 0) {\n begin = 0;\n }\n this.caret(0, 0);\n this.caret(begin, end);\n };\n /**\n * @hidden\n */\n DateInput.prototype.getDateObject = function (value) {\n var leadingZero = ((this.dateObject || {}) || null).leadingZero;\n this.options.value = value;\n var dateObject = this.createDateObject();\n dateObject.setLeadingZero(this.isActive ? leadingZero : null);\n return dateObject;\n };\n /* tslint:disable:align */\n /**\n * @hidden\n */\n DateInput.prototype.createDateObject = function () {\n var defaultOptions = this.getDateObjectOptions();\n var dateObject = new DateObject(extend({}, defaultOptions));\n return dateObject;\n };\n /**\n * @hidden\n */\n DateInput.prototype.getDateObjectOptions = function () {\n var newOptions = {\n intlService: this.options.intlService,\n formatPlaceholder: this.options.formatPlaceholder ? this.options.formatPlaceholder : 'formatPattern',\n format: this.inputFormat,\n cycleTime: this.options.cycleTime,\n twoDigitYearMax: this.options.twoDigitYearMax,\n autoCorrectParts: this.options.autoCorrectParts,\n value: this.options.value\n };\n return newOptions;\n };\n /* tslint:enable:align */\n /**\n * @hidden\n */\n DateInput.prototype.keyEventMatchesAutoSwitchKeys = function (keyObject) {\n var autoSwitchKeys = (this.options.autoSwitchKeys || [])\n .map(function (x) { return x.toString().toLowerCase().trim(); });\n if (autoSwitchKeys.indexOf(keyObject.keyCode.toString()) >= 0 ||\n autoSwitchKeys.indexOf(keyObject.keyCode) >= 0 ||\n autoSwitchKeys.indexOf(keyObject.key.toLowerCase().trim()) >= 0) {\n return true;\n }\n return false;\n };\n /**\n * @hidden\n */\n DateInput.prototype.autoFill = function () {\n var dateObject = this.dateObject, currentDate = new Date(), day, month, year, hours, minutes, seconds;\n if (dateObject.date || dateObject.month || dateObject.year || dateObject.hours || dateObject.minutes || dateObject.seconds) {\n year = dateObject.year ? dateObject.value.getFullYear() : currentDate.getFullYear(),\n month = dateObject.month ? dateObject.value.getMonth() : currentDate.getMonth(),\n day = dateObject.date ? dateObject.value.getDate() : currentDate.getDate(),\n hours = dateObject.hours ? dateObject.value.getHours() : currentDate.getHours(),\n minutes = dateObject.minutes ? dateObject.value.getMinutes() : currentDate.getMinutes(),\n seconds = dateObject.seconds ? dateObject.value.getSeconds() : currentDate.getSeconds();\n dateObject.setValue(new Date(year, month, day, hours, minutes, seconds));\n this.refreshElementValue();\n this.triggerChange();\n }\n };\n return DateInput;\n}(Observable));\n\nvar __meta__ = {\n id: \"dateinputcommon\",\n name: \"DateInputCommon\",\n category: \"web\",\n description: \"This is the common package for date editing accross all kendo flavours\",\n depends: [\"core\"]\n};\n\n(function($, undefined$1) {\n kendo.ui.DateInputCommon = DateInput;\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.core.js';\nimport './kendo.label.js';\nimport './kendo.icons.js';\nimport './kendo.dateinput.common.js';\n\nvar __meta__ = {\n id: \"dateinput\",\n name: \"DateInput\",\n category: \"web\",\n description: \"The DateInput widget allows to edit date by typing.\",\n depends: [ \"core\", \"label\" ]\n};\n\n(function($, undefined$1) {\n var global = window;\n var kendo = global.kendo;\n var ui = kendo.ui;\n var Widget = ui.Widget;\n var DateInputCommon = ui.DateInputCommon;\n var ns = \".kendoDateInput\";\n var objectToString = {}.toString;\n var isPlainObject = $.isPlainObject;\n\n\n var FOCUSED = \"k-focus\";\n var STATEDISABLED = \"k-disabled\";\n var STATEINVALID = \"k-invalid\";\n\n var DISABLED = \"disabled\";\n var READONLY = \"readonly\";\n var CHANGE = \"change\";\n\n var IntlService = kendo.Class.extend({\n init: function(options) {\n const info = options.culture ? kendo.getCulture(options.culture) : kendo.culture();\n this.messages = options.messages;\n this.cldr = { };\n this.cldr[info.name] = {\n name: info.name,\n calendar: info.calendar || {},\n numbers: info.numberFormat\n };\n },\n\n parseDate: function(value, format, culture) {\n return kendo.parseDate(value, format, culture);\n },\n\n formatDate: function(date, format, culture) {\n return kendo.toString(date, format, culture);\n },\n\n splitDateFormat: function(format) {\n return kendo.date.splitDateFormat(format);\n },\n\n dateFormatNames: function(locale, options) {\n return kendo.date.dateFormatNames(options);\n },\n\n dateFieldName: function(options) {\n return this.messages[options.type] || {};\n }\n });\n\n function buildKeys() {\n const cultureInfo = kendo.culture();\n let keys = [];\n\n keys.push(cultureInfo.calendars.standard[\"/\"]);\n keys.push(cultureInfo.calendars.standard[\":\"]);\n\n return keys;\n }\n\n function getCultureFormat(culture, format) {\n if (!culture) {\n return format;\n }\n const cultureInfo = kendo.getCulture(culture);\n return cultureInfo.calendars.standard.patterns[format] || format;\n }\n\n var DateInput = Widget.extend({\n init: function(element, options) {\n var that = this;\n\n Widget.fn.init.call(that, element, options);\n element = that.element;\n\n options = that.options;\n options.format = kendo._extractFormat(options.format || kendo.getCulture(options.culture).calendars.standard.patterns.d);\n options.min = kendo.parseDate(element.attr(\"min\")) || kendo.parseDate(options.min);\n options.max = kendo.parseDate(element.attr(\"max\")) || kendo.parseDate(options.max);\n\n var wrapperClass = (element.parent().attr(\"class\") || \"\");\n var skipStyling = wrapperClass.indexOf(\"picker\") >= 0 && wrapperClass.indexOf(\"rangepicker\") < 0;\n var initialValue = that.options.value || element.val();\n\n if (skipStyling) {\n that.wrapper = that.element.parent();\n } else {\n that.wrapper = element.wrap(\"\").parent();\n that.wrapper.addClass(element[0].className).removeClass('input-validation-error');\n }\n that.wrapper[0].style.cssText = element[0].style.cssText;\n element.css({\n height: element[0].style.height\n });\n\n\n that._validationIcon = $(kendo.ui.icon({ icon: \"exclamation-circle\", iconClass: \"k-input-validation-icon k-hidden\" })).insertAfter(element);\n\n that._form();\n\n that.dateInputInstance = new DateInputCommon(element[0], {\n format: getCultureFormat(options.culture, options.format),\n autoCorrectParts: options.autoCorrectParts,\n autoSwitchKeys: options.autoSwitchKeys.length ? options.autoSwitchKeys : buildKeys(),\n enableMouseWheel: options.enableMouseWheel,\n twoDigitYearMax: options.twoDigitYearMax,\n steps: options.steps,\n formatPlaceholder: options.messages,\n events: {\n inputEnd: function(e) {\n if (e.error) {\n that._blinkInvalidState();\n }\n },\n keydown: function(e) {\n if (e.event.keyCode == kendo.keys.UP || e.event.keyCode == kendo.keys.DOWN) {\n setTimeout(function() {\n that.element.trigger(CHANGE);\n });\n }\n },\n blur: function(e) {\n that._change();\n e.preventDefault();\n },\n },\n intlService: new IntlService({\n culture: options.culture,\n messages: that.options.messages\n }),\n autoSwitchParts: options.autoSwitchParts,\n autoFill: false\n });\n\n that._emptyMask = this.element.val();\n if (options.value) {\n that.value(options.value);\n }\n\n that.element\n .addClass(\"k-input-inner\")\n .attr(\"autocomplete\", \"off\")\n .on(\"focus\" + ns, function() {\n that.wrapper.addClass(FOCUSED);\n })\n .on(\"focusout\" + ns, function() {\n that.wrapper.removeClass(FOCUSED);\n });\n\n try {\n element[0].setAttribute(\"type\", \"text\");\n } catch (e) {\n element[0].type = \"text\";\n }\n\n var disabled = element.is(\"[disabled]\") || $(that.element).parents(\"fieldset\").is(':disabled');\n\n if (disabled) {\n that.enable(false);\n } else {\n that.readonly(element.is(\"[readonly]\"));\n }\n that.value(initialValue);\n if (!skipStyling) {\n that._applyCssClasses();\n }\n\n if (options.label) {\n that._label();\n }\n\n kendo.notify(that);\n },\n\n options: {\n name: \"DateInput\",\n autoCorrectParts: true,\n autoSwitchKeys: [],\n autoSwitchParts: false,\n enableMouseWheel: true,\n culture: \"\",\n value: \"\",\n format: \"\",\n min: new Date(1900, 0, 1),\n max: new Date(2099, 11, 31),\n messages: {\n \"year\": \"year\",\n \"month\": \"month\",\n \"day\": \"day\",\n \"weekday\": \"day of the week\",\n \"hour\": \"hours\",\n \"minute\": \"minutes\",\n \"second\": \"seconds\",\n \"milliseconds\": \"milliseconds\",\n \"dayperiod\": \"AM/PM\"\n },\n size: \"medium\",\n steps: {\n year: 1,\n month: 1,\n day: 1,\n hour: 1,\n minute: 1,\n second: 1,\n millisecond: 1,\n },\n fillMode: \"solid\",\n rounded: \"medium\",\n label: null,\n autoFill: false\n },\n\n events: [\n CHANGE\n ],\n\n min: function(value) {\n if (value !== undefined$1) {\n this.options.min = value;\n } else {\n return this.options.min;\n }\n },\n\n max: function(value) {\n if (value !== undefined$1) {\n this.options.max = value;\n } else {\n return this.options.max;\n }\n },\n\n setOptions: function(options) {\n var that = this;\n Widget.fn.setOptions.call(that, options);\n that.dateInputInstance.destroy();\n that.dateInputInstance = null;\n\n that.dateInputInstance = new DateInputCommon(this.element[0], {\n format: getCultureFormat(that.options.culture, that.options.format),\n autoSwitchKeys: that.options.autoSwitchKeys.length ? that.options.autoSwitchKeys : buildKeys(),\n autoCorrectParts: that.options.autoCorrectParts,\n enableMouseWheel: that.options.enableMouseWheel,\n steps: that.options.steps,\n twoDigitYearMax: that.options.twoDigitYearMax,\n formatPlaceholder: that.options.messages,\n events: {\n inputEnd: function(e) {\n if (e.error) {\n that._blinkInvalidState();\n }\n },\n keydown: function(e) {\n if (e.event.keyCode == kendo.keys.UP || e.event.keyCode == kendo.keys.DOWN) {\n setTimeout(function() {\n that.element.trigger(CHANGE);\n });\n }\n },\n blur: function(e) {\n that._change();\n e.preventDefault();\n },\n },\n intlService: new IntlService({\n culture: that.options.culture,\n messages: that.options.messages\n }),\n autoSwitchParts: that.options.autoSwitchParts,\n autoFill: that.options.autoFill\n });\n },\n\n destroy: function() {\n var that = this;\n that.element.off(ns);\n that.dateInputInstance.destroy();\n\n if (that._formElement) {\n that._formElement.off(\"reset\", that._resetHandler);\n }\n\n if (that.label) {\n that.label.destroy();\n }\n\n if (that._validationIcon) {\n that._validationIcon.remove();\n }\n\n Widget.fn.destroy.call(that);\n },\n\n value: function(value) {\n if (value === undefined$1) {\n return this.dateInputInstance.value;\n }\n\n if (value === null) {\n value = \"\";\n }\n\n if (objectToString.call(value) !== \"[object Date]\") {\n value = kendo.parseDate(value, this.options.format, this.options.culture);\n }\n\n if (value && !value.getTime()) {\n value = null;\n }\n\n this.dateInputInstance.writeValue(value);\n\n if (this.label && this.label.floatingLabel) {\n this.label.floatingLabel.refresh();\n }\n },\n\n _hasDateInput: function() {\n\n return this._emptyMask !== this.element.val();\n },\n\n readonly: function(readonly) {\n this._editable({\n readonly: readonly === undefined$1 ? true : readonly,\n disable: false\n });\n\n if (this.label && this.label.floatingLabel) {\n this.label.floatingLabel.readonly(readonly === undefined$1 ? true : readonly);\n }\n },\n\n enable: function(enable) {\n this._editable({\n readonly: false,\n disable: !(enable = enable === undefined$1 ? true : enable)\n });\n\n if (this.label && this.label.floatingLabel) {\n this.label.floatingLabel.enable(enable = enable === undefined$1 ? true : enable);\n }\n },\n\n _label: function() {\n var that = this;\n var options = that.options;\n var labelOptions = isPlainObject(options.label) ? options.label : {\n content: options.label\n };\n\n that.label = new kendo.ui.Label(null, $.extend({}, labelOptions, {\n widget: that,\n floatCheck: () => {\n if (!that.value() && !that._hasDateInput() && document.activeElement !== that.element[0]) {\n this.element.val(\"\");\n return true;\n }\n\n return false;\n }\n }));\n\n that._inputLabel = that.label.element;\n },\n\n _bindInput: function() {\n var that = this;\n that.element\n .on(\"focus\" + ns, function() {\n that.wrapper.addClass(FOCUSED);\n })\n .on(\"focusout\" + ns, function() {\n that.wrapper.removeClass(FOCUSED);\n });\n\n if (this.dateInputInstance) {\n this.dateInputInstance.bindEvents();\n }\n },\n\n _unbindInput: function() {\n this.element\n .off(\"focus\" + ns)\n .off(\"focusout\" + ns);\n\n if (this.dateInputInstance) {\n this.dateInputInstance.unbindEvents();\n }\n },\n\n _editable: function(options) {\n var that = this;\n var element = that.element;\n var disable = options.disable;\n var readonly = options.readonly;\n var wrapper = that.wrapper;\n\n that._unbindInput();\n\n if (!readonly && !disable) {\n wrapper.removeClass(STATEDISABLED);\n if (element && element.length) {\n element[0].removeAttribute(DISABLED);\n element[0].removeAttribute(READONLY);\n }\n\n that._bindInput();\n } else {\n if (disable) {\n wrapper.addClass(STATEDISABLED);\n element.attr(DISABLED, disable);\n if (element && element.length) {\n element[0].removeAttribute(READONLY);\n }\n }\n if (readonly) {\n element.attr(READONLY, readonly);\n }\n }\n },\n\n _change: function() {\n var that = this;\n var oldValue = that._oldValue;\n var value = that.value();\n\n if (value && that.min() && value < that.min()) {\n that.value(that.min());\n value = that.value();\n }\n if (value && that.max() && value > that.max()) {\n that.value(that.max());\n value = that.value();\n }\n\n if (oldValue && value && value.getTime() !== oldValue.getTime() ||\n oldValue && !value ||\n !oldValue && value\n ) {\n that._oldValue = value;\n that.trigger(CHANGE);\n that.element.trigger(CHANGE);\n }\n },\n\n\n _blinkInvalidState: function() {\n var that = this;\n\n that._addInvalidState();\n clearTimeout(that._invalidStateTimeout);\n that._invalidStateTimeout = setTimeout(that._removeInvalidState.bind(that), 100);\n },\n\n _addInvalidState: function() {\n var that = this;\n\n that.wrapper.addClass(STATEINVALID);\n that._validationIcon.removeClass(\"k-hidden\");\n },\n\n _removeInvalidState: function() {\n var that = this;\n\n that.wrapper.removeClass(STATEINVALID);\n that._validationIcon.addClass(\"k-hidden\");\n that._invalidStateTimeout = null;\n },\n\n\n _form: function() {\n var that = this;\n var element = that.element;\n var formId = element.attr(\"form\");\n var form = formId ? $(\"#\" + formId) : element.closest(\"form\");\n var initialValue = element[0].value;\n\n if (!initialValue && that.options.value) {\n initialValue = that.options.value;\n }\n\n if (form[0]) {\n that._resetHandler = function() {\n setTimeout(function() {\n that.value(initialValue);\n });\n };\n\n that._formElement = form.on(\"reset\", that._resetHandler);\n }\n },\n\n _paste: function(e) {\n e.preventDefault();\n },\n\n\n });\n\n kendo.cssProperties.registerPrefix(\"DateInput\", \"k-input-\");\n\n kendo.cssProperties.registerValues(\"DateInput\", [{\n prop: \"rounded\",\n values: kendo.cssProperties.roundedValues.concat([['full', 'full']])\n }]);\n\n ui.plugin(DateInput);\n\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.calendar.js';\nimport './kendo.popup.js';\nimport './kendo.dateinput.js';\nimport './kendo.html.button.js';\nimport './kendo.label.js';\nimport './kendo.actionsheet.js';\n\nvar __meta__ = {\n id: \"datepicker\",\n name: \"DatePicker\",\n category: \"web\",\n description: \"The DatePicker widget allows the user to select a date from a calendar or by direct input.\",\n depends: [ \"calendar\", \"popup\", \"html.button\", \"label\", \"actionsheet\" ]\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n ui = kendo.ui,\n html = kendo.html,\n mediaQuery = kendo.mediaQuery,\n Widget = ui.Widget,\n parse = kendo.parseDate,\n keys = kendo.keys,\n support = kendo.support,\n template = kendo.template,\n activeElement = kendo._activeElement,\n DIV = \"
    \",\n SPAN = \"\",\n ns = \".kendoDatePicker\",\n CLICK = \"click\" + ns,\n UP = support.mouseAndTouchPresent ? kendo.applyEventMap(\"up\", ns.slice(1)) : CLICK,\n OPEN = \"open\",\n CLOSE = \"close\",\n CHANGE = \"change\",\n DISABLED = \"disabled\",\n READONLY = \"readonly\",\n FOCUSED = \"k-focus\",\n SELECTED = \"k-selected\",\n STATEDISABLED = \"k-disabled\",\n HOVER = \"k-hover\",\n HOVEREVENTS = \"mouseenter\" + ns + \" mouseleave\" + ns,\n MOUSEDOWN = \"mousedown\" + ns,\n NAVIGATE = \"navigate\",\n ID = \"id\",\n MIN = \"min\",\n MAX = \"max\",\n MONTH = \"month\",\n ARIA_DISABLED = \"aria-disabled\",\n ARIA_READONLY = \"aria-readonly\",\n ARIA_EXPANDED = \"aria-expanded\",\n ARIA_HIDDEN = \"aria-hidden\",\n ARIA_ACTIVEDESCENDANT = \"aria-activedescendant\",\n calendar = kendo.calendar,\n isInRange = calendar.isInRange,\n restrictValue = calendar.restrictValue,\n isEqualDatePart = calendar.isEqualDatePart,\n extend = $.extend,\n DATE = Date;\n\n function normalize(options) {\n var parseFormats = options.parseFormats,\n format = options.format;\n\n calendar.normalize(options);\n\n parseFormats = Array.isArray(parseFormats) ? parseFormats : [parseFormats];\n\n if (!parseFormats.length) {\n parseFormats.push(\"yyyy-MM-dd\");\n }\n\n if ($.inArray(format, parseFormats) === -1) {\n parseFormats.splice(0, 0, options.format);\n }\n\n options.parseFormats = parseFormats;\n }\n\n function preventDefault(e) {\n e.preventDefault();\n }\n\n var DateView = function(options) {\n var that = this, id,\n body = document.body,\n div = $(DIV).attr(ARIA_HIDDEN, \"true\")\n .addClass(\"k-calendar-container\");\n\n that.options = options = options || {};\n id = options.id;\n\n that.bigScreenMQL = mediaQuery(\"large\");\n that.smallScreenMQL = mediaQuery(\"small\");\n if (options.adaptiveMode == \"auto\" ) {\n that.smallScreenMQL.onChange(function() {\n if (that.popup && kendo.isFunction(that.popup.fullscreen)) {\n that.popup.fullscreen(that.smallScreenMQL.mediaQueryList.matches);\n }\n });\n }\n\n if (!options.omitPopup) {\n div.appendTo(body);\n if (options.adaptiveMode == \"auto\" && !that.bigScreenMQL.mediaQueryList.matches) {\n that.popup = new ui.ActionSheet(div, {\n adaptive: true,\n title: \"Set dates\",\n subtitle: \"DD / MM / YY\",\n closeButton: true,\n focusOnActivate: false,\n fullscreen: that.smallScreenMQL.mediaQueryList.matches,\n popup: extend(options.popup, options, { name: \"Popup\", isRtl: kendo.support.isRtl(options.anchor) })\n });\n } else {\n that.popup = new ui.Popup(div, extend(options.popup, options, { name: \"Popup\", isRtl: kendo.support.isRtl(options.anchor) }));\n }\n } else {\n div = options.dateDiv;\n }\n if (id) {\n id += \"_dateview\";\n\n div.attr(ID, id);\n that._dateViewID = id;\n }\n that.div = div;\n\n that.value(options.value);\n };\n\n DateView.prototype = {\n _calendar: function() {\n var that = this;\n var calendar = that.calendar;\n var options = that.options;\n var div;\n\n if (!calendar) {\n var size = options.adaptiveMode != \"auto\" || this.bigScreenMQL.mediaQueryList.matches ? this.options.size : \"large\";\n div = $(DIV).attr(ID, kendo.guid())\n .appendTo(options.omitPopup ? options.dateDiv : (that.popup._content || that.popup.element))\n .on(MOUSEDOWN, preventDefault)\n .on(CLICK, \"td:has(.k-link)\", that._click.bind(that));\n\n\n that.calendar = calendar = new ui.Calendar(div, {\n componentType: options.componentType,\n size: size,\n messages: options.messages\n });\n that._setOptions(options);\n\n div.addClass(kendo.getValidCssClass(\"k-calendar-\", \"size\", size));\n\n calendar.navigate(that._value || that._current, options.start);\n\n that.value(that._value);\n }\n },\n\n _setOptions: function(options) {\n this.calendar.setOptions({\n focusOnNav: false,\n change: options.change,\n culture: options.culture,\n dates: options.dates,\n depth: options.depth,\n footer: options.footer,\n format: options.format,\n max: options.max,\n min: options.min,\n month: options.month,\n weekNumber: options.weekNumber,\n start: options.start,\n messages: options.messages,\n disableDates: options.disableDates\n });\n },\n\n setOptions: function(options) {\n var that = this;\n var old = that.options;\n var disableDates = options.disableDates;\n\n if (disableDates) {\n options.disableDates = calendar.disabled(disableDates);\n }\n\n that.options = extend(old, options, {\n change: old.change,\n close: old.close,\n open: old.open\n });\n\n if (that.calendar) {\n that._setOptions(that.options);\n }\n },\n\n destroy: function() {\n var that = this;\n if (this.popup) {\n this.popup.destroy();\n }\n\n if (that.bigScreenMQL) {\n that.bigScreenMQL.destroy();\n that.bigScreenMQL = null;\n }\n\n if (that.smallScreenMQL) {\n that.smallScreenMQL.destroy();\n that.smallScreenMQL = null;\n }\n },\n\n open: function() {\n var that = this;\n var popupHovered;\n\n that._calendar();\n\n // In some cases when the popup is opened resize is triggered which will cause it to close\n // Setting the below flag will prevent this from happening\n // Reference: https://github.com/telerik/kendo/pull/7553\n popupHovered = that.popup._hovered;\n that.popup._hovered = true;\n\n that.popup.open();\n\n setTimeout(function() {\n that.popup._hovered = popupHovered;\n }, 1);\n },\n\n close: function() {\n if (this.popup) {\n this.popup.close();\n }\n },\n\n min: function(value) {\n this._option(MIN, value);\n },\n\n max: function(value) {\n this._option(MAX, value);\n },\n\n toggle: function() {\n var that = this;\n\n that[that.popup.visible() ? CLOSE : OPEN]();\n },\n\n move: function(e) {\n var that = this,\n key = e.keyCode,\n calendar = that.calendar,\n selectIsClicked = e.ctrlKey && key == keys.DOWN || key == keys.ENTER,\n handled = false;\n\n if (e.altKey) {\n if (key == keys.DOWN) {\n that.open();\n e.preventDefault();\n handled = true;\n } else if (key == keys.UP) {\n that.close();\n e.preventDefault();\n handled = true;\n }\n\n } else if (that.popup && that.popup.visible()) {\n\n if (key == keys.ESC || (selectIsClicked && calendar._cell.hasClass(SELECTED))) {\n that.close();\n e.preventDefault();\n return true;\n }\n //spacebar selects a date in the calendar\n if (key != keys.SPACEBAR) {\n that._current = calendar._move(e);\n }\n\n handled = true;\n }\n\n return handled;\n },\n\n current: function(date) {\n this._current = date;\n if (this.calendar) {\n this.calendar._focus(date);\n }\n },\n\n value: function(value) {\n var that = this,\n calendar = that.calendar,\n options = that.options,\n disabledDate = options.disableDates;\n\n if (disabledDate && disabledDate(value)) {\n value = null;\n }\n\n that._value = value;\n that._current = new DATE(+restrictValue(value, options.min, options.max));\n\n if (calendar) {\n calendar.value(value);\n }\n },\n\n _click: function(e) {\n\n if (e.currentTarget.className.indexOf(SELECTED) !== -1) {\n this.calendar.trigger(\"change\");\n this.close();\n }\n },\n\n _option: function(option, value) {\n var that = this;\n var calendar = that.calendar;\n\n that.options[option] = value;\n\n if (calendar) {\n calendar[option](value);\n }\n }\n };\n\n DateView.normalize = normalize;\n\n kendo.DateView = DateView;\n\n var DatePicker = Widget.extend({\n init: function(element, options) {\n var that = this,\n initialValue,\n disabled;\n\n Widget.fn.init.call(that, element, options);\n element = that.element;\n options = that.options;\n\n options.disableDates = kendo.calendar.disabled(options.disableDates);\n\n options.min = parse(element.attr(\"min\")) || parse(options.min);\n options.max = parse(element.attr(\"max\")) || parse(options.max);\n\n that.options.readonly = options.readonly !== undefined$1 ? options.readonly : Boolean(that.element.attr(\"readonly\"));\n that.options.enable = options.enable !== undefined$1 ? options.enable : !(Boolean(element.is(\"[disabled]\") || $(element).parents(\"fieldset\").is(':disabled')));\n\n normalize(options);\n\n that._initialOptions = extend({}, options);\n\n that._wrapper();\n\n that._createDateView();\n that._createDateViewProxy = that._createDateView.bind(that);\n\n that.bigScreenMQL = mediaQuery(\"large\");\n if (that.options.adaptiveMode == \"auto\") {\n that.bigScreenMQL.onChange(()=> {\n that._createDateViewProxy();\n that.dateView.value(that._value);\n });\n }\n\n that._icon();\n\n try {\n element[0].setAttribute(\"type\", \"text\");\n } catch (e) {\n element[0].type = \"text\";\n }\n\n element\n .addClass(\"k-input-inner\")\n .attr({\n role: \"combobox\",\n \"aria-expanded\": false,\n \"aria-haspopup\": \"grid\",\n \"aria-controls\": that.dateView._dateViewID,\n \"autocomplete\": \"off\"\n });\n that._reset();\n that._template();\n\n disabled = !that.options.enable;\n if (disabled) {\n that.enable(false);\n } else {\n that.readonly(element.is(\"[readonly]\"));\n }\n\n initialValue = parse(options.value || that.element.val(), options.parseFormats, options.culture);\n\n that._createDateInput(options);\n\n that._old = that._update(initialValue || that.element.val());\n that._oldText = element.val();\n that._applyCssClasses();\n\n if (options.label) {\n that._label();\n }\n\n kendo.notify(that);\n },\n events: [\n OPEN,\n CLOSE,\n CHANGE],\n options: {\n name: \"DatePicker\",\n value: null,\n footer: \"\",\n format: \"\",\n culture: \"\",\n parseFormats: [],\n min: new Date(1900, 0, 1),\n max: new Date(2099, 11, 31),\n start: MONTH,\n depth: MONTH,\n animation: {},\n month: {},\n dates: [],\n disableDates: null,\n ARIATemplate: ({ valueType, text }) => `Current focused ${valueType} is ${text}`,\n dateInput: false,\n weekNumber: false,\n messages: {\n weekColumnHeader: \"\"\n },\n componentType: \"classic\",\n adaptiveMode: \"none\",\n size: \"medium\",\n fillMode: \"solid\",\n rounded: \"medium\",\n label: null,\n autoFill: false\n },\n\n _createDateView: function() {\n var that = this,\n options = that.options,\n element = that.element,\n div;\n\n if (that.dateView) {\n that.dateView.destroy();\n that.dateView = null;\n }\n\n that.dateView = new DateView(extend({}, options, {\n id: element.attr(ID),\n anchor: that.wrapper,\n change: function() {\n // calendar is the current scope\n that._change(this.value());\n that.close();\n },\n close: function(e) {\n if (that.trigger(CLOSE)) {\n e.preventDefault();\n } else {\n element.attr(ARIA_EXPANDED, false);\n div.attr(ARIA_HIDDEN, true);\n\n setTimeout(function() {\n element.removeAttr(\"aria-activedescendant\");\n });\n }\n },\n open: function(e) {\n var options = that.options,\n date;\n\n if (that.trigger(OPEN)) {\n e.preventDefault();\n } else {\n if (that.element.val() !== that._oldText) {\n date = parse(element.val(), options.parseFormats, options.culture);\n\n that.dateView[date ? \"current\" : \"value\"](date);\n }\n\n element.attr(ARIA_EXPANDED, true);\n div.attr(ARIA_HIDDEN, false);\n\n that._updateARIA(date);\n\n }\n }\n }));\n\n div = that.dateView.div;\n },\n\n setOptions: function(options) {\n var that = this;\n var value = that._value;\n\n Widget.fn.setOptions.call(that, options);\n\n options = that.options;\n\n options.min = parse(options.min);\n options.max = parse(options.max);\n\n normalize(options);\n\n that._dateIcon.off(ns);\n that._dateIcon.remove();\n\n that.dateView.setOptions(options);\n that._icon();\n that._editable({\n readonly: options.readonly === undefined$1 ? that.options.readonly : options.readonly,\n disable: !(options.enable === undefined$1 ? that.options.enable : options.enable)\n });\n\n that._createDateInput(options);\n\n if (!that._dateInput) {\n that.element.val(kendo.toString(value, options.format, options.culture));\n }\n\n if (value) {\n that._updateARIA(value);\n }\n\n if (options.label && that._inputLabel) {\n that.label.setOptions(options.label);\n } else if (options.label === false) {\n that.label._unwrapFloating();\n that._inputLabel.remove();\n delete that._inputLabel;\n } else if (options.label) {\n that._label();\n }\n },\n\n _editable: function(options) {\n var that = this,\n icon = that._dateIcon.off(ns),\n element = that.element.off(ns),\n wrapper = that.wrapper.off(ns),\n readonly = options.readonly,\n disable = options.disable;\n\n if (!readonly && !disable) {\n wrapper\n .removeClass(STATEDISABLED)\n .on(HOVEREVENTS, that._toggleHover);\n if (element && element.length) {\n element[0].removeAttribute(DISABLED);\n element[0].removeAttribute(READONLY);\n }\n element.attr(ARIA_DISABLED, false)\n .attr(ARIA_READONLY, false)\n .on(\"keydown\" + ns, that._keydown.bind(that))\n .on(\"focusout\" + ns, that._blur.bind(that))\n .on(\"focus\" + ns, function() {\n that.wrapper.addClass(FOCUSED);\n });\n\n icon.on(UP, that._click.bind(that))\n .on(MOUSEDOWN, preventDefault);\n } else {\n wrapper\n .addClass(disable ? STATEDISABLED : \"\")\n .removeClass(disable ? \"\" : STATEDISABLED);\n\n element.attr(DISABLED, disable)\n .attr(READONLY, readonly)\n .attr(ARIA_DISABLED, disable)\n .attr(ARIA_READONLY, readonly);\n }\n },\n\n readonly: function(readonly) {\n this._editable({\n readonly: readonly === undefined$1 ? true : readonly,\n disable: false\n });\n if (this._dateInput) {\n this._dateInput._editable({\n readonly: readonly === undefined$1 ? true : readonly,\n disable: false\n });\n }\n\n if (this.label && this.label.floatingLabel) {\n this.label.floatingLabel.readonly(readonly === undefined$1 ? true : readonly);\n }\n },\n\n enable: function(enable) {\n this._editable({\n readonly: false,\n disable: !(enable = enable === undefined$1 ? true : enable)\n });\n if (this._dateInput) {\n this._dateInput._editable({\n readonly: false,\n disable: !(enable = enable === undefined$1 ? true : enable)\n });\n }\n\n if (this.label && this.label.floatingLabel) {\n this.label.floatingLabel.enable(enable = enable === undefined$1 ? true : enable);\n }\n },\n\n _label: function() {\n var that = this;\n var options = that.options;\n var labelOptions = $.isPlainObject(options.label) ? options.label : {\n content: options.label\n };\n\n if (that._dateInput) {\n labelOptions.floatCheck = () => {\n\n if (!that.value() && !that._dateInput._hasDateInput() && document.activeElement !== that.element[0]) {\n that.element.val(\"\");\n return true;\n }\n\n return false;\n };\n }\n\n that.label = new kendo.ui.Label(null, $.extend({}, labelOptions, {\n widget: that\n }));\n\n that._inputLabel = that.label.element;\n },\n\n destroy: function() {\n var that = this;\n\n if (that.label) {\n that.label.destroy();\n }\n\n Widget.fn.destroy.call(that);\n\n if (that.dateView.calendar && that._navigateCalendarHandler) {\n that.dateView.calendar.unbind(NAVIGATE, that._navigateCalendarHandler);\n that._navigateCalendarHandler = null;\n }\n\n that.dateView.destroy();\n\n that.element.off(ns);\n that._dateIcon.off(ns);\n\n if (that._form) {\n that._form.off(\"reset\", that._resetHandler);\n }\n\n if (that.bigScreenMQL) {\n that.bigScreenMQL.destroy();\n }\n\n that._createDateViewProxy = null;\n },\n\n open: function() {\n this.dateView.open();\n this._navigateCalendar();\n },\n\n close: function() {\n this.dateView.close();\n },\n\n min: function(value) {\n return this._option(MIN, value);\n },\n\n max: function(value) {\n return this._option(MAX, value);\n },\n\n value: function(value) {\n var that = this;\n\n if (value === undefined$1) {\n return that._value;\n }\n\n that._old = that._update(value);\n\n if (that._old === null) {\n if (that._dateInput) {\n that._dateInput.value(that._old);\n } else {\n that.element.val(\"\");\n }\n }\n\n that._oldText = that.element.val();\n\n if (that.label && that.label.floatingLabel) {\n that.label.floatingLabel.refresh();\n }\n },\n\n _toggleHover: function(e) {\n $(e.currentTarget).toggleClass(HOVER, e.type === \"mouseenter\");\n },\n\n _blur: function() {\n var that = this,\n value = that.element.val();\n\n that.close();\n if (value !== that._oldText) {\n that._change(value);\n if (!value) {\n that.dateView.current(kendo.calendar.getToday());\n }\n }\n\n that.wrapper.removeClass(FOCUSED);\n },\n\n _click: function(e) {\n var that = this;\n\n that.dateView.toggle();\n that._navigateCalendar();\n that._focusElement(e.type);\n },\n\n _focusElement: function(eventType) {\n var element = this.element;\n\n if ((!support.touch || (support.mouseAndTouchPresent && !(eventType || \"\").match(/touch/i))) && element[0] !== activeElement()) {\n element.trigger(\"focus\");\n }\n },\n\n _change: function(value) {\n var that = this,\n oldValue = that.element.val(),\n dateChanged;\n\n value = that._update(value);\n dateChanged = !kendo.calendar.isEqualDate(that._old, value);\n\n var valueUpdated = dateChanged && !that._typing;\n var textFormatted = oldValue !== that.element.val();\n\n if (valueUpdated || textFormatted) {\n that.element.trigger(CHANGE);\n }\n\n if (dateChanged) {\n that._old = value;\n that._oldText = that.element.val();\n\n that.trigger(CHANGE);\n }\n\n that._typing = false;\n },\n\n _keydown: function(e) {\n var that = this,\n dateView = that.dateView,\n value = that.element.val(),\n handled = false;\n\n if (!dateView.popup.visible() && e.keyCode == keys.ENTER && value !== that._oldText) {\n that._change(value);\n } else {\n handled = dateView.move(e);\n that._updateARIA(dateView._current);\n\n if (!handled) {\n that._typing = true;\n } else if (that._dateInput && e.stopImmediatePropagation) {\n e.stopImmediatePropagation();\n }\n }\n },\n\n _icon: function() {\n var that = this,\n element = that.element,\n options = that.options,\n icon;\n\n icon = element.next(\"button.k-input-button\");\n\n if (!icon[0]) {\n icon = $(html.renderButton('', {\n icon: \"calendar\",\n size: options.size,\n fillMode: options.fillMode,\n shape: \"none\",\n rounded: \"none\"\n })).insertAfter(element);\n }\n\n that._dateIcon = icon.attr({\n \"role\": \"button\"\n });\n },\n\n _setCalendarAttribute: function() {\n var that = this;\n setTimeout(function() {\n that.element.attr(ARIA_ACTIVEDESCENDANT, that.dateView.calendar._table.attr(ARIA_ACTIVEDESCENDANT));\n });\n },\n\n _navigateCalendar: function() {\n var that = this;\n\n if (!that._navigateCalendarHandler) {\n that._navigateCalendarHandler = that._setCalendarAttribute.bind(that);\n }\n\n if (!!that.dateView.calendar) {\n that.dateView.calendar.unbind(NAVIGATE, that._navigateCalendarHandler).bind(NAVIGATE, that._navigateCalendarHandler);\n }\n },\n\n _option: function(option, value) {\n var that = this,\n options = that.options;\n\n if (value === undefined$1) {\n return options[option];\n }\n\n value = parse(value, options.parseFormats, options.culture);\n\n if (!value) {\n return;\n }\n\n options[option] = new DATE(+value);\n that.dateView[option](value);\n },\n\n _update: function(value) {\n var that = this,\n options = that.options,\n min = options.min,\n max = options.max,\n current = that._value,\n date = parse(value, options.parseFormats, options.culture),\n isSameType = (date === null && current === null) || (date instanceof Date && current instanceof Date),\n formattedValue;\n\n if (options.disableDates(date)) {\n date = null;\n if (!that._old && !that.element.val()) {\n value = null;\n }\n }\n\n if (+date === +current && isSameType) {\n formattedValue = kendo.toString(date, options.format, options.culture);\n\n if (formattedValue !== value && !(that._dateInput && !date)) {\n that.element.val(date === null ? value : formattedValue);\n }\n\n return date;\n }\n\n if (date !== null && isEqualDatePart(date, min)) {\n date = restrictValue(date, min, max);\n } else if (!isInRange(date, min, max)) {\n date = null;\n }\n\n that._value = date;\n that.dateView.value(date);\n if (that._dateInput && date) {\n that._dateInput.value(date || value);\n } else {\n that.element.val(kendo.toString(date || value, options.format, options.culture));\n }\n that._updateARIA(date);\n\n return date;\n },\n\n _wrapper: function() {\n var that = this,\n element = that.element,\n wrapper;\n\n wrapper = element.parents(\".k-datepicker\");\n\n if (!wrapper[0]) {\n wrapper = element.wrap(SPAN).parent();\n }\n\n wrapper[0].style.cssText = element[0].style.cssText;\n element.css({\n height: element[0].style.height\n });\n\n that.wrapper = wrapper.addClass(\"k-datepicker k-input\")\n .addClass(element[0].className).removeClass('input-validation-error');\n },\n\n _reset: function() {\n var that = this,\n element = that.element,\n formId = element.attr(\"form\"),\n options = that.options,\n disabledDate = options.disableDates,\n parseFormats = options.parseFormats.length ? options.parseFormats : null,\n optionsValue = that._initialOptions.value,\n form = formId ? $(\"#\" + formId) : element.closest(\"form\"),\n initialValue = element[0].defaultValue;\n\n if (optionsValue && (disabledDate && disabledDate(optionsValue))) {\n optionsValue = null;\n }\n\n if ((!initialValue || !kendo.parseDate(initialValue, parseFormats, options.culture)) && optionsValue) {\n element.attr(\"value\", kendo.toString(optionsValue, options.format, options.culture));\n }\n\n if (form[0]) {\n that._resetHandler = function() {\n that.value(optionsValue || element[0].defaultValue);\n that.max(that._initialOptions.max);\n that.min(that._initialOptions.min);\n };\n\n that._form = form.on(\"reset\", that._resetHandler);\n }\n },\n\n _template: function() {\n this._ariaTemplate = template(this.options.ARIATemplate).bind(this);\n },\n\n _createDateInput: function(options) {\n if (this._dateInput) {\n this._dateInput.destroy();\n this._dateInput = null;\n }\n\n if (options.dateInput ) {\n this._dateInput = new ui.DateInput(this.element, {\n culture: options.culture,\n format: options.format,\n size: options.size,\n fillMode: options.fillMode,\n rounded: options.rounded,\n min: options.min,\n max: options.max,\n messages: options.messages.dateInput,\n autoFill: options.autoFill\n });\n }\n },\n\n _updateARIA: function(date) {\n var that = this;\n var calendar = that.dateView.calendar;\n\n if (that.element && that.element.length) {\n that.element[0].removeAttribute(ARIA_ACTIVEDESCENDANT);\n }\n\n if (calendar) {\n that.element.attr(ARIA_ACTIVEDESCENDANT, calendar._updateAria(that._ariaTemplate, date));\n }\n }\n });\n\n kendo.cssProperties.registerPrefix(\"DatePicker\", \"k-input-\");\n\n kendo.cssProperties.registerValues(\"DatePicker\", [{\n prop: \"rounded\",\n values: kendo.cssProperties.roundedValues.concat([['full', 'full']])\n }]);\n\n ui.plugin(DatePicker);\n\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.userevents.js';\n\nvar __meta__ = {\n id: \"drawer\",\n name: \"Drawer\",\n category: \"web\",\n description: \"The Kendo Drawer widget provides slide to reveal sidebar\",\n depends: [ \"userevents\" ]\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n ui = kendo.ui,\n Widget = ui.Widget,\n SHOW = \"show\",\n HIDE = \"hide\",\n NS = \".kendoDrawer\",\n FOCUSED = \"k-focus\",\n keys = kendo.keys,\n ITEMCLICK = \"itemClick\",\n TABINDEX = \"tabIndex\",\n PUSH = \"push\",\n OVERLAY = \"overlay\",\n LEFT = \"left\",\n START = \"start\",\n END = \"end\",\n RIGHT = \"right\";\n\n var Drawer = kendo.ui.Widget.extend({\n init: function(element, options) {\n var that = this;\n var userEvents;\n\n Widget.fn.init.call(this, element, options);\n\n options = that.options;\n\n that._element(element);\n\n that._wrapper(element);\n\n that._navigatable();\n\n that.position();\n\n that._mode();\n\n if (options.mini) {\n that._miniMode();\n }\n\n that._initDrawerItems();\n\n if (options.mini && options.mode != PUSH) {\n that._setBodyOffset();\n }\n\n userEvents = this.userEvents = new kendo.UserEvents(options.mode != PUSH ? $(document.body) : this.drawerContainer, { fastTap: true, allowSelection: true });\n\n that.tap = function(e) {\n if ($.contains(that.drawerItemsWrapper[0], e.event.target)) {\n that._itemClick(e);\n }\n if (options.autoCollapse && that.visible && !that.trigger(\"hide\", { sender: this })) {\n that.hide();\n e.preventDefault();\n }\n };\n\n if (this.options.swipeToOpen) {\n userEvents.bind(\"start\", function(e) { that._start(e); });\n userEvents.bind(\"move\", function(e) { that._update(e); });\n userEvents.bind(\"end\", function(e) { that._end(e); });\n userEvents.bind(\"tap\", that.tap);\n } else {\n userEvents.bind(\"press\", that.tap);\n }\n\n if (options.minHeight && options.mode == PUSH) {\n that.drawerContainer.css(\"min-height\", options.minHeight);\n }\n\n\n if (that._showWatermarkOverlay) {\n that._showWatermarkOverlay(that.drawerContainer[0]);\n }\n\n if (options.expanded) {\n that._removeTransition();\n that.show();\n }\n },\n\n _element: function() {\n var that = this;\n\n var element = that.element;\n var options = that.options;\n that.contentElement = element.children()\n .wrapAll(\"
    \")\n .parent();\n that.drawerElement = $(options.template);\n\n element.addClass(\"k-widget k-drawer\");\n },\n\n _navigatable: function() {\n var that = this;\n var element = that.element;\n var drawerItems = element.find(\"[data-role='drawer-item']\");\n\n drawerItems.first().parent()\n .attr(\"role\", \"menu\")\n .attr(\"aria-orientation\", \"vertical\");\n\n if (!this.options.navigatable) {\n return;\n }\n\n element\n .attr(TABINDEX, 0)\n .on(\"focus\" + NS, that._focus.bind(that))\n .on(\"focusout\" + NS, that._blur.bind(that))\n .on(\"keydown\" + NS, that, that._keyDown.bind(that));\n },\n\n _blur: function() {\n var that = this;\n\n if (that._current) {\n that._current.removeClass(FOCUSED);\n }\n },\n\n _focus: function() {\n var that = this;\n\n that._setCurrent(that._current ? that._current : that.drawerItemsWrapper.find(\"[data-role='drawer-item']\").eq(0));\n },\n\n _setCurrent: function(current) {\n var that = this;\n var id = kendo.guid();\n var next = $(current);\n\n if (that._current) {\n $(that._current)\n .removeClass(FOCUSED)\n .removeAttr(\"id\");\n\n that.element.removeAttr(\"aria-activedescendant\");\n }\n\n next\n .attr(\"id\", id)\n .addClass(FOCUSED);\n\n that.element.attr(\"aria-activedescendant\", id);\n\n that._current = next;\n },\n\n _keyDown: function(e) {\n var that = this;\n var handled = false;\n var current = that._current;\n var next;\n\n if (e.keyCode == keys.UP) {\n handled = true;\n next = current.prevAll(\"[data-role='drawer-item']\").first();\n\n if (next.length) {\n that._setCurrent(next);\n } else {\n that._setCurrent(current.parent().find(\"[data-role='drawer-item']\").last());\n }\n\n }\n\n if (e.keyCode == keys.DOWN) {\n handled = true;\n next = current.nextAll(\"[data-role='drawer-item']\").first();\n\n if (next.length) {\n that._setCurrent(next);\n } else {\n that._setCurrent(current.parent().find(\"[data-role='drawer-item']\").first());\n }\n }\n\n if (e.keyCode == keys.HOME) {\n handled = true;\n that._setCurrent(that.drawerItemsWrapper.find(\"[data-role='drawer-item']\").eq(0));\n }\n\n if (e.keyCode == keys.END) {\n handled = true;\n that._setCurrent(that.drawerItemsWrapper.find(\"[data-role='drawer-item']\").last());\n }\n\n if (e.keyCode == keys.SPACEBAR || e.keyCode == keys.ENTER) {\n handled = true;\n that.tap({\n event: { target: current[0] },\n preventDefault: $.noop\n });\n }\n\n if (e.keyCode == keys.ESC) {\n handled = true;\n that.hide();\n }\n\n if (handled) {\n //prevent scrolling while pressing the keys\n e.preventDefault();\n }\n },\n\n _wrapper: function() {\n var options = this.options;\n var drawerElement = this.drawerElement;\n var element = this.element;\n var contentElement = this.contentElement;\n var drawerItemsWrapper = this.drawerItemsWrapper = drawerElement.wrapAll(\"
    \").parent();\n var drawerWrapper = this.drawerWrapper = drawerItemsWrapper.wrap(\"
    \").parent();\n var drawerContainer = this.drawerContainer = element.wrap(\"
    \").parent();\n\n if (options.mini) {\n if (options.mini.width) {\n drawerWrapper.width(options.mini.width);\n }\n } else {\n drawerWrapper.width(0);\n }\n\n\n if (options.mode === PUSH) {\n drawerContainer.append(contentElement);\n }\n else if (options.mode === OVERLAY) {\n drawerContainer.after(contentElement);\n $(document.body).prepend(drawerContainer);\n }\n\n element.append( drawerWrapper );\n },\n\n _addTransition: function() {\n this.drawerWrapper.css(\"transition\", \"all .3s ease-out\");\n },\n\n _removeTransition: function() {\n this.drawerWrapper.css(\"transition\", \"none\");\n },\n\n _setBodyOffset: function() {\n var overlayMiniOffset = this.element.outerWidth();\n\n if (this.leftPositioned) {\n $(document.body).css(\"padding-left\", overlayMiniOffset);\n }\n else {\n $(document.body).css(\"padding-right\", overlayMiniOffset);\n }\n },\n\n _initDrawerItems: function() {\n var drawerItemsWrapper = this.drawerItemsWrapper;\n var drawerItems = drawerItemsWrapper.find(\"[data-role='drawer-item']\");\n var separatorItems = drawerItemsWrapper.find(\"[data-role='drawer-separator']\");\n\n drawerItems.addClass(\"k-drawer-item\").attr(\"role\", \"menuitem\");\n separatorItems.addClass(\"k-drawer-item k-drawer-separator\").attr(\"role\", \"separator\");\n\n drawerItems.each((i, item) => {\n item.setAttribute(\"aria-label\", item.textContent.trim());\n });\n\n if (this._selectedItemIndex >= 0) {\n drawerItems.removeClass(\"k-selected\");\n drawerItems.eq(this._selectedItemIndex).addClass(\"k-selected\");\n }\n },\n\n _mode: function() {\n var options = this.options;\n var drawerContainer = this.drawerContainer;\n var overlayContainer;\n\n if (options.mode == PUSH) {\n drawerContainer.addClass('k-drawer-' + PUSH);\n }\n else {\n drawerContainer.addClass('k-drawer-' + OVERLAY);\n overlayContainer = this.overlayContainer = $('
    ');\n overlayContainer.hide();\n drawerContainer.prepend(overlayContainer);\n }\n },\n\n _miniMode: function() {\n var options = this.options;\n var drawerContainer = this.drawerContainer;\n var miniWidth = options.mini.width;\n var miniTemplate = this._miniTemplate = options.mini.template && $(options.mini.template);\n var drawerItemsWrapper = this.drawerItemsWrapper;\n var drawerWrapper = this.drawerWrapper;\n\n drawerContainer.addClass(\"k-drawer-mini\");\n\n if (miniTemplate) {\n drawerItemsWrapper.html(miniTemplate);\n }\n\n if (miniWidth) {\n drawerWrapper.width(miniWidth);\n }\n\n this.minWidth = options.mini.width || this.drawerWrapper.width();\n },\n\n show: function() {\n var drawerWrapper = this.drawerWrapper;\n var drawerContainer = this.drawerContainer;\n var options = this.options;\n var isExpanded = drawerContainer.hasClass(\"k-drawer-expanded\");\n var miniTemplate = this._miniTemplate;\n var drawerElement = this.drawerElement;\n var drawerItemsWrapper = this.drawerItemsWrapper;\n\n if (!isExpanded) {\n drawerContainer.addClass('k-drawer-expanded');\n this.visible = true;\n }\n\n if (miniTemplate) {\n drawerItemsWrapper.html(drawerElement);\n this._initDrawerItems();\n this._selectItem();\n }\n\n drawerWrapper.width(options.width);\n\n if (options.mini) {\n drawerContainer.removeClass(\"k-drawer-mini\");\n }\n\n if (options.mode === OVERLAY) {\n this.overlayContainer.show();\n this.visible = true;\n }\n },\n\n hide: function() {\n var that = this;\n var drawerWrapper = that.drawerWrapper;\n var drawerContainer = that.drawerContainer;\n var options = this.options;\n var drawerItemsWrapper = this.drawerItemsWrapper;\n var miniTemplate = this._miniTemplate;\n var miniWidth = options.mini && options.mini.width;\n\n this._addTransition();\n\n if (this._miniTemplate) {\n drawerItemsWrapper.html(miniTemplate);\n that._initDrawerItems();\n this._selectItem();\n }\n\n if (options.mini) {\n drawerContainer.addClass(\"k-drawer-mini\");\n if (miniWidth) {\n drawerWrapper.width(miniWidth);\n } else {\n drawerWrapper.width(\"\");\n }\n } else {\n drawerWrapper.width(0);\n }\n\n if (this.visible) {\n drawerContainer.removeClass('k-drawer-expanded');\n this.visible = false;\n }\n\n if (options.mode === OVERLAY) {\n this.overlayContainer.hide();\n }\n },\n\n position: function(value) {\n var that = this;\n var options = that.options;\n var position = value || options.position;\n\n if (position == RIGHT) {\n that.element.removeClass('k-drawer-' + START);\n that.element.addClass('k-drawer-' + END);\n }\n else {\n that.element.removeClass('k-drawer-' + END);\n that.element.addClass('k-drawer-' + START);\n }\n\n this.leftPositioned = position === LEFT;\n },\n\n _start: function(e) {\n var that = this;\n var options = this.options;\n var drawerWrapper = this.drawerWrapper;\n var drawerItemsWrapper = this.drawerItemsWrapper;\n var userEvents = e.sender;\n\n\n // ignore non-horizontal swipes\n if (Math.abs(e.x.velocity) < Math.abs(e.y.velocity) || kendo.triggeredByInput(e.event)) {\n userEvents.cancel();\n return;\n }\n\n\n if (this.drawerMini) {\n drawerItemsWrapper.html(that.drawerElement);\n }\n\n this._removeTransition();\n\n if (options.mode != PUSH) {\n this.overlayContainer.show();\n }\n },\n\n _update: function(e) {\n var options = this.options;\n var mode = options.mode;\n\n if (mode == PUSH) {\n this._push(e);\n }\n else {\n this._overlay(e);\n }\n },\n\n _end: function(e) {\n var velocity = e.x.velocity;\n var options = this.options;\n var drawerWrapper = this.drawerWrapper;\n var elementWidth = drawerWrapper.width();\n var pastHalf = elementWidth > options.width / 2;\n var velocityThreshold = 0.8;\n var shouldShow;\n\n this._addTransition();\n\n if (this.leftPositioned) {\n shouldShow = velocity > -velocityThreshold && (velocity > velocityThreshold || pastHalf);\n }\n else {\n shouldShow = velocity < velocityThreshold && (velocity < -velocityThreshold || pastHalf);\n }\n\n if (shouldShow) {\n if (this.trigger(\"show\", { sender: this })) {\n e.preventDefault();\n this.hide();\n } else {\n this.show();\n }\n } else {\n if (this.trigger(\"hide\", { sender: this })) {\n e.preventDefault();\n this.show();\n } else {\n this.hide();\n }\n }\n },\n\n _overlay: function(moveEventArgs) {\n var options = this.options;\n var minWidth = (options.mini && options.mini.width) || this.minWidth || 0;\n var drawerWrapper = this.drawerWrapper;\n var elementWidth = drawerWrapper.width();\n var limitedPosition;\n var updatedPosition;\n\n updatedPosition = elementWidth + (this.leftPositioned ? moveEventArgs.x.delta : -moveEventArgs.x.delta);\n\n limitedPosition = Math.min(Math.max(updatedPosition, minWidth), options.width);\n\n moveEventArgs.event.preventDefault();\n moveEventArgs.event.stopPropagation();\n\n drawerWrapper.width(limitedPosition);\n },\n\n _push: function(moveEventArgs) {\n var options = this.options;\n var minWidth = (options.mini && options.mini.width) || this.minWidth || 0;\n var drawerWrapper = this.drawerWrapper;\n var elementWidth = drawerWrapper.width();\n var limitedPosition;\n var updatedPosition;\n\n updatedPosition = elementWidth + (this.leftPositioned ? moveEventArgs.x.delta : -moveEventArgs.x.delta);\n\n limitedPosition = Math.min(Math.max(updatedPosition, minWidth), options.width);\n\n moveEventArgs.event.preventDefault();\n moveEventArgs.event.stopPropagation();\n\n drawerWrapper.width(limitedPosition);\n },\n\n _selectItem: function(item) {\n var selectedItemIndex;\n\n if (item) {\n item.addClass(\"k-selected\");\n this.trigger(\"itemClick\", { item: item, sender: this });\n this._selectedItemIndex = item.index();\n return;\n }\n\n selectedItemIndex = this._selectedItemIndex;\n\n if (selectedItemIndex) {\n this.drawerItemsWrapper.find(\"[data-role='drawer-item']\").eq(selectedItemIndex).addClass(\"k-selected\");\n }\n },\n\n _itemClick: function(e) {\n var that = this;\n var item;\n var items;\n\n if ($(e.event.target).find(\".k-drawer-item\").length > 0) {\n item = $(e.event.target).find(\".k-drawer-item\");\n }\n else if ($(e.event.target).closest(\".k-drawer-item\").length > 0) {\n item = $(e.event.target).closest(\".k-drawer-item\");\n }\n else if ($(e.event.target).hasClass(\".k-drawer-item\")) {\n item = $(e.event.target);\n }\n items = that.drawerItemsWrapper.find(\".k-drawer-item\").removeClass(\"k-selected\");\n that._selectItem(item);\n\n if (that.options.navigatable) {\n that._setCurrent(item);\n }\n },\n\n destroy: function() {\n var options = this.options;\n\n if (options.mode != PUSH) {\n if (this.leftPositioned) {\n $(document.body).css(\"padding-left\", 0);\n }\n else {\n $(document.body).css(\"padding-right\", 0);\n }\n }\n\n Widget.fn.destroy.call(this);\n\n this.userEvents.destroy();\n\n kendo.destroy(this.element);\n this.element = this.drawerWrapper = this.drawerElement = this.drawerContainer = this.drawerItemsWrapper = this._miniTemplate = null;\n },\n\n options: {\n name: \"Drawer\",\n autoCollapse: true,\n expanded: false,\n position: LEFT,\n mode: \"overlay\",\n swipeToOpen: true,\n width: 280,\n mini: false,\n navigatable: false,\n template: \"\"\n },\n\n events: [\n HIDE,\n SHOW,\n ITEMCLICK\n ]\n\n });\n kendo.ui.plugin(Drawer);\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.core.js';\nimport './kendo.selectable.js';\nimport './kendo.calendar.js';\nimport './kendo.icons.js';\n\nvar __meta__ = {\n id: \"multiviewcalendar\",\n name: \"MultiViewCalendar\",\n category: \"web\",\n description: \"Multi-view calendar.\",\n depends: [ \"core\", \"selectable\", \"calendar\" ]\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n calendar = kendo.calendar,\n support = kendo.support,\n isInRange = calendar.isInRange,\n toDateObject = calendar.toDateObject,\n createDate = calendar.createDate,\n isEqualDate = calendar.isEqualDate,\n getToday = calendar.getToday,\n keys = kendo.keys,\n ui = kendo.ui,\n Widget = ui.Widget,\n Selectable = ui.Selectable,\n template = kendo.template,\n mobileOS = support.mobileOS,\n ns = \".kendoMultiViewCalendar\",\n CLICK = \"click\",\n KEYDOWN = \"keydown\",\n ID = \"id\",\n MIN = \"min\",\n MONTH = \"month\",\n DOT = \".\",\n EMPTY = \" \",\n CENTURY = \"century\",\n DECADE = \"decade\",\n CHANGE = \"change\",\n NAVIGATE = \"navigate\",\n VALUE = \"value\",\n FOCUSED = \"k-focus\",\n SELECTED = \"k-selected\",\n MID = \"k-range-mid\",\n SPLITEND = \"k-range-split-end\",\n SPLITSTART = \"k-range-split-start\",\n START = \"k-range-start\",\n END = \"k-range-end\",\n HOVER = \"k-hover\",\n DISABLED = \"k-disabled\",\n TODAY = \"k-calendar-nav-today\",\n OTHERMONTH = \"k-other-month\",\n OUTOFRANGE = \"k-out-of-range\",\n CALENDAR_VIEW = \"k-calendar-view\",\n CELLSELECTOR = \"td:has(.k-link):not(.\" + OUTOFRANGE + \")\",\n CELLSELECTORVALID = \"td:has(.k-link):not(.\" + DISABLED + \"):not(.\" + OUTOFRANGE + \")\",\n BLUR = \"blur\",\n FOCUS = \"focus\",\n MOUSEENTER = support.touch ? \"touchstart\" : \"mouseenter\",\n MOUSELEAVE_NS = support.touch ? \"touchend\" + ns + \" touchmove\" + ns : \"mouseleave\" + ns,\n PREVARROW = \"_prevArrow\",\n NEXTARROW = \"_nextArrow\",\n RANGE = \"range\",\n SINGLE = \"single\",\n MULTIPLE = \"multiple\",\n TABINDEX = \"tabindex\",\n TABLE = \"table\",\n TBODY = \"tbody\",\n THEAD = \"thead\",\n TR = \"tr\",\n TD = \"td\",\n TH = \"th\",\n ROLE = \"role\",\n NONE = \"none\",\n ROWGROUP = \"rowgroup\",\n COLUMNHEADER = \"columnheader\",\n ROWHEADER = \"rowheader\",\n GRIDCELL = \"gridcell\",\n ARIA_SELECTED = \"aria-selected\",\n ARIA_DISABLED = \"aria-disabled\",\n ARIA_LABEL = \"aria-label\",\n ARIA_OWNS = \"aria-owns\",\n ARIA_ACTIVEDESCENDANT = \"aria-activedescendant\",\n INPUTSELECTOR = \"input,a,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-caret-alt-down,span.k-icon.k-i-caret-alt-up,span.k-svg-icon.k-svg-i-caret-alt-down,span.k-svg-icon.k-svg-i-caret-alt-up\",\n DATE = Date,\n views = {\n month: 0,\n year: 1,\n decade: 2,\n century: 3\n };\n\n var RangeSelectable = Widget.extend({\n init: function(element, options) {\n var that = this;\n\n Widget.fn.init.call(that, element, options);\n\n that.calendar = options.calendar;\n\n that.userEvents = new kendo.UserEvents(that.element, {\n global: true,\n allowSelection: true,\n filter: that.options.filter,\n tap: that._tap.bind(that),\n touchAction: NONE\n });\n },\n\n events: [CHANGE],\n\n options: {\n name: \"RangeSelectable\",\n filter: \">*\",\n inputSelectors: INPUTSELECTOR,\n multiple: false,\n dragToSelect: true,\n relatedTarget: $.noop\n },\n\n destroy: function() {\n var that = this;\n\n Widget.fn.destroy.call(that);\n\n that.userEvents.destroy();\n that.calendar = null;\n\n that._lastActive = that.element = that.userEvents = that._start = that._end = null;\n },\n\n _allowSelection: function(target) {\n if ($(target).is(this.options.inputSelectors)) {\n this.userEvents.cancel();\n return false;\n }\n\n return true;\n },\n\n start: function(element) {\n if (element === undefined$1) {\n return this._start;\n }\n element.addClass(START + \" \" + SELECTED).attr(ARIA_SELECTED, true);\n this._start = element;\n },\n\n end: function(element) {\n if (element === undefined$1) {\n return this._start;\n }\n element.addClass(END + \" \" + SELECTED).attr(ARIA_SELECTED, true);\n this._end = element;\n },\n\n mid: function(elements) {\n var tables = this.element.find(\"table.k-month\");\n\n elements.addClass(MID).attr(ARIA_SELECTED, true);\n tables.each(function() {\n var that = $(this);\n var lastCell = that.find(CELLSELECTORVALID).last();\n var firstCell = that.find(CELLSELECTORVALID).first();\n\n if (lastCell.hasClass(MID)) {\n lastCell.addClass(SPLITEND);\n }\n\n if (firstCell.hasClass(MID)) {\n firstCell.addClass(SPLITSTART);\n }\n });\n },\n\n clear: function(clearVariables) {\n this.element.find(CELLSELECTOR)\n .removeClass(END + \" \" + SELECTED + \" \" + START + \" \" + MID + \" \" + SPLITEND + \" \" + SPLITSTART)\n .removeAttr(ARIA_SELECTED);\n\n if (clearVariables) {\n this._start = this._end = null;\n }\n },\n\n selectFrom: function(start) {\n var that = this;\n var items;\n var startIdx;\n\n items = that.element.find(CELLSELECTOR);\n\n startIdx = $.inArray($(start)[0], items);\n\n that.clear();\n that.start(start);\n\n items = items.filter(function(index) {\n return index > startIdx;\n });\n that.mid(items);\n },\n\n selectTo: function(end) {\n var that = this;\n var items;\n var endIdx;\n\n items = that.element.find(CELLSELECTOR);\n\n endIdx = $.inArray($(end)[0], items);\n\n that.clear();\n\n items = items.filter(function(index) {\n return index < endIdx;\n });\n that.mid(items);\n that.end($(end));\n },\n\n range: function(start, end) {\n var that = this;\n var items;\n var startIdx;\n var endIdx;\n var temp;\n\n if (start === undefined$1) {\n return { start: that._start, end: that._end };\n }\n\n items = that.element.find(CELLSELECTOR);\n\n startIdx = $.inArray($(start)[0], items);\n endIdx = $.inArray($(end)[0], items);\n\n if (endIdx == -1) {\n endIdx = items.length;\n }\n\n if (startIdx > endIdx) {\n temp = end;\n end = start;\n start = temp;\n temp = startIdx;\n startIdx = endIdx;\n endIdx = temp;\n }\n that.clear();\n start.addClass(START + \" \" + SELECTED).attr(ARIA_SELECTED, true);\n that._start = start;\n\n items = items.filter(function(index) {\n return index > startIdx && index < endIdx;\n });\n that.mid(items);\n\n if (end) {\n that.end($(end));\n } else {\n that._useEnd = true;\n }\n },\n\n change: function() {\n this.trigger(CHANGE);\n },\n\n _clearFlags: function() {\n this._useStart = this._useEnd = false;\n },\n\n _tap: function(e) {\n var target = $(e.target),\n range = this.calendar.selectRange() || {},\n start = range.start,\n end = range.end,\n that = this,\n currentDate = toDateObject($(target).find(\"a\")),\n items,\n startIdx,\n endIdx;\n\n\n that._lastActive = target;\n\n if (!start || +start > +currentDate) {\n that.clear(true);\n that.start(target);\n that._clearFlags();\n that.trigger(CHANGE);\n return;\n }\n\n if (start && !end) {\n items = that.element.find(CELLSELECTOR);\n\n startIdx = $.inArray($(that._start)[0], items);\n endIdx = $.inArray($(target)[0], items);\n\n if (start) {\n that._useStart = true;\n }\n\n items = items.filter(function(index) {\n return index > startIdx && index < endIdx;\n });\n that.mid(items);\n that.end($(target));\n that.trigger(CHANGE);\n that._clearFlags();\n return;\n }\n\n if (start && end) {\n if (target.hasClass(MID)) {\n if (!that._toggling) {\n that.range(target, that._end);\n } else {\n that.range(that._start, target);\n }\n that._toggling = !that._toggling;\n that.trigger(CHANGE);\n that._clearFlags();\n return;\n }\n that._toggling = false;\n that._end = null;\n that.clear();\n that.start(target);\n that.trigger(CHANGE);\n that._clearFlags();\n }\n }\n });\n\n\n var MultiViewCalendar = Widget.extend({\n init: function(element, options) {\n var that = this;\n var id;\n var culture;\n\n Widget.fn.init.call(that, element, options);\n\n element = that.wrapper = that.element;\n options = that.options;\n\n that.options.disableDates = calendar.disabled(that.options.disableDates);\n\n culture = kendo.getCulture(options.culture);\n options.format = kendo._extractFormat(options.format || culture.calendars.standard.patterns.d);\n\n that._templates();\n\n that._header();\n\n that._wrapper();\n\n id = element\n .addClass(`k-widget k-calendar k-calendar-range ${kendo.getValidCssClass(\"k-calendar-\", \"size\", that.options.size || \"medium\")}` + (options.weekNumber ? \" k-week-number\" : \"\"))\n .on(KEYDOWN + ns, DOT + CALENDAR_VIEW, that._move.bind(that))\n .on(FOCUS + ns, DOT + CALENDAR_VIEW, that._focus.bind(that))\n .on(BLUR + ns, DOT + CALENDAR_VIEW, that._blur.bind(that))\n .on(CLICK + ns, CELLSELECTORVALID, function(e) {\n var link = e.currentTarget.firstChild;\n\n if (link.href.indexOf(\"#\") != -1) {\n e.preventDefault();\n }\n\n that._click($(link));\n })\n .on(MOUSEENTER + ns, CELLSELECTORVALID, that._mouseEnter.bind(that))\n .on(MOUSELEAVE_NS, CELLSELECTORVALID, function() {\n $(this).removeClass(HOVER);\n })\n .attr(ID);\n\n if (!id) {\n id = kendo.guid();\n }\n\n that._cellID = id + \"_cell_selected\";\n\n that._calendarWidth = that.element.width();\n\n that._range = options.range;\n\n that._initViews({ viewName: options.start, value: options.value });\n that._selectable();\n\n that._footer(that.footer);\n that._selectDates = [];\n that.value(options.value);\n that._addSelectedCellsToArray();\n\n if (options.selectable == MULTIPLE) {\n that._selectDates = options.selectDates.length ? options.selectDates : that._selectDates;\n that._restoreSelection();\n }\n\n if (options.selectable == RANGE) {\n that.selectRange(that._range);\n }\n\n kendo.notify(that);\n },\n\n options: {\n name: \"MultiViewCalendar\",\n value: null,\n min: new DATE(1900, 0, 1),\n max: new DATE(2099, 11, 31),\n dates: [],\n disableDates: null,\n culture: \"\",\n footer: \"\",\n format: \"\",\n month: {},\n range: { start: null, end: null },\n weekNumber: false,\n views: 2,\n showViewHeader: false,\n selectable: SINGLE,\n selectDates: [],\n start: MONTH,\n depth: MONTH,\n messages: {\n weekColumnHeader: \"\"\n },\n size: \"medium\",\n orientation: \"horizontal\"\n },\n\n events: [\n CHANGE,\n NAVIGATE\n ],\n\n setOptions: function(options) {\n var that = this;\n\n calendar.normalize(options);\n\n options.disableDates = calendar.disabled(options.disableDates);\n\n Widget.fn.setOptions.call(that, options);\n\n that._selectable();\n\n that._templates();\n\n that._footer(that.footer);\n\n for (var i = 0; i < that._views.length; i++) {\n that._views[i].off(ns).remove();\n }\n\n that._initViews({ viewName: options.start, value: options.value });\n\n that._range = options.range || { start: null, end: null };\n\n that._restoreSelection();\n },\n\n destroy: function() {\n var that = this;\n\n that._cell = null;\n that._currentView = null;\n that._current = null;\n\n if (that._views) {\n for (var i = 0; i < that._views.length; i++) {\n that._views[i].off(ns).remove();\n }\n }\n\n that.element.off(ns);\n\n if (that.header) {\n that.header.off(ns);\n that._title = null;\n that.header = null;\n }\n\n if (that.selectable) {\n that.selectable.destroy();\n that.selectable = null;\n }\n\n if (that.rangeSelectable) {\n that.rangeSelectable.destroy();\n that.rangeSelectable = null;\n }\n\n if (that._today) {\n kendo.destroy(that._today.off(ns));\n }\n\n that._views = null;\n\n Widget.fn.destroy.call(that);\n },\n\n current: function() {\n return this._current;\n },\n\n focus: function() {\n this.tablesWrapper.trigger(\"focus\");\n },\n\n min: function(value) {\n return this._option(MIN, value);\n },\n\n max: function(value) {\n return this._option(\"max\", value);\n },\n\n view: function() {\n return this._currentView;\n },\n\n navigateToPast: function() {\n this._navigate(PREVARROW, -1);\n },\n\n navigateToFuture: function() {\n this._navigate(NEXTARROW, 1);\n },\n\n navigateUp: function() {\n var that = this,\n index = that._index;\n\n if (that._title.hasClass(DISABLED)) {\n return;\n }\n\n that.navigate(that._current, ++index);\n },\n\n navigateDown: function(value) {\n var that = this,\n index = that._index,\n depth = that.options.depth;\n\n if (!value) {\n return;\n }\n\n if (index === views[depth]) {\n if (!isEqualDate(that._value, that._current) || !isEqualDate(that._value, value)) {\n that.value(value);\n that.trigger(CHANGE);\n }\n return;\n }\n\n that.navigate(value, --index);\n },\n\n navigate: function(value, view) {\n view = isNaN(view) ? calendar.views[calendar.viewsEnum[view]] : calendar.views[view];\n\n var that = this;\n var options = that.options;\n var min = options.min;\n var max = options.max;\n\n if (!value) {\n that._current = value = new DATE(+calendar.restrictValue(value, min, max));\n } else {\n that._current = value;\n }\n\n if (view === undefined$1) {\n view = that._currentView;\n }\n\n that._currentView = view;\n\n for (var i = 0; i < that._views.length; i++) {\n that._views[i].off(ns).remove();\n }\n\n that._initViews({ viewName: view.name, value: value });\n\n that._restoreSelection();\n },\n\n _aria: function() {\n var tables = this.tablesWrapper.find(TABLE),\n rowGroups = tables.first().find(THEAD).add(tables.find(TBODY)),\n viewName = this._currentView.name;\n\n tables.removeAttr(TABINDEX);\n\n tables.attr({\n role: NONE\n });\n\n rowGroups.attr({\n role: ROWGROUP\n });\n\n if (viewName === MONTH) {\n this._ariaMonth();\n }\n },\n\n _ariaMonth: function() {\n var tables = this.tablesWrapper.find(TABLE),\n rowGroups = tables.first().find(THEAD).add(tables.find(TBODY)),\n rows = rowGroups.find(TR),\n noHeaderRows = tables.not(\":eq(0)\").find(THEAD + EMPTY + TR),\n noHeaderCells = noHeaderRows.find(TH),\n columnHeaderCells = tables.first().find(THEAD + EMPTY + TH),\n rowHeaderCells = tables.find(TBODY + EMPTY + TH),\n outOfRange = tables.find(DOT + OUTOFRANGE),\n ariaDataCells = function(i, row) {\n var $row = $(row),\n numberOfEmpty = $row.find(DOT + OUTOFRANGE).length,\n owned = [],\n prev, cells;\n\n if (i === 1) {\n $row.children()\n .filter(DOT + OUTOFRANGE)\n .attr({\n \"aria-hidden\": \"false\",\n role: GRIDCELL\n });\n } else if (numberOfEmpty === 7) {\n $row.removeAttr(ROLE);\n $row.find(TH).removeAttr(ROLE);\n } else if (numberOfEmpty > 0 && numberOfEmpty < 7 && $row.children().not(TH).first().hasClass(OUTOFRANGE)) {\n $row.find(TH).removeAttr(ROLE);\n prev = rows.eq(i - 1);\n\n if (!prev.attr(ROLE) || prev.attr(ROLE) === NONE) {\n prev = rows.eq(i - 2);\n }\n\n cells = $row.children().not(TH);\n\n cells.each(function(j, cell) {\n var $cell = $(cell),\n id;\n\n if (!$cell.hasClass(OUTOFRANGE)) {\n id = \"owned_\" + i + \"_\" + j;\n $cell.attr(ID, id);\n owned.push(id);\n }\n });\n\n $row.removeAttr(ROLE);\n prev.attr(ARIA_OWNS, owned.join(\" \"));\n }\n };\n\n columnHeaderCells.attr({\n role: COLUMNHEADER\n });\n\n rowHeaderCells.attr({\n role: ROWHEADER\n });\n\n outOfRange.removeAttr(ROLE);\n noHeaderRows.removeAttr(ROLE);\n noHeaderCells.removeAttr(ARIA_LABEL).removeAttr(ROLE);\n\n rows.each(ariaDataCells);\n },\n\n _updateHeader: function() {\n var that = this;\n var view = that._currentView;\n var title = that._title;\n var value = that._firstViewValue;\n var options = that.options;\n var visibleRange = that._visibleRange();\n var culture = options.culture;\n var min = options.min;\n var max = options.max;\n var lastDate;\n var disabled;\n var prevDisabled;\n var nextDisabled;\n\n if (view.name === DECADE || view.name === CENTURY) {\n lastDate = shiftDate(value, view.name, options.views - 1);\n if (!isInRange(lastDate, min, max)) {\n lastDate = max;\n }\n\n title.html('' + view.first(value).getFullYear() + \" - \" + view.last(lastDate).getFullYear() + \"\");\n } else {\n title.html('' + view.title(value, min, max, culture) + \" - \" + view.title(shiftDate(value, view.name, options.views - 1), min, max, culture) + \"\");\n }\n\n disabled = view.name === CENTURY;\n title.toggleClass(DISABLED, disabled).attr(ARIA_DISABLED, disabled);\n\n prevDisabled = view.compare(visibleRange.start, that.options.min) < 1;\n nextDisabled = view.compare(visibleRange.end, that.options.max) > -1;\n\n if (prevDisabled && nextDisabled) {\n if (that._navContainer) {\n that._navContainer.remove();\n that._navContainer = null;\n }\n } else {\n if (!that._navContainer) {\n that._navContainer = $(`` +\n `${kendo.ui.icon({ icon: \"chevron-left\", iconClass: \"k-button-icon\" })}` +\n `${kendo.ui.icon({ icon: \"chevron-right\", iconClass: \"k-button-icon\" })}` +\n '').appendTo(that.header);\n that[PREVARROW] = that._navContainer.find(\".k-calendar-prev-view\");\n that[NEXTARROW] = that._navContainer.find(\".k-calendar-next-view\");\n }\n\n that[PREVARROW].toggleClass(DISABLED, prevDisabled).attr(ARIA_DISABLED, prevDisabled);\n if (that[PREVARROW].hasClass(DISABLED)) {\n that[PREVARROW].removeClass(HOVER);\n }\n\n that[NEXTARROW].toggleClass(DISABLED, nextDisabled).attr(ARIA_DISABLED, nextDisabled);\n if (that[NEXTARROW].hasClass(DISABLED)) {\n that[NEXTARROW].removeClass(HOVER);\n }\n }\n },\n\n _mouseEnter: function(e) {\n var that = this;\n var cell = $(e.currentTarget);\n var range;\n var items;\n var startIdx;\n var endIdx;\n\n cell.addClass(HOVER);\n\n if (that.rangeSelectable && that._currentView.name === MONTH) {\n range = that.selectRange();\n if (range.start && !range.end) {\n if (that._dateInViews(that.selectRange().start)) {\n items = that.element.find(that.rangeSelectable.options.filter);\n startIdx = $.inArray($(that.rangeSelectable._start)[0], items);\n endIdx = $.inArray($(cell)[0], items);\n if (startIdx > endIdx) {\n return;\n }\n that.rangeSelectable.range(that.rangeSelectable._start, cell);\n } else if (+toDateObject(that.element.find(CELLSELECTOR).first().find(\"a\")) > +range.start) {\n that.rangeSelectable.selectTo(cell);\n }\n that.rangeSelectable._end = null;\n }\n }\n },\n\n _move: function(e) {\n var that = this;\n var options = that.options;\n var key = e.keyCode;\n var index = that._index;\n var min = options.min;\n var max = options.max;\n var focusedCell = that.element.find(DOT + FOCUSED);\n var table = focusedCell.closest(TABLE);\n var currentValue = new DATE(+(that._current || toDateObject(focusedCell.find(\"a\"))));\n var isRtl = kendo.support.isRtl(that.wrapper);\n var navigate = false;\n var value, prevent, method, cell, lastActive, cellIndex, triggerChange;\n\n if (key == keys.RIGHT && !isRtl || key == keys.LEFT && isRtl) {\n value = 1;\n prevent = true;\n } else if (key == keys.LEFT && !isRtl || key == keys.RIGHT && isRtl) {\n value = -1;\n prevent = true;\n } else if (key == keys.UP) {\n value = index === 0 ? -7 : -4;\n prevent = true;\n } else if (key == keys.DOWN) {\n value = index === 0 ? 7 : 4;\n prevent = true;\n } else if (key == keys.SPACEBAR) {\n value = 0;\n prevent = true;\n } else if (key == keys.HOME) {\n prevent = true;\n cell = table.find(CELLSELECTORVALID).eq(0);\n if (cell.hasClass(FOCUSED)) {\n table = table.prev();\n if (table.length) {\n that._focusCell(table.find(CELLSELECTORVALID).eq(0));\n } else {\n navigate = that[PREVARROW] && !that[PREVARROW].hasClass(DISABLED);\n that._navigate(PREVARROW, -1);\n that._focusCell(that.element.find(TABLE).first().find(CELLSELECTORVALID).first());\n }\n } else {\n that._focusCell(cell);\n }\n } else if (key == keys.END) {\n prevent = true;\n cell = table.find(CELLSELECTORVALID).last();\n if (cell.hasClass(FOCUSED)) {\n table = table.next();\n if (table.length) {\n that._focusCell(table.find(CELLSELECTORVALID).last());\n } else {\n navigate = that[NEXTARROW] && !that[NEXTARROW].hasClass(DISABLED);\n that._navigate(NEXTARROW, 1);\n that._focusCell(that.element.find(TABLE).last().find(CELLSELECTORVALID).last());\n }\n } else {\n that._focusCell(cell);\n }\n } else if (key === 84) {\n that._todayClick(e);\n prevent = true;\n }\n\n if (e.ctrlKey || e.metaKey) {\n if (key == keys.RIGHT && !isRtl || key == keys.LEFT && isRtl) {\n navigate = that[NEXTARROW] && !that[NEXTARROW].hasClass(DISABLED);\n that._navigate(NEXTARROW, 1);\n prevent = true;\n } else if (key == keys.LEFT && !isRtl || key == keys.RIGHT && isRtl) {\n navigate = that[PREVARROW] && !that[PREVARROW].hasClass(DISABLED);\n that._navigate(PREVARROW, -1);\n prevent = true;\n } else if (key == keys.UP) {\n navigate = !that._title.hasClass(DISABLED);\n that.navigateUp();\n that._focusCell(that._cellByDate(that._current));\n prevent = true;\n } else if (key == keys.DOWN) {\n if (that._currentView.name === MONTH) {\n that.value(currentValue);\n } else {\n that.navigateDown(currentValue);\n that._focusCell(that._cellByDate(that._current));\n navigate = true;\n }\n prevent = true;\n } else if ((key == keys.ENTER || key == keys.SPACEBAR)) {\n if (options.selectable === MULTIPLE) {\n that._toggleSelection(e);\n }\n }\n } else if (e.shiftKey && options.selectable !== SINGLE) {\n if (value !== undefined$1 || method) {\n if (!method) {\n that._currentView.setDate(currentValue, value);\n }\n\n if (that._currentView.name !== MONTH) {\n return;\n }\n\n if (options.disableDates(currentValue)) {\n currentValue = that._nextNavigatable(currentValue, value);\n }\n\n min = createDate(min.getFullYear(), min.getMonth(), min.getDate());\n\n if (isInRange(currentValue, min, max)) {\n if (!that._dateInViews(currentValue)) {\n if (value > 0) {\n navigate = that[NEXTARROW] && !that[NEXTARROW].hasClass(DISABLED);\n that._navigate(NEXTARROW, 1);\n } else {\n navigate = that[PREVARROW] && !that[PREVARROW].hasClass(DISABLED);\n that._navigate(PREVARROW, -1);\n }\n }\n cell = that._cellByDate(currentValue);\n that._current = currentValue;\n\n if (that.selectable) {\n that._selectRange(toDateObject((that.selectable._lastActive || focusedCell).find(\"a\")), currentValue);\n if (!that.selectable._lastActive) {\n that.selectable._lastActive = focusedCell;\n }\n that.trigger(CHANGE);\n that._focusCell(cell);\n }\n\n if (that.rangeSelectable) {\n lastActive = toDateObject((that.rangeSelectable._lastActive || focusedCell).find(\"a\"));\n if (!that._dateInViews(lastActive)) {\n if (+lastActive > +currentValue) {\n that.rangeSelectable._end = that.rangeSelectable._lastActive;\n that.rangeSelectable.selectFrom(cell);\n } else {\n that.rangeSelectable.selectTo(cell);\n }\n } else {\n if (that.rangeSelectable._end && that.rangeSelectable._end.is(DOT + FOCUSED)) {\n that.rangeSelectable._lastActive = that.rangeSelectable._start;\n } else {\n that.rangeSelectable._lastActive = that._cellByDate(lastActive);\n }\n that.rangeSelectable.range(that.rangeSelectable._lastActive, cell);\n }\n that.rangeSelectable.change();\n that._focusCell(cell);\n }\n }\n }\n } else {\n if (key == keys.ENTER || key == keys.SPACEBAR) {\n if (that._currentView.name === MONTH) {\n triggerChange = !focusedCell.hasClass(SELECTED) || that.element.find(DOT + SELECTED).length > 1;\n that.value(currentValue);\n if (that.selectable) {\n that.selectable._lastActive = that._cellByDate(currentValue);\n if (triggerChange) {\n that.selectable.trigger(CHANGE, { event: e });\n }\n }\n if (that.rangeSelectable) {\n that.rangeSelectable.change();\n }\n } else {\n that._click($(that._cell[0].firstChild));\n }\n prevent = true;\n } else if (key == keys.PAGEUP || key == keys.PAGEDOWN) {\n prevent = true;\n cellIndex = table.find(CELLSELECTORVALID).index(focusedCell);\n table = key == keys.PAGEUP ? table.prev() : table.next();\n if (!table.length) {\n if (key == keys.PAGEUP) {\n navigate = that[PREVARROW] && !that[PREVARROW].hasClass(DISABLED);\n that.navigateToPast();\n table = that.element.find(TABLE).first();\n } else {\n navigate = that[NEXTARROW] && !that[NEXTARROW].hasClass(DISABLED);\n that.navigateToFuture();\n table = that.element.find(TABLE).last();\n }\n }\n cell = table.find(CELLSELECTORVALID).eq(cellIndex);\n if (cell.length) {\n that._focusCell(cell);\n } else {\n that._focusCell(table.find(CELLSELECTORVALID).last());\n }\n }\n\n if (value || method) {\n if (!method) {\n that._currentView.setDate(currentValue, value);\n }\n\n min = createDate(min.getFullYear(), min.getMonth(), min.getDate());\n\n if (isInRange(currentValue, min, max)) {\n if (that.selectable && options.disableDates(currentValue)) {\n currentValue = that._nextNavigatable(currentValue, value);\n }\n if (!that._dateInViews(currentValue)) {\n if (value > 0) {\n navigate = that[NEXTARROW] && !that[NEXTARROW].hasClass(DISABLED);\n that._navigate(NEXTARROW, 1);\n } else {\n navigate = that[PREVARROW] && !that[PREVARROW].hasClass(DISABLED);\n that._navigate(NEXTARROW, -1);\n }\n }\n cell = that._cellByDate(currentValue);\n that._current = currentValue;\n that._focusCell(cell);\n }\n }\n }\n\n if (navigate) {\n that.trigger(NAVIGATE);\n }\n\n if (prevent) {\n e.preventDefault();\n }\n\n return that._current;\n\n },\n\n _visualizeSelectedDatesInView: function() {\n var that = this;\n var selectedDates = {};\n var cells;\n\n $.each(that._selectDates, function(index, value) {\n selectedDates[kendo.calendar.views[0].toDateString(value)] = value;\n });\n that.selectable.clear();\n cells = that.element.find(TABLE)\n .find(CELLSELECTOR)\n .filter(function(index, element) {\n return selectedDates[$(element.firstChild).attr(kendo.attr(VALUE))];\n });\n\n if (cells.length > 0) {\n that.selectable._selectElement(cells, true);\n }\n },\n\n _nextNavigatable: function(currentValue, value) {\n var that = this;\n var disabled = true;\n var view = that._currentView;\n var min = that.options.min;\n var max = that.options.max;\n var isDisabled = that.options.disableDates;\n var navigatableDate = new Date(currentValue.getTime());\n\n view.setDate(navigatableDate, -value);\n while (disabled) {\n view.setDate(currentValue, value);\n if (!isInRange(currentValue, min, max)) {\n currentValue = navigatableDate;\n break;\n }\n disabled = isDisabled(currentValue);\n }\n return currentValue;\n },\n\n _toggleSelection: function(event) {\n var that = this;\n\n that.selectable._lastActive = $(that._cell[0]);\n\n if ($(that._cell[0]).hasClass(SELECTED)) {\n that.selectable._unselect($(that._cell[0]));\n }\n else {\n that.selectable.value($(that._cell[0]));\n }\n that.selectable.trigger(CHANGE, { event: event });\n },\n\n _option: function(option, value) {\n var that = this;\n var options = that.options;\n var currentValue = that._value || that._current;\n var isBigger;\n\n if (value === undefined$1) {\n return options[option];\n }\n\n value = kendo.parseDate(value, options.format, options.culture);\n\n if (!value) {\n return;\n }\n\n options[option] = new DATE(+value);\n\n if (option === MIN) {\n isBigger = value > currentValue;\n } else {\n isBigger = currentValue > value;\n }\n\n if (isBigger) {\n that._value = null;\n }\n\n that.navigate(that._value);\n\n that._toggle();\n },\n\n _cellByDate: function(value) {\n if (value instanceof Date) {\n value = this._currentView.toDateString(value);\n }\n return this.element.find(TABLE).find(\"td:not(.\" + OTHERMONTH + \")\")\n .filter(function() {\n return $(this.firstChild).attr(kendo.attr(VALUE)) === value;\n });\n },\n\n _selectable: function() {\n var that = this;\n var selectable = that.options.selectable;\n\n if (that.selectable) {\n that.selectable.destroy();\n that.selectable = null;\n }\n\n if (that.rangeSelectable) {\n that.rangeSelectable.destroy();\n that.rangeSelectable = null;\n }\n\n if (selectable.toLowerCase() === RANGE) {\n that.rangeSelectable = new RangeSelectable(that.wrapper, {\n calendar: that,\n filter: \"table.k-month \" + CELLSELECTORVALID,\n change: that._rangeSelection.bind(that)\n });\n } else {\n that.selectable = new Selectable(that.wrapper, {\n aria: true,\n dragToSelect: false,\n inputSelectors: \"input,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-caret-alt-down,span.k-icon.k-i-caret-alt-up,span.k-svg-icon.k-svg-i-caret-alt-down,span.k-svg-icon.k-svg-i-caret-alt-up\",\n multiple: Selectable.parseOptions(selectable).multiple,\n filter: \"table.k-content \" + CELLSELECTORVALID,\n change: that._selection.bind(that),\n relatedTarget: that._onRelatedTarget.bind(that),\n unselect: that._unselecting.bind(that)\n });\n }\n },\n\n _onRelatedTarget: function(target) {\n var that = this;\n\n if (that.selectable.options.multiple && target.is(CELLSELECTORVALID) && target.length > 1) {\n that._focusCell(target.first(), true);\n }\n },\n\n _getFirstViewDate: function(currentView) {\n var that = this;\n var options = that.options;\n var ranges = [];\n var start;\n var end;\n var current = new Date(+that._current);\n var i;\n\n for (i = 0; i < options.views; i++) {\n start = currentView.first(current);\n end = currentView.last(current);\n\n if (+end > +options.max) {\n if (+start <= +options.max) {\n ranges.push({ start: start, end: new Date(+options.max) });\n }\n break;\n }\n\n ranges.push({ start: start, end: end });\n\n current = new Date(+shiftDate(end, currentView.name, 1));\n }\n\n current = new Date(+that._current);\n\n for (i = 0; i < options.views; i++) {\n start = currentView.first(current);\n end = currentView.last(current);\n\n if (+start < +options.min) {\n if (+end >= +options.min) {\n ranges.push({ start: new Date(+options.min), end: end });\n }\n break;\n }\n\n ranges.push({ start: start, end: end });\n\n current = new Date(+shiftDate(start, currentView.name, -1));\n }\n\n start = ranges[0].start;\n\n for (i = 0; i < options.views + 1; i++) {\n if (!ranges[i]) {\n break;\n }\n\n if (+start > +ranges[i].start) {\n start = ranges[i].start;\n }\n }\n\n return new Date(+start);\n },\n\n _canRenderNextView: function(viewDate) {\n var fullYear = viewDate.getFullYear();\n var month = viewDate.getMonth();\n var date = viewDate.getDate();\n var max = this.options.max;\n var maxYear = max.getFullYear();\n var maxMonth = max.getMonth();\n\n\n if (fullYear < maxYear) {\n return true;\n }\n\n if (fullYear === maxYear && month < maxMonth) {\n return true;\n }\n\n if (fullYear === maxYear && month === maxMonth && date < max.getDate()) {\n return true;\n }\n\n if (fullYear === maxYear && month === maxMonth && date === max.getDate()) {\n return true;\n }\n\n return false;\n },\n\n _initViews: function(viewOptions) {\n var that = this;\n var options = that.options;\n var index = calendar.viewsEnum[viewOptions.viewName];\n var currentView = calendar.views[index];\n var viewDate;\n\n that._current = new DATE(+calendar.restrictValue(viewOptions.value, options.min, options.max));\n that._views = [];\n that._index = index;\n viewDate = that._getFirstViewDate(currentView);\n viewDate.setDate(1);\n\n that._firstViewValue = new Date(+viewDate);\n\n for (var i = 0; i < options.views; i++) {\n viewDate = i ? shiftDate(viewDate, currentView.name, 1) : viewDate;\n viewDate.setDate(1);\n\n if (!that._canRenderNextView(viewDate)) {\n break;\n }\n\n that._table = $(currentView.content($.extend({\n min: options.min,\n max: options.max,\n date: viewDate,\n url: options.url,\n dates: options.dates,\n format: options.format,\n culture: options.culture,\n disableDates: options.disableDates,\n showHeader: options.showViewHeader,\n isWeekColumnVisible: options.weekNumber,\n otherMonth: options.otherMonth,\n messages: options.messages,\n contentClasses: \"k-calendar-table k-content\"\n }, that[currentView.name])));\n\n that._table.appendTo(that.tablesWrapper).addClass(\"k-\" + currentView.name);\n that._views.push(that._table);\n }\n\n that._currentView = currentView;\n\n that.tablesWrapper.attr(\"class\", \"k-calendar-view k-calendar-\" + currentView.name + `view ${that.options.orientation != \"vertical\" ? \"k-hstack\" : \"k-vstack\"} k-align-items-start k-justify-content-center`);\n\n that._updateHeader();\n\n that._aria();\n },\n\n _rangeSelection: function(e) {\n var that = this;\n var range = e.sender.range();\n var useEnd = e.sender._useEnd;\n var useStart = e.sender._useStart;\n var initialRange = that.selectRange() || {};\n var start;\n var end;\n\n if (range.start) {\n start = toDateObject(range.start.find(\"a\"));\n }\n\n if (range.end) {\n end = toDateObject(range.end.find(\"a\"));\n }\n\n that._range = { start: useStart ? initialRange.start : start, end: useEnd ? initialRange.end : end };\n\n if (!that._preventChange) {\n that.trigger(CHANGE);\n }\n },\n\n _selection: function(e) {\n var that = this;\n var selectElements = e.sender.value();\n var domEvent = e.event;\n var currentTarget = $(domEvent && domEvent.currentTarget);\n var isCell = currentTarget.is(TD);\n var currentValue;\n\n if (that.options.selectable === SINGLE) {\n that._validateValue(selectElements[0] ? toDateObject(selectElements.first().find(\"a\")) : e.sender._lastActive ? toDateObject(e.sender._lastActive.find(\"a\")) : that.value());\n }\n\n if (that.options.selectable == MULTIPLE) {\n\n if (isCell) {\n currentValue = toDateObject(currentTarget.find(\"a\"));\n }\n\n if (domEvent && domEvent.ctrlKey) {\n if (isCell) {\n if (currentTarget.hasClass(SELECTED)) {\n that._selectDates.push(currentValue);\n } else {\n that._deselect(currentValue);\n }\n } else {\n that.element.find(\"table \" + CELLSELECTORVALID).each(function(index, element) {\n var value = toDateObject($(element).find(\"a\"));\n that._deselect(value);\n });\n that._addSelectedCellsToArray();\n }\n } else if (domEvent && domEvent.shiftKey) {\n that._selectRange(toDateObject(e.sender._lastActive ? e.sender._lastActive.find(\"a\") : selectElements.first().find(\"a\")), currentValue);\n } else if (isCell) {\n that._selectDates = [];\n that._selectDates.push(currentValue);\n } else {\n that._selectDates = [];\n that._addSelectedCellsToArray();\n }\n }\n\n if (!that._preventChange) {\n that.trigger(CHANGE);\n }\n },\n\n _addSelectedCellsToArray: function() {\n var that = this;\n if (!that.selectable) {\n return;\n }\n that.selectable.value().each(function(index, item) {\n var date = toDateObject($(item.firstChild));\n if (!that.options.disableDates(date)) {\n that._selectDates.push(date);\n }\n });\n },\n\n _deselect: function(date) {\n var that = this;\n var currentDateIndex = that._selectDates.map(Number).indexOf(+date);\n if (currentDateIndex != -1) {\n that._selectDates.splice(currentDateIndex, 1);\n }\n },\n\n _unselecting: function(e) {\n var that = this;\n var element = e.element;\n\n if (that.options.selectable === SINGLE && !mobileOS && element.hasClass(FOCUSED)) {\n e.preventDefault();\n }\n },\n\n _visibleRange: function() {\n var tables = this.element.find(DOT + CALENDAR_VIEW + EMPTY + TABLE);\n var firstDateInView = toDateObject(tables.first().find(CELLSELECTOR).first().find(\"a\"));\n var lastDateInView = toDateObject(tables.last().find(CELLSELECTOR).last().find(\"a\"));\n return { start: firstDateInView, end: lastDateInView };\n },\n\n _dateInViews: function(date) {\n var that = this;\n var tables = that.element.find(DOT + CALENDAR_VIEW + EMPTY + TABLE);\n var firstDateInView = toDateObject(tables.first().find(CELLSELECTOR).first().find(\"a\"));\n var lastDateInView = toDateObject(tables.last().find(CELLSELECTOR).last().find(\"a\"));\n\n date = new Date(date.toDateString());\n\n return +date <= +lastDateInView && +date >= +firstDateInView;\n },\n\n _fillRange: function(start, end) {\n var that = this;\n var daysDifference;\n\n that._selectDates = [];\n daysDifference = daysBetweenTwoDates(start, end);\n addDaysToArray(that._selectDates, daysDifference, start, that.options.disableDates);\n },\n\n _selectRange: function(start, end) {\n var that = this;\n var current;\n\n if (+end < +start) {\n current = end;\n end = start;\n start = current;\n }\n\n that._fillRange(start, end);\n that._visualizeSelectedDatesInView();\n },\n\n _header: function() {\n var that = this;\n var element = that.element;\n var buttons;\n var header = element.find(\".k-calendar-header\");\n\n if (!header.length) {\n header = $(`').prependTo(element);\n }\n\n that.header = header;\n\n header.on(MOUSEENTER + ns + \" \" + MOUSELEAVE_NS + \" \" + FOCUS + ns + \" \" + BLUR + ns, \".k-button\", mousetoggle)\n .on(CLICK, function() { return false; })\n .on(CLICK + ns, \".k-button.k-calendar-title\", that._calendarTitleClick.bind(that))\n .on(CLICK + ns, \".k-button.k-calendar-prev-view\", that._prevViewClick.bind(that))\n .on(CLICK + ns, \".k-button.k-calendar-next-view\", that._nextViewClick.bind(that));\n\n buttons = header.find(\".k-button\");\n\n that._title = buttons.filter(\".k-calendar-title\");\n that._navContainer = header.find(\".k-calendar-nav\");\n that[PREVARROW] = buttons.filter(\".k-calendar-prev-view\");\n that[NEXTARROW] = buttons.filter(\".k-calendar-next-view\");\n },\n\n _calendarTitleClick: function() {\n this.navigateUp();\n this.focus();\n this.trigger(NAVIGATE);\n },\n\n _prevViewClick: function(e) {\n e.preventDefault();\n this.navigateToPast();\n this.focus();\n this.trigger(NAVIGATE);\n },\n\n _nextViewClick: function(e) {\n e.preventDefault();\n this.navigateToFuture();\n this.focus();\n this.trigger(NAVIGATE);\n },\n\n _wrapper: function() {\n this.tablesWrapper = $('
    ').insertAfter(this.element[0].firstChild);\n },\n\n _templates: function() {\n var that = this;\n var options = that.options;\n var month = options.month;\n var content = month.content;\n var weekNumber = month.weekNumber;\n var empty = month.empty;\n\n that.month = {\n content: template((data) => `${content ? kendo.template(content, { useWithBlock: !!content })(data) : data.value}`, { useWithBlock: !!content }),\n empty: template((data) => `' : ' class=\"k-calendar-td k-out-of-range\">'}${(empty ? kendo.template(empty, { useWithBlock: !!empty })(data) : \"\")}`, { useWithBlock: !!empty }),\n weekNumber: template((data) => `${weekNumber ? kendo.template(weekNumber, { useWithBlock: !!weekNumber })(data) : data.weekNumber}`, { useWithBlock: !!weekNumber })\n };\n },\n\n _footer: function() {\n var that = this;\n var options = that.options;\n var template = options.footer !== false ? kendo.template(that.options.footer || ((data) => kendo.toString(data,\"D\", options.culture)), { useWithBlock: false }) : null;\n var today = getToday();\n var element = that.element;\n var footer = element.find(\".k-footer\");\n\n if (!template) {\n that._toggle(false);\n footer.hide();\n return;\n }\n\n if (!footer[0]) {\n footer = $(`
    \n \n
    `).appendTo(element);\n }\n\n that._today = footer.show()\n .find(\".k-button-flat-primary\")\n .attr(\"title\", kendo.toString(today, \"D\", that.options.culture));\n\n footer.find(\".k-button-text\")\n .html(template(today));\n\n that._toggle();\n },\n\n _navigate: function(arrow, modifier) {\n var that = this;\n var index = that._index + 1;\n var currentValue = new DATE(+that._current);\n var originaValue = new DATE(+that._current);\n var offset;\n\n arrow = that[arrow];\n\n offset = that._cellByDate(currentValue).closest(TABLE).index();\n\n if (modifier > 0) {\n offset = 1 - offset;\n } else {\n offset = offset + 1;\n }\n\n if (!arrow || !arrow.hasClass(DISABLED)) {\n if (index > 3) {\n currentValue.setFullYear(currentValue.getFullYear() + 100 * (modifier * offset));\n } else {\n calendar.views[index].setDate(currentValue, (modifier * offset));\n }\n\n that.navigate(currentValue);\n\n if (that._dateInViews(originaValue)) {\n that._focusCell(that._cellByDate(originaValue));\n that._current = originaValue;\n } else {\n if (index > 3) {\n originaValue.setFullYear(originaValue.getFullYear() + 100 * modifier);\n } else {\n calendar.views[index].setDate(originaValue, modifier);\n }\n that._focusCell(that._cellByDate(originaValue));\n that._current = originaValue;\n }\n }\n },\n\n _toggle: function(toggle) {\n var that = this;\n var options = that.options;\n var isTodayDisabled = options.selectable !== RANGE && that.options.disableDates(getToday());\n var link = that._today;\n\n if (toggle === undefined$1) {\n toggle = isInRange(getToday(), options.min, options.max);\n }\n\n if (link) {\n link.off(CLICK + ns);\n\n if (toggle && !isTodayDisabled) {\n link.addClass(TODAY)\n .removeClass(DISABLED)\n .on(CLICK + ns, function(e) { that._todayClick(e); that.focus(); });\n } else {\n link.removeClass(TODAY)\n .addClass(DISABLED)\n .on(CLICK + ns, function prevent(e) {\n e.preventDefault();\n });\n }\n }\n },\n\n _click: function(link) {\n var that = this;\n var options = that.options;\n var currentValue = new Date(+that._current);\n var value = toDateObject(link);\n\n kendo.date.adjustDST(value, 0);\n\n that._currentView.setDate(currentValue, value);\n that._current = value;\n\n if (that._currentView.name !== options.depth) {\n that.navigateDown(calendar.restrictValue(currentValue, options.min, options.max));\n that._focusCell(that._cellByDate(that._current));\n that.trigger(NAVIGATE);\n } else {\n that._focusCell(link.closest(TD));\n }\n\n that.focus();\n },\n\n _blur: function() {\n var that = this;\n\n if (that._cell) {\n that._cell.removeClass(FOCUSED);\n }\n },\n\n _focus: function() {\n var cell = this._cell;\n\n if (!cell || !$.contains(this.tablesWrapper[0], cell[0])) {\n if (this._current && this._dateInViews(this._current)) {\n cell = this._cellByDate(this._current);\n } else {\n cell = this.tablesWrapper.find(CELLSELECTORVALID).first();\n }\n }\n\n this._focusCell(cell);\n },\n\n _focusCell: function(cell) {\n var that = this;\n var cellId = that._cellID;\n\n if (that._cell && that._cell.length) {\n that._cell[0].removeAttribute(ARIA_LABEL);\n that._cell.removeClass(FOCUSED);\n that.tablesWrapper.removeAttr(ARIA_ACTIVEDESCENDANT);\n\n if (that._cell.attr(ID) === cellId) {\n that._cell[0].removeAttribute(ID);\n }\n }\n\n that._cell = cell;\n\n if (cell.attr(ID)) {\n that.tablesWrapper.attr(ARIA_ACTIVEDESCENDANT, cell.attr(ID));\n } else if (cellId) {\n cell.attr(ID, cellId);\n that.tablesWrapper.attr(ARIA_ACTIVEDESCENDANT, cellId);\n }\n\n cell.addClass(FOCUSED);\n\n if (cell.length && that._currentView.name == MONTH) {\n that._current = toDateObject(cell.find(\"a\"));\n }\n },\n\n _todayClick: function(e) {\n var that = this;\n var disabled = that.options.disableDates;\n var today = getToday();\n var navigate = false;\n\n e.preventDefault();\n\n if (disabled(today)) {\n return;\n }\n\n that._value = today;\n\n if (that.options.selectable === MULTIPLE) {\n that._selectDates = [today];\n }\n\n if (that.options.selectable === RANGE) {\n that.rangeSelectable.clear(true);\n that._range = { start: today, end: null };\n }\n\n if (that._currentView.name != MONTH || !that._dateInViews(today)) {\n navigate = true;\n }\n\n that.navigate(today, that.options.depth);\n\n if (that.options.selectable === SINGLE) {\n that.selectable._lastActive = null;\n }\n\n if (navigate) {\n that.trigger(NAVIGATE);\n }\n\n that.trigger(CHANGE);\n },\n\n _validateValue: function(value) {\n var that = this;\n var options = that.options;\n var min = options.min;\n var max = options.max;\n\n value = kendo.parseDate(value, options.format, options.culture);\n\n if (value !== null) {\n value = new DATE(+value);\n\n if (!isInRange(value, min, max)) {\n value = null;\n }\n }\n\n if (value === null || !that.options.disableDates(new Date(+value))) {\n that._value = value;\n } else if (that._value === undefined$1) {\n that._value = null;\n }\n\n return that._value;\n },\n\n _updateAria: function(ariaTemplate, date) {\n var that = this;\n var cell = that._cellByDate(date || that.current());\n var valueType = that.view().valueType();\n var current = date || that.current();\n var text;\n\n that._focusCell(cell);\n\n if (valueType === MONTH) {\n text = kendo.toString(current, \"MMMM\");\n } else if (valueType === \"date\") {\n text = kendo.toString(current, \"D\");\n } else {\n text = cell.text();\n }\n\n cell.attr(ARIA_LABEL, ariaTemplate({ current: current, valueType: valueType, text: text }));\n return cell.attr(ID);\n },\n\n clearSelection: function() {\n var that = this;\n\n if (that.selectable) {\n that.element.find(DOT + SELECTED).removeClass(SELECTED).removeAttr(ARIA_SELECTED);\n }\n\n if (that.rangeSelectable) {\n that.rangeSelectable.clear(true);\n }\n },\n\n _restoreSelection: function() {\n var that = this;\n var range;\n var selectable = that.options.selectable;\n\n if (that._currentView.name !== that.options.depth) {\n return;\n }\n\n that._preventChange = true;\n\n if (selectable === RANGE) {\n range = that.selectRange();\n\n if (!range || !range.start) {\n that._preventChange = false;\n return;\n }\n\n that.selectRange(range);\n }\n\n if (selectable === SINGLE && that.value()) {\n that.selectable.value(that._cellByDate(that.value()));\n }\n\n if (selectable === MULTIPLE) {\n that._visualizeSelectedDatesInView();\n }\n\n that._preventChange = false;\n },\n\n value: function(value) {\n var that = this;\n var cell;\n\n if (value === undefined$1) {\n return that._value;\n }\n\n value = that._validateValue(value);\n\n that.clearSelection();\n\n if (value && !that._dateInViews(value)) {\n that.navigate(value);\n }\n\n if (value !== null && that._currentView.name === MONTH) {\n cell = that._cellByDate(value);\n\n if (that.selectable) {\n that.selectable.value(cell);\n }\n\n if (that.rangeSelectable) {\n that.rangeSelectable.start(cell);\n that.rangeSelectable._lastActive = cell;\n }\n }\n },\n\n selectDates: function(dates) {\n var that = this;\n var validSelectedDates;\n var datesUnique;\n\n if (dates === undefined$1) {\n return that._selectDates;\n }\n\n datesUnique = dates\n .map(function(date) { return date.getTime(); })\n .filter(function(date, position, array) {\n return array.indexOf(date) === position;\n })\n .map(function(time) { return new Date(time); });\n\n validSelectedDates = $.grep(datesUnique, function(value) {\n if (value) {\n return +that._validateValue(new Date(value.setHours(0, 0, 0, 0))) === +value;\n }\n });\n that._selectDates = validSelectedDates.length > 0 ? validSelectedDates : (datesUnique.length === 0 ? datesUnique : that._selectDates);\n that._visualizeSelectedDatesInView();\n },\n\n selectRange: function(range) {\n var that = this;\n var startInRange;\n var endInRange;\n var visibleRange;\n\n if (range === undefined$1) {\n return that._range;\n }\n\n that._range = range;\n\n if (!range.start) {\n return;\n }\n\n visibleRange = that._visibleRange();\n\n startInRange = that._dateInViews(range.start);\n endInRange = range.end && that._dateInViews(range.end);\n\n if (!startInRange && endInRange) {\n that.rangeSelectable.selectTo(that._cellByDate(range.end));\n }\n\n if (startInRange && endInRange) {\n that.rangeSelectable.range(that._cellByDate(range.start), that._cellByDate(range.end));\n }\n\n if (range.end && startInRange && !endInRange) {\n that.rangeSelectable.selectFrom(that._cellByDate(range.start));\n }\n\n if (!range.end && startInRange) {\n that.rangeSelectable.start(that._cellByDate(range.start));\n }\n\n if (+visibleRange.start > +range.start && +visibleRange.end < +range.end) {\n that.rangeSelectable.mid(that.element.find(CELLSELECTORVALID));\n }\n }\n });\n\n kendo.ui.plugin(MultiViewCalendar);\n\n function mousetoggle(e) {\n var disabled = $(this).hasClass(\"k-disabled\");\n\n if (!disabled) {\n $(this).toggleClass(HOVER, MOUSEENTER.indexOf(e.type) > -1 || e.type == FOCUS);\n }\n }\n\n function addDaysToArray(array, numberOfDays, fromDate, disableDates) {\n for (var i = 0; i <= numberOfDays; i++) {\n var nextDay = new Date(fromDate.getTime());\n nextDay = new Date(nextDay.setDate(nextDay.getDate() + i));\n if (!disableDates(nextDay)) {\n array.push(nextDay);\n }\n }\n }\n\n function daysBetweenTwoDates(startDate, endDate) {\n if (+endDate < +startDate) {\n var temp = +startDate;\n calendar.views[0].setDate(startDate, endDate);\n calendar.views[0].setDate(endDate, new Date(temp));\n }\n var fromDateUTC = Date.UTC(startDate.getFullYear(), startDate.getMonth(), startDate.getDate());\n var endDateUTC = Date.UTC(endDate.getFullYear(), endDate.getMonth(), endDate.getDate());\n\n return Math.ceil((+endDateUTC - +fromDateUTC) / kendo.date.MS_PER_DAY);\n }\n\n function shiftDate(value, dimension, numberOfViews) {\n var current;\n if (dimension === MONTH) {\n current = new DATE(value.getFullYear(), value.getMonth() + numberOfViews, value.getDate());\n current.setFullYear(value.getFullYear());\n if (Math.abs(current.getMonth() - value.getMonth()) > numberOfViews || numberOfViews > 10) {\n current.setMonth(value.getMonth() + numberOfViews);\n current = calendar.views[0].last(current);\n }\n return current;\n } else if (dimension === \"year\") {\n current = new DATE(1, value.getMonth(), value.getDate());\n current.setFullYear(value.getFullYear() + numberOfViews);\n if (Math.abs(current.getFullYear() - value.getFullYear()) > numberOfViews) {\n current = new DATE(1, value.getMonth(), 1);\n current.setFullYear(value.getFullYear() + numberOfViews);\n current = calendar.views[1].last(current);\n }\n return current;\n } else if (dimension === \"decade\") {\n current = new DATE(1, value.getMonth(), value.getDate());\n current.setFullYear(value.getFullYear() + 10 * numberOfViews);\n if (Math.abs(current.getFullYear() - value.getFullYear()) > 10 * numberOfViews) {\n current = new DATE(1, value.getMonth(), 1);\n current.setFullYear(value.getFullYear() + 10 * numberOfViews);\n current = calendar.views[2].last(current);\n }\n return current;\n } else if (dimension === \"century\") {\n current = new DATE(1, value.getMonth(), value.getDate());\n current.setFullYear(value.getFullYear() + 100 * numberOfViews);\n if (Math.abs(current.getFullYear() - value.getFullYear()) > 100 * numberOfViews) {\n current = new DATE(1, value.getMonth(), 1);\n current.setFullYear(value.getFullYear() + 100 * numberOfViews);\n current = calendar.views[3].last(current);\n }\n return current;\n }\n }\n\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.data.js';\n\nvar __meta__ = {\n id: \"virtuallist\",\n name: \"VirtualList\",\n category: \"framework\",\n depends: [ \"data\" ],\n hidden: true\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n ui = kendo.ui,\n encode = kendo.htmlEncode,\n Widget = ui.Widget,\n DataBoundWidget = ui.DataBoundWidget,\n percentageUnitsRegex = /^\\d+(\\.\\d+)?%$/i,\n LIST_CONTENT = \"k-list-content k-virtual-content\",\n TABLE_CONTENT = \"k-table-body k-table-scroller\",\n HEADER = \"k-list-group-sticky-header\",\n LIST_ITEM = \"k-list-item\",\n TABLE_ITEM = \"k-table-row\",\n HEIGHTCONTAINER = \"k-height-container\",\n GROUPITEM = \"k-list-item-group-label\",\n LIST_UL = \"k-list-ul\",\n TABLE_LIST = \"k-table-list\",\n\n SELECTED = \"k-selected\",\n FOCUSED = \"k-focus\",\n HOVER = \"k-hover\",\n CHANGE = \"change\",\n CLICK = \"click\",\n LISTBOUND = \"listBound\",\n ITEMCHANGE = \"itemChange\",\n\n ACTIVATE = \"activate\",\n DEACTIVATE = \"deactivate\",\n\n GROUP_ROW_SEL = \".k-table-group-row\",\n\n VIRTUAL_LIST_NS = \".VirtualList\";\n\n function lastFrom(array) {\n return array[array.length - 1];\n }\n\n function toArray(value) {\n return value instanceof Array ? value : [value];\n }\n\n function isPrimitive(dataItem) {\n return typeof dataItem === \"string\" || typeof dataItem === \"number\" || typeof dataItem === \"boolean\";\n }\n\n function getItemCount(screenHeight, listScreens, itemHeight) {\n return Math.ceil(screenHeight * listScreens / itemHeight);\n }\n\n function appendChild(parent, className, tagName) {\n var element = document.createElement(tagName || \"div\");\n if (className) {\n element.className = className;\n }\n parent.appendChild(element);\n\n return element;\n }\n\n function getDefaultItemHeight(listSize) {\n var mockList = $('
    ' +\n '
    ' +\n '
      ' +\n '
    • ' +\n 'test' +\n '
    • ' +\n '
    ' +\n '
    ' +\n '
    ');\n var lineHeight;\n\n mockList.css({\n position: \"absolute\",\n left: \"-200000px\",\n visibility: \"hidden\"\n });\n mockList.appendTo(document.body);\n lineHeight = parseFloat(kendo.getComputedStyles(mockList.find(\".k-list-item\")[0], [\"height\"]).height);\n mockList.remove();\n\n return lineHeight;\n }\n\n function bufferSizes(screenHeight, listScreens, opposite) { //in pixels\n return {\n down: screenHeight * opposite,\n up: screenHeight * (listScreens - 1 - opposite)\n };\n }\n\n function listValidator(options, screenHeight) {\n var downThreshold = (options.listScreens - 1 - options.threshold) * screenHeight;\n var upThreshold = options.threshold * screenHeight;\n\n return function(list, scrollTop, lastScrollTop) {\n if (scrollTop > lastScrollTop) {\n return scrollTop - list.top < downThreshold;\n } else {\n return list.top === 0 || scrollTop - list.top > upThreshold;\n }\n };\n }\n\n function scrollCallback(element, callback) {\n return function(force) {\n return callback(element.scrollTop, force);\n };\n }\n\n function syncList(reorder) {\n return function(list, force) {\n reorder(list.items, list.index, force);\n return list;\n };\n }\n\n function position(element, y) {\n element.style.webkitTransform = 'translateY(' + y + \"px)\";\n element.style.transform = 'translateY(' + y + \"px)\";\n }\n\n function map2(callback, templates) {\n return function(arr1, arr2) {\n for (var i = 0, len = arr1.length; i < len; i++) {\n callback(arr1[i], arr2[i], templates);\n if (arr2[i].item) {\n this.trigger(ITEMCHANGE, { item: $(arr1[i]), data: arr2[i].item, ns: kendo.ui });\n }\n }\n };\n }\n\n function reshift(items, diff) {\n var range;\n\n if (diff > 0) { // down\n range = items.splice(0, diff);\n items.push.apply(items, range);\n } else { // up\n range = items.splice(diff, -diff);\n items.unshift.apply(items, range);\n }\n\n return range;\n }\n\n function render(element, data, templates) {\n var itemTemplate = templates.template,\n hasColumns = this.options.columns && this.options.columns.length,\n altRow = data.index % 2 === 1 ? \"k-table-alt-row\" : \"\";\n\n element = $(element);\n\n if (!data.item) {\n itemTemplate = templates.placeholderTemplate;\n }\n\n if (data.index === 0 && this.header && data.group) {\n this.header.html(templates.fixedGroupTemplate(data.group));\n }\n\n this.angular(\"cleanup\", function() {\n return { elements: [ element ] };\n });\n\n element\n .attr(\"data-uid\", data.item ? data.item.uid : \"\")\n .attr(\"data-offset-index\", data.index);\n\n if (hasColumns && data.item) {\n if (altRow.length > 0) {\n element.addClass(altRow);\n } else {\n element.removeClass(\"k-table-alt-row\");\n }\n\n let renderedColumns = $(renderColumns(this.options, data.item, templates));\n kendo.applyStylesFromKendoAttributes(renderedColumns, [\"width\", \"max-width\"]);\n element.empty().append(renderedColumns);\n } else {\n element.find(\".\" + GROUPITEM).remove();\n element.find(\".k-list-item-text\").html(itemTemplate(data.item || {}));\n }\n\n element.toggleClass(FOCUSED, data.current);\n element.toggleClass(SELECTED, data.selected);\n element.toggleClass(\"k-first\", data.newGroup);\n element.toggleClass(\"k-last\", data.isLastGroupedItem);\n element.toggleClass(\"k-loading-item\", !data.item);\n\n if (data.index !== 0 && data.newGroup) {\n if (hasColumns) {\n $('' + templates.groupTemplate(data.group) + '')\n .appendTo(element);\n } else {\n $(\"
    \")\n .appendTo(element)\n .html(templates.groupTemplate(data.group));\n }\n } else if (data.group && hasColumns) {\n element.append($(''));\n }\n\n if (data.top !== undefined$1) {\n position(element[0], data.top);\n }\n\n this.angular(\"compile\", function() {\n return { elements: [ element ], data: [ { dataItem: data.item, group: data.group, newGroup: data.newGroup } ] };\n });\n }\n\n function renderColumns(options, dataItem, templates) {\n var item = \"\";\n\n for (var i = 0; i < options.columns.length; i++) {\n var currentWidth = options.columns[i].width;\n var currentWidthInt = parseInt(currentWidth, 10);\n var widthStyle = '';\n\n if (currentWidth) {\n let widthValue = `${currentWidthInt}${percentageUnitsRegex.test(currentWidth) ? \"%\" : \"px\"}`;\n widthStyle = `${kendo.attr(\"style-width\")}=\"${widthValue}\" ${kendo.attr(\"style-max-width\")}=\"${widthValue}\"`;\n }\n\n item += \"\";\n item += templates[\"column\" + i](dataItem);\n item += \"\";\n }\n\n return item;\n }\n\n function mapChangedItems(selected, itemsToMatch) {\n var itemsLength = itemsToMatch.length;\n var selectedLength = selected.length;\n var dataItem;\n var found;\n var i, j;\n\n var changed = [];\n var unchanged = [];\n\n if (selectedLength) {\n for (i = 0; i < selectedLength; i++) {\n dataItem = selected[i];\n found = false;\n\n for (j = 0; j < itemsLength; j++) {\n if (dataItem === itemsToMatch[j]) {\n found = true;\n changed.push({ index: i, item: dataItem });\n break;\n }\n }\n\n if (!found) {\n unchanged.push(dataItem);\n }\n }\n }\n\n return {\n changed: changed,\n unchanged: unchanged\n };\n }\n\n function isActivePromise(promise) {\n return promise && promise.state() !== \"resolved\";\n }\n\n var VirtualList = DataBoundWidget.extend({\n init: function(element, options) {\n var that = this,\n contentClasses = options.columns && options.columns.length ? TABLE_CONTENT : LIST_CONTENT;\n\n that.bound(false);\n that._fetching = false;\n\n Widget.fn.init.call(that, element, options);\n\n if (!that.options.itemHeight) {\n that.options.itemHeight = getDefaultItemHeight(options.listSize);\n }\n\n options = that.options;\n\n that.element.attr(\"role\", \"listbox\");\n\n var contentSelector = \".\" + contentClasses.split(' ').join('.');\n var wrapper = that.element.closest(contentSelector);\n\n that.content = that.wrapper = wrapper.length ? wrapper : that.element.wrap(\"
    \").parent();\n\n if (that.options.columns && that.options.columns.length) {\n var thead = that.element.closest(\".k-data-table\").find('.k-table-thead');\n var row = $('' +\n '' +\n '');\n\n thead.append(row);\n\n that.header = row.find(\".k-table-th\");\n that.element.addClass(TABLE_LIST + \" k-virtual-table\");\n } else {\n that.header = that.content.before(\"
    \").prev();\n that.element.addClass(LIST_UL);\n }\n\n if (options.ariaLabel) {\n this.element.attr(\"aria-label\", options.ariaLabel);\n } else if (options.ariaLabelledBy) {\n this.element.attr(\"aria-labelledby\", options.ariaLabelledBy);\n }\n\n that.element.on(\"mouseenter\" + VIRTUAL_LIST_NS, \"li:not(.k-loading-item)\", function() { $(this).addClass(HOVER); })\n .on(\"mouseleave\" + VIRTUAL_LIST_NS, \"li\", function() { $(this).removeClass(HOVER); });\n\n that._values = toArray(that.options.value);\n that._selectedDataItems = [];\n that._selectedIndexes = [];\n that._rangesList = {};\n that._promisesList = [];\n that._optionID = kendo.guid();\n\n that._templates();\n\n that.setDataSource(options.dataSource);\n\n that.content.on(\"scroll\" + VIRTUAL_LIST_NS, kendo.throttle(function() {\n that._renderItems();\n that._triggerListBound();\n }, options.delay));\n\n that._selectable();\n },\n\n options: {\n name: \"VirtualList\",\n autoBind: true,\n delay: 100,\n height: null,\n listScreens: 4,\n threshold: 0.5,\n itemHeight: null,\n oppositeBuffer: 1,\n type: \"flat\",\n selectable: false,\n value: [],\n dataValueField: null,\n template: (data) => encode(data),\n placeholderTemplate: () => \"loading...\",\n groupTemplate: (data) => encode(data),\n fixedGroupTemplate: (data) => encode(data),\n mapValueTo: \"index\",\n valueMapper: null,\n ariaLabel: null,\n ariaLabelledBy: null\n },\n\n events: [\n CHANGE,\n CLICK,\n LISTBOUND,\n ITEMCHANGE,\n ACTIVATE,\n DEACTIVATE\n ],\n\n setOptions: function(options) {\n var itemClass = this.options.columns && this.options.columns.length ? TABLE_ITEM : LIST_ITEM;\n\n Widget.fn.setOptions.call(this, options);\n\n if (this._selectProxy && this.options.selectable === false) {\n this.element.off(CLICK, \".\" + itemClass, this._selectProxy);\n } else if (!this._selectProxy && this.options.selectable) {\n this._selectable();\n }\n\n this._templates();\n this.refresh();\n },\n\n items: function() {\n return $(this._items);\n },\n\n destroy: function() {\n this.wrapper.off(VIRTUAL_LIST_NS);\n this.dataSource.unbind(CHANGE, this._refreshHandler);\n Widget.fn.destroy.call(this);\n },\n\n setDataSource: function(source) {\n var that = this;\n var dataSource = source || {};\n var value;\n\n dataSource = Array.isArray(dataSource) ? { data: dataSource } : dataSource;\n dataSource = kendo.data.DataSource.create(dataSource);\n\n if (that.dataSource) {\n that.dataSource.unbind(CHANGE, that._refreshHandler);\n\n that._clean();\n that.bound(false);\n\n that._deferValueSet = true;\n value = that.value();\n\n that.value([]);\n that.mute(function() {\n that.value(value);\n });\n } else {\n that._refreshHandler = that.refresh.bind(that);\n }\n\n that.dataSource = dataSource.bind(CHANGE, that._refreshHandler);\n\n that.setDSFilter(dataSource.filter());\n\n if (dataSource.view().length !== 0) {\n that.refresh();\n } else if (that.options.autoBind) {\n dataSource.fetch();\n }\n },\n\n skip: function() {\n return this.dataSource.currentRangeStart();\n },\n\n _triggerListBound: function() {\n var that = this;\n var skip = that.skip();\n\n if (that.bound() && !that._selectingValue && that._skip !== skip) {\n that._skip = skip;\n that.trigger(LISTBOUND);\n }\n },\n\n _getValues: function(dataItems) {\n var getter = this._valueGetter;\n\n return $.map(dataItems, function(dataItem) {\n return getter(dataItem);\n });\n },\n\n _highlightSelectedItems: function() {\n for (var i = 0; i < this._selectedDataItems.length; i++) {\n var item = this._getElementByDataItem(this._selectedDataItems[i]);\n if (item.length) {\n item.addClass(SELECTED);\n }\n }\n },\n\n refresh: function(e) {\n var that = this;\n var action = e && e.action;\n var isItemChange = action === \"itemchange\";\n var filtered = this.isFiltered();\n var result;\n\n if (that._mute) { return; }\n\n that._deferValueSet = false;\n\n if (!that._fetching) {\n if (filtered) {\n that.focus(0);\n }\n\n that._createList();\n if (!action && that._values.length && !filtered &&\n !that.options.skipUpdateOnBind && !that._emptySearch) {\n that._selectingValue = true;\n\n that.bound(true);\n that.value(that._values, true).done(function() {\n that._selectingValue = false;\n that._triggerListBound();\n });\n } else {\n that.bound(true);\n that._highlightSelectedItems();\n that._triggerListBound();\n }\n } else {\n if (that._renderItems) {\n that._renderItems(true);\n }\n\n that._triggerListBound();\n }\n\n if (isItemChange || action === \"remove\") {\n result = mapChangedItems(that._selectedDataItems, e.items);\n if (result.changed.length) {\n if (isItemChange) {\n that.trigger(\"selectedItemChange\", {\n items: result.changed\n });\n } else {\n that.value(that._getValues(result.unchanged));\n }\n }\n }\n\n that._fetching = false;\n },\n\n removeAt: function(position) {\n var value = this._values.splice(position, 1)[0];\n\n return {\n position: position,\n dataItem: this._removeSelectedDataItem(value)\n };\n },\n\n _removeSelectedDataItem: function(value) {\n var that = this,\n valueGetter = that._valueGetter;\n\n for (var idx in that._selectedDataItems) {\n if (valueGetter(that._selectedDataItems[idx]) === value) {\n that._selectedIndexes.splice(idx, 1);\n return that._selectedDataItems.splice(idx, 1)[0];\n }\n }\n },\n\n setValue: function(value) {\n this._values = toArray(value);\n },\n\n value: function(value, _forcePrefetch) {\n var that = this;\n\n if (value === undefined$1) {\n return that._values.slice();\n }\n\n if (value === null) {\n value = [];\n }\n\n value = toArray(value);\n\n if (!that._valueDeferred || that._valueDeferred.state() === \"resolved\") {\n that._valueDeferred = $.Deferred();\n }\n\n var shouldClear = that.options.selectable === \"multiple\" && that.select().length && value.length;\n\n if (shouldClear || !value.length) {\n that.select(-1);\n }\n\n that._values = value;\n\n if ((that.bound() && !that._mute && !that._deferValueSet) || _forcePrefetch) {\n that._prefetchByValue(value);\n }\n\n return that._valueDeferred;\n },\n\n _checkValuesOrder: function(value) {\n if (this._removedAddedIndexes &&\n this._removedAddedIndexes.length === value.length) {\n var newValue = this._removedAddedIndexes.slice();\n this._removedAddedIndexes = null;\n return newValue;\n }\n\n return value;\n },\n\n _prefetchByValue: function(value) {\n var that = this,\n dataView = that._dataView,\n valueGetter = that._valueGetter,\n mapValueTo = that.options.mapValueTo,\n item, match = false,\n forSelection = [];\n\n //try to find the items in the loaded data\n for (var i = 0; i < value.length; i++) {\n for (var idx = 0; idx < dataView.length; idx++) {\n item = dataView[idx].item;\n if (item) {\n match = isPrimitive(item) ? value[i] === item : value[i] === valueGetter(item);\n\n if (match) {\n forSelection.push(dataView[idx].index);\n }\n }\n }\n }\n\n if (forSelection.length === value.length) {\n that._values = [];\n that.select(forSelection);\n return;\n }\n\n //prefetch the items\n if (typeof that.options.valueMapper === \"function\") {\n that.options.valueMapper({\n value: (this.options.selectable === \"multiple\") ? value : value[0],\n success: function(response) {\n if (mapValueTo === \"index\") {\n that.mapValueToIndex(response);\n } else if (mapValueTo === \"dataItem\") {\n that.mapValueToDataItem(response);\n }\n }\n });\n } else {\n if (!that.value()[0]) {\n that.select([-1]);\n } else {\n that._selectingValue = false;\n that._triggerListBound();\n }\n }\n },\n\n mapValueToIndex: function(indexes) {\n if (indexes === undefined$1 || indexes === -1 || indexes === null) {\n indexes = [];\n } else {\n indexes = toArray(indexes);\n }\n\n if (!indexes.length) {\n indexes = [-1];\n } else {\n var removed = this._deselect([]).removed;\n if (removed.length) {\n this._triggerChange(removed, []);\n }\n }\n\n this.select(indexes);\n },\n\n mapValueToDataItem: function(dataItems) {\n var removed, added;\n\n if (dataItems === undefined$1 || dataItems === null) {\n dataItems = [];\n } else {\n dataItems = toArray(dataItems);\n }\n\n if (!dataItems.length) {\n this.select([-1]);\n } else {\n removed = $.map(this._selectedDataItems, function(item, index) {\n return { index: index, dataItem: item };\n });\n\n added = $.map(dataItems, function(item, index) {\n return { index: index, dataItem: item };\n });\n\n this._selectedDataItems = dataItems;\n\n this._selectedIndexes = [];\n\n for (var i = 0; i < this._selectedDataItems.length; i++) {\n var item = this._getElementByDataItem(this._selectedDataItems[i]);\n this._selectedIndexes.push(this._getIndecies(item)[0]);\n item.addClass(SELECTED);\n }\n\n this._triggerChange(removed, added);\n\n if (this._valueDeferred) {\n this._valueDeferred.resolve();\n }\n }\n },\n\n deferredRange: function(index) {\n var dataSource = this.dataSource;\n var take = this.itemCount;\n var ranges = this._rangesList;\n var result = $.Deferred();\n var defs = [];\n\n var low = Math.floor(index / take) * take;\n var high = Math.ceil(index / take) * take;\n\n var pages = high === low ? [ high ] : [ low, high ];\n\n $.each(pages, function(_, skip) {\n var end = skip + take;\n var existingRange = ranges[skip];\n var deferred;\n\n if (!existingRange || (existingRange.end !== end)) {\n deferred = $.Deferred();\n ranges[skip] = { end: end, deferred: deferred };\n\n dataSource._multiplePrefetch(skip, take, function() {\n deferred.resolve();\n });\n } else {\n deferred = existingRange.deferred;\n }\n\n defs.push(deferred);\n });\n\n $.when.apply($, defs).done(function() {\n result.resolve();\n });\n\n return result;\n },\n\n prefetch: function(indexes) {\n var that = this,\n take = this.itemCount,\n isEmptyList = !that._promisesList.length;\n\n if (!isActivePromise(that._activeDeferred)) {\n that._activeDeferred = $.Deferred();\n that._promisesList = [];\n }\n\n $.each(indexes, function(_, index) {\n that._promisesList.push(that.deferredRange(that._getSkip(index, take)));\n });\n\n if (isEmptyList) {\n $.when.apply($, that._promisesList).done(function() {\n that._promisesList = [];\n that._activeDeferred.resolve();\n });\n }\n\n return that._activeDeferred;\n },\n\n _findDataItem: function(view, index) {\n var group;\n\n //find in grouped view\n if (this.options.type === \"group\") {\n for (var i = 0; i < view.length; i++) {\n group = view[i].items;\n if (group.length <= index) {\n index = index - group.length;\n } else {\n return group[index];\n }\n }\n }\n\n //find in flat view\n return view[index];\n },\n\n _getRange: function(skip, take) {\n return this.dataSource._findRange(skip, Math.min(skip + take, this.dataSource.total()));\n },\n\n dataItemByIndex: function(index) {\n var that = this;\n var take = that.itemCount;\n var skip = that._getSkip(index, take);\n var view = this._getRange(skip, take);\n\n //should not return item if data is not loaded\n if (!that._getRange(skip, take).length) {\n return null;\n }\n\n if (that.options.type === \"group\") {\n kendo.ui.progress($(that.wrapper), true);\n that.mute(function() {\n that.dataSource.range(skip, take, function() {\n kendo.ui.progress($(that.wrapper), false);\n });\n view = that.dataSource.view();\n });\n }\n\n return that._findDataItem(view, [index - skip]);\n },\n\n selectedDataItems: function() {\n return this._selectedDataItems.slice();\n },\n\n scrollWith: function(value) {\n this.content.scrollTop(this.content.scrollTop() + value);\n },\n\n scrollTo: function(y) {\n this.content.scrollTop(y); //works only if the element is visible\n },\n\n scrollToIndex: function(index) {\n this.scrollTo(index * this.options.itemHeight);\n },\n\n focus: function(candidate) {\n var element,\n index,\n data,\n current,\n itemHeight = this.options.itemHeight,\n id = this._optionID,\n triggerEvent = true;\n\n if (candidate === undefined$1) {\n current = this.element.find(\".\" + FOCUSED);\n return current.length ? current : null;\n }\n\n if (typeof candidate === \"function\") {\n data = this.dataSource.flatView();\n for (var idx = 0; idx < data.length; idx++) {\n if (candidate(data[idx])) {\n candidate = idx;\n break;\n }\n }\n }\n\n if (candidate instanceof Array) {\n candidate = lastFrom(candidate);\n }\n\n if (isNaN(candidate)) {\n element = $(candidate);\n index = parseInt($(element).attr(\"data-offset-index\"), 10);\n } else {\n index = candidate;\n element = this._getElementByIndex(index);\n }\n\n if (index === -1) {\n this.element.find(\".\" + FOCUSED).removeClass(FOCUSED);\n this._focusedIndex = undefined$1;\n return;\n }\n\n if (element.length) { /*focus rendered item*/\n if (element.hasClass(FOCUSED)) {\n triggerEvent = false;\n }\n if (this._focusedIndex !== undefined$1) {\n current = this._getElementByIndex(this._focusedIndex);\n current\n .removeClass(FOCUSED)\n .removeAttr(\"id\");\n\n if (triggerEvent) {\n this.trigger(DEACTIVATE);\n }\n }\n\n this._focusedIndex = index;\n\n element\n .addClass(FOCUSED)\n .attr(\"id\", id);\n\n var position = this._getElementLocation(index);\n\n if (position === \"top\") {\n this.scrollTo(index * itemHeight);\n } else if (position === \"bottom\") {\n this.scrollTo((index * itemHeight + itemHeight) - this._screenHeight);\n } else if (position === \"outScreen\") {\n this.scrollTo(index * itemHeight);\n }\n\n if (triggerEvent) {\n this.trigger(ACTIVATE);\n }\n } else { /*focus non rendered item*/\n this._focusedIndex = index;\n this.items().removeClass(FOCUSED);\n this.scrollToIndex(index);\n }\n },\n\n focusIndex: function() {\n return this._focusedIndex;\n },\n\n focusFirst: function() {\n this.scrollTo(0);\n this.focus(0);\n },\n\n focusLast: function() {\n var lastIndex = this.dataSource.total();\n this.scrollTo(this.heightContainer.offsetHeight);\n this.focus(lastIndex - 1);\n },\n\n focusPrev: function() {\n var index = this._focusedIndex;\n var current;\n\n if (!isNaN(index) && index > 0) {\n index -= 1;\n this.focus(index);\n\n current = this.focus();\n if (current && current.hasClass(\"k-loading-item\")) {\n index += 1;\n this.focus(index);\n }\n\n return index;\n } else {\n index = this.dataSource.total() - 1;\n this.focus(index);\n return index;\n }\n },\n\n focusNext: function() {\n var index = this._focusedIndex;\n var lastIndex = this.dataSource.total() - 1;\n var current;\n\n if (!isNaN(index) && index < lastIndex) {\n index += 1;\n this.focus(index);\n\n current = this.focus();\n if (current && current.hasClass(\"k-loading-item\")) {\n index -= 1;\n this.focus(index);\n }\n\n return index;\n } else {\n index = 0;\n this.focus(index);\n return index;\n }\n },\n\n _triggerChange: function(removed, added) {\n removed = removed || [];\n added = added || [];\n\n if (removed.length || added.length) {\n this.trigger(CHANGE, {\n removed: removed,\n added: added\n });\n }\n },\n\n select: function(candidate) {\n var that = this,\n indices,\n initialIndices,\n singleSelection = that.options.selectable !== \"multiple\",\n prefetchStarted = isActivePromise(that._activeDeferred),\n filtered = this.isFiltered(),\n isAlreadySelected,\n deferred,\n result,\n removed = [];\n\n if (candidate === undefined$1) {\n return that._selectedIndexes.slice();\n }\n\n if (!that._selectDeferred || that._selectDeferred.state() === \"resolved\") {\n that._selectDeferred = $.Deferred();\n }\n\n indices = that._getIndecies(candidate);\n isAlreadySelected = singleSelection && !filtered && lastFrom(indices) === lastFrom(this._selectedIndexes);\n removed = that._deselectCurrentValues(indices);\n\n if (removed.length || !indices.length || isAlreadySelected) {\n that._triggerChange(removed);\n\n if (that._valueDeferred) {\n that._valueDeferred.resolve().promise();\n }\n\n return that._selectDeferred.resolve().promise();\n }\n\n if (indices.length === 1 && indices[0] === -1) {\n indices = [];\n }\n\n initialIndices = indices;\n result = that._deselect(indices);\n removed = result.removed;\n indices = result.indices;\n\n if (singleSelection) {\n prefetchStarted = false;\n if (indices.length) {\n indices = [lastFrom(indices)];\n }\n }\n\n var done = function() {\n var added = that._select(indices);\n\n if (initialIndices.length === indices.length || singleSelection) {\n that.focus(indices);\n }\n\n that._triggerChange(removed, added);\n\n if (that._valueDeferred) {\n that._valueDeferred.resolve();\n }\n\n that._selectDeferred.resolve();\n };\n\n deferred = that.prefetch(indices);\n\n if (!prefetchStarted) {\n if (deferred) {\n deferred.done(done);\n } else {\n done();\n }\n }\n\n return that._selectDeferred.promise();\n },\n\n bound: function(bound) {\n if (bound === undefined$1) {\n return this._listCreated;\n }\n\n this._listCreated = bound;\n },\n\n mute: function(callback) {\n this._mute = true;\n callback();\n this._mute = false;\n },\n\n setDSFilter: function(filter) {\n this._lastDSFilter = $.extend({}, filter);\n },\n\n isFiltered: function() {\n if (!this._lastDSFilter) {\n this.setDSFilter(this.dataSource.filter());\n }\n\n return !kendo.data.Query.compareFilters(this.dataSource.filter(), this._lastDSFilter);\n },\n\n skipUpdate: $.noop,\n\n _getElementByIndex: function(index) {\n return this.items().filter(function(idx, element) {\n return index === parseInt($(element).attr(\"data-offset-index\"), 10);\n });\n },\n\n _getElementByDataItem: function(dataItem) {\n var dataView = this._dataView,\n valueGetter = this._valueGetter,\n element, match;\n\n for (var i = 0; i < dataView.length; i++) {\n match = dataView[i].item && isPrimitive(dataView[i].item) ? dataView[i].item === dataItem : dataView[i].item && dataItem && valueGetter(dataView[i].item) == valueGetter(dataItem);\n if (match) {\n element = dataView[i];\n break;\n }\n }\n\n return element ? this._getElementByIndex(element.index) : $();\n },\n\n _clean: function() {\n this.result = undefined$1;\n this._lastScrollTop = undefined$1;\n this._skip = undefined$1;\n $(this.heightContainer).remove();\n this.heightContainer = undefined$1;\n this.element.empty();\n },\n\n _height: function() {\n var hasData = !!this.dataSource.view().length,\n height = this.options.height,\n itemHeight = this.options.itemHeight,\n total = this.dataSource.total();\n\n if (!hasData) {\n height = 0;\n } else if (height / itemHeight > total) {\n height = total * itemHeight;\n }\n\n return height;\n },\n\n setScreenHeight: function() {\n var height = this._height();\n\n this.content.height(height);\n this._screenHeight = height;\n },\n\n screenHeight: function() {\n return this._screenHeight;\n },\n\n _getElementLocation: function(index) {\n var scrollTop = this.content.scrollTop(),\n screenHeight = this._screenHeight,\n itemHeight = this.options.itemHeight,\n yPosition = index * itemHeight,\n yDownPostion = yPosition + itemHeight,\n screenEnd = scrollTop + screenHeight,\n position;\n\n if (yPosition === (scrollTop - itemHeight) || (yDownPostion > scrollTop && yPosition < scrollTop)) {\n position = \"top\";\n } else if (yPosition === screenEnd || (yPosition < screenEnd && screenEnd < yDownPostion)) {\n position = \"bottom\";\n } else if ((yPosition >= scrollTop) && (yPosition <= scrollTop + (screenHeight - itemHeight))) {\n position = \"inScreen\";\n } else {\n position = \"outScreen\";\n }\n\n return position;\n },\n\n _templates: function() {\n var options = this.options;\n var templates = {\n template: options.template,\n placeholderTemplate: options.placeholderTemplate,\n groupTemplate: options.groupTemplate,\n fixedGroupTemplate: options.fixedGroupTemplate\n };\n\n if (options.columns) {\n options.columns.forEach((column, i) => {\n var templateText = column.field ? column.field.toString() : \"text\";\n var templateFunc = data => encode(kendo.getter(templateText)(data));\n\n templates[\"column\" + i] = column.template || templateFunc;\n });\n }\n\n for (var key in templates) {\n if (typeof templates[key] !== \"function\") {\n templates[key] = kendo.template(templates[key] || \"\");\n }\n }\n\n this.templates = templates;\n },\n\n _generateItems: function(element, count) {\n var items = [],\n item, text,\n itemHeight = this.options.itemHeight + \"px\",\n itemClass = this.options.columns && this.options.columns.length ? TABLE_ITEM : LIST_ITEM;\n\n while (count-- > 0) {\n text = document.createElement(\"span\");\n text.className = \"k-list-item-text\";\n\n item = document.createElement(\"li\");\n item.tabIndex = -1;\n item.className = itemClass;\n item.setAttribute(\"role\", \"option\");\n item.style.height = itemHeight;\n item.style.minHeight = itemHeight;\n item.appendChild(text);\n\n element.appendChild(item);\n\n items.push(item);\n }\n\n return items;\n },\n\n _saveInitialRanges: function() {\n var ranges = this.dataSource._ranges;\n var deferred = $.Deferred();\n deferred.resolve();\n\n this._rangesList = {};\n for (var i = 0; i < ranges.length; i++) {\n this._rangesList[ranges[i].start] = { end: ranges[i].end, deferred: deferred };\n }\n },\n\n _createList: function() {\n var that = this,\n content = that.content.get(0),\n options = that.options,\n dataSource = that.dataSource;\n\n if (that.bound()) {\n that._clean();\n }\n\n that._saveInitialRanges();\n that._buildValueGetter();\n that.setScreenHeight();\n that.itemCount = getItemCount(that._screenHeight, options.listScreens, options.itemHeight);\n\n if (that.itemCount > dataSource.total()) {\n that.itemCount = dataSource.total();\n }\n\n that._items = that._generateItems(that.element[0], that.itemCount);\n\n that._setHeight(options.itemHeight * dataSource.total());\n that.options.type = (dataSource.group() || []).length ? \"group\" : \"flat\";\n\n if (that.options.type === \"flat\") {\n if (that.header.closest(GROUP_ROW_SEL).length) {\n that.header.closest(GROUP_ROW_SEL).hide();\n } else {\n that.header.hide();\n }\n } else {\n if (that.header.closest(GROUP_ROW_SEL).length) {\n that.header.closest(GROUP_ROW_SEL).show();\n } else {\n that.header.show();\n }\n }\n\n that.getter = that._getter(function() {\n that._renderItems(true);\n });\n\n that._onScroll = function(scrollTop, force) {\n var getList = that._listItems(that.getter);\n return that._fixedHeader(scrollTop, getList(scrollTop, force));\n };\n\n that._renderItems = that._whenChanged(\n scrollCallback(content, that._onScroll),\n syncList(that._reorderList(that._items, render.bind(that)))\n );\n\n that._renderItems();\n that._calculateGroupPadding(that._screenHeight);\n that._calculateColumnsHeaderPadding();\n },\n\n _setHeight: function(height) {\n var currentHeight,\n heightContainer = this.heightContainer;\n\n if (!heightContainer) {\n heightContainer = this.heightContainer = appendChild(this.content[0], HEIGHTCONTAINER);\n } else {\n currentHeight = heightContainer.offsetHeight;\n }\n\n if (height !== currentHeight) {\n heightContainer.innerHTML = \"\";\n\n while (height > 0) {\n var padHeight = Math.min(height, 250000); //IE workaround, should not create elements with height larger than 250000px\n appendChild(heightContainer).style.height = padHeight + \"px\";\n height -= padHeight;\n }\n }\n },\n\n _getter: function() {\n var lastRequestedRange = null,\n dataSource = this.dataSource,\n lastRangeStart = dataSource.skip(),\n type = this.options.type,\n pageSize = this.itemCount,\n flatGroups = {};\n\n if (dataSource.pageSize() < pageSize) {\n this.mute(function() {\n dataSource.pageSize(pageSize);\n });\n }\n\n return function(index, rangeStart) {\n var that = this;\n if (!dataSource.inRange(rangeStart, pageSize)) {\n if (lastRequestedRange !== rangeStart) {\n lastRequestedRange = rangeStart;\n lastRangeStart = rangeStart;\n\n if (that._getterDeferred) {\n that._getterDeferred.reject();\n }\n\n that._getterDeferred = that.deferredRange(rangeStart);\n that._getterDeferred.then(function() {\n var firstItemIndex = that._indexConstraint(that.content[0].scrollTop);\n\n that._getterDeferred = null;\n\n if (rangeStart <= firstItemIndex && firstItemIndex <= (rangeStart + pageSize)) {\n that._fetching = true;\n dataSource.range(rangeStart, pageSize);\n }\n });\n }\n\n return null;\n } else {\n if (lastRangeStart !== rangeStart) {\n this.mute(function() {\n dataSource.range(rangeStart, pageSize);\n lastRangeStart = rangeStart;\n });\n }\n\n var result;\n if (type === \"group\") { //grouped list\n if (!flatGroups[rangeStart]) {\n var flatGroup = flatGroups[rangeStart] = [];\n var groups = dataSource.view();\n for (var i = 0, len = groups.length; i < len; i++) {\n var group = groups[i];\n for (var j = 0, groupLength = group.items.length; j < groupLength; j++) {\n flatGroup.push({ item: group.items[j], group: group.value });\n }\n }\n }\n\n result = flatGroups[rangeStart][index - rangeStart];\n } else { //flat list\n result = dataSource.view()[index - rangeStart];\n }\n\n return result;\n }\n };\n },\n\n _fixedHeader: function(scrollTop, list) {\n var group = this.currentVisibleGroup,\n itemHeight = this.options.itemHeight,\n firstVisibleDataItemIndex = Math.floor((scrollTop - list.top) / itemHeight),\n firstVisibleDataItem = list.items[firstVisibleDataItemIndex];\n\n if (firstVisibleDataItem && firstVisibleDataItem.item) {\n var firstVisibleGroup = firstVisibleDataItem.group;\n\n if (firstVisibleGroup !== group) {\n var fixedGroupText = firstVisibleGroup || \"\";\n this.header.html(this.templates.fixedGroupTemplate(fixedGroupText));\n this.currentVisibleGroup = firstVisibleGroup;\n }\n }\n\n return list;\n },\n\n _itemMapper: function(item, index, value) {\n var listType = this.options.type,\n itemHeight = this.options.itemHeight,\n currentIndex = this._focusedIndex,\n selected = false,\n current = false,\n newGroup = false,\n group = null,\n match = false,\n valueGetter = this._valueGetter;\n\n if (listType === \"group\") {\n if (item) {\n newGroup = index === 0 || (this._currentGroup !== false && this._currentGroup !== item.group);\n this._currentGroup = item.group;\n }\n\n group = item ? item.group : null;\n item = item ? item.item : null;\n }\n\n if (this.options.mapValueTo === \"dataItem\" && this._selectedDataItems.length && item) {\n for (var i = 0; i < this._selectedDataItems.length; i++) {\n match = valueGetter(this._selectedDataItems[i]) === valueGetter(item);\n if (match) {\n selected = true;\n break;\n }\n }\n } else if (!this.isFiltered() && value.length && item) {\n for (var j = 0; j < value.length; j++) {\n match = isPrimitive(item) ? value[j] === item : value[j] === valueGetter(item);\n if (match) {\n value.splice(j , 1);\n selected = true;\n break;\n }\n }\n }\n\n if (currentIndex === index) {\n current = true;\n }\n\n return {\n item: item ? item : null,\n group: group,\n newGroup: newGroup,\n selected: selected,\n current: current,\n index: index,\n top: index * itemHeight\n };\n },\n\n _range: function(index) {\n var itemCount = this.itemCount,\n value = this._values.slice(),\n items = [],\n item;\n\n this._view = {};\n this._currentGroup = false;\n\n for (var i = index, length = index + itemCount; i < length; i++) {\n item = this._itemMapper(this.getter(i, index), i, value);\n if (items[items.length - 1]) {\n items[items.length - 1].isLastGroupedItem = item.newGroup;\n }\n items.push(item);\n this._view[item.index] = item;\n }\n\n this._dataView = items;\n return items;\n },\n\n _getDataItemsCollection: function(scrollTop, lastScrollTop) {\n var items = this._range(this._listIndex(scrollTop, lastScrollTop));\n return {\n index: items.length ? items[0].index : 0,\n top: items.length ? items[0].top : 0,\n items: items\n };\n },\n\n _listItems: function() {\n var screenHeight = this._screenHeight,\n options = this.options;\n\n var theValidator = listValidator(options, screenHeight);\n\n return (function(value, force) {\n var result = this.result,\n lastScrollTop = this._lastScrollTop;\n\n if (force || !result || !theValidator(result, value, lastScrollTop)) {\n result = this._getDataItemsCollection(value, lastScrollTop);\n }\n\n this._lastScrollTop = value;\n this.result = result;\n\n return result;\n }).bind(this);\n },\n\n _whenChanged: function(getter, callback) {\n var current;\n\n return function(force) {\n var theNew = getter(force);\n\n if (theNew !== current) {\n current = theNew;\n callback(theNew, force);\n }\n };\n },\n\n _reorderList: function(list, reorder) {\n var that = this;\n var length = list.length;\n var currentOffset = -Infinity;\n reorder = map2(reorder, this.templates).bind(this);\n\n return function(list2, offset, force) {\n var diff = offset - currentOffset;\n var range, range2;\n\n if (force || Math.abs(diff) >= length) { // full reorder\n range = list;\n range2 = list2;\n } else { // partial reorder\n range = reshift(list, diff);\n range2 = diff > 0 ? list2.slice(-diff) : list2.slice(0, -diff);\n }\n\n reorder(range, range2, that.bound());\n\n currentOffset = offset;\n };\n },\n\n _bufferSizes: function() {\n var options = this.options;\n\n return bufferSizes(this._screenHeight, options.listScreens, options.oppositeBuffer);\n },\n\n _indexConstraint: function(position) {\n var itemCount = this.itemCount,\n itemHeight = this.options.itemHeight,\n total = this.dataSource.total();\n\n return Math.min(Math.max(total - itemCount, 0), Math.max(0, Math.floor(position / itemHeight )));\n },\n\n _listIndex: function(scrollTop, lastScrollTop) {\n var buffers = this._bufferSizes(),\n position;\n\n position = scrollTop - ((scrollTop > lastScrollTop) ? buffers.down : buffers.up);\n\n return this._indexConstraint(position);\n },\n\n _selectable: function() {\n var itemClass = this.options.columns && this.options.columns.length ? TABLE_ITEM : LIST_ITEM;\n\n if (this.options.selectable) {\n this._selectProxy = this._clickHandler.bind(this);\n this.element.on(CLICK + VIRTUAL_LIST_NS, \".\" + itemClass, this._selectProxy);\n }\n },\n\n getElementIndex: function(element) {\n if (!(element instanceof jQuery)) {\n return undefined$1;\n }\n\n return parseInt(element.attr(\"data-offset-index\"), 10);\n },\n\n _getIndecies: function(candidate) {\n var result = [], data;\n\n if (typeof candidate === \"function\") {\n data = this.dataSource.flatView();\n for (var idx = 0; idx < data.length; idx++) {\n if (candidate(data[idx])) {\n result.push(idx);\n break;\n }\n }\n }\n\n if (typeof candidate === \"number\") {\n result.push(candidate);\n }\n\n var elementIndex = this.getElementIndex(candidate);\n if (!isNaN(elementIndex)) {\n result.push(elementIndex);\n }\n\n if (candidate instanceof Array) {\n result = candidate;\n }\n\n return result;\n },\n\n _deselect: function(indices) {\n var removed = [],\n selectedIndex,\n dataItem,\n selectedIndexes = this._selectedIndexes,\n selectedDataItems = this._selectedDataItems,\n position = 0,\n selectable = this.options.selectable,\n removedindexesCounter = 0,\n valueGetter = this._valueGetter,\n item, match,\n result = null;\n\n indices = indices.slice();\n\n if (selectable === true || !indices.length) { //deselect everything\n for (var idx = 0; idx < selectedIndexes.length; idx++) {\n if (selectedIndexes[idx] !== undefined$1) {\n this._getElementByIndex(selectedIndexes[idx]).removeClass(SELECTED);\n } else if (selectedDataItems[idx]) {\n this._getElementByDataItem(selectedDataItems[idx]).removeClass(SELECTED);\n }\n\n removed.push({\n index: selectedIndexes[idx],\n position: idx,\n dataItem: selectedDataItems[idx]\n });\n }\n\n this._values = [];\n this._selectedDataItems = [];\n this._selectedIndexes = [];\n } else if (selectable === \"multiple\") {\n for (var i = 0; i < indices.length; i++) {\n result = null;\n position = $.inArray(indices[i], selectedIndexes);\n dataItem = this.dataItemByIndex(indices[i]);\n\n if (position === -1 && dataItem) {\n for (var j = 0; j < selectedDataItems.length; j++) {\n match = isPrimitive(dataItem) ? selectedDataItems[j] === dataItem : valueGetter(selectedDataItems[j]) === valueGetter(dataItem);\n if (match) {\n item = this._getElementByIndex(indices[i]);\n result = this._deselectSingleItem(item, j, indices[i], removedindexesCounter);\n }\n }\n } else {\n selectedIndex = selectedIndexes[position];\n\n if (selectedIndex !== undefined$1) {\n item = this._getElementByIndex(selectedIndex);\n result = this._deselectSingleItem(item, position, selectedIndex, removedindexesCounter);\n }\n }\n\n if (result) {\n indices.splice(i, 1);\n removed.push(result);\n\n removedindexesCounter++;\n i--;\n }\n }\n }\n\n return {\n indices: indices,\n removed: removed\n };\n },\n\n _deselectSingleItem: function(item, position, selectedIndex, removedindexesCounter) {\n var dataItem;\n\n if (!item.hasClass(SELECTED)) {\n return;\n }\n\n item.removeClass(SELECTED);\n this._values.splice(position, 1);\n this._selectedIndexes.splice(position, 1);\n dataItem = this._selectedDataItems.splice(position, 1)[0];\n\n return {\n index: selectedIndex,\n position: position + removedindexesCounter,\n dataItem: dataItem\n };\n },\n\n _deselectCurrentValues: function(indices) {\n var children = this.element[0].children;\n var value, index, position;\n var values = this._values;\n var removed = [];\n var idx = 0;\n var j;\n\n if (this.options.selectable !== \"multiple\" || !this.isFiltered()) {\n return [];\n }\n\n if (indices[0] === -1) {\n $(children).removeClass(SELECTED);\n removed = $.map(this._selectedDataItems.slice(0), function(dataItem, idx) {\n return {\n dataItem: dataItem,\n position: idx\n };\n });\n this._selectedIndexes = [];\n this._selectedDataItems = [];\n this._values = [];\n return removed;\n }\n\n for (; idx < indices.length; idx++) {\n position = -1;\n index = indices[idx];\n if (this.dataItemByIndex(index)) {\n value = this._valueGetter(this.dataItemByIndex(index));\n }\n\n for (j = 0; j < values.length; j++) {\n if (value == values[j]) {\n position = j;\n break;\n }\n }\n\n if (position > -1) {\n removed.push(this.removeAt(position));\n $(children[index]).removeClass(SELECTED);\n }\n }\n\n return removed;\n },\n\n _getSkip: function(index, take) {\n var page = index < take ? 1 : Math.floor(index / take) + 1;\n\n return (page - 1) * take;\n },\n\n _select: function(indexes) {\n var that = this,\n singleSelection = this.options.selectable !== \"multiple\",\n dataSource = this.dataSource,\n dataItem, oldSkip,\n take = this.itemCount,\n valueGetter = this._valueGetter,\n added = [];\n\n if (singleSelection) {\n that._selectedIndexes = [];\n that._selectedDataItems = [];\n that._values = [];\n }\n\n oldSkip = dataSource.skip();\n\n $.each(indexes, function(_, index) {\n var skip = that._getSkip(index, take);\n\n that.mute(function() {\n dataSource.range(skip, take); //switch the range to get the dataItem\n\n dataItem = that._findDataItem(dataSource.view(), [index - skip]);\n that._selectedIndexes.push(index);\n that._selectedDataItems.push(dataItem);\n that._values.push(isPrimitive(dataItem) ? dataItem : valueGetter(dataItem));\n\n added.push({\n index: index,\n dataItem: dataItem\n });\n\n that._getElementByIndex(index).addClass(SELECTED);\n\n dataSource.range(oldSkip, take); //switch back the range\n });\n });\n\n that._values = that._checkValuesOrder(that._values);\n\n return added;\n },\n\n _clickHandler: function(e) {\n var item = $(e.currentTarget);\n\n if (!e.isDefaultPrevented() && item.attr(\"data-uid\")) {\n this.trigger(CLICK, { item: item });\n }\n },\n\n _buildValueGetter: function() {\n this._valueGetter = kendo.getter(this.options.dataValueField);\n },\n\n _calculateGroupPadding: function(height) {\n var firstItem = this.items().first(),\n groupHeader = this.header,\n padding = 0;\n\n if (groupHeader[0] && groupHeader[0].style.display !== \"none\") {\n if (height !== \"auto\") {\n padding = kendo.support.scrollbar();\n }\n\n padding += parseFloat(firstItem.css(\"border-right-width\"), 10) + parseFloat(firstItem.children(\".k-group\").css(\"right\"), 10);\n\n groupHeader.css(\"padding-right\", padding);\n }\n },\n\n _calculateColumnsHeaderPadding: function() {\n if (this.options.columns && this.options.columns.length) {\n var isRtl = kendo.support.isRtl(this.wrapper);\n var scrollbar = kendo.support.scrollbar();\n var columnsHeader = this.content.parent().parent().find(\".k-table-header\");\n var total = this.dataSource.total();\n\n columnsHeader.css((isRtl ? \"padding-left\" : \"padding-right\"), total ? scrollbar : 0);\n }\n }\n\n });\n\n kendo.ui.VirtualList = VirtualList;\n kendo.ui.plugin(VirtualList);\n\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.list.js';\nimport './kendo.mobile.scroller.js';\nimport './kendo.virtuallist.js';\n\nvar __meta__ = {\n id: \"autocomplete\",\n name: \"AutoComplete\",\n category: \"web\",\n description: \"The AutoComplete widget provides suggestions depending on the typed text.It also allows multiple value entries.\",\n depends: [ \"list\" ],\n features: [ {\n id: \"mobile-scroller\",\n name: \"Mobile scroller\",\n description: \"Support for kinetic scrolling in mobile device\",\n depends: [ \"mobile.scroller\" ]\n }, {\n id: \"virtualization\",\n name: \"VirtualList\",\n description: \"Support for virtualization\",\n depends: [ \"virtuallist\" ]\n } ]\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n encode = kendo.htmlEncode,\n support = kendo.support,\n caret = kendo.caret,\n activeElement = kendo._activeElement,\n placeholderSupported = support.placeholder,\n ui = kendo.ui,\n List = ui.List,\n keys = kendo.keys,\n DataSource = kendo.data.DataSource,\n ARIA_DISABLED = \"aria-disabled\",\n ARIA_READONLY = \"aria-readonly\",\n CHANGE = \"change\",\n DISABLED = \"disabled\",\n READONLY = \"readonly\",\n FOCUSED = \"k-focus\",\n SELECTED = \"k-selected\",\n HIDDENCLASS = \"k-hidden\",\n STATEDISABLED = \"k-disabled\",\n AUTOCOMPLETEVALUE = \"off\",\n HOVER = \"k-hover\",\n ns = \".kendoAutoComplete\",\n HOVEREVENTS = \"mouseenter\" + ns + \" mouseleave\" + ns;\n\n function indexOfWordAtCaret(caretIdx, text, separator) {\n return separator ? text.substring(0, caretIdx).split(separator).length - 1 : 0;\n }\n\n function wordAtCaret(caretIdx, text, separator) {\n return text.split(separator)[indexOfWordAtCaret(caretIdx, text, separator)];\n }\n\n function replaceWordAtCaret(caretIdx, text, word, separator, defaultSeparator) {\n var words = text.split(separator);\n\n words.splice(indexOfWordAtCaret(caretIdx, text, separator), 1, word);\n\n if (separator && words[words.length - 1] !== \"\") {\n words.push(\"\");\n }\n\n return words.join(defaultSeparator);\n }\n\n var AutoComplete = List.extend({\n init: function(element, options) {\n var that = this, wrapper, disabled;\n\n that.ns = ns;\n options = Array.isArray(options) ? { dataSource: options } : options;\n\n List.fn.init.call(that, element, options);\n\n element = that.element;\n options = that.options;\n\n options.placeholder = options.placeholder || element.attr(\"placeholder\");\n if (placeholderSupported) {\n element.attr(\"placeholder\", options.placeholder);\n }\n\n that._wrapper();\n that._loader();\n that._clearButton();\n\n that._dataSource();\n that._ignoreCase();\n\n element[0].type = \"text\";\n wrapper = that.wrapper;\n\n that._popup();\n\n element\n .addClass(\"k-input-inner\")\n .on(\"keydown\" + ns, that._keydown.bind(that))\n .on(\"keypress\" + ns, that._keypress.bind(that))\n .on(\"input\" + ns, that._search.bind(that))\n .on(\"paste\" + ns, that._search.bind(that))\n .on(\"focus\" + ns, function() {\n that._prev = that._accessor();\n that._oldText = that._prev;\n that._placeholder(false);\n wrapper.addClass(FOCUSED);\n })\n .on(\"focusout\" + ns, function(ev) {\n if (that.filterInput && ev.relatedTarget === that.filterInput[0]) {\n return;\n }\n\n that._change();\n that._placeholder();\n that.close();\n wrapper.removeClass(FOCUSED);\n })\n .attr({\n autocomplete: AUTOCOMPLETEVALUE,\n role: \"combobox\",\n \"aria-expanded\": false\n });\n\n that._clear.on(\"click\" + ns + \" touchend\" + ns, that._clearValue.bind(that));\n that._enable();\n\n that._old = that._accessor();\n\n that._placeholder();\n\n that._initList();\n\n disabled = $(that.element).parents(\"fieldset\").is(':disabled');\n\n if (disabled) {\n that.enable(false);\n }\n\n that.listView.bind(\"click\", function(e) { e.preventDefault(); });\n\n that._resetFocusItemHandler = that._resetFocusItem.bind(that);\n\n kendo.notify(that);\n that._toggleCloseVisibility();\n that._applyCssClasses();\n\n if (options.label) {\n that._label();\n }\n\n that._aria();\n },\n\n options: {\n name: \"AutoComplete\",\n enabled: true,\n suggest: false,\n template: \"\",\n groupTemplate: (data) => encode(data),\n fixedGroupTemplate: (data) => encode(data),\n dataTextField: \"\",\n minLength: 1,\n enforceMinLength: false,\n delay: 200,\n height: 200,\n filter: \"startswith\",\n ignoreCase: true,\n highlightFirst: false,\n separator: null,\n placeholder: \"\",\n animation: {},\n virtual: false,\n value: null,\n clearButton: true,\n autoWidth: false,\n popup: null,\n size: \"medium\",\n fillMode: \"solid\",\n rounded: \"medium\",\n label: null\n },\n\n _onActionSheetCreate: function() {\n var that = this;\n\n if (that.filterInput) {\n that.filterInput\n .on(\"keydown\" + ns, that._keydown.bind(that))\n .on(\"keypress\" + ns, that._keypress.bind(that))\n .on(\"input\" + ns, that._search.bind(that))\n .on(\"paste\" + ns, that._search.bind(that))\n .attr({\n autocomplete: AUTOCOMPLETEVALUE,\n role: \"combobox\",\n \"aria-expanded\": false\n });\n\n that.popup.bind(\"activate\", () => {\n that.filterInput.val(that.element.val());\n that.filterInput.trigger(\"focus\");\n });\n\n that.popup.bind(\"deactivate\", () => {\n that.element.trigger(\"focus\");\n });\n }\n },\n\n _onCloseButtonPressed: function() {\n var that = this;\n\n if (that.filterInput && activeElement() === that.filterInput[0]) {\n that.element.val(that.filterInput.val());\n }\n },\n\n _dataSource: function() {\n var that = this;\n\n if (that.dataSource && that._refreshHandler) {\n that._unbindDataSource();\n } else {\n that._progressHandler = that._showBusy.bind(that);\n that._errorHandler = that._hideBusy.bind(that);\n }\n\n that.dataSource = DataSource.create(that.options.dataSource)\n .bind(\"progress\", that._progressHandler)\n .bind(\"error\", that._errorHandler);\n },\n\n setDataSource: function(dataSource) {\n this.options.dataSource = dataSource;\n this._dataSource();\n\n this.listView.setDataSource(this.dataSource);\n },\n\n events: [\n \"open\",\n \"close\",\n CHANGE,\n \"select\",\n \"filtering\",\n \"dataBinding\",\n \"dataBound\"\n ],\n\n setOptions: function(options) {\n var listOptions = this._listOptions(options);\n\n List.fn.setOptions.call(this, options);\n\n this.listView.setOptions(listOptions);\n this._accessors();\n this._aria();\n this._clearButton();\n },\n\n _listOptions: function(options) {\n var listOptions = List.fn._listOptions.call(this, $.extend(options, {\n skipUpdateOnBind: true\n }));\n\n listOptions.dataValueField = listOptions.dataTextField;\n listOptions.selectedItemChange = null;\n\n return listOptions;\n },\n\n _editable: function(options) {\n var that = this,\n element = that.element,\n wrapper = that.wrapper.off(ns),\n readonly = options.readonly,\n disable = options.disable;\n\n if (!readonly && !disable) {\n wrapper\n .removeClass(STATEDISABLED)\n .on(HOVEREVENTS, that._toggleHover);\n\n element.prop(DISABLED, false)\n .prop(READONLY, false)\n .attr(ARIA_DISABLED, false)\n .attr(ARIA_READONLY, false);\n } else {\n wrapper\n .addClass(disable ? STATEDISABLED : \"\")\n .removeClass(disable ? \"\" : STATEDISABLED);\n\n element.attr(DISABLED, disable)\n .attr(READONLY, readonly)\n .attr(ARIA_DISABLED, disable)\n .attr(ARIA_READONLY, readonly);\n }\n\n that._toggleCloseVisibility();\n },\n\n close: function() {\n var that = this;\n var current = that.listView.focus();\n\n if (current) {\n current.removeClass(SELECTED);\n }\n\n that.popup.close();\n that._deactivateItem();\n },\n\n destroy: function() {\n var that = this;\n\n that.element.off(ns);\n that._clear.off(ns);\n that.wrapper.off(ns);\n\n if (that.filterInput) {\n that.filterInput.off(ns);\n }\n\n List.fn.destroy.call(that);\n },\n\n refresh: function() {\n this.listView.refresh();\n },\n\n select: function(li) {\n this._select(li);\n },\n\n search: function(word) {\n var that = this,\n options = that.options,\n ignoreCase = options.ignoreCase,\n separator = that._separator(),\n length,\n accentFoldingFiltering = that.dataSource.options.accentFoldingFiltering,\n element = that.filterInput && activeElement() === that.filterInput[0] ? that.filterInput : that.element;\n\n word = word || that._accessor();\n\n clearTimeout(that._typingTimeout);\n\n if (separator) {\n word = wordAtCaret(caret(element)[0], word, separator);\n }\n\n length = word.length;\n\n if ((!options.enforceMinLength && !length) || length >= options.minLength) {\n that._open = true;\n\n that._mute(function() {\n this.listView.value([]);\n });\n\n that._filterSource({\n value: ignoreCase ? (accentFoldingFiltering ? word.toLocaleLowerCase(accentFoldingFiltering) : word.toLowerCase()) : word,\n operator: options.filter,\n field: options.dataTextField,\n ignoreCase: ignoreCase\n });\n\n that.one(\"close\", that._unifySeparators.bind(that));\n }\n that._toggleCloseVisibility();\n },\n\n suggest: function(word) {\n var that = this,\n key = that._last,\n value = that._accessor(),\n element = that.element[0],\n caretIdx = caret(element)[0],\n separator = that._separator(),\n words = value.split(separator),\n wordIndex = indexOfWordAtCaret(caretIdx, value, separator),\n selectionEnd = caretIdx,\n idx,\n accentFoldingFiltering = that.dataSource.options.accentFoldingFiltering;\n\n if (key == keys.BACKSPACE || key == keys.DELETE) {\n that._last = undefined$1;\n return;\n }\n\n word = word || \"\";\n\n if (typeof word !== \"string\") {\n if (word[0]) {\n word = that.dataSource.view()[List.inArray(word[0], that.ul[0])];\n }\n\n word = word ? that._text(word) : \"\";\n }\n\n if (caretIdx <= 0) {\n caretIdx = (accentFoldingFiltering ? value.toLocaleLowerCase(accentFoldingFiltering) : value.toLowerCase()).indexOf(accentFoldingFiltering ? word.toLocaleLowerCase(accentFoldingFiltering) : word.toLowerCase()) + 1;\n }\n\n idx = value.substring(0, caretIdx).lastIndexOf(separator);\n idx = idx > -1 ? caretIdx - (idx + separator.length) : caretIdx;\n value = words[wordIndex].substring(0, idx);\n\n if (word) {\n word = word.toString();\n idx = (accentFoldingFiltering ? word.toLocaleLowerCase(accentFoldingFiltering) : word.toLowerCase()).indexOf(accentFoldingFiltering ? value.toLocaleLowerCase(accentFoldingFiltering) : value.toLowerCase());\n if (idx > -1) {\n word = word.substring(idx + value.length);\n\n selectionEnd = caretIdx + word.length;\n\n value += word;\n }\n\n if (separator && words[words.length - 1] !== \"\") {\n words.push(\"\");\n }\n\n }\n\n words[wordIndex] = value;\n\n that._accessor(words.join(separator || \"\"));\n\n if (element === activeElement()) {\n caret(element, caretIdx, selectionEnd);\n }\n },\n\n value: function(value) {\n if (value !== undefined$1) {\n this.listView.value(value);\n\n this._accessor(value);\n this._old = this._accessor();\n this._oldText = this._accessor();\n } else {\n return this._accessor();\n }\n this._toggleCloseVisibility();\n this._refreshFloatingLabel();\n },\n\n _click: function(e) {\n var item = e.item;\n var that = this;\n var element = that.element;\n var dataItem = that.listView.dataItemByIndex(that.listView.getElementIndex(item));\n\n e.preventDefault();\n\n that._active = true;\n\n if (that.trigger(\"select\", { dataItem: dataItem, item: item })) {\n that.close();\n return;\n }\n that._oldText = element.val();\n that._select(item).done(function() {\n that._blur();\n\n caret(element, element.val().length);\n });\n },\n\n _clearText: $.noop,\n\n _resetFocusItem: function() {\n var index = this.options.highlightFirst ? 0 : -1;\n\n if (this.options.virtual) {\n this.listView.scrollTo(0);\n }\n\n this.listView.focus(index);\n },\n\n _listBound: function() {\n var that = this;\n var popup = that.popup;\n var options = that.options;\n var data = that.dataSource.flatView();\n var length = data.length;\n var groupsLength = that.dataSource._group ? that.dataSource._group.length : 0;\n var isActive = that.element[0] === activeElement() || that.filterInput && that.filterInput[0] === activeElement();\n var action;\n\n that._renderFooter();\n that._renderNoData();\n that._toggleNoData(!length);\n that._toggleHeader(!!groupsLength && !!length);\n\n that._resizePopup();\n\n popup.position();\n\n if (length) {\n if (options.suggest && isActive && that._inputValue()) {\n that.suggest(data[0]);\n }\n }\n\n if (that._open) {\n that._open = false;\n action = that._allowOpening() ? \"open\" : \"close\";\n\n if (that._typingTimeout && !isActive) {\n action = \"close\";\n }\n\n if (length) {\n that._resetFocusItem();\n\n if (options.virtual) {\n that.popup\n .unbind(\"activate\", that._resetFocusItemHandler)\n .one(\"activate\", that._resetFocusItemHandler);\n }\n }\n\n popup[action]();\n that._typingTimeout = undefined$1;\n }\n\n if (that._touchScroller) {\n that._touchScroller.reset();\n }\n\n that._hideBusy();\n\n that.trigger(\"dataBound\");\n },\n\n _mute: function(callback) {\n this._muted = true;\n callback.call(this);\n this._muted = false;\n },\n\n _listChange: function() {\n var isActive = this._active || this.element[0] === activeElement();\n\n if (isActive && !this._muted) {\n this._selectValue(this.listView.selectedDataItems()[0]);\n }\n },\n\n _selectValue: function(dataItem) {\n var separator = this._separator();\n var text = \"\";\n\n if (dataItem) {\n text = this._text(dataItem);\n }\n\n if (text === null) {\n text = \"\";\n }\n\n if (separator) {\n text = replaceWordAtCaret(caret(this.element)[0], this._accessor(), text, separator, this._defaultSeparator());\n }\n\n this._prev = text;\n this._accessor(text);\n this._placeholder();\n },\n\n _unifySeparators: function() {\n this._accessor(this.value().split(this._separator()).join(this._defaultSeparator()));\n return this;\n },\n\n _preselect: function(value, text) {\n this._inputValue(text);\n this._accessor(value);\n\n this._old = this.oldText = this._accessor();\n\n this.listView.setValue(value);\n this._placeholder();\n },\n\n _change: function() {\n var that = this;\n var value = that._unifySeparators().value();\n var trigger = value !== List.unifyType(that._old, typeof value);\n\n var valueUpdated = trigger && !that._typing;\n var itemSelected = that._oldText !== value;\n\n that._old = value;\n that._oldText = value;\n\n if (that.filterInput && activeElement() === that.filterInput[0]) {\n that.element.val(that.filterInput.val());\n }\n\n if (valueUpdated || itemSelected) {\n // trigger the DOM change event so any subscriber gets notified\n that.element.trigger(CHANGE);\n }\n\n if (trigger) {\n that.trigger(CHANGE);\n }\n\n that.typing = false;\n that._toggleCloseVisibility();\n },\n\n _accessor: function(value) {\n var that = this,\n element = that.filterInput && activeElement() === that.filterInput[0] ? that.filterInput[0] : that.element[0];\n\n if (value !== undefined$1) {\n element.value = value === null ? \"\" : value;\n that._placeholder();\n } else {\n value = element.value;\n\n if (element.className.indexOf(\"k-readonly\") > -1) {\n if (value === that.options.placeholder) {\n return \"\";\n } else {\n return value;\n }\n }\n\n return value;\n }\n },\n\n _keydown: function(e) {\n var that = this;\n var key = e.keyCode;\n var listView = that.listView;\n var visible = that.popup.visible();\n var current = listView.focus();\n\n that._last = key;\n\n if (key === keys.DOWN) {\n if (visible) {\n this._move(current ? \"focusNext\" : \"focusFirst\");\n } else if (that.value()) {\n that._filterSource({\n value: that.ignoreCase ? that.value().toLowerCase() : that.value(),\n operator: that.options.filter,\n field: that.options.dataTextField,\n ignoreCase: that.ignoreCase\n }).done(function() {\n if (that._allowOpening()) {\n that._resetFocusItem();\n that.popup.open();\n }\n });\n }\n e.preventDefault();\n } else if (key === keys.ESC ) {\n if (visible) {\n e.preventDefault();\n that.close();\n } else {\n that._clearValue();\n }\n } else if (e.altKey && key === keys.UP && visible) {\n e.preventDefault();\n that.close();\n } else if (key === keys.UP) {\n if (visible) {\n this._move(current ? \"focusPrev\" : \"focusLast\");\n }\n e.preventDefault();\n } else if (key === keys.HOME) {\n this._move(\"focusFirst\");\n } else if (key === keys.END) {\n this._move(\"focusLast\");\n } else if (key === keys.ENTER || key === keys.TAB) {\n\n if (key === keys.ENTER && visible) {\n e.preventDefault();\n }\n\n if (visible && current) {\n var dataItem = listView.dataItemByIndex(listView.getElementIndex(current));\n if (that.trigger(\"select\", { dataItem: dataItem, item: current })) {\n return;\n }\n\n this._select(current);\n }\n\n this._blur();\n } else if (that.popup.visible() && (key === keys.PAGEDOWN || key === keys.PAGEUP)) {\n e.preventDefault();\n\n var direction = key === keys.PAGEDOWN ? 1 : -1;\n listView.scrollWith(direction * listView.screenHeight());\n } else {\n // In some cases when the popup is opened resize is triggered which will cause it to close\n // Setting the below flag will prevent this from happening\n that.popup._hovered = true;\n that._search();\n }\n },\n\n _keypress: function() {\n this._oldText = this.element.val();\n this._typing = true;\n },\n\n _move: function(action) {\n this.listView[action]();\n\n if (this.options.suggest) {\n this.suggest(this.listView.focus());\n }\n },\n\n _hideBusy: function() {\n var that = this;\n clearTimeout(that._busy);\n that._loading.addClass(HIDDENCLASS);\n that.element.attr(\"aria-busy\", false);\n that._busy = null;\n that._toggleCloseVisibility();\n },\n\n _showBusy: function() {\n var that = this;\n\n if (that._busy) {\n return;\n }\n\n that._busy = setTimeout(function() {\n that.element.attr(\"aria-busy\", true);\n that._loading.removeClass(HIDDENCLASS);\n that._hideClear();\n }, 100);\n },\n\n _placeholder: function(show) {\n if (placeholderSupported) {\n return;\n }\n\n var that = this,\n element = that.element,\n placeholder = that.options.placeholder,\n value;\n\n if (placeholder) {\n value = element.val();\n\n if (show === undefined$1) {\n show = !value;\n }\n\n if (!show) {\n if (value !== placeholder) {\n placeholder = value;\n } else {\n placeholder = \"\";\n }\n }\n\n if (value === that._old && !show) {\n return;\n }\n\n element.toggleClass(\"k-readonly\", show)\n .val(placeholder);\n\n if (!placeholder && element[0] === document.activeElement) {\n caret(element[0], 0, 0);\n }\n }\n },\n\n _separator: function() {\n var separator = this.options.separator;\n if (separator instanceof Array) {\n return new RegExp(separator.join(\"|\"), 'gi');\n }\n return separator;\n },\n\n _defaultSeparator: function() {\n var separator = this.options.separator;\n if (separator instanceof Array) {\n return separator[0];\n }\n return separator;\n },\n\n _inputValue: function() {\n return this.element.val();\n },\n\n _search: function() {\n var that = this;\n clearTimeout(that._typingTimeout);\n\n that._typingTimeout = setTimeout(function() {\n if (that._prev !== that._accessor()) {\n that._prev = that._accessor();\n that.search();\n }\n }, that.options.delay);\n },\n\n _select: function(candidate) {\n var that = this;\n that._active = true;\n\n return that.listView.select(candidate).done(function() {\n that._active = false;\n });\n },\n\n _loader: function() {\n this._loading = $('').insertAfter(this.element);\n },\n\n _clearButton: function() {\n List.fn._clearButton.call(this);\n\n if (this.options.clearButton) {\n this._clear.insertAfter(this.element);\n this.wrapper.addClass(\"k-autocomplete-clearable\");\n }\n },\n\n _toggleHover: function(e) {\n $(e.currentTarget).toggleClass(HOVER, e.type === \"mouseenter\");\n },\n\n _toggleCloseVisibility: function() {\n var preventShow = this.element.is(\":disabled\") || this.element.is(\"[readonly]\");\n\n if (this.value() && !preventShow) {\n this._showClear();\n } else {\n this._hideClear();\n }\n },\n\n _wrapper: function() {\n var that = this,\n element = that.element,\n DOMelement = element[0],\n wrapper;\n\n wrapper = element.parent();\n\n if (!wrapper.is(\"span.k-autocomplete\")) {\n wrapper = element.wrap(\"\").parent();\n }\n\n wrapper.attr(\"tabindex\", -1);\n\n wrapper[0].style.cssText = DOMelement.style.cssText;\n element.css({\n width: \"\",\n height: DOMelement.style.height\n });\n\n that._focused = that.element;\n that.wrapper = wrapper\n .addClass(\"k-autocomplete k-input\")\n .addClass(DOMelement.className)\n .removeClass('input-validation-error');\n },\n\n _clearValue: function() {\n List.fn._clearValue.call(this);\n this.element.focus();\n }\n });\n\n ui.plugin(AutoComplete);\n\n kendo.cssProperties.registerPrefix(\"AutoComplete\", \"k-input-\");\n\n kendo.cssProperties.registerValues(\"AutoComplete\", [{\n prop: \"rounded\",\n values: kendo.cssProperties.roundedValues.concat([['full', 'full']])\n }]);\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.list.js';\nimport './kendo.mobile.scroller.js';\nimport './kendo.virtuallist.js';\nimport './kendo.html.button.js';\nimport './kendo.icons.js';\n\nvar __meta__ = {\n id: \"dropdownlist\",\n name: \"DropDownList\",\n category: \"web\",\n description: \"The DropDownList widget displays a list of values and allows the selection of a single value from the list.\",\n depends: [ \"list\", \"html.button\", \"icons\" ],\n features: [ {\n id: \"mobile-scroller\",\n name: \"Mobile scroller\",\n description: \"Support for kinetic scrolling in mobile device\",\n depends: [ \"mobile.scroller\" ]\n }, {\n id: \"virtualization\",\n name: \"VirtualList\",\n description: \"Support for virtualization\",\n depends: [ \"virtuallist\" ]\n } ]\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n encode = kendo.htmlEncode,\n ui = kendo.ui,\n html = kendo.html,\n List = ui.List,\n Select = ui.Select,\n support = kendo.support,\n activeElement = kendo._activeElement,\n ObservableObject = kendo.data.ObservableObject,\n keys = kendo.keys,\n ns = \".kendoDropDownList\",\n nsFocusEvent = ns + \"FocusEvent\",\n DISABLED = \"disabled\",\n READONLY = \"readonly\",\n CHANGE = \"change\",\n FOCUSED = \"k-focus\",\n STATEDISABLED = \"k-disabled\",\n ARIA_DISABLED = \"aria-disabled\",\n ARIA_READONLY = \"aria-readonly\",\n CLICKEVENTS = \"click\" + ns + \" touchend\" + ns,\n HOVEREVENTS = \"mouseenter\" + ns + \" mouseleave\" + ns,\n TABINDEX = \"tabindex\",\n STATE_FILTER = \"filter\",\n STATE_ACCEPT = \"accept\",\n MSG_INVALID_OPTION_LABEL = \"The `optionLabel` option is not valid due to missing fields. Define a custom optionLabel as shown here http://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownlist#configuration-optionLabel\",\n OPEN = \"open\",\n CLOSE = \"close\";\n\n var DropDownList = Select.extend( {\n init: function(element, options) {\n var that = this;\n var index = options && options.index;\n var optionLabel, text, disabled;\n\n that.ns = ns;\n options = Array.isArray(options) ? { dataSource: options } : options;\n\n Select.fn.init.call(that, element, options);\n\n options = that.options;\n element = that.element.on(\"focus\" + ns, that._focusHandler.bind(that));\n\n that._focusInputHandler = that._focusInput.bind(that);\n\n that.optionLabel = $();\n that._optionLabel();\n\n that._inputTemplate();\n\n that._reset();\n\n that._prev = \"\";\n that._word = \"\";\n\n that._wrapper();\n\n that._tabindex();\n that.wrapper.data(TABINDEX, that.wrapper.attr(TABINDEX));\n\n that._span();\n\n that._popup();\n\n that._mobile();\n\n that._dataSource();\n\n that._ignoreCase();\n\n if (options.label) {\n this._label();\n }\n\n that._aria();\n\n that._enable();\n\n that._oldIndex = that.selectedIndex = -1;\n\n if (index !== undefined$1) {\n options.index = index;\n }\n\n that._initialIndex = options.index;\n\n that.requireValueMapper(that.options);\n that._initList();\n that.listView.one(\"dataBound\", that._attachAriaActiveDescendant.bind(that));\n\n that._cascade();\n\n that.one(\"set\", function(e) {\n if (!e.sender.listView.bound() && that.hasOptionLabel()) {\n that._textAccessor(that._optionLabelText());\n }\n });\n\n if (options.autoBind) {\n that.dataSource.fetch();\n } else if (that.selectedIndex === -1) { //selectedIndex !== -1 when cascade functionality happens instantly\n text = options.text || \"\";\n if (!text) {\n optionLabel = options.optionLabel;\n\n if (optionLabel && options.index === 0) {\n text = optionLabel;\n } else if (that._isSelect) {\n text = element.children(\":selected\").text();\n }\n }\n\n that._textAccessor(text);\n }\n\n disabled = $(that.element).parents(\"fieldset\").is(':disabled');\n\n if (disabled) {\n that.enable(false);\n }\n\n that.listView.bind(\"click\", function(e) { e.preventDefault(); });\n\n kendo.notify(that);\n that._applyCssClasses();\n },\n\n options: {\n name: \"DropDownList\",\n enabled: true,\n autoBind: true,\n index: 0,\n text: null,\n value: null,\n delay: 500,\n height: 200,\n dataTextField: \"\",\n dataValueField: \"\",\n optionLabel: \"\",\n cascadeFrom: \"\",\n cascadeFromField: \"\",\n cascadeFromParentField: \"\",\n ignoreCase: true,\n animation: {},\n filter: \"none\",\n minLength: 1,\n enforceMinLength: false,\n virtual: false,\n template: null,\n valueTemplate: null,\n optionLabelTemplate: null,\n groupTemplate: (data) => encode(data),\n fixedGroupTemplate: (data) => encode(data),\n autoWidth: false,\n popup: null,\n filterTitle: null,\n size: \"medium\",\n fillMode: \"solid\",\n rounded: \"medium\",\n label: null,\n popupFilter: true\n },\n\n events: [\n \"open\",\n \"close\",\n CHANGE,\n \"select\",\n \"filtering\",\n \"dataBinding\",\n \"dataBound\",\n \"cascade\",\n \"set\",\n \"kendoKeydown\"\n ],\n\n setOptions: function(options) {\n Select.fn.setOptions.call(this, options);\n\n this.listView.setOptions(this._listOptions(options));\n\n this._optionLabel();\n this._inputTemplate();\n this._accessors();\n this._removeFilterHeader();\n this._addFilterHeader();\n this._enable();\n this._aria();\n\n if (!this.value() && this.hasOptionLabel()) {\n this.select(0);\n }\n },\n\n destroy: function() {\n var that = this;\n\n Select.fn.destroy.call(that);\n\n that.wrapper.off(ns);\n that.wrapper.off(nsFocusEvent);\n that.element.off(ns);\n\n that._arrow.off();\n that._arrow = null;\n that._arrowIcon = null;\n\n that.optionLabel.off();\n\n if (that.filterInput) {\n that.filterInput.off(nsFocusEvent);\n }\n },\n\n open: function() {\n var that = this;\n var isFiltered = that.dataSource.filter() ? that.dataSource.filter().filters.length > 0 : false;\n var listView = this.listView;\n\n if (that.popup.visible()) {\n return;\n }\n\n if (!that.listView.bound() || that._state === STATE_ACCEPT) {\n that._open = true;\n that._state = \"rebind\";\n\n if (that.filterInput) {\n that.filterInput.val(\"\");\n that._prev = \"\";\n }\n\n if (that.filterInput && that.options.minLength !== 1 && !isFiltered) {\n that.refresh();\n that.popup.one(\"activate\", that._focusInputHandler);\n that.wrapper.attr(\"aria-activedescendant\", listView._optionID);\n that.popup.open();\n that._resizeFilterInput();\n } else {\n that._filterSource();\n }\n } else if (that._allowOpening()) {\n that._focusFilter = true;\n that.popup.one(\"activate\", that._focusInputHandler);\n // In some cases when the popup is opened resize is triggered which will cause it to close\n // Setting the below flag will prevent this from happening\n that.popup._hovered = true;\n that.wrapper.attr(\"aria-activedescendant\", listView._optionID);\n that.popup.open();\n that._resizeFilterInput();\n that._focusItem();\n }\n },\n\n close: function() {\n this._attachAriaActiveDescendant();\n this.popup.close();\n },\n\n _attachAriaActiveDescendant: function() {\n var wrapper = this.wrapper,\n inputId = wrapper.find(\".k-input-inner\").attr('id');\n\n wrapper.attr(\"aria-describedby\", inputId);\n },\n\n _focusInput: function() {\n if (!this._hasActionSheet()) {\n this._focusElement(this.filterInput);\n }\n },\n\n _resizeFilterInput: function() {\n var filterInput = this.filterInput;\n var originalPrevent = this._prevent;\n\n if (!filterInput || this._hasActionSheet()) {\n return;\n }\n\n var isInputActive = this.filterInput[0] === activeElement();\n var caret = kendo.caret(this.filterInput[0])[0];\n\n this._prevent = true;\n\n filterInput.addClass(\"k-hidden\");\n filterInput.closest(\".k-list-filter\").css(\"width\", this.popup.element.width());\n filterInput.removeClass(\"k-hidden\");\n\n if (isInputActive) {\n filterInput.trigger(\"focus\");\n kendo.caret(filterInput[0], caret);\n }\n\n this._prevent = originalPrevent;\n },\n\n _allowOpening: function() {\n return this.hasOptionLabel() || this.filterInput || Select.fn._allowOpening.call(this);\n },\n\n toggle: function(toggle) {\n this._toggle(toggle, true);\n },\n\n current: function(candidate) {\n var current;\n\n if (candidate === undefined$1) {\n current = this.listView.focus();\n\n if (!current && this.selectedIndex === 0 && this.hasOptionLabel()) {\n return this.optionLabel;\n }\n\n return current;\n }\n\n this._focus(candidate);\n },\n\n dataItem: function(index) {\n var that = this;\n var dataItem = null;\n\n if (index === null) { return index; }\n\n if (index === undefined$1) {\n dataItem = that.listView.selectedDataItems()[0];\n } else {\n if (typeof index !== \"number\") {\n if (that.options.virtual) {\n return that.dataSource.getByUid($(index).data(\"uid\"));\n }\n if (index.hasClass(\"k-list-optionlabel\")) {\n index = -1;\n } else {\n index = $(that.items()).index(index);\n }\n } else if (that.hasOptionLabel()) {\n index -= 1;\n }\n\n dataItem = that.dataSource.flatView()[index];\n }\n\n if (!dataItem) {\n dataItem = that._optionLabelDataItem();\n }\n\n return dataItem;\n },\n\n refresh: function() {\n this.listView.refresh();\n },\n\n text: function(text) {\n var that = this;\n var loweredText;\n var ignoreCase = that.options.ignoreCase;\n\n text = text === null ? \"\" : text;\n\n if (text !== undefined$1) {\n if (typeof text !== \"string\") {\n that._textAccessor(text);\n return;\n }\n\n loweredText = ignoreCase ? text.toLowerCase() : text;\n\n that._select(function(data) {\n data = that._text(data);\n\n if (ignoreCase) {\n data = (data + \"\").toLowerCase();\n }\n\n return data === loweredText;\n }).done(function() {\n that._textAccessor(that.dataItem() || text);\n that._refreshFloatingLabel();\n });\n\n } else {\n return that._textAccessor();\n }\n },\n\n _clearFilter: function() {\n $(this.filterInput).val(\"\");\n Select.fn._clearFilter.call(this);\n },\n\n value: function(value) {\n var that = this;\n var listView = that.listView;\n var dataSource = that.dataSource;\n var valueFn = function() { that.value(value); };\n\n if (value === undefined$1) {\n value = that._accessor() || that.listView.value()[0];\n return value === undefined$1 || value === null ? \"\" : value;\n }\n\n that.requireValueMapper(that.options, value);\n\n if (value || !that.hasOptionLabel()) {\n that._initialIndex = null;\n }\n\n this.trigger(\"set\", { value: value });\n\n if (that._request && that.options.cascadeFrom && that.listView.bound()) {\n if (that._valueSetter) {\n dataSource.unbind(CHANGE, that._valueSetter);\n }\n\n that._valueSetter = valueFn.bind(that);\n\n dataSource.one(CHANGE, that._valueSetter);\n return;\n }\n\n if (that._isFilterEnabled() && listView.bound() && listView.isFiltered()) {\n that._clearFilter();\n } else {\n that._fetchData();\n }\n\n listView.value(value).done(function() {\n that._old = that._valueBeforeCascade = that._accessor();\n that._oldIndex = that.selectedIndex;\n that._refreshFloatingLabel();\n });\n },\n\n hasOptionLabel: function() {\n return this.optionLabel && !!this.optionLabel[0];\n },\n\n _optionLabel: function() {\n var that = this;\n var options = that.options;\n var optionLabel = options.optionLabel;\n var template = options.optionLabelTemplate;\n\n if (!optionLabel) {\n that.optionLabel.off().remove();\n that.optionLabel = $();\n return;\n }\n\n if (!template) {\n template = (data) => (typeof optionLabel === \"string\" ?\n encode(data) :\n encode(kendo.getter(options.dataTextField)(data)));\n }\n\n if (typeof template !== \"function\") {\n template = kendo.template(template);\n }\n\n that.optionLabelTemplate = template;\n\n if (!that.hasOptionLabel()) {\n that.optionLabel = $('
    ').prependTo(that.list);\n }\n\n that.optionLabel.html(template(optionLabel))\n .off()\n .on(CLICKEVENTS, that._click.bind(that))\n .on(HOVEREVENTS, that._toggleHover);\n\n that.angular(\"compile\", function() {\n return { elements: that.optionLabel, data: [{ dataItem: that._optionLabelDataItem() }] };\n });\n },\n\n _optionLabelText: function() {\n var optionLabel = this.options.optionLabel;\n return (typeof optionLabel === \"string\") ? optionLabel : this._text(optionLabel);\n },\n\n _optionLabelDataItem: function() {\n var that = this;\n var optionLabel = that.options.optionLabel;\n\n if (that.hasOptionLabel()) {\n return $.isPlainObject(optionLabel) ? new ObservableObject(optionLabel) : that._assignInstance(that._optionLabelText(), \"\");\n }\n\n return undefined$1;\n },\n\n _buildOptions: function(data) {\n var that = this;\n if (!that._isSelect) {\n return;\n }\n\n var value = that.listView.value()[0];\n var optionLabel = that._optionLabelDataItem();\n var optionLabelValue = optionLabel && that._value(optionLabel);\n\n if (value === undefined$1 || value === null) {\n value = \"\";\n }\n\n if (optionLabel) {\n if (optionLabelValue === undefined$1 || optionLabelValue === null) {\n optionLabelValue = \"\";\n }\n\n optionLabel = '\";\n }\n\n that._options(data, optionLabel, value);\n\n if (value !== List.unifyType(that._accessor(), typeof value)) {\n that._customOption = null;\n that._custom(value);\n }\n },\n\n _listBound: function() {\n\n var that = this;\n var initialIndex = that._initialIndex;\n var filtered = that._state === STATE_FILTER;\n\n var data = that.dataSource.flatView();\n var dataItem;\n\n that._presetValue = false;\n\n that._renderFooter();\n that._renderNoData();\n that._toggleNoData(!data.length);\n\n that._resizePopup(true);\n\n that.popup.position();\n\n that._buildOptions(data);\n\n if (!filtered) {\n if (that._open) {\n that.toggle(that._allowOpening());\n }\n\n that._open = false;\n\n if (!that._fetch) {\n if (data.length) {\n if (!that.listView.value().length && initialIndex > -1 && initialIndex !== null) {\n that.select(initialIndex);\n }\n\n that._initialIndex = null;\n dataItem = that.listView.selectedDataItems()[0];\n if (dataItem && that.text() !== that._text(dataItem)) {\n that._selectValue(dataItem);\n }\n } else if (that._textAccessor() !== that._optionLabelText()) {\n that.listView.value(\"\");\n that._selectValue(null);\n that._oldIndex = that.selectedIndex;\n }\n }\n }\n\n that._hideBusy();\n that.trigger(\"dataBound\");\n },\n\n _listChange: function() {\n this._selectValue(this.listView.selectedDataItems()[0]);\n\n if (this._presetValue || (this._old && this._oldIndex === -1)) {\n this._oldIndex = this.selectedIndex;\n }\n },\n\n _filterPaste: function() {\n this._search();\n },\n\n _attachFocusHandlers: function() {\n var that = this;\n var wrapper = that.wrapper;\n\n wrapper.on(\"focusin\" + nsFocusEvent, that._focusinHandler.bind(that))\n .on(\"focusout\" + nsFocusEvent, that._focusoutHandler.bind(that));\n if (that.filterInput) {\n that.filterInput.on(\"focusin\" + nsFocusEvent, that._focusinHandler.bind(that))\n .on(\"focusout\" + nsFocusEvent, that._focusoutHandler.bind(that));\n }\n },\n\n _focusHandler: function() {\n this.wrapper.trigger(\"focus\");\n },\n\n _focusinHandler: function() {\n this.wrapper.addClass(FOCUSED);\n this._prevent = false;\n },\n\n _focusoutHandler: function() {\n var that = this;\n var isIFrame = window.self !== window.top;\n\n if (!that._prevent) {\n clearTimeout(that._typingTimeout);\n\n if (support.mobileOS.ios && isIFrame) {\n that._change();\n } else {\n that._blur();\n }\n\n that.wrapper.removeClass(FOCUSED);\n that._prevent = true;\n that._open = false;\n that.element.trigger(\"blur\");\n }\n },\n\n _wrapperMousedown: function() {\n this._prevent = !!this.filterInput;\n },\n\n _wrapperClick: function(e) {\n e.preventDefault();\n this.popup.unbind(\"activate\", this._focusInputHandler);\n this._focused = this.wrapper;\n this._prevent = false;\n this._toggle();\n },\n\n _editable: function(options) {\n var that = this;\n var element = that.element;\n var disable = options.disable;\n var readonly = options.readonly;\n var wrapper = that.wrapper.add(that.filterInput).off(ns);\n var dropDownWrapper = that.wrapper.off(HOVEREVENTS);\n\n if (!readonly && !disable) {\n element.prop(DISABLED, false).prop(READONLY, false);\n\n dropDownWrapper\n .removeClass(STATEDISABLED)\n .on(HOVEREVENTS, that._toggleHover);\n\n wrapper\n .attr(TABINDEX, wrapper.data(TABINDEX))\n .attr(ARIA_DISABLED, false)\n .attr(ARIA_READONLY, false)\n .on(\"keydown\" + ns, that, that._keydown.bind(that))\n .on(kendo.support.mousedown + ns, that._wrapperMousedown.bind(that))\n .on(\"paste\" + ns, that._filterPaste.bind(that));\n\n that.wrapper.on(\"click\" + ns, that._wrapperClick.bind(that));\n\n if (!that.filterInput) {\n wrapper.on(\"keypress\" + ns, that._keypress.bind(that));\n } else {\n wrapper.on(\"input\" + ns, that._search.bind(that));\n }\n\n } else if (disable) {\n wrapper.removeAttr(TABINDEX);\n dropDownWrapper.addClass(STATEDISABLED);\n } else {\n dropDownWrapper.removeClass(STATEDISABLED);\n }\n\n element.attr(DISABLED, disable)\n .attr(READONLY, readonly);\n\n wrapper.attr(ARIA_DISABLED, disable)\n .attr(ARIA_READONLY, readonly);\n },\n\n _keydown: function(e) {\n var that = this;\n var key = e.keyCode;\n var altKey = e.altKey;\n var isInputActive;\n var handled;\n\n var isPopupVisible = that.popup.visible();\n\n if (that.filterInput) {\n isInputActive = that.filterInput[0] === activeElement();\n }\n\n if (key === keys.LEFT) {\n key = keys.UP;\n handled = true;\n } else if (key === keys.RIGHT) {\n key = keys.DOWN;\n handled = true;\n }\n\n if (handled && isInputActive) {\n return;\n }\n\n e.keyCode = key;\n\n if ((altKey && key === keys.UP) || key === keys.ESC) {\n that._focusElement(that.wrapper);\n }\n\n if (that._state === STATE_FILTER && key === keys.ESC) {\n that._clearFilter();\n that._open = false;\n that._state = STATE_ACCEPT;\n }\n\n if (key === keys.ENTER && that._typingTimeout && that.filterInput && isPopupVisible) {\n e.preventDefault();\n return;\n }\n\n if (key === keys.SPACEBAR && !isInputActive) {\n that.toggle(!isPopupVisible);\n e.preventDefault();\n }\n\n handled = that._move(e);\n\n if (handled) {\n return;\n }\n\n if (!isPopupVisible || !that.filterInput) {\n var current = that._focus();\n\n if (key === keys.HOME) {\n handled = true;\n that._firstItem();\n } else if (key === keys.END) {\n handled = true;\n that._lastItem();\n }\n\n if (handled) {\n if (that.trigger(\"select\", { dataItem: that._getElementDataItem(that._focus()), item: that._focus() })) {\n that._focus(current);\n return;\n }\n\n that._select(that._focus(), true).done(function() {\n if (!isPopupVisible) {\n that._blur();\n }\n });\n e.preventDefault();\n }\n }\n\n if (!altKey && !handled && that.filterInput) {\n that._search();\n }\n },\n\n _matchText: function(text, word) {\n var ignoreCase = this.options.ignoreCase;\n\n if (text === undefined$1 || text === null) {\n return false;\n }\n\n text = text + \"\";\n\n if (ignoreCase) {\n text = text.toLowerCase();\n }\n\n return text.indexOf(word) === 0;\n },\n\n _shuffleData: function(data, splitIndex) {\n var optionDataItem = this._optionLabelDataItem();\n\n if (optionDataItem) {\n data = [optionDataItem].concat(data);\n }\n\n return data.slice(splitIndex).concat(data.slice(0, splitIndex));\n },\n\n _selectNext: function() {\n var that = this;\n var data = that.dataSource.flatView();\n var dataLength = data.length + (that.hasOptionLabel() ? 1 : 0);\n var isInLoop = sameCharsOnly(that._word, that._last);\n var startIndex = that.selectedIndex;\n var oldFocusedItem;\n var text;\n\n if (startIndex === -1) {\n startIndex = 0;\n } else {\n startIndex += isInLoop ? 1 : 0;\n startIndex = normalizeIndex(startIndex, dataLength);\n }\n\n data = data.toJSON ? data.toJSON() : data.slice();\n data = that._shuffleData(data, startIndex);\n\n for (var idx = 0; idx < dataLength; idx++) {\n text = that._text(data[idx]);\n\n if (isInLoop && that._matchText(text, that._last)) {\n break;\n } else if (that._matchText(text, that._word)) {\n break;\n }\n }\n\n if (idx !== dataLength) {\n oldFocusedItem = that._focus();\n\n that._select(normalizeIndex(startIndex + idx, dataLength)).done(function() {\n var done = function() {\n if (!that.popup.visible()) {\n that._change();\n }\n };\n\n if (that.trigger(\"select\", { dataItem: that._getElementDataItem(that._focus()), item: that._focus() })) {\n that._select(oldFocusedItem).done(done);\n } else {\n done();\n }\n });\n }\n },\n\n _keypress: function(e) {\n var that = this;\n\n if (e.which === 0 || e.keyCode === kendo.keys.ENTER) {\n return;\n }\n\n var character = String.fromCharCode(e.charCode || e.keyCode);\n\n if (that.options.ignoreCase) {\n character = character.toLowerCase();\n }\n\n if (character === \" \") {\n e.preventDefault();\n }\n\n that._word += character;\n that._last = character;\n\n that._search();\n },\n\n _popupOpen: function(e) {\n var popup = this.popup;\n\n if (e.isDefaultPrevented() || this._hasActionSheet()) {\n return;\n }\n\n popup.wrapper = kendo.wrap(popup.element);\n\n if (popup.element.closest(\".km-root\")[0]) {\n popup.wrapper.addClass(\"km-popup km-widget\");\n this.wrapper.addClass(\"km-widget\");\n }\n },\n\n _popup: function() {\n Select.fn._popup.call(this);\n this.popup.one(\"open\", this._popupOpen.bind(this));\n },\n\n _postCreatePopup: function() {\n Select.fn._postCreatePopup.call(this);\n this._attachFocusHandlers();\n },\n\n _getElementDataItem: function(element) {\n if (!element || !element[0]) {\n return null;\n }\n\n if (element[0] === this.optionLabel[0]) {\n return this._optionLabelDataItem();\n }\n\n return this.listView.dataItemByIndex(this.listView.getElementIndex(element));\n },\n\n _click: function(e) {\n var that = this;\n var item = e.item || $(e.currentTarget);\n\n e.preventDefault();\n\n if (that.trigger(\"select\", { dataItem: that._getElementDataItem(item), item: item })) {\n that.close();\n return;\n }\n\n that._userTriggered = true;\n\n that._select(item).done(function() {\n that._blur();\n that._focusElement(that.wrapper);\n });\n },\n\n _focusElement: function(element) {\n var active = activeElement();\n var wrapper = this.wrapper;\n var filterInput = this.filterInput;\n var compareElement = element === filterInput ? wrapper : filterInput;\n var touchEnabled = support.mobileOS && (support.touch || support.MSPointers || support.pointers);\n\n if (filterInput && filterInput[0] === element[0] && touchEnabled) {\n return;\n }\n\n if (filterInput && (compareElement[0] === active || this._focusFilter)) {\n this._focusFilter = false;\n this._prevent = true;\n this._focused = element.trigger(\"focus\");\n }\n },\n\n _searchByWord: function(word) {\n if (!word) {\n return;\n }\n\n var that = this;\n var ignoreCase = that.options.ignoreCase;\n\n if (ignoreCase) {\n word = word.toLowerCase();\n }\n\n that._select(function(dataItem) {\n return that._matchText(that._text(dataItem), word);\n });\n },\n\n _inputValue: function() {\n return this.text();\n },\n\n _search: function() {\n var that = this;\n var dataSource = that.dataSource;\n\n clearTimeout(that._typingTimeout);\n\n if (that._isFilterEnabled()) {\n that._typingTimeout = setTimeout(function() {\n var value = that.filterInput.val();\n\n if (that._prev !== value) {\n that._prev = value;\n that.search(value);\n that._resizeFilterInput();\n }\n\n that._typingTimeout = null;\n }, that.options.delay);\n } else {\n that._typingTimeout = setTimeout(function() {\n that._word = \"\";\n }, that.options.delay);\n\n if (!that.listView.bound()) {\n dataSource.fetch().done(function() {\n that._selectNext();\n });\n return;\n }\n\n that._selectNext();\n }\n },\n\n _get: function(candidate) {\n var data, found, idx;\n var isFunction = typeof candidate === \"function\";\n var jQueryCandidate = !isFunction ? $(candidate) : $();\n\n if (this.hasOptionLabel()) {\n if (typeof candidate === \"number\") {\n if (candidate > -1) {\n candidate -= 1;\n }\n } else if (jQueryCandidate.hasClass(\"k-list-optionlabel\")) {\n candidate = -1;\n }\n }\n\n if (isFunction) {\n data = this.dataSource.flatView();\n\n for (idx = 0; idx < data.length; idx++) {\n if (candidate(data[idx])) {\n candidate = idx;\n found = true;\n break;\n }\n }\n\n if (!found) {\n candidate = -1;\n }\n }\n\n return candidate;\n },\n\n _firstItem: function() {\n if (this.hasOptionLabel()) {\n this._focus(this.optionLabel);\n } else {\n this.listView.focusFirst();\n }\n },\n\n _lastItem: function() {\n this._resetOptionLabel();\n this.listView.focusLast();\n },\n\n _nextItem: function() {\n var focusIndex;\n\n if (this.optionLabel.hasClass(\"k-focus\")) {\n this._resetOptionLabel();\n this.listView.focusFirst();\n focusIndex = 1;\n } else {\n focusIndex = this.listView.focusNext();\n }\n\n return focusIndex;\n },\n\n _prevItem: function() {\n var focusIndex;\n\n if (this.optionLabel.hasClass(\"k-focus\")) {\n return;\n }\n\n focusIndex = this.listView.focusPrev();\n\n if (!this.listView.focus() && !this.options.virtual) {\n this._focus(this.optionLabel);\n }\n\n return focusIndex;\n },\n\n _focusItem: function() {\n var options = this.options;\n var listView = this.listView;\n var focusedItem = listView.focus();\n var index = listView.select();\n\n index = index[index.length - 1];\n\n if (index === undefined$1 && options.highlightFirst && !focusedItem) {\n index = 0;\n }\n\n if (index !== undefined$1) {\n listView.focus(index);\n } else {\n if (options.optionLabel && (!options.virtual || options.virtual.mapValueTo !== \"dataItem\")) {\n this._focus(this.optionLabel);\n this._select(this.optionLabel);\n this.listView.content.scrollTop(0);\n } else {\n listView.scrollToIndex(0);\n }\n }\n },\n\n _resetOptionLabel: function(additionalClass) {\n this.optionLabel.removeClass(\"k-focus\" + (additionalClass || \"\")).removeAttr(\"id\");\n },\n\n _focus: function(candidate) {\n var listView = this.listView;\n var optionLabel = this.optionLabel;\n\n if (candidate === undefined$1) {\n candidate = listView.focus();\n\n if (!candidate && optionLabel.hasClass(\"k-focus\")) {\n candidate = optionLabel;\n }\n\n return candidate;\n }\n\n this._resetOptionLabel();\n\n candidate = this._get(candidate);\n\n listView.focus(candidate);\n\n if (candidate === -1) {\n optionLabel.addClass(\"k-focus\")\n .attr(\"id\", listView._optionID);\n\n if (this.filterInput) {\n this.filterInput\n .removeAttr(\"aria-activedescendant\")\n .attr(\"aria-activedescendant\", listView._optionID);\n }\n }\n },\n\n _select: function(candidate, keepState) {\n var that = this;\n\n candidate = that._get(candidate);\n\n return that.listView.select(candidate).done(function() {\n if (!keepState && that._state === STATE_FILTER) {\n that._state = STATE_ACCEPT;\n }\n\n if (candidate === -1) {\n that._selectValue(null);\n }\n });\n },\n\n _selectValue: function(dataItem) {\n var that = this;\n var optionLabel = that.options.optionLabel;\n var idx = that.listView.select();\n\n var value = \"\";\n var text = \"\";\n\n idx = idx[idx.length - 1];\n if (idx === undefined$1) {\n idx = -1;\n }\n\n this._resetOptionLabel(\" k-selected\");\n\n if (dataItem || dataItem === 0) {\n text = dataItem;\n value = that._dataValue(dataItem);\n if (optionLabel) {\n idx += 1;\n }\n } else if (optionLabel) {\n that._focus(that.optionLabel.addClass(\"k-selected\"));\n\n text = that._optionLabelText();\n\n if (typeof optionLabel === \"string\") {\n value = \"\";\n } else {\n value = that._value(optionLabel);\n }\n\n idx = 0;\n }\n\n that.selectedIndex = idx;\n\n if (value === null) {\n value = \"\";\n }\n\n that._textAccessor(text);\n that._accessor(value, idx);\n\n that._triggerCascade();\n },\n\n _mobile: function() {\n var that = this,\n popup = that.popup,\n mobileOS = support.mobileOS,\n root = popup.element.parents(\".km-root\").eq(0);\n\n if (root.length && mobileOS) {\n popup.options.animation.open.effects = (mobileOS.android || mobileOS.meego) ? \"fadeIn\" : (mobileOS.ios || mobileOS.wp) ? \"slideIn:up\" : popup.options.animation.open.effects;\n }\n },\n\n _span: function() {\n var that = this,\n wrapper = that.wrapper,\n SELECTOR = \"span.k-input-value-text\",\n id = kendo.guid(),\n options = that.options,\n span, arrowBtn;\n\n span = wrapper.find(SELECTOR);\n\n if (!span[0]) {\n arrowBtn = html.renderButton('', {\n icon: \"caret-alt-down\",\n size: options.size,\n fillMode: options.fillMode,\n shape: \"none\",\n rounded: \"none\"\n });\n\n wrapper.append('' +\n '' +\n '')\n .append(arrowBtn)\n .append(that.element);\n\n span = wrapper.find(SELECTOR);\n }\n\n that.span = span;\n that._arrow = wrapper.find(\".k-input-button\");\n that._arrowIcon = that._arrow.find(\".k-icon,.k-svg-icon\");\n },\n\n _wrapper: function() {\n var that = this,\n element = that.element,\n DOMelement = element[0],\n wrapper;\n\n wrapper = element.parent();\n\n if (!wrapper.is(\"span.k-picker\")) {\n wrapper = element.wrap(\"\").parent();\n wrapper[0].style.cssText = DOMelement.style.cssText;\n wrapper[0].title = DOMelement.title;\n }\n\n that._focused = that.wrapper = wrapper\n .addClass(\"k-picker k-dropdownlist\")\n .addClass(DOMelement.className)\n .removeClass('input-validation-error')\n .css(\"display\", \"\")\n .attr({\n accesskey: element.attr(\"accesskey\"),\n unselectable: \"on\",\n role: \"combobox\",\n \"aria-expanded\": false\n });\n\n element.hide().removeAttr(\"accesskey\");\n },\n\n _clearSelection: function(parent) {\n this.select(parent.value() ? 0 : -1);\n },\n\n _openHandler: function(e) {\n this._adjustListWidth();\n\n if (this.trigger(OPEN)) {\n e.preventDefault();\n } else {\n this.wrapper.attr(\"aria-expanded\", true);\n this.ul.attr(\"aria-hidden\", false);\n }\n },\n\n _closeHandler: function(e) {\n if (this.trigger(CLOSE)) {\n e.preventDefault();\n } else {\n this.wrapper.attr(\"aria-expanded\", false);\n this.ul.attr(\"aria-hidden\", true);\n }\n },\n\n _inputTemplate: function() {\n var that = this,\n template = that.options.valueTemplate;\n\n\n if (!template) {\n template = (data) => encode(that._text(data));\n } else {\n template = kendo.template(template);\n }\n\n that.valueTemplate = template;\n\n if (that.hasOptionLabel() && !that.options.optionLabelTemplate) {\n try {\n that.valueTemplate(that._optionLabelDataItem());\n } catch (e) {\n throw new Error(MSG_INVALID_OPTION_LABEL);\n }\n }\n },\n\n _textAccessor: function(text) {\n var dataItem = null;\n var template = this.valueTemplate;\n var optionLabelText = this._optionLabelText();\n var span = this.span;\n\n if (text === undefined$1) {\n return span.text();\n }\n\n if ($.isPlainObject(text) || text instanceof ObservableObject) {\n dataItem = text;\n } else if (optionLabelText && optionLabelText === text) {\n dataItem = this.options.optionLabel;\n }\n\n if (!dataItem) {\n dataItem = this._assignInstance(text, this._accessor());\n }\n\n if (this.hasOptionLabel()) {\n if (dataItem === optionLabelText || this._text(dataItem) === optionLabelText) {\n template = this.optionLabelTemplate;\n\n if (typeof this.options.optionLabel === \"string\" && !this.options.optionLabelTemplate) {\n dataItem = optionLabelText;\n }\n }\n }\n\n var getElements = function() {\n return {\n elements: span.get(),\n data: [ { dataItem: dataItem } ]\n };\n };\n\n this.angular(\"cleanup\", getElements);\n\n try {\n span.html(template(dataItem));\n } catch (e) {\n //dataItem has missing fields required in custom template\n span.html(\"\");\n }\n\n this.angular(\"compile\", getElements);\n },\n\n _preselect: function(value, text) {\n if (!value && !text) {\n text = this._optionLabelText();\n }\n\n this._accessor(value);\n this._textAccessor(text);\n\n this._old = this._accessor();\n this._oldIndex = this.selectedIndex;\n\n this.listView.setValue(value);\n\n this._initialIndex = null;\n this._presetValue = true;\n },\n\n _assignInstance: function(text, value) {\n var dataTextField = this.options.dataTextField;\n var dataItem = {};\n\n if (dataTextField) {\n assign(dataItem, dataTextField.split(\".\"), text);\n assign(dataItem, this.options.dataValueField.split(\".\"), value);\n dataItem = new ObservableObject(dataItem);\n } else {\n dataItem = text;\n }\n\n return dataItem;\n }\n });\n\n function assign(instance, fields, value) {\n var idx = 0,\n lastIndex = fields.length - 1,\n field;\n\n for (; idx < lastIndex; ++idx) {\n field = fields[idx];\n\n if (!(field in instance)) {\n instance[field] = {};\n }\n\n instance = instance[field];\n }\n\n instance[fields[lastIndex]] = value;\n }\n\n function normalizeIndex(index, length) {\n if (index >= length) {\n index -= length;\n }\n return index;\n }\n\n function sameCharsOnly(word, character) {\n for (var idx = 0; idx < word.length; idx++) {\n if (word.charAt(idx) !== character) {\n return false;\n }\n }\n return true;\n }\n\n ui.plugin(DropDownList);\n\n kendo.cssProperties.registerPrefix(\"DropDownList\", \"k-picker-\");\n\n kendo.cssProperties.registerValues(\"DropDownList\", [{\n prop: \"rounded\",\n values: kendo.cssProperties.roundedValues.concat([['full', 'full']])\n }]);\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.data.js';\nimport './kendo.draganddrop.js';\n\nvar __meta__ = {\n id: \"treeview.draganddrop\",\n name: \"Hierarchical Drag & Drop\",\n category: \"framework\",\n depends: [ \"core\", \"draganddrop\" ],\n advanced: true\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo;\n var ui = kendo.ui;\n var extend = $.extend;\n var VISIBILITY = \"visibility\";\n var DRAG_STATUS = \"k-drag-status\";\n var DRAG_STATUS_ELEMENT = ``;\n var KSTATEHOVER = \"k-hover\";\n var INPUTSELECTOR = \"input,a:not(.k-in),textarea,.k-multiselect-wrap,select,button,a.k-button>.k-icon,button.k-button>.k-icon,span.k-toggle-icon,a.k-button>.k-svg-icon,button.k-button>.k-svg-icon\";\n var DROPHINTTEMPLATE = \"
    \" +\n \"
    \" +\n \"
    \" +\n \"
    \";\n\n ui.HierarchicalDragAndDrop = kendo.Class.extend({\n init: function(element, options) {\n this.element = element;\n this.hovered = element;\n this.options = extend({\n dragstart: $.noop, drag: $.noop, drop: $.noop, dragend: $.noop\n }, options);\n\n this._draggable = new ui.Draggable(element, {\n ignore: INPUTSELECTOR,\n filter: options.filter,\n autoScroll: options.autoScroll,\n cursorOffset: {\n left: 10,\n top: kendo.support.mobileOS ? -40 / kendo.support.zoomLevel() : 10\n },\n hint: this._hint.bind(this),\n dragstart: this.dragstart.bind(this),\n dragcancel: this.dragcancel.bind(this),\n hintDestroyed: this.dragcancel.bind(this),\n drag: this.drag.bind(this),\n dragend: this.dragend.bind(this),\n $angular: options.$angular,\n holdToDrag: options.holdToDrag,\n clickMoveClick: options.clickMoveClick\n });\n },\n\n _hint: function(element) {\n return \"
    \" +\n DRAG_STATUS_ELEMENT +\n this.options.hintText(element) +\n \"
    \";\n },\n\n _removeTouchHover: function() {\n if (kendo.support.touch && this.hovered) {\n this.hovered.find(\".\" + KSTATEHOVER).removeClass(KSTATEHOVER);\n this.hovered = false;\n }\n },\n\n _hintStatus: function(newStatus) {\n var statusElement = this._draggable.hint.find(`.${DRAG_STATUS}`);\n if (newStatus) {\n this.status = newStatus;\n ui.icon(statusElement, {\n icon: newStatus\n });\n } else {\n this.status = '';\n statusElement.replaceWith(DRAG_STATUS_ELEMENT);\n }\n },\n\n dragstart: function(e) {\n if (this.dropHint) {\n this.dropHint.remove();\n }\n\n this.source = e.currentTarget.closest(this.options.itemSelector);\n\n if (this.options.dragstart(this.source)) {\n e.preventDefault();\n }\n\n if (this.options.reorderable) {\n this.dropHint = $(DROPHINTTEMPLATE)\n .css(VISIBILITY, \"hidden\")\n .appendTo(this.element);\n } else {\n this.dropHint = $();\n }\n },\n\n drag: function(e) {\n var options = this.options;\n var source = this.source;\n var target = this.dropTarget = $(kendo.eventTarget(e));\n var container = target.closest(options.allowedContainers);\n var hoveredItem, itemHeight, itemTop, itemContent, delta;\n var insertOnTop, insertOnBottom, addChild;\n var itemData, position, status;\n\n if (!container.length) {\n // dragging outside of allowed elements\n status = \"cancel\";\n this._removeTouchHover();\n } else if (source[0] == target[0] || options.contains(source[0], target[0])) {\n // dragging item within itself\n status = \"cancel\";\n } else if (e.clickMoveClick && e.currentTarget.hasClass(\"k-drag-cell\") && target.closest(\".k-drag-cell\").length === 0) {\n // click-move-click interaction with drag cell\n status = \"cancel\";\n } else if (e.clickMoveClick && e.currentTarget.hasClass(\"k-treeview-leaf\") && target.closest(\".k-treeview-leaf\").length === 0) {\n // click-move-click interaction with TreeView\n status = \"cancel\";\n } else {\n // moving or reordering item\n status = \"insert-middle\";\n\n itemData = options.itemFromTarget(target);\n hoveredItem = itemData.item;\n\n if (hoveredItem.length) {\n this._removeTouchHover();\n itemHeight = kendo._outerHeight(hoveredItem);\n itemContent = itemData.content;\n\n if (options.reorderable) {\n delta = itemHeight / (itemContent.length > 0 ? 4 : 2);\n itemTop = kendo.getOffset(hoveredItem).top;\n\n insertOnTop = e.y.location < (itemTop + delta);\n insertOnBottom = (itemTop + itemHeight - delta) < e.y.location;\n addChild = itemContent.length && !insertOnTop && !insertOnBottom;\n } else {\n addChild = true;\n insertOnTop = false;\n insertOnBottom = false;\n }\n\n this.hovered = addChild ? container : false;\n\n this.dropHint.css(VISIBILITY, addChild ? \"hidden\" : \"visible\");\n\n if (this._lastHover && this._lastHover[0] != itemContent[0]) {\n this._lastHover.removeClass(KSTATEHOVER);\n }\n\n this._lastHover = itemContent.toggleClass(KSTATEHOVER, addChild);\n\n if (addChild) {\n status = \"plus\";\n } else {\n position = hoveredItem.position();\n position.top += insertOnTop ? 0 : itemHeight;\n\n this.dropHint.css(position)\n [insertOnTop ? \"prependTo\" : \"appendTo\"]\n (options.dropHintContainer(hoveredItem));\n\n if (insertOnTop && itemData.first) {\n status = \"insert-top\";\n }\n\n if (insertOnBottom && itemData.last) {\n status = \"insert-bottom\";\n }\n }\n } else if (target[0] != this.dropHint[0]) {\n if (this._lastHover) {\n this._lastHover.removeClass(KSTATEHOVER);\n }\n\n if (!$.contains(this.element[0], container[0])) {\n // moving node to different element\n status = \"plus\";\n } else {\n status = \"cancel\";\n }\n }\n }\n\n this.options.drag({\n originalEvent: e.originalEvent,\n source: source,\n target: target,\n pageY: e.y.location,\n pageX: e.x.location,\n status: status,\n setStatus: function(value) {\n status = value;\n }\n });\n\n if (status.indexOf(\"insert\") !== 0) {\n this.dropHint.css(VISIBILITY, \"hidden\");\n }\n\n this._hintStatus(status);\n },\n\n dragcancel: function() {\n if (this.dropHint) {\n this.dropHint.remove();\n }\n },\n\n dragend: function(e) {\n var position = \"over\",\n source = this.source,\n destination,\n dropHint = this.dropHint,\n dropTarget = this.dropTarget || $(kendo.eventTarget(e)),\n eventArgs, dropPrevented, requireTarget;\n\n if (dropHint && dropHint.css(VISIBILITY) == \"visible\") {\n position = this.options.dropPositionFrom(dropHint);\n destination = dropHint.closest(this.options.itemSelector);\n requireTarget = true;\n } else if (dropTarget) {\n destination = dropTarget.closest(this.options.itemSelector);\n\n // moving node to root element\n if (!destination.length) {\n destination = dropTarget.closest(this.options.allowedContainers);\n }\n }\n\n if (requireTarget && !destination.length) {\n this.dragcancel();\n return;\n }\n\n eventArgs = {\n originalEvent: e.originalEvent,\n source: source[0],\n destination: destination[0],\n valid: this.status != \"cancel\",\n setValid: function(newValid) {\n this.valid = newValid;\n },\n dropTarget: dropTarget[0],\n position: position\n };\n\n dropPrevented = this.options.drop(eventArgs);\n\n dropHint.remove();\n this._removeTouchHover();\n if (this._lastHover) {\n this._lastHover.removeClass(KSTATEHOVER);\n }\n\n if (!eventArgs.valid || dropPrevented) {\n this._draggable.dropped = eventArgs.valid;\n return;\n }\n\n this._draggable.dropped = true;\n\n this.options.dragend({\n originalEvent: e.originalEvent,\n source: source,\n destination: destination,\n position: position\n });\n },\n\n destroy: function() {\n this._lastHover = this.hovered = null;\n this._draggable.destroy();\n }\n });\n\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n", "import './kendo.html.base.js';\n\nvar __meta__ = {\n id: \"html.input\",\n name: \"Html.Input\",\n category: \"web\",\n description: \"HTML rendering utility for Kendo UI for jQuery.\",\n depends: [ \"html.base\" ],\n features: []\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n HTMLBase = kendo.html.HTMLBase;\n\n var renderCheckBox = function(element, options) {\n if (arguments[0] === undefined$1 || $.isPlainObject(arguments[0])) {\n options = element;\n element = $(\"\");\n }\n\n return (new HTMLCheckBox(element, options)).html();\n };\n\n var renderRadioButton = function(element, options) {\n if (arguments[0] === undefined$1 || $.isPlainObject(arguments[0])) {\n options = element;\n element = $(\"\");\n }\n\n return (new HTMLRadioButton(element, options)).html();\n };\n\n var HTMLInput = HTMLBase.extend({\n init: function(element, options) {\n var that = this;\n HTMLBase.fn.init.call(that, element, options);\n that._wrapper();\n that._addClasses();\n },\n options: {\n label: null,\n labelPosition: \"after\",\n labelId: null,\n encoded: true\n },\n _wrapper: function() {\n var that = this,\n element = that.element[0],\n options = that.options,\n elementId = element.id;\n\n that.wrapper = that.element\n .addClass(options.inputClass)\n .prop(\"type\", options.type);\n\n if (!elementId && !!options.label) {\n element.id = elementId = kendo.guid();\n }\n\n if (!!options.label) {\n that.labelEl = $(\"