diff options
Diffstat (limited to 'nz-admin/src/main/resources/statics/libs')
22 files changed, 0 insertions, 32057 deletions
diff --git a/nz-admin/src/main/resources/statics/libs/ajaxupload.js b/nz-admin/src/main/resources/statics/libs/ajaxupload.js deleted file mode 100644 index 7e51768b..00000000 --- a/nz-admin/src/main/resources/statics/libs/ajaxupload.js +++ /dev/null @@ -1,673 +0,0 @@ -/** - * AJAX Upload ( http://valums.com/ajax-upload/ ) - * Copyright (c) Andris Valums - * Licensed under the MIT license ( http://valums.com/mit-license/ ) - * Thanks to Gary Haran, David Mark, Corey Burns and others for contributions - */ -(function () { - /* global window */ - /* jslint browser: true, devel: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true */ - - /** - * Wrapper for FireBug's console.log - */ - function log(){ - if (typeof(console) != 'undefined' && typeof(console.log) == 'function'){ - Array.prototype.unshift.call(arguments, '[Ajax Upload]'); - console.log( Array.prototype.join.call(arguments, ' ')); - } - } - - /** - * Attaches event to a dom element. - * @param {Element} el - * @param type event name - * @param fn callback This refers to the passed element - */ - function addEvent(el, type, fn){ - if (el.addEventListener) { - el.addEventListener(type, fn, false); - } else if (el.attachEvent) { - el.attachEvent('on' + type, function(){ - fn.call(el); - }); - } else { - throw new Error('not supported or DOM not loaded'); - } - } - - /** - * Attaches resize event to a window, limiting - * number of event fired. Fires only when encounteres - * delay of 100 after series of events. - * - * Some browsers fire event multiple times when resizing - * http://www.quirksmode.org/dom/events/resize.html - * - * @param fn callback This refers to the passed element - */ - function addResizeEvent(fn){ - var timeout; - - addEvent(window, 'resize', function(){ - if (timeout){ - clearTimeout(timeout); - } - timeout = setTimeout(fn, 100); - }); - } - - // Needs more testing, will be rewriten for next version - // getOffset function copied from jQuery lib (http://jquery.com/) - if (document.documentElement.getBoundingClientRect){ - // Get Offset using getBoundingClientRect - // http://ejohn.org/blog/getboundingclientrect-is-awesome/ - var getOffset = function(el){ - var box = el.getBoundingClientRect(); - var doc = el.ownerDocument; - var body = doc.body; - var docElem = doc.documentElement; // for ie - var clientTop = docElem.clientTop || body.clientTop || 0; - var clientLeft = docElem.clientLeft || body.clientLeft || 0; - - // In Internet Explorer 7 getBoundingClientRect property is treated as physical, - // while others are logical. Make all logical, like in IE8. - var zoom = 1; - if (body.getBoundingClientRect) { - var bound = body.getBoundingClientRect(); - zoom = (bound.right - bound.left) / body.clientWidth; - } - - if (zoom > 1) { - clientTop = 0; - clientLeft = 0; - } - - var top = box.top / zoom + (window.pageYOffset || docElem && docElem.scrollTop / zoom || body.scrollTop / zoom) - clientTop, left = box.left / zoom + (window.pageXOffset || docElem && docElem.scrollLeft / zoom || body.scrollLeft / zoom) - clientLeft; - - return { - top: top, - left: left - }; - }; - } else { - // Get offset adding all offsets - var getOffset = function(el){ - var top = 0, left = 0; - do { - top += el.offsetTop || 0; - left += el.offsetLeft || 0; - el = el.offsetParent; - } while (el); - - return { - left: left, - top: top - }; - }; - } - - /** - * Returns left, top, right and bottom properties describing the border-box, - * in pixels, with the top-left relative to the body - * @param {Element} el - * @return {Object} Contains left, top, right,bottom - */ - function getBox(el){ - var left, right, top, bottom; - var offset = getOffset(el); - left = offset.left; - top = offset.top; - - right = left + el.offsetWidth; - bottom = top + el.offsetHeight; - - return { - left: left, - right: right, - top: top, - bottom: bottom - }; - } - - /** - * Helper that takes object literal - * and add all properties to element.style - * @param {Element} el - * @param {Object} styles - */ - function addStyles(el, styles){ - for (var name in styles) { - if (styles.hasOwnProperty(name)) { - el.style[name] = styles[name]; - } - } - } - - /** - * Function places an absolutely positioned - * element on top of the specified element - * copying position and dimentions. - * @param {Element} from - * @param {Element} to - */ - function copyLayout(from, to){ - var box = getBox(from); - - addStyles(to, { - position: 'absolute', - left : box.left + 'px', - top : box.top + 'px', - width : from.offsetWidth + 'px', - height : from.offsetHeight + 'px' - }); - } - - /** - * Creates and returns element from html chunk - * Uses innerHTML to create an element - */ - var toElement = (function(){ - var div = document.createElement('div'); - return function(html){ - div.innerHTML = html; - var el = div.firstChild; - return div.removeChild(el); - }; - })(); - - /** - * Function generates unique id - * @return unique id - */ - var getUID = (function(){ - var id = 0; - return function(){ - return 'ValumsAjaxUpload' + id++; - }; - })(); - - /** - * Get file name from path - * @param {String} file path to file - * @return filename - */ - function fileFromPath(file){ - return file.replace(/.*(\/|\\)/, ""); - } - - /** - * Get file extension lowercase - * @param {String} file name - * @return file extenstion - */ - function getExt(file){ - return (-1 !== file.indexOf('.')) ? file.replace(/.*[.]/, '') : ''; - } - - function hasClass(el, name){ - var re = new RegExp('\\b' + name + '\\b'); - return re.test(el.className); - } - function addClass(el, name){ - if ( ! hasClass(el, name)){ - el.className += ' ' + name; - } - } - function removeClass(el, name){ - var re = new RegExp('\\b' + name + '\\b'); - el.className = el.className.replace(re, ''); - } - - function removeNode(el){ - el.parentNode.removeChild(el); - } - - /** - * Easy styling and uploading - * @constructor - * @param button An element you want convert to - * upload button. Tested dimentions up to 500x500px - * @param {Object} options See defaults below. - */ - window.AjaxUpload = function(button, options){ - this._settings = { - // Location of the server-side upload script - action: 'upload.php', - // File upload name - name: 'userfile', - // Additional data to send - data: {}, - // Submit file as soon as it's selected - autoSubmit: true, - // The type of data that you're expecting back from the server. - // html and xml are detected automatically. - // Only useful when you are using json data as a response. - // Set to "json" in that case. - responseType: false, - // Class applied to button when mouse is hovered - hoverClass: 'hover', - // Class applied to button when AU is disabled - disabledClass: 'disabled', - // When user selects a file, useful with autoSubmit disabled - // You can return false to cancel upload - onChange: function(file, extension){ - }, - // Callback to fire before file is uploaded - // You can return false to cancel upload - onSubmit: function(file, extension){ - }, - // Fired when file upload is completed - // WARNING! DO NOT USE "FALSE" STRING AS A RESPONSE! - onComplete: function(file, response){ - } - }; - - // Merge the users options with our defaults - for (var i in options) { - if (options.hasOwnProperty(i)){ - this._settings[i] = options[i]; - } - } - - // button isn't necessary a dom element - if (button.jquery){ - // jQuery object was passed - button = button[0]; - } else if (typeof button == "string") { - if (/^#.*/.test(button)){ - // If jQuery user passes #elementId don't break it - button = button.slice(1); - } - - button = document.getElementById(button); - } - - if ( ! button || button.nodeType !== 1){ - throw new Error("Please make sure that you're passing a valid element"); - } - - if ( button.nodeName.toUpperCase() == 'A'){ - // disable link - addEvent(button, 'click', function(e){ - if (e && e.preventDefault){ - e.preventDefault(); - } else if (window.event){ - window.event.returnValue = false; - } - }); - } - - // DOM element - this._button = button; - // DOM element - this._input = null; - // If disabled clicking on button won't do anything - this._disabled = false; - - // if the button was disabled before refresh if will remain - // disabled in FireFox, let's fix it - this.enable(); - - this._rerouteClicks(); - }; - - // assigning methods to our class - AjaxUpload.prototype = { - setData: function(data){ - this._settings.data = data; - }, - disable: function(){ - addClass(this._button, this._settings.disabledClass); - this._disabled = true; - - var nodeName = this._button.nodeName.toUpperCase(); - if (nodeName == 'INPUT' || nodeName == 'BUTTON'){ - this._button.setAttribute('disabled', 'disabled'); - } - - // hide input - if (this._input){ - // We use visibility instead of display to fix problem with Safari 4 - // The problem is that the value of input doesn't change if it - // has display none when user selects a file - this._input.parentNode.style.visibility = 'hidden'; - } - }, - enable: function(){ - removeClass(this._button, this._settings.disabledClass); - this._button.removeAttribute('disabled'); - this._disabled = false; - - }, - /** - * Creates invisible file input - * that will hover above the button - * <div><input type='file' /></div> - */ - _createInput: function(){ - var self = this; - - var input = document.createElement("input"); - input.setAttribute('type', 'file'); - input.setAttribute('name', this._settings.name); - - addStyles(input, { - 'position' : 'absolute', - // in Opera only 'browse' button - // is clickable and it is located at - // the right side of the input - 'right' : 0, - 'margin' : 0, - 'padding' : 0, - 'fontSize' : '480px', - 'cursor' : 'pointer' - }); - - var div = document.createElement("div"); - addStyles(div, { - 'display' : 'block', - 'position' : 'absolute', - 'overflow' : 'hidden', - 'margin' : 0, - 'padding' : 0, - 'opacity' : 0, - // Make sure browse button is in the right side - // in Internet Explorer - 'direction' : 'ltr', - //Max zIndex supported by Opera 9.0-9.2 - 'zIndex': 2147483583 - }); - - // Make sure that element opacity exists. - // Otherwise use IE filter - if ( div.style.opacity !== "0") { - if (typeof(div.filters) == 'undefined'){ - throw new Error('Opacity not supported by the browser'); - } - div.style.filter = "alpha(opacity=0)"; - } - - addEvent(input, 'change', function(){ - - if ( ! input || input.value === ''){ - return; - } - - // Get filename from input, required - // as some browsers have path instead of it - var file = fileFromPath(input.value); - - if (false === self._settings.onChange.call(self, file, getExt(file))){ - self._clearInput(); - return; - } - - // Submit form when value is changed - if (self._settings.autoSubmit) { - self.submit(); - } - }); - - addEvent(input, 'mouseover', function(){ - addClass(self._button, self._settings.hoverClass); - }); - - addEvent(input, 'mouseout', function(){ - removeClass(self._button, self._settings.hoverClass); - - // We use visibility instead of display to fix problem with Safari 4 - // The problem is that the value of input doesn't change if it - // has display none when user selects a file - input.parentNode.style.visibility = 'hidden'; - - }); - - div.appendChild(input); - document.body.appendChild(div); - - this._input = input; - }, - _clearInput : function(){ - if (!this._input){ - return; - } - - // this._input.value = ''; Doesn't work in IE6 - removeNode(this._input.parentNode); - this._input = null; - this._createInput(); - - removeClass(this._button, this._settings.hoverClass); - }, - /** - * Function makes sure that when user clicks upload button, - * the this._input is clicked instead - */ - _rerouteClicks: function(){ - var self = this; - - // IE will later display 'access denied' error - // if you use using self._input.click() - // other browsers just ignore click() - - addEvent(self._button, 'mouseover', function(){ - if (self._disabled){ - return; - } - - if ( ! self._input){ - self._createInput(); - } - - var div = self._input.parentNode; - copyLayout(self._button, div); - div.style.visibility = 'visible'; - - }); - - - // commented because we now hide input on mouseleave - /** - * When the window is resized the elements - * can be misaligned if button position depends - * on window size - */ - //addResizeEvent(function(){ - // if (self._input){ - // copyLayout(self._button, self._input.parentNode); - // } - //}); - - }, - /** - * Creates iframe with unique name - * @return {Element} iframe - */ - _createIframe: function(){ - // We can't use getTime, because it sometimes return - // same value in safari :( - var id = getUID(); - - // We can't use following code as the name attribute - // won't be properly registered in IE6, and new window - // on form submit will open - // var iframe = document.createElement('iframe'); - // iframe.setAttribute('name', id); - - var iframe = toElement('<iframe src="javascript:false;" name="' + id + '" />'); - // src="javascript:false; was added - // because it possibly removes ie6 prompt - // "This page contains both secure and nonsecure items" - // Anyway, it doesn't do any harm. - iframe.setAttribute('id', id); - - iframe.style.display = 'none'; - document.body.appendChild(iframe); - - return iframe; - }, - /** - * Creates form, that will be submitted to iframe - * @param {Element} iframe Where to submit - * @return {Element} form - */ - _createForm: function(iframe){ - var settings = this._settings; - - // We can't use the following code in IE6 - // var form = document.createElement('form'); - // form.setAttribute('method', 'post'); - // form.setAttribute('enctype', 'multipart/form-data'); - // Because in this case file won't be attached to request - var form = toElement('<form method="post" enctype="multipart/form-data"></form>'); - - form.setAttribute('action', settings.action); - form.setAttribute('target', iframe.name); - form.style.display = 'none'; - document.body.appendChild(form); - - // Create hidden input element for each data key - for (var prop in settings.data) { - if (settings.data.hasOwnProperty(prop)){ - var el = document.createElement("input"); - el.setAttribute('type', 'hidden'); - el.setAttribute('name', prop); - el.setAttribute('value', settings.data[prop]); - form.appendChild(el); - } - } - return form; - }, - /** - * Gets response from iframe and fires onComplete event when ready - * @param iframe - * @param file Filename to use in onComplete callback - */ - _getResponse : function(iframe, file){ - // getting response - var toDeleteFlag = false, self = this, settings = this._settings; - - addEvent(iframe, 'load', function(){ - - if (// For Safari - iframe.src == "javascript:'%3Chtml%3E%3C/html%3E';" || - // For FF, IE - iframe.src == "javascript:'<html></html>';"){ - // First time around, do not delete. - // We reload to blank page, so that reloading main page - // does not re-submit the post. - - if (toDeleteFlag) { - // Fix busy state in FF3 - setTimeout(function(){ - removeNode(iframe); - }, 0); - } - - return; - } - - var doc = iframe.contentDocument ? iframe.contentDocument : window.frames[iframe.id].document; - - // fixing Opera 9.26,10.00 - if (doc.readyState && doc.readyState != 'complete') { - // Opera fires load event multiple times - // Even when the DOM is not ready yet - // this fix should not affect other browsers - return; - } - - // fixing Opera 9.64 - if (doc.body && doc.body.innerHTML == "false") { - // In Opera 9.64 event was fired second time - // when body.innerHTML changed from false - // to server response approx. after 1 sec - return; - } - - var response; - - if (doc.XMLDocument) { - // response is a xml document Internet Explorer property - response = doc.XMLDocument; - } else if (doc.body){ - // response is html document or plain text - response = doc.body.innerHTML; - - if (settings.responseType && settings.responseType.toLowerCase() == 'json') { - // If the document was sent as 'application/javascript' or - // 'text/javascript', then the browser wraps the text in a <pre> - // tag and performs html encoding on the contents. In this case, - // we need to pull the original text content from the text node's - // nodeValue property to retrieve the unmangled content. - // Note that IE6 only understands text/html - if (doc.body.firstChild && doc.body.firstChild.nodeName.toUpperCase() == 'PRE') { - response = doc.body.firstChild.firstChild.nodeValue; - } - - if (response) { - response = eval("(" + response + ")"); - } else { - response = {}; - } - } - } else { - // response is a xml document - response = doc; - } - - settings.onComplete.call(self, file, response); - - // Reload blank page, so that reloading main page - // does not re-submit the post. Also, remember to - // delete the frame - toDeleteFlag = true; - - // Fix IE mixed content issue - iframe.src = "javascript:'<html></html>';"; - }); - }, - /** - * Upload file contained in this._input - */ - submit: function(){ - var self = this, settings = this._settings; - - if ( ! this._input || this._input.value === ''){ - return; - } - - var file = fileFromPath(this._input.value); - - // user returned false to cancel upload - if (false === settings.onSubmit.call(this, file, getExt(file))){ - this._clearInput(); - return; - } - - // sending request - var iframe = this._createIframe(); - var form = this._createForm(iframe); - - // assuming following structure - // div -> input type='file' - removeNode(this._input.parentNode); - removeClass(self._button, self._settings.hoverClass); - - form.appendChild(this._input); - - form.submit(); - - // request set, clean up - removeNode(form); form = null; - removeNode(this._input); this._input = null; - - // Get response from iframe and fire onComplete event when ready - this._getResponse(iframe, file); - - // get ready for next request - this._createInput(); - } - }; -})(); diff --git a/nz-admin/src/main/resources/statics/libs/app.js b/nz-admin/src/main/resources/statics/libs/app.js deleted file mode 100644 index 2a1cdedb..00000000 --- a/nz-admin/src/main/resources/statics/libs/app.js +++ /dev/null @@ -1,772 +0,0 @@ -/*! AdminLTE app.js - * ================ - * Main JS application file for AdminLTE v2. This file - * should be included in all pages. It controls some layout - * options and implements exclusive AdminLTE plugins. - * - * @Author Almsaeed Studio - * @Support <http://www.almsaeedstudio.com> - * @Email <[email protected]> - * @version 2.3.8 - * @license MIT <http://opensource.org/licenses/MIT> - */ - -//Make sure jQuery has been loaded before app.js -if (typeof jQuery === "undefined") { - throw new Error("AdminLTE requires jQuery"); -} - -/* AdminLTE - * - * @type Object - * @description $.AdminLTE is the main object for the template's app. - * It's used for implementing functions and options related - * to the template. Keeping everything wrapped in an object - * prevents conflict with other plugins and is a better - * way to organize our code. - */ -$.AdminLTE = {}; - -/* -------------------- - * - AdminLTE Options - - * -------------------- - * Modify these options to suit your implementation - */ -$.AdminLTE.options = { - //Add slimscroll to navbar menus - //This requires you to load the slimscroll plugin - //in every page before app.js - navbarMenuSlimscroll: true, - navbarMenuSlimscrollWidth: "3px", //The width of the scroll bar - navbarMenuHeight: "200px", //The height of the inner menu - //General animation speed for JS animated elements such as box collapse/expand and - //sidebar treeview slide up/down. This options accepts an integer as milliseconds, - //'fast', 'normal', or 'slow' - animationSpeed: 'fast', - //Sidebar push menu toggle button selector - sidebarToggleSelector: "[data-toggle='offcanvas']", - //Activate sidebar push menu - sidebarPushMenu: true, - //Activate sidebar slimscroll if the fixed layout is set (requires SlimScroll Plugin) - sidebarSlimScroll: true, - //Enable sidebar expand on hover effect for sidebar mini - //This option is forced to true if both the fixed layout and sidebar mini - //are used together - sidebarExpandOnHover: false, - //BoxRefresh Plugin - enableBoxRefresh: true, - //Bootstrap.js tooltip - enableBSToppltip: true, - BSTooltipSelector: "[data-toggle='tooltip']", - //Enable Fast Click. Fastclick.js creates a more - //native touch experience with touch devices. If you - //choose to enable the plugin, make sure you load the script - //before AdminLTE's app.js - enableFastclick: false, - //Control Sidebar Tree views - enableControlTreeView: true, - //Control Sidebar Options - enableControlSidebar: true, - controlSidebarOptions: { - //Which button should trigger the open/close event - toggleBtnSelector: "[data-toggle='control-sidebar']", - //The sidebar selector - selector: ".control-sidebar", - //Enable slide over content - slide: true - }, - //Box Widget Plugin. Enable this plugin - //to allow boxes to be collapsed and/or removed - enableBoxWidget: true, - //Box Widget plugin options - boxWidgetOptions: { - boxWidgetIcons: { - //Collapse icon - collapse: 'fa-minus', - //Open icon - open: 'fa-plus', - //Remove icon - remove: 'fa-times' - }, - boxWidgetSelectors: { - //Remove button selector - remove: '[data-widget="remove"]', - //Collapse button selector - collapse: '[data-widget="collapse"]' - } - }, - //Direct Chat plugin options - directChat: { - //Enable direct chat by default - enable: true, - //The button to open and close the chat contacts pane - contactToggleSelector: '[data-widget="chat-pane-toggle"]' - }, - //Define the set of colors to use globally around the website - colors: { - lightBlue: "#3c8dbc", - red: "#f56954", - green: "#00a65a", - aqua: "#00c0ef", - yellow: "#f39c12", - blue: "#0073b7", - navy: "#001F3F", - teal: "#39CCCC", - olive: "#3D9970", - lime: "#01FF70", - orange: "#FF851B", - fuchsia: "#F012BE", - purple: "#8E24AA", - maroon: "#D81B60", - black: "#222222", - gray: "#d2d6de" - }, - //The standard screen sizes that bootstrap uses. - //If you change these in the variables.less file, change - //them here too. - screenSizes: { - xs: 480, - sm: 768, - md: 992, - lg: 1200 - } -}; - -/* ------------------ - * - Implementation - - * ------------------ - * The next block of code implements AdminLTE's - * functions and plugins as specified by the - * options above. - */ -$(function () { - "use strict"; - - //Fix for IE page transitions - $("body").removeClass("hold-transition"); - - //Extend options if external options exist - if (typeof AdminLTEOptions !== "undefined") { - $.extend(true, - $.AdminLTE.options, - AdminLTEOptions); - } - - //Easy access to options - var o = $.AdminLTE.options; - - //Set up the object - _init(); - - //Activate the layout maker - $.AdminLTE.layout.activate(); - - //Enable sidebar tree view controls - if (o.enableControlTreeView) { - $.AdminLTE.tree('.sidebar'); - } - - //Enable control sidebar - if (o.enableControlSidebar) { - $.AdminLTE.controlSidebar.activate(); - } - - //Add slimscroll to navbar dropdown - if (o.navbarMenuSlimscroll && typeof $.fn.slimscroll != 'undefined') { - $(".navbar .menu").slimscroll({ - height: o.navbarMenuHeight, - alwaysVisible: false, - size: o.navbarMenuSlimscrollWidth - }).css("width", "100%"); - } - - //Activate sidebar push menu - if (o.sidebarPushMenu) { - $.AdminLTE.pushMenu.activate(o.sidebarToggleSelector); - } - - //Activate Bootstrap tooltip - if (o.enableBSToppltip) { - $('body').tooltip({ - selector: o.BSTooltipSelector, - container: 'body' - }); - } - - //Activate box widget - if (o.enableBoxWidget) { - $.AdminLTE.boxWidget.activate(); - } - - //Activate fast click - if (o.enableFastclick && typeof FastClick != 'undefined') { - FastClick.attach(document.body); - } - - //Activate direct chat widget - if (o.directChat.enable) { - $(document).on('click', o.directChat.contactToggleSelector, function () { - var box = $(this).parents('.direct-chat').first(); - box.toggleClass('direct-chat-contacts-open'); - }); - } - - /* - * INITIALIZE BUTTON TOGGLE - * ------------------------ - */ - $('.btn-group[data-toggle="btn-toggle"]').each(function () { - var group = $(this); - $(this).find(".btn").on('click', function (e) { - group.find(".btn.active").removeClass("active"); - $(this).addClass("active"); - e.preventDefault(); - }); - - }); -}); - -/* ---------------------------------- - * - Initialize the AdminLTE Object - - * ---------------------------------- - * All AdminLTE functions are implemented below. - */ -function _init() { - 'use strict'; - /* Layout - * ====== - * Fixes the layout height in case min-height fails. - * - * @type Object - * @usage $.AdminLTE.layout.activate() - * $.AdminLTE.layout.fix() - * $.AdminLTE.layout.fixSidebar() - */ - $.AdminLTE.layout = { - activate: function () { - var _this = this; - _this.fix(); - _this.fixSidebar(); - $('body, html, .wrapper').css('height', 'auto'); - $(window, ".wrapper").resize(function () { - _this.fix(); - _this.fixSidebar(); - }); - }, - fix: function () { - // Remove overflow from .wrapper if layout-boxed exists - $(".layout-boxed > .wrapper").css('overflow', 'hidden'); - //Get window height and the wrapper height - var footer_height = $('.main-footer').outerHeight() || 0; - var neg = $('.main-header').outerHeight() + footer_height; - var window_height = $(window).height(); - var sidebar_height = $(".sidebar").height() || 0; - //Set the min-height of the content and sidebar based on the - //the height of the document. - if ($("body").hasClass("fixed")) { - $(".content-wrapper, .right-side").css('min-height', window_height - footer_height); - } else { - var postSetWidth; - if (window_height >= sidebar_height) { - $(".content-wrapper, .right-side").css('min-height', window_height - neg); - postSetWidth = window_height - neg; - } else { - $(".content-wrapper, .right-side").css('min-height', sidebar_height); - postSetWidth = sidebar_height; - } - - //Fix for the control sidebar height - var controlSidebar = $($.AdminLTE.options.controlSidebarOptions.selector); - if (typeof controlSidebar !== "undefined") { - if (controlSidebar.height() > postSetWidth) - $(".content-wrapper, .right-side").css('min-height', controlSidebar.height()); - } - - } - }, - fixSidebar: function () { - //Make sure the body tag has the .fixed class - if (!$("body").hasClass("fixed")) { - if (typeof $.fn.slimScroll != 'undefined') { - $(".sidebar").slimScroll({destroy: true}).height("auto"); - } - return; - } else if (typeof $.fn.slimScroll == 'undefined' && window.console) { - window.console.error("Error: the fixed layout requires the slimscroll plugin!"); - } - //Enable slimscroll for fixed layout - if ($.AdminLTE.options.sidebarSlimScroll) { - if (typeof $.fn.slimScroll != 'undefined') { - //Destroy if it exists - $(".sidebar").slimScroll({destroy: true}).height("auto"); - //Add slimscroll - $(".sidebar").slimScroll({ - height: ($(window).height() - $(".main-header").height()) + "px", - color: "rgba(0,0,0,0.2)", - size: "3px" - }); - } - } - } - }; - - /* PushMenu() - * ========== - * Adds the push menu functionality to the sidebar. - * - * @type Function - * @usage: $.AdminLTE.pushMenu("[data-toggle='offcanvas']") - */ - $.AdminLTE.pushMenu = { - activate: function (toggleBtn) { - //Get the screen sizes - var screenSizes = $.AdminLTE.options.screenSizes; - - //Enable sidebar toggle - $(document).on('click', toggleBtn, function (e) { - e.preventDefault(); - - //Enable sidebar push menu - if ($(window).width() > (screenSizes.sm - 1)) { - if ($("body").hasClass('sidebar-collapse')) { - $("body").removeClass('sidebar-collapse').trigger('expanded.pushMenu'); - } else { - $("body").addClass('sidebar-collapse').trigger('collapsed.pushMenu'); - } - } - //Handle sidebar push menu for small screens - else { - if ($("body").hasClass('sidebar-open')) { - $("body").removeClass('sidebar-open').removeClass('sidebar-collapse').trigger('collapsed.pushMenu'); - } else { - $("body").addClass('sidebar-open').trigger('expanded.pushMenu'); - } - } - }); - - $(".content-wrapper").click(function () { - //Enable hide menu when clicking on the content-wrapper on small screens - if ($(window).width() <= (screenSizes.sm - 1) && $("body").hasClass("sidebar-open")) { - $("body").removeClass('sidebar-open'); - } - }); - - //Enable expand on hover for sidebar mini - if ($.AdminLTE.options.sidebarExpandOnHover - || ($('body').hasClass('fixed') - && $('body').hasClass('sidebar-mini'))) { - this.expandOnHover(); - } - }, - expandOnHover: function () { - var _this = this; - var screenWidth = $.AdminLTE.options.screenSizes.sm - 1; - //Expand sidebar on hover - $('.main-sidebar').hover(function () { - if ($('body').hasClass('sidebar-mini') - && $("body").hasClass('sidebar-collapse') - && $(window).width() > screenWidth) { - _this.expand(); - } - }, function () { - if ($('body').hasClass('sidebar-mini') - && $('body').hasClass('sidebar-expanded-on-hover') - && $(window).width() > screenWidth) { - _this.collapse(); - } - }); - }, - expand: function () { - $("body").removeClass('sidebar-collapse').addClass('sidebar-expanded-on-hover'); - }, - collapse: function () { - if ($('body').hasClass('sidebar-expanded-on-hover')) { - $('body').removeClass('sidebar-expanded-on-hover').addClass('sidebar-collapse'); - } - } - }; - - /* Tree() - * ====== - * Converts the sidebar into a multilevel - * tree view menu. - * - * @type Function - * @Usage: $.AdminLTE.tree('.sidebar') - */ - $.AdminLTE.tree = function (menu) { - var _this = this; - var animationSpeed = $.AdminLTE.options.animationSpeed; - $(document).off('click', menu + ' li a') - .on('click', menu + ' li a', function (e) { - //Get the clicked link and the next element - var $this = $(this); - var checkElement = $this.next(); - - //Check if the next element is a menu and is visible - if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible')) && (!$('body').hasClass('sidebar-collapse'))) { - //Close the menu - checkElement.slideUp(animationSpeed, function () { - checkElement.removeClass('menu-open'); - //Fix the layout in case the sidebar stretches over the height of the window - //_this.layout.fix(); - }); - checkElement.parent("li").removeClass("active"); - } - //If the menu is not visible - else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) { - //Get the parent menu - var parent = $this.parents('ul').first(); - //Close all open menus within the parent - var ul = parent.find('ul:visible').slideUp(animationSpeed); - //Remove the menu-open class from the parent - ul.removeClass('menu-open'); - //Get the parent li - var parent_li = $this.parent("li"); - - //Open the target menu and add the menu-open class - checkElement.slideDown(animationSpeed, function () { - //Add the class active to the parent li - checkElement.addClass('menu-open'); - parent.find('li.active').removeClass('active'); - parent_li.addClass('active'); - //Fix the layout in case the sidebar stretches over the height of the window - _this.layout.fix(); - }); - } - //if this isn't a link, prevent the page from being redirected - if (checkElement.is('.treeview-menu')) { - e.preventDefault(); - } - }); - }; - - /* ControlSidebar - * ============== - * Adds functionality to the right sidebar - * - * @type Object - * @usage $.AdminLTE.controlSidebar.activate(options) - */ - $.AdminLTE.controlSidebar = { - //instantiate the object - activate: function () { - //Get the object - var _this = this; - //Update options - var o = $.AdminLTE.options.controlSidebarOptions; - //Get the sidebar - var sidebar = $(o.selector); - //The toggle button - var btn = $(o.toggleBtnSelector); - - //Listen to the click event - btn.on('click', function (e) { - e.preventDefault(); - //If the sidebar is not open - if (!sidebar.hasClass('control-sidebar-open') - && !$('body').hasClass('control-sidebar-open')) { - //Open the sidebar - _this.open(sidebar, o.slide); - } else { - _this.close(sidebar, o.slide); - } - }); - - //If the body has a boxed layout, fix the sidebar bg position - var bg = $(".control-sidebar-bg"); - _this._fix(bg); - - //If the body has a fixed layout, make the control sidebar fixed - if ($('body').hasClass('fixed')) { - _this._fixForFixed(sidebar); - } else { - //If the content height is less than the sidebar's height, force max height - if ($('.content-wrapper, .right-side').height() < sidebar.height()) { - _this._fixForContent(sidebar); - } - } - }, - //Open the control sidebar - open: function (sidebar, slide) { - //Slide over content - if (slide) { - sidebar.addClass('control-sidebar-open'); - } else { - //Push the content by adding the open class to the body instead - //of the sidebar itself - $('body').addClass('control-sidebar-open'); - } - }, - //Close the control sidebar - close: function (sidebar, slide) { - if (slide) { - sidebar.removeClass('control-sidebar-open'); - } else { - $('body').removeClass('control-sidebar-open'); - } - }, - _fix: function (sidebar) { - var _this = this; - if ($("body").hasClass('layout-boxed')) { - sidebar.css('position', 'absolute'); - sidebar.height($(".wrapper").height()); - if (_this.hasBindedResize) { - return; - } - $(window).resize(function () { - _this._fix(sidebar); - }); - _this.hasBindedResize = true; - } else { - sidebar.css({ - 'position': 'fixed', - 'height': 'auto' - }); - } - }, - _fixForFixed: function (sidebar) { - sidebar.css({ - 'position': 'fixed', - 'max-height': '100%', - 'overflow': 'auto', - 'padding-bottom': '50px' - }); - }, - _fixForContent: function (sidebar) { - $(".content-wrapper, .right-side").css('min-height', sidebar.height()); - } - }; - - /* BoxWidget - * ========= - * BoxWidget is a plugin to handle collapsing and - * removing boxes from the screen. - * - * @type Object - * @usage $.AdminLTE.boxWidget.activate() - * Set all your options in the main $.AdminLTE.options object - */ - $.AdminLTE.boxWidget = { - selectors: $.AdminLTE.options.boxWidgetOptions.boxWidgetSelectors, - icons: $.AdminLTE.options.boxWidgetOptions.boxWidgetIcons, - animationSpeed: $.AdminLTE.options.animationSpeed, - activate: function (_box) { - var _this = this; - if (!_box) { - _box = document; // activate all boxes per default - } - //Listen for collapse event triggers - $(_box).on('click', _this.selectors.collapse, function (e) { - e.preventDefault(); - _this.collapse($(this)); - }); - - //Listen for remove event triggers - $(_box).on('click', _this.selectors.remove, function (e) { - e.preventDefault(); - _this.remove($(this)); - }); - }, - collapse: function (element) { - var _this = this; - //Find the box parent - var box = element.parents(".box").first(); - //Find the body and the footer - var box_content = box.find("> .box-body, > .box-footer, > form >.box-body, > form > .box-footer"); - if (!box.hasClass("collapsed-box")) { - //Convert minus into plus - element.children(":first") - .removeClass(_this.icons.collapse) - .addClass(_this.icons.open); - //Hide the content - box_content.slideUp(_this.animationSpeed, function () { - box.addClass("collapsed-box"); - }); - } else { - //Convert plus into minus - element.children(":first") - .removeClass(_this.icons.open) - .addClass(_this.icons.collapse); - //Show the content - box_content.slideDown(_this.animationSpeed, function () { - box.removeClass("collapsed-box"); - }); - } - }, - remove: function (element) { - //Find the box parent - var box = element.parents(".box").first(); - box.slideUp(this.animationSpeed); - } - }; -} - -/* ------------------ - * - Custom Plugins - - * ------------------ - * All custom plugins are defined below. - */ - -/* - * BOX REFRESH BUTTON - * ------------------ - * This is a custom plugin to use with the component BOX. It allows you to add - * a refresh button to the box. It converts the box's state to a loading state. - * - * @type plugin - * @usage $("#box-widget").boxRefresh( options ); - */ -(function ($) { - - "use strict"; - - $.fn.boxRefresh = function (options) { - - // Render options - var settings = $.extend({ - //Refresh button selector - trigger: ".refresh-btn", - //File source to be loaded (e.g: ajax/src.php) - source: "", - //Callbacks - onLoadStart: function (box) { - return box; - }, //Right after the button has been clicked - onLoadDone: function (box) { - return box; - } //When the source has been loaded - - }, options); - - //The overlay - var overlay = $('<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>'); - - return this.each(function () { - //if a source is specified - if (settings.source === "") { - if (window.console) { - window.console.log("Please specify a source first - boxRefresh()"); - } - return; - } - //the box - var box = $(this); - //the button - var rBtn = box.find(settings.trigger).first(); - - //On trigger click - rBtn.on('click', function (e) { - e.preventDefault(); - //Add loading overlay - start(box); - - //Perform ajax call - box.find(".box-body").load(settings.source, function () { - done(box); - }); - }); - }); - - function start(box) { - //Add overlay and loading img - box.append(overlay); - - settings.onLoadStart.call(box); - } - - function done(box) { - //Remove overlay and loading img - box.find(overlay).remove(); - - settings.onLoadDone.call(box); - } - - }; - -})(jQuery); - -/* - * EXPLICIT BOX CONTROLS - * ----------------------- - * This is a custom plugin to use with the component BOX. It allows you to activate - * a box inserted in the DOM after the app.js was loaded, toggle and remove box. - * - * @type plugin - * @usage $("#box-widget").activateBox(); - * @usage $("#box-widget").toggleBox(); - * @usage $("#box-widget").removeBox(); - */ -(function ($) { - - 'use strict'; - - $.fn.activateBox = function () { - $.AdminLTE.boxWidget.activate(this); - }; - - $.fn.toggleBox = function () { - var button = $($.AdminLTE.boxWidget.selectors.collapse, this); - $.AdminLTE.boxWidget.collapse(button); - }; - - $.fn.removeBox = function () { - var button = $($.AdminLTE.boxWidget.selectors.remove, this); - $.AdminLTE.boxWidget.remove(button); - }; - -})(jQuery); - -/* - * TODO LIST CUSTOM PLUGIN - * ----------------------- - * This plugin depends on iCheck plugin for checkbox and radio inputs - * - * @type plugin - * @usage $("#todo-widget").todolist( options ); - */ -(function ($) { - - 'use strict'; - - $.fn.todolist = function (options) { - // Render options - var settings = $.extend({ - //When the user checks the input - onCheck: function (ele) { - return ele; - }, - //When the user unchecks the input - onUncheck: function (ele) { - return ele; - } - }, options); - - return this.each(function () { - - if (typeof $.fn.iCheck != 'undefined') { - $('input', this).on('ifChecked', function () { - var ele = $(this).parents("li").first(); - ele.toggleClass("done"); - settings.onCheck.call(ele); - }); - - $('input', this).on('ifUnchecked', function () { - var ele = $(this).parents("li").first(); - ele.toggleClass("done"); - settings.onUncheck.call(ele); - }); - } else { - $('input', this).on('change', function () { - var ele = $(this).parents("li").first(); - ele.toggleClass("done"); - if ($('input', ele).is(":checked")) { - settings.onCheck.call(ele); - } else { - settings.onUncheck.call(ele); - } - }); - } - }); - }; -}(jQuery)); diff --git a/nz-admin/src/main/resources/statics/libs/app.min.js b/nz-admin/src/main/resources/statics/libs/app.min.js deleted file mode 100644 index 4851def3..00000000 --- a/nz-admin/src/main/resources/statics/libs/app.min.js +++ /dev/null @@ -1,13 +0,0 @@ -/*! AdminLTE app.js - * ================ - * Main JS application file for AdminLTE v2. This file - * should be included in all pages. It controls some layout - * options and implements exclusive AdminLTE plugins. - * - * @Author Almsaeed Studio - * @Support <http://www.almsaeedstudio.com> - * @Email <[email protected]> - * @version 2.3.8 - * @license MIT <http://opensource.org/licenses/MIT> - */ -function _init(){"use strict";$.AdminLTE.layout={activate:function(){var a=this;a.fix(),a.fixSidebar(),$("body, html, .wrapper").css("height","auto"),$(window,".wrapper").resize(function(){a.fix(),a.fixSidebar()})},fix:function(){$(".layout-boxed > .wrapper").css("overflow","hidden");var a=$(".main-footer").outerHeight()||0,b=$(".main-header").outerHeight()+a,c=$(window).height(),d=$(".sidebar").height()||0;if($("body").hasClass("fixed"))$(".content-wrapper, .right-side").css("min-height",c-a);else{var e;c>=d?($(".content-wrapper, .right-side").css("min-height",c-b),e=c-b):($(".content-wrapper, .right-side").css("min-height",d),e=d);var f=$($.AdminLTE.options.controlSidebarOptions.selector);"undefined"!=typeof f&&f.height()>e&&$(".content-wrapper, .right-side").css("min-height",f.height())}},fixSidebar:function(){return $("body").hasClass("fixed")?("undefined"==typeof $.fn.slimScroll&&window.console&&window.console.error("Error: the fixed layout requires the slimscroll plugin!"),void($.AdminLTE.options.sidebarSlimScroll&&"undefined"!=typeof $.fn.slimScroll&&($(".sidebar").slimScroll({destroy:!0}).height("auto"),$(".sidebar").slimScroll({height:$(window).height()-$(".main-header").height()+"px",color:"rgba(0,0,0,0.2)",size:"3px"})))):void("undefined"!=typeof $.fn.slimScroll&&$(".sidebar").slimScroll({destroy:!0}).height("auto"))}},$.AdminLTE.pushMenu={activate:function(a){var b=$.AdminLTE.options.screenSizes;$(document).on("click",a,function(a){a.preventDefault(),$(window).width()>b.sm-1?$("body").hasClass("sidebar-collapse")?$("body").removeClass("sidebar-collapse").trigger("expanded.pushMenu"):$("body").addClass("sidebar-collapse").trigger("collapsed.pushMenu"):$("body").hasClass("sidebar-open")?$("body").removeClass("sidebar-open").removeClass("sidebar-collapse").trigger("collapsed.pushMenu"):$("body").addClass("sidebar-open").trigger("expanded.pushMenu")}),$(".content-wrapper").click(function(){$(window).width()<=b.sm-1&&$("body").hasClass("sidebar-open")&&$("body").removeClass("sidebar-open")}),($.AdminLTE.options.sidebarExpandOnHover||$("body").hasClass("fixed")&&$("body").hasClass("sidebar-mini"))&&this.expandOnHover()},expandOnHover:function(){var a=this,b=$.AdminLTE.options.screenSizes.sm-1;$(".main-sidebar").hover(function(){$("body").hasClass("sidebar-mini")&&$("body").hasClass("sidebar-collapse")&&$(window).width()>b&&a.expand()},function(){$("body").hasClass("sidebar-mini")&&$("body").hasClass("sidebar-expanded-on-hover")&&$(window).width()>b&&a.collapse()})},expand:function(){$("body").removeClass("sidebar-collapse").addClass("sidebar-expanded-on-hover")},collapse:function(){$("body").hasClass("sidebar-expanded-on-hover")&&$("body").removeClass("sidebar-expanded-on-hover").addClass("sidebar-collapse")}},$.AdminLTE.tree=function(a){var b=this,c=$.AdminLTE.options.animationSpeed;$(document).off("click",a+" li a").on("click",a+" li a",function(a){var d=$(this),e=d.next();if(e.is(".treeview-menu")&&e.is(":visible")&&!$("body").hasClass("sidebar-collapse"))e.slideUp(c,function(){e.removeClass("menu-open")}),e.parent("li").removeClass("active");else if(e.is(".treeview-menu")&&!e.is(":visible")){var f=d.parents("ul").first(),g=f.find("ul:visible").slideUp(c);g.removeClass("menu-open");var h=d.parent("li");e.slideDown(c,function(){e.addClass("menu-open"),f.find("li.active").removeClass("active"),h.addClass("active"),b.layout.fix()})}e.is(".treeview-menu")&&a.preventDefault()})},$.AdminLTE.controlSidebar={activate:function(){var a=this,b=$.AdminLTE.options.controlSidebarOptions,c=$(b.selector),d=$(b.toggleBtnSelector);d.on("click",function(d){d.preventDefault(),c.hasClass("control-sidebar-open")||$("body").hasClass("control-sidebar-open")?a.close(c,b.slide):a.open(c,b.slide)});var e=$(".control-sidebar-bg");a._fix(e),$("body").hasClass("fixed")?a._fixForFixed(c):$(".content-wrapper, .right-side").height()<c.height()&&a._fixForContent(c)},open:function(a,b){b?a.addClass("control-sidebar-open"):$("body").addClass("control-sidebar-open")},close:function(a,b){b?a.removeClass("control-sidebar-open"):$("body").removeClass("control-sidebar-open")},_fix:function(a){var b=this;if($("body").hasClass("layout-boxed")){if(a.css("position","absolute"),a.height($(".wrapper").height()),b.hasBindedResize)return;$(window).resize(function(){b._fix(a)}),b.hasBindedResize=!0}else a.css({position:"fixed",height:"auto"})},_fixForFixed:function(a){a.css({position:"fixed","max-height":"100%",overflow:"auto","padding-bottom":"50px"})},_fixForContent:function(a){$(".content-wrapper, .right-side").css("min-height",a.height())}},$.AdminLTE.boxWidget={selectors:$.AdminLTE.options.boxWidgetOptions.boxWidgetSelectors,icons:$.AdminLTE.options.boxWidgetOptions.boxWidgetIcons,animationSpeed:$.AdminLTE.options.animationSpeed,activate:function(a){var b=this;a||(a=document),$(a).on("click",b.selectors.collapse,function(a){a.preventDefault(),b.collapse($(this))}),$(a).on("click",b.selectors.remove,function(a){a.preventDefault(),b.remove($(this))})},collapse:function(a){var b=this,c=a.parents(".box").first(),d=c.find("> .box-body, > .box-footer, > form >.box-body, > form > .box-footer");c.hasClass("collapsed-box")?(a.children(":first").removeClass(b.icons.open).addClass(b.icons.collapse),d.slideDown(b.animationSpeed,function(){c.removeClass("collapsed-box")})):(a.children(":first").removeClass(b.icons.collapse).addClass(b.icons.open),d.slideUp(b.animationSpeed,function(){c.addClass("collapsed-box")}))},remove:function(a){var b=a.parents(".box").first();b.slideUp(this.animationSpeed)}}}if("undefined"==typeof jQuery)throw new Error("AdminLTE requires jQuery");$.AdminLTE={},$.AdminLTE.options={navbarMenuSlimscroll:!0,navbarMenuSlimscrollWidth:"3px",navbarMenuHeight:"200px",animationSpeed:500,sidebarToggleSelector:"[data-toggle='offcanvas']",sidebarPushMenu:!0,sidebarSlimScroll:!0,sidebarExpandOnHover:!1,enableBoxRefresh:!0,enableBSToppltip:!0,BSTooltipSelector:"[data-toggle='tooltip']",enableFastclick:!1,enableControlTreeView:!0,enableControlSidebar:!0,controlSidebarOptions:{toggleBtnSelector:"[data-toggle='control-sidebar']",selector:".control-sidebar",slide:!0},enableBoxWidget:!0,boxWidgetOptions:{boxWidgetIcons:{collapse:"fa-minus",open:"fa-plus",remove:"fa-times"},boxWidgetSelectors:{remove:'[data-widget="remove"]',collapse:'[data-widget="collapse"]'}},directChat:{enable:!0,contactToggleSelector:'[data-widget="chat-pane-toggle"]'},colors:{lightBlue:"#3c8dbc",red:"#f56954",green:"#00a65a",aqua:"#00c0ef",yellow:"#f39c12",blue:"#0073b7",navy:"#001F3F",teal:"#39CCCC",olive:"#3D9970",lime:"#01FF70",orange:"#FF851B",fuchsia:"#F012BE",purple:"#8E24AA",maroon:"#D81B60",black:"#222222",gray:"#d2d6de"},screenSizes:{xs:480,sm:768,md:992,lg:1200}},$(function(){"use strict";$("body").removeClass("hold-transition"),"undefined"!=typeof AdminLTEOptions&&$.extend(!0,$.AdminLTE.options,AdminLTEOptions);var a=$.AdminLTE.options;_init(),$.AdminLTE.layout.activate(),a.enableControlTreeView&&$.AdminLTE.tree(".sidebar"),a.enableControlSidebar&&$.AdminLTE.controlSidebar.activate(),a.navbarMenuSlimscroll&&"undefined"!=typeof $.fn.slimscroll&&$(".navbar .menu").slimscroll({height:a.navbarMenuHeight,alwaysVisible:!1,size:a.navbarMenuSlimscrollWidth}).css("width","100%"),a.sidebarPushMenu&&$.AdminLTE.pushMenu.activate(a.sidebarToggleSelector),a.enableBSToppltip&&$("body").tooltip({selector:a.BSTooltipSelector,container:"body"}),a.enableBoxWidget&&$.AdminLTE.boxWidget.activate(),a.enableFastclick&&"undefined"!=typeof FastClick&&FastClick.attach(document.body),a.directChat.enable&&$(document).on("click",a.directChat.contactToggleSelector,function(){var a=$(this).parents(".direct-chat").first();a.toggleClass("direct-chat-contacts-open")}),$('.btn-group[data-toggle="btn-toggle"]').each(function(){var a=$(this);$(this).find(".btn").on("click",function(b){a.find(".btn.active").removeClass("active"),$(this).addClass("active"),b.preventDefault()})})}),function(a){"use strict";a.fn.boxRefresh=function(b){function c(a){a.append(f),e.onLoadStart.call(a)}function d(a){a.find(f).remove(),e.onLoadDone.call(a)}var e=a.extend({trigger:".refresh-btn",source:"",onLoadStart:function(a){return a},onLoadDone:function(a){return a}},b),f=a('<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>');return this.each(function(){if(""===e.source)return void(window.console&&window.console.log("Please specify a source first - boxRefresh()"));var b=a(this),f=b.find(e.trigger).first();f.on("click",function(a){a.preventDefault(),c(b),b.find(".box-body").load(e.source,function(){d(b)})})})}}(jQuery),function(a){"use strict";a.fn.activateBox=function(){a.AdminLTE.boxWidget.activate(this)},a.fn.toggleBox=function(){var b=a(a.AdminLTE.boxWidget.selectors.collapse,this);a.AdminLTE.boxWidget.collapse(b)},a.fn.removeBox=function(){var b=a(a.AdminLTE.boxWidget.selectors.remove,this);a.AdminLTE.boxWidget.remove(b)}}(jQuery),function(a){"use strict";a.fn.todolist=function(b){var c=a.extend({onCheck:function(a){return a},onUncheck:function(a){return a}},b);return this.each(function(){"undefined"!=typeof a.fn.iCheck?(a("input",this).on("ifChecked",function(){var b=a(this).parents("li").first();b.toggleClass("done"),c.onCheck.call(b)}),a("input",this).on("ifUnchecked",function(){var b=a(this).parents("li").first();b.toggleClass("done"),c.onUncheck.call(b)})):a("input",this).on("change",function(){var b=a(this).parents("li").first();b.toggleClass("done"),a("input",b).is(":checked")?c.onCheck.call(b):c.onUncheck.call(b)})})}}(jQuery);
\ No newline at end of file diff --git a/nz-admin/src/main/resources/statics/libs/axios.min.js b/nz-admin/src/main/resources/statics/libs/axios.min.js deleted file mode 100644 index 933a8c2c..00000000 --- a/nz-admin/src/main/resources/statics/libs/axios.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* axios v0.12.0 | (c) 2016 by Matt Zabriskie */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){e.exports=r(1)},function(e,t,r){"use strict";function n(e){this.defaults=i.merge({},e),this.interceptors={request:new u,response:new u}}var o=r(2),i=r(3),s=r(5),u=r(14),a=r(15),c=r(16),f=r(17),p=r(9);n.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),e=i.merge(o,this.defaults,{method:"get"},e),e.baseURL&&!a(e.url)&&(e.url=c(e.baseURL,e.url)),e.withCredentials=e.withCredentials||this.defaults.withCredentials,e.data=p(e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),i.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});var t=[s,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r};var d=new n(o),l=e.exports=f(n.prototype.request,d);l.request=f(n.prototype.request,d),l.Axios=n,l.defaults=d.defaults,l.interceptors=d.interceptors,l.create=function(e){return new n(e)},l.all=function(e){return Promise.all(e)},l.spread=r(18),i.forEach(["delete","get","head"],function(e){n.prototype[e]=function(t,r){return this.request(i.merge(r||{},{method:e,url:t}))},l[e]=f(n.prototype[e],d)}),i.forEach(["post","put","patch"],function(e){n.prototype[e]=function(t,r,n){return this.request(i.merge(n||{},{method:e,url:t,data:r}))},l[e]=f(n.prototype[e],d)})},function(e,t,r){"use strict";function n(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var o=r(3),i=r(4),s=/^\)\]\}',?\n/,u={"Content-Type":"application/x-www-form-urlencoded"};e.exports={transformRequest:[function(e,t){return i(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(n(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)?(n(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e){e=e.replace(s,"");try{e=JSON.parse(e)}catch(t){}}return e}],headers:{common:{Accept:"application/json, text/plain, */*"},patch:o.merge(u),post:o.merge(u),put:o.merge(u)},timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&300>e}}},function(e,t){"use strict";function r(e){return"[object Array]"===x.call(e)}function n(e){return"[object ArrayBuffer]"===x.call(e)}function o(e){return"undefined"!=typeof FormData&&e instanceof FormData}function i(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function s(e){return"string"==typeof e}function u(e){return"number"==typeof e}function a(e){return"undefined"==typeof e}function c(e){return null!==e&&"object"==typeof e}function f(e){return"[object Date]"===x.call(e)}function p(e){return"[object File]"===x.call(e)}function d(e){return"[object Blob]"===x.call(e)}function l(e){return"[object Function]"===x.call(e)}function h(e){return c(e)&&l(e.pipe)}function m(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function y(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function w(){return"undefined"!=typeof window&&"undefined"!=typeof document&&"function"==typeof document.createElement}function g(e,t){if(null!==e&&"undefined"!=typeof e)if("object"==typeof e||r(e)||(e=[e]),r(e))for(var n=0,o=e.length;o>n;n++)t.call(null,e[n],n,e);else for(var i in e)e.hasOwnProperty(i)&&t.call(null,e[i],i,e)}function v(){function e(e,r){"object"==typeof t[r]&&"object"==typeof e?t[r]=v(t[r],e):t[r]=e}for(var t={},r=0,n=arguments.length;n>r;r++)g(arguments[r],e);return t}var x=Object.prototype.toString;e.exports={isArray:r,isArrayBuffer:n,isFormData:o,isArrayBufferView:i,isString:s,isNumber:u,isObject:c,isUndefined:a,isDate:f,isFile:p,isBlob:d,isFunction:l,isStream:h,isURLSearchParams:m,isStandardBrowserEnv:w,forEach:g,merge:v,trim:y}},function(e,t,r){"use strict";var n=r(3);e.exports=function(e,t){n.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}},function(e,t,r){"use strict";e.exports=function(e){return new Promise(function(t,n){try{var o;"function"==typeof e.adapter?o=e.adapter:"undefined"!=typeof XMLHttpRequest?o=r(6):"undefined"!=typeof process&&(o=r(6)),"function"==typeof o&&o(t,n,e)}catch(i){n(i)}})}},function(e,t,r){"use strict";var n=r(3),o=r(7),i=r(8),s=r(9),u=r(10),a="undefined"!=typeof window&&window.btoa||r(11),c=r(12);e.exports=function(e,t,f){var p=f.data,d=f.headers;n.isFormData(p)&&delete d["Content-Type"];var l=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in l||u(f.url)||(l=new window.XDomainRequest,h="onload",m=!0,l.onprogress=function(){},l.ontimeout=function(){}),f.auth){var y=f.auth.username||"",w=f.auth.password||"";d.Authorization="Basic "+a(y+":"+w)}if(l.open(f.method.toUpperCase(),o(f.url,f.params,f.paramsSerializer),!0),l.timeout=f.timeout,l[h]=function(){if(l&&(4===l.readyState||m)&&0!==l.status){var r="getAllResponseHeaders"in l?i(l.getAllResponseHeaders()):null,n=f.responseType&&"text"!==f.responseType?l.response:l.responseText,o={data:s(n,r,f.transformResponse),status:1223===l.status?204:l.status,statusText:1223===l.status?"No Content":l.statusText,headers:r,config:f,request:l};c(e,t,o),l=null}},l.onerror=function(){t(new Error("Network Error")),l=null},l.ontimeout=function(){var e=new Error("timeout of "+f.timeout+"ms exceeded");e.timeout=f.timeout,e.code="ECONNABORTED",t(e),l=null},n.isStandardBrowserEnv()){var g=r(13),v=f.withCredentials||u(f.url)?g.read(f.xsrfCookieName):void 0;v&&(d[f.xsrfHeaderName]=v)}if("setRequestHeader"in l&&n.forEach(d,function(e,t){"undefined"==typeof p&&"content-type"===t.toLowerCase()?delete d[t]:l.setRequestHeader(t,e)}),f.withCredentials&&(l.withCredentials=!0),f.responseType)try{l.responseType=f.responseType}catch(x){if("json"!==l.responseType)throw x}f.progress&&("post"===f.method||"put"===f.method?l.upload.addEventListener("progress",f.progress):"get"===f.method&&l.addEventListener("progress",f.progress)),void 0===p&&(p=null),l.send(p)}},function(e,t,r){"use strict";function n(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=r(3);e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(o.isURLSearchParams(t))i=t.toString();else{var s=[];o.forEach(t,function(e,t){null!==e&&"undefined"!=typeof e&&(o.isArray(e)&&(t+="[]"),o.isArray(e)||(e=[e]),o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),s.push(n(t)+"="+n(e))}))}),i=s.join("&")}return i&&(e+=(-1===e.indexOf("?")?"?":"&")+i),e}},function(e,t,r){"use strict";var n=r(3);e.exports=function(e){var t,r,o,i={};return e?(n.forEach(e.split("\n"),function(e){o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t&&(i[t]=i[t]?i[t]+", "+r:r)}),i):i}},function(e,t,r){"use strict";var n=r(3);e.exports=function(e,t,r){return n.forEach(r,function(r){e=r(e,t)}),e}},function(e,t,r){"use strict";var n=r(3);e.exports=n.isStandardBrowserEnv()?function(){function e(e){var t=e;return r&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,r=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(r){var o=n.isString(r)?e(r):r;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t){"use strict";function r(){this.message="String contains an invalid character"}function n(e){for(var t,n,i=String(e),s="",u=0,a=o;i.charAt(0|u)||(a="=",u%1);s+=a.charAt(63&t>>8-u%1*8)){if(n=i.charCodeAt(u+=.75),n>255)throw new r;t=t<<8|n}return s}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",e.exports=n},function(e,t){"use strict";e.exports=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(r):e(r)}},function(e,t,r){"use strict";var n=r(3);e.exports=n.isStandardBrowserEnv()?function(){return{write:function(e,t,r,o,i,s){var u=[];u.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),n.isString(o)&&u.push("path="+o),n.isString(i)&&u.push("domain="+i),s===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,r){"use strict";function n(){this.handlers=[]}var o=r(3);n.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},n.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},n.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=n},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,"")}},function(e,t){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}}])}); -//# sourceMappingURL=axios.min.map
\ No newline at end of file diff --git a/nz-admin/src/main/resources/statics/libs/bootstrap-table.min.js b/nz-admin/src/main/resources/statics/libs/bootstrap-table.min.js deleted file mode 100644 index d15db75b..00000000 --- a/nz-admin/src/main/resources/statics/libs/bootstrap-table.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/* -* bootstrap-table - v1.11.1 - 2017-02-22 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2017 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";var b=null,c=function(a){var b=arguments,c=!0,d=1;return a=a.replace(/%s/g,function(){var a=b[d++];return"undefined"==typeof a?(c=!1,""):a}),c?a:""},d=function(b,c,d,e){var f="";return a.each(b,function(a,b){return b[c]===e?(f=b[d],!1):!0}),f},e=function(b,c){var d=-1;return a.each(b,function(a,b){return b.field===c?(d=a,!1):!0}),d},f=function(b){var c,d,e,f=0,g=[];for(c=0;c<b[0].length;c++)f+=b[0][c].colspan||1;for(c=0;c<b.length;c++)for(g[c]=[],d=0;f>d;d++)g[c][d]=!1;for(c=0;c<b.length;c++)for(d=0;d<b[c].length;d++){var h=b[c][d],i=h.rowspan||1,j=h.colspan||1,k=a.inArray(!1,g[c]);for(1===j&&(h.fieldIndex=k,"undefined"==typeof h.field&&(h.field=k)),e=0;i>e;e++)g[c+e][k]=!0;for(e=0;j>e;e++)g[c][k+e]=!0}},g=function(){if(null===b){var c,d,e=a("<p/>").addClass("fixed-table-scroll-inner"),f=a("<div/>").addClass("fixed-table-scroll-outer");f.append(e),a("body").append(f),c=e[0].offsetWidth,f.css("overflow","scroll"),d=e[0].offsetWidth,c===d&&(d=f[0].clientWidth),f.remove(),b=c-d}return b},h=function(b,d,e,f){var g=d;if("string"==typeof d){var h=d.split(".");h.length>1?(g=window,a.each(h,function(a,b){g=g[b]})):g=window[d]}return"object"==typeof g?g:"function"==typeof g?g.apply(b,e||[]):!g&&"string"==typeof d&&c.apply(this,[d].concat(e))?c.apply(this,[d].concat(e)):f},i=function(b,c,d){var e=Object.getOwnPropertyNames(b),f=Object.getOwnPropertyNames(c),g="";if(d&&e.length!==f.length)return!1;for(var h=0;h<e.length;h++)if(g=e[h],a.inArray(g,f)>-1&&b[g]!==c[g])return!1;return!0},j=function(a){return"string"==typeof a?a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`"):a},k=function(a){for(var b in a){var c=b.split(/(?=[A-Z])/).join("-").toLowerCase();c!==b&&(a[c]=a[b],delete a[b])}return a},l=function(a,b,c){var d=a;if("string"!=typeof b||a.hasOwnProperty(b))return c?j(a[b]):a[b];var e=b.split(".");for(var f in e)e.hasOwnProperty(f)&&(d=d&&d[e[f]]);return c?j(d):d},m=function(){return!!(navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./))},n=function(){Object.keys||(Object.keys=function(){var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=c.length;return function(e){if("object"!=typeof e&&("function"!=typeof e||null===e))throw new TypeError("Object.keys called on non-object");var f,g,h=[];for(f in e)a.call(e,f)&&h.push(f);if(b)for(g=0;d>g;g++)a.call(e,c[g])&&h.push(c[g]);return h}}())},o=function(b,c){this.options=c,this.$el=a(b),this.$el_=this.$el.clone(),this.timeoutId_=0,this.timeoutFooter_=0,this.init()};o.DEFAULTS={classes:"table table-hover",sortClass:void 0,locale:void 0,height:void 0,undefinedText:"-",sortName:void 0,sortOrder:"asc",sortStable:!1,striped:!1,columns:[[]],data:[],totalField:"total",dataField:"rows",method:"get",url:void 0,ajax:void 0,cache:!0,contentType:"application/json",dataType:"json",ajaxOptions:{},queryParams:function(a){return a},queryParamsType:"limit",responseHandler:function(a){return a},pagination:!1,onlyInfoPagination:!1,paginationLoop:!0,sidePagination:"client",totalRows:0,pageNumber:1,pageSize:10,pageList:[10,25,50,100],paginationHAlign:"right",paginationVAlign:"bottom",paginationDetailHAlign:"left",paginationPreText:"‹",paginationNextText:"›",search:!1,searchOnEnterKey:!1,strictSearch:!1,searchAlign:"right",selectItemName:"btSelectItem",showHeader:!0,showFooter:!1,showColumns:!1,showPaginationSwitch:!1,showRefresh:!1,showToggle:!1,buttonsAlign:"right",smartDisplay:!0,escape:!1,minimumCountColumns:1,idField:void 0,uniqueId:void 0,cardView:!1,detailView:!1,detailFormatter:function(){return""},trimOnSearch:!0,clickToSelect:!1,singleSelect:!1,toolbar:void 0,toolbarAlign:"left",checkboxHeader:!0,sortable:!0,silentSort:!0,maintainSelected:!1,searchTimeOut:500,searchText:"",iconSize:void 0,buttonsClass:"default",iconsPrefix:"glyphicon",icons:{paginationSwitchDown:"glyphicon-collapse-down icon-chevron-down",paginationSwitchUp:"glyphicon-collapse-up icon-chevron-up",refresh:"glyphicon-refresh icon-refresh",toggle:"glyphicon-list-alt icon-list-alt",columns:"glyphicon-th icon-th",detailOpen:"glyphicon-plus icon-plus",detailClose:"glyphicon-minus icon-minus"},customSearch:a.noop,customSort:a.noop,rowStyle:function(){return{}},rowAttributes:function(){return{}},footerStyle:function(){return{}},onAll:function(){return!1},onClickCell:function(){return!1},onDblClickCell:function(){return!1},onClickRow:function(){return!1},onDblClickRow:function(){return!1},onSort:function(){return!1},onCheck:function(){return!1},onUncheck:function(){return!1},onCheckAll:function(){return!1},onUncheckAll:function(){return!1},onCheckSome:function(){return!1},onUncheckSome:function(){return!1},onLoadSuccess:function(){return!1},onLoadError:function(){return!1},onColumnSwitch:function(){return!1},onPageChange:function(){return!1},onSearch:function(){return!1},onToggle:function(){return!1},onPreBody:function(){return!1},onPostBody:function(){return!1},onPostHeader:function(){return!1},onExpandRow:function(){return!1},onCollapseRow:function(){return!1},onRefreshOptions:function(){return!1},onRefresh:function(){return!1},onResetView:function(){return!1}},o.LOCALES={},o.LOCALES["en-US"]=o.LOCALES.en={formatLoadingMessage:function(){return"Loading, please wait..."},formatRecordsPerPage:function(a){return c("%s rows per page",a)},formatShowingRows:function(a,b,d){return c("Showing %s to %s of %s rows",a,b,d)},formatDetailPagination:function(a){return c("Showing %s rows",a)},formatSearch:function(){return"Search"},formatNoMatches:function(){return"No matching records found"},formatPaginationSwitch:function(){return"Hide/Show pagination"},formatRefresh:function(){return"Refresh"},formatToggle:function(){return"Toggle"},formatColumns:function(){return"Columns"},formatAllRows:function(){return"All"}},a.extend(o.DEFAULTS,o.LOCALES["en-US"]),o.COLUMN_DEFAULTS={radio:!1,checkbox:!1,checkboxEnabled:!0,field:void 0,title:void 0,titleTooltip:void 0,"class":void 0,align:void 0,halign:void 0,falign:void 0,valign:void 0,width:void 0,sortable:!1,order:"asc",visible:!0,switchable:!0,clickToSelect:!0,formatter:void 0,footerFormatter:void 0,events:void 0,sorter:void 0,sortName:void 0,cellStyle:void 0,searchable:!0,searchFormatter:!0,cardVisible:!0,escape:!1},o.EVENTS={"all.bs.table":"onAll","click-cell.bs.table":"onClickCell","dbl-click-cell.bs.table":"onDblClickCell","click-row.bs.table":"onClickRow","dbl-click-row.bs.table":"onDblClickRow","sort.bs.table":"onSort","check.bs.table":"onCheck","uncheck.bs.table":"onUncheck","check-all.bs.table":"onCheckAll","uncheck-all.bs.table":"onUncheckAll","check-some.bs.table":"onCheckSome","uncheck-some.bs.table":"onUncheckSome","load-success.bs.table":"onLoadSuccess","load-error.bs.table":"onLoadError","column-switch.bs.table":"onColumnSwitch","page-change.bs.table":"onPageChange","search.bs.table":"onSearch","toggle.bs.table":"onToggle","pre-body.bs.table":"onPreBody","post-body.bs.table":"onPostBody","post-header.bs.table":"onPostHeader","expand-row.bs.table":"onExpandRow","collapse-row.bs.table":"onCollapseRow","refresh-options.bs.table":"onRefreshOptions","reset-view.bs.table":"onResetView","refresh.bs.table":"onRefresh"},o.prototype.init=function(){this.initLocale(),this.initContainer(),this.initTable(),this.initHeader(),this.initData(),this.initHiddenRows(),this.initFooter(),this.initToolbar(),this.initPagination(),this.initBody(),this.initSearchText(),this.initServer()},o.prototype.initLocale=function(){if(this.options.locale){var b=this.options.locale.split(/-|_/);b[0].toLowerCase(),b[1]&&b[1].toUpperCase(),a.fn.bootstrapTable.locales[this.options.locale]?a.extend(this.options,a.fn.bootstrapTable.locales[this.options.locale]):a.fn.bootstrapTable.locales[b.join("-")]?a.extend(this.options,a.fn.bootstrapTable.locales[b.join("-")]):a.fn.bootstrapTable.locales[b[0]]&&a.extend(this.options,a.fn.bootstrapTable.locales[b[0]])}},o.prototype.initContainer=function(){this.$container=a(['<div class="bootstrap-table">','<div class="fixed-table-toolbar"></div>',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'<div class="fixed-table-pagination" style="clear: both;"></div>':"",'<div class="fixed-table-container">','<div class="fixed-table-header"><table></table></div>','<div class="fixed-table-body">','<div class="fixed-table-loading">',this.options.formatLoadingMessage(),"</div>","</div>",'<div class="fixed-table-footer"><table><tr></tr></table></div>',"bottom"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'<div class="fixed-table-pagination"></div>':"","</div>","</div>"].join("")),this.$container.insertAfter(this.$el),this.$tableContainer=this.$container.find(".fixed-table-container"),this.$tableHeader=this.$container.find(".fixed-table-header"),this.$tableBody=this.$container.find(".fixed-table-body"),this.$tableLoading=this.$container.find(".fixed-table-loading"),this.$tableFooter=this.$container.find(".fixed-table-footer"),this.$toolbar=this.$container.find(".fixed-table-toolbar"),this.$pagination=this.$container.find(".fixed-table-pagination"),this.$tableBody.append(this.$el),this.$container.after('<div class="clearfix"></div>'),this.$el.addClass(this.options.classes),this.options.striped&&this.$el.addClass("table-striped"),-1!==a.inArray("table-no-bordered",this.options.classes.split(" "))&&this.$tableContainer.addClass("table-no-bordered")},o.prototype.initTable=function(){var b=this,c=[],d=[];if(this.$header=this.$el.find(">thead"),this.$header.length||(this.$header=a("<thead></thead>").appendTo(this.$el)),this.$header.find("tr").each(function(){var b=[];a(this).find("th").each(function(){"undefined"!=typeof a(this).data("field")&&a(this).data("field",a(this).data("field")+""),b.push(a.extend({},{title:a(this).html(),"class":a(this).attr("class"),titleTooltip:a(this).attr("title"),rowspan:a(this).attr("rowspan")?+a(this).attr("rowspan"):void 0,colspan:a(this).attr("colspan")?+a(this).attr("colspan"):void 0},a(this).data()))}),c.push(b)}),a.isArray(this.options.columns[0])||(this.options.columns=[this.options.columns]),this.options.columns=a.extend(!0,[],c,this.options.columns),this.columns=[],f(this.options.columns),a.each(this.options.columns,function(c,d){a.each(d,function(d,e){e=a.extend({},o.COLUMN_DEFAULTS,e),"undefined"!=typeof e.fieldIndex&&(b.columns[e.fieldIndex]=e),b.options.columns[c][d]=e})}),!this.options.data.length){var e=[];this.$el.find(">tbody>tr").each(function(c){var f={};f._id=a(this).attr("id"),f._class=a(this).attr("class"),f._data=k(a(this).data()),a(this).find(">td").each(function(d){for(var g,h,i=a(this),j=+i.attr("colspan")||1,l=+i.attr("rowspan")||1;e[c]&&e[c][d];d++);for(g=d;d+j>g;g++)for(h=c;c+l>h;h++)e[h]||(e[h]=[]),e[h][g]=!0;var m=b.columns[d].field;f[m]=a(this).html(),f["_"+m+"_id"]=a(this).attr("id"),f["_"+m+"_class"]=a(this).attr("class"),f["_"+m+"_rowspan"]=a(this).attr("rowspan"),f["_"+m+"_colspan"]=a(this).attr("colspan"),f["_"+m+"_title"]=a(this).attr("title"),f["_"+m+"_data"]=k(a(this).data())}),d.push(f)}),this.options.data=d,d.length&&(this.fromHtml=!0)}},o.prototype.initHeader=function(){var b=this,d={},e=[];this.header={fields:[],styles:[],classes:[],formatters:[],events:[],sorters:[],sortNames:[],cellStyles:[],searchables:[]},a.each(this.options.columns,function(f,g){e.push("<tr>"),0===f&&!b.options.cardView&&b.options.detailView&&e.push(c('<th class="detail" rowspan="%s"><div class="fht-cell"></div></th>',b.options.columns.length)),a.each(g,function(a,f){var g="",h="",i="",k="",l=c(' class="%s"',f["class"]),m=(b.options.sortOrder||f.order,"px"),n=f.width;if(void 0===f.width||b.options.cardView||"string"==typeof f.width&&-1!==f.width.indexOf("%")&&(m="%"),f.width&&"string"==typeof f.width&&(n=f.width.replace("%","").replace("px","")),h=c("text-align: %s; ",f.halign?f.halign:f.align),i=c("text-align: %s; ",f.align),k=c("vertical-align: %s; ",f.valign),k+=c("width: %s; ",!f.checkbox&&!f.radio||n?n?n+m:void 0:"36px"),"undefined"!=typeof f.fieldIndex){if(b.header.fields[f.fieldIndex]=f.field,b.header.styles[f.fieldIndex]=i+k,b.header.classes[f.fieldIndex]=l,b.header.formatters[f.fieldIndex]=f.formatter,b.header.events[f.fieldIndex]=f.events,b.header.sorters[f.fieldIndex]=f.sorter,b.header.sortNames[f.fieldIndex]=f.sortName,b.header.cellStyles[f.fieldIndex]=f.cellStyle,b.header.searchables[f.fieldIndex]=f.searchable,!f.visible)return;if(b.options.cardView&&!f.cardVisible)return;d[f.field]=f}e.push("<th"+c(' title="%s"',f.titleTooltip),f.checkbox||f.radio?c(' class="bs-checkbox %s"',f["class"]||""):l,c(' style="%s"',h+k),c(' rowspan="%s"',f.rowspan),c(' colspan="%s"',f.colspan),c(' data-field="%s"',f.field),">"),e.push(c('<div class="th-inner %s">',b.options.sortable&&f.sortable?"sortable both":"")),g=b.options.escape?j(f.title):f.title,f.checkbox&&(!b.options.singleSelect&&b.options.checkboxHeader&&(g='<input name="btSelectAll" type="checkbox" />'),b.header.stateField=f.field),f.radio&&(g="",b.header.stateField=f.field,b.options.singleSelect=!0),e.push(g),e.push("</div>"),e.push('<div class="fht-cell"></div>'),e.push("</div>"),e.push("</th>")}),e.push("</tr>")}),this.$header.html(e.join("")),this.$header.find("th[data-field]").each(function(){a(this).data(d[a(this).data("field")])}),this.$container.off("click",".th-inner").on("click",".th-inner",function(c){var d=a(this);return b.options.detailView&&d.closest(".bootstrap-table")[0]!==b.$container[0]?!1:void(b.options.sortable&&d.parent().data().sortable&&b.onSort(c))}),this.$header.children().children().off("keypress").on("keypress",function(c){if(b.options.sortable&&a(this).data().sortable){var d=c.keyCode||c.which;13==d&&b.onSort(c)}}),a(window).off("resize.bootstrap-table"),!this.options.showHeader||this.options.cardView?(this.$header.hide(),this.$tableHeader.hide(),this.$tableLoading.css("top",0)):(this.$header.show(),this.$tableHeader.show(),this.$tableLoading.css("top",this.$header.outerHeight()+1),this.getCaret(),a(window).on("resize.bootstrap-table",a.proxy(this.resetWidth,this))),this.$selectAll=this.$header.find('[name="btSelectAll"]'),this.$selectAll.off("click").on("click",function(){var c=a(this).prop("checked");b[c?"checkAll":"uncheckAll"](),b.updateSelected()})},o.prototype.initFooter=function(){!this.options.showFooter||this.options.cardView?this.$tableFooter.hide():this.$tableFooter.show()},o.prototype.initData=function(a,b){this.data="append"===b?this.data.concat(a):"prepend"===b?[].concat(a).concat(this.data):a||this.options.data,this.options.data="append"===b?this.options.data.concat(a):"prepend"===b?[].concat(a).concat(this.options.data):this.data,"server"!==this.options.sidePagination&&this.initSort()},o.prototype.initSort=function(){var b=this,d=this.options.sortName,e="desc"===this.options.sortOrder?-1:1,f=a.inArray(this.options.sortName,this.header.fields),g=0;return this.options.customSort!==a.noop?void this.options.customSort.apply(this,[this.options.sortName,this.options.sortOrder]):void(-1!==f&&(this.options.sortStable&&a.each(this.data,function(a,b){b.hasOwnProperty("_position")||(b._position=a)}),this.data.sort(function(c,g){b.header.sortNames[f]&&(d=b.header.sortNames[f]);var i=l(c,d,b.options.escape),j=l(g,d,b.options.escape),k=h(b.header,b.header.sorters[f],[i,j]);return void 0!==k?e*k:((void 0===i||null===i)&&(i=""),(void 0===j||null===j)&&(j=""),b.options.sortStable&&i===j&&(i=c._position,j=g._position),a.isNumeric(i)&&a.isNumeric(j)?(i=parseFloat(i),j=parseFloat(j),j>i?-1*e:e):i===j?0:("string"!=typeof i&&(i=i.toString()),-1===i.localeCompare(j)?-1*e:e))}),void 0!==this.options.sortClass&&(clearTimeout(g),g=setTimeout(function(){b.$el.removeClass(b.options.sortClass);var a=b.$header.find(c('[data-field="%s"]',b.options.sortName).index()+1);b.$el.find(c("tr td:nth-child(%s)",a)).addClass(b.options.sortClass)},250))))},o.prototype.onSort=function(b){var c="keypress"===b.type?a(b.currentTarget):a(b.currentTarget).parent(),d=this.$header.find("th").eq(c.index());return this.$header.add(this.$header_).find("span.order").remove(),this.options.sortName===c.data("field")?this.options.sortOrder="asc"===this.options.sortOrder?"desc":"asc":(this.options.sortName=c.data("field"),this.options.sortOrder="asc"===c.data("order")?"desc":"asc"),this.trigger("sort",this.options.sortName,this.options.sortOrder),c.add(d).data("order",this.options.sortOrder),this.getCaret(),"server"===this.options.sidePagination?void this.initServer(this.options.silentSort):(this.initSort(),void this.initBody())},o.prototype.initToolbar=function(){var b,d,e=this,f=[],g=0,i=0;this.$toolbar.find(".bs-bars").children().length&&a("body").append(a(this.options.toolbar)),this.$toolbar.html(""),("string"==typeof this.options.toolbar||"object"==typeof this.options.toolbar)&&a(c('<div class="bs-bars pull-%s"></div>',this.options.toolbarAlign)).appendTo(this.$toolbar).append(a(this.options.toolbar)),f=[c('<div class="columns columns-%s btn-group pull-%s">',this.options.buttonsAlign,this.options.buttonsAlign)],"string"==typeof this.options.icons&&(this.options.icons=h(null,this.options.icons)),this.options.showPaginationSwitch&&f.push(c('<button class="btn'+c(" btn-%s",this.options.buttonsClass)+c(" btn-%s",this.options.iconSize)+'" type="button" name="paginationSwitch" aria-label="pagination Switch" title="%s">',this.options.formatPaginationSwitch()),c('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.paginationSwitchDown),"</button>"),this.options.showRefresh&&f.push(c('<button class="btn'+c(" btn-%s",this.options.buttonsClass)+c(" btn-%s",this.options.iconSize)+'" type="button" name="refresh" aria-label="refresh" title="%s">',this.options.formatRefresh()),c('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.refresh),"</button>"),this.options.showToggle&&f.push(c('<button class="btn'+c(" btn-%s",this.options.buttonsClass)+c(" btn-%s",this.options.iconSize)+'" type="button" name="toggle" aria-label="toggle" title="%s">',this.options.formatToggle()),c('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.toggle),"</button>"),this.options.showColumns&&(f.push(c('<div class="keep-open btn-group" title="%s">',this.options.formatColumns()),'<button type="button" aria-label="columns" class="btn'+c(" btn-%s",this.options.buttonsClass)+c(" btn-%s",this.options.iconSize)+' dropdown-toggle" data-toggle="dropdown">',c('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.columns),' <span class="caret"></span>',"</button>",'<ul class="dropdown-menu" role="menu">'),a.each(this.columns,function(a,b){if(!(b.radio||b.checkbox||e.options.cardView&&!b.cardVisible)){var d=b.visible?' checked="checked"':"";b.switchable&&(f.push(c('<li role="menuitem"><label><input type="checkbox" data-field="%s" value="%s"%s> %s</label></li>',b.field,a,d,b.title)),i++)}}),f.push("</ul>","</div>")),f.push("</div>"),(this.showToolbar||f.length>2)&&this.$toolbar.append(f.join("")),this.options.showPaginationSwitch&&this.$toolbar.find('button[name="paginationSwitch"]').off("click").on("click",a.proxy(this.togglePagination,this)),this.options.showRefresh&&this.$toolbar.find('button[name="refresh"]').off("click").on("click",a.proxy(this.refresh,this)),this.options.showToggle&&this.$toolbar.find('button[name="toggle"]').off("click").on("click",function(){e.toggleView()}),this.options.showColumns&&(b=this.$toolbar.find(".keep-open"),i<=this.options.minimumCountColumns&&b.find("input").prop("disabled",!0),b.find("li").off("click").on("click",function(a){a.stopImmediatePropagation()}),b.find("input").off("click").on("click",function(){var b=a(this);e.toggleColumn(a(this).val(),b.prop("checked"),!1),e.trigger("column-switch",a(this).data("field"),b.prop("checked"))})),this.options.search&&(f=[],f.push('<div class="pull-'+this.options.searchAlign+' search">',c('<input class="form-control'+c(" input-%s",this.options.iconSize)+'" type="text" placeholder="%s">',this.options.formatSearch()),"</div>"),this.$toolbar.append(f.join("")),d=this.$toolbar.find(".search input"),d.off("keyup drop blur").on("keyup drop blur",function(b){e.options.searchOnEnterKey&&13!==b.keyCode||a.inArray(b.keyCode,[37,38,39,40])>-1||(clearTimeout(g),g=setTimeout(function(){e.onSearch(b)},e.options.searchTimeOut))}),m()&&d.off("mouseup").on("mouseup",function(a){clearTimeout(g),g=setTimeout(function(){e.onSearch(a)},e.options.searchTimeOut)}))},o.prototype.onSearch=function(b){var c=a.trim(a(b.currentTarget).val());this.options.trimOnSearch&&a(b.currentTarget).val()!==c&&a(b.currentTarget).val(c),c!==this.searchText&&(this.searchText=c,this.options.searchText=c,this.options.pageNumber=1,this.initSearch(),this.updatePagination(),this.trigger("search",c))},o.prototype.initSearch=function(){var b=this;if("server"!==this.options.sidePagination){if(this.options.customSearch!==a.noop)return void this.options.customSearch.apply(this,[this.searchText]);var c=this.searchText&&(this.options.escape?j(this.searchText):this.searchText).toLowerCase(),d=a.isEmptyObject(this.filterColumns)?null:this.filterColumns;this.data=d?a.grep(this.options.data,function(b){for(var c in d)if(a.isArray(d[c])&&-1===a.inArray(b[c],d[c])||!a.isArray(d[c])&&b[c]!==d[c])return!1;return!0}):this.options.data,this.data=c?a.grep(this.data,function(d,f){for(var g=0;g<b.header.fields.length;g++)if(b.header.searchables[g]){var i,j=a.isNumeric(b.header.fields[g])?parseInt(b.header.fields[g],10):b.header.fields[g],k=b.columns[e(b.columns,j)];if("string"==typeof j){i=d;for(var l=j.split("."),m=0;m<l.length;m++)i=i[l[m]];k&&k.searchFormatter&&(i=h(k,b.header.formatters[g],[i,d,f],i))}else i=d[j];if("string"==typeof i||"number"==typeof i)if(b.options.strictSearch){if((i+"").toLowerCase()===c)return!0}else if(-1!==(i+"").toLowerCase().indexOf(c))return!0}return!1}):this.data}},o.prototype.initPagination=function(){if(!this.options.pagination)return void this.$pagination.hide();this.$pagination.show();var b,d,e,f,g,h,i,j,k,l=this,m=[],n=!1,o=this.getData(),p=this.options.pageList;if("server"!==this.options.sidePagination&&(this.options.totalRows=o.length),this.totalPages=0,this.options.totalRows){if(this.options.pageSize===this.options.formatAllRows())this.options.pageSize=this.options.totalRows,n=!0;else if(this.options.pageSize===this.options.totalRows){var q="string"==typeof this.options.pageList?this.options.pageList.replace("[","").replace("]","").replace(/ /g,"").toLowerCase().split(","):this.options.pageList;a.inArray(this.options.formatAllRows().toLowerCase(),q)>-1&&(n=!0)}this.totalPages=~~((this.options.totalRows-1)/this.options.pageSize)+1,this.options.totalPages=this.totalPages}if(this.totalPages>0&&this.options.pageNumber>this.totalPages&&(this.options.pageNumber=this.totalPages),this.pageFrom=(this.options.pageNumber-1)*this.options.pageSize+1,this.pageTo=this.options.pageNumber*this.options.pageSize,this.pageTo>this.options.totalRows&&(this.pageTo=this.options.totalRows),m.push('<div class="pull-'+this.options.paginationDetailHAlign+' pagination-detail">','<span class="pagination-info">',this.options.onlyInfoPagination?this.options.formatDetailPagination(this.options.totalRows):this.options.formatShowingRows(this.pageFrom,this.pageTo,this.options.totalRows),"</span>"),!this.options.onlyInfoPagination){m.push('<span class="page-list">');var r=[c('<span class="btn-group %s">',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?"dropdown":"dropup"),'<button type="button" class="btn'+c(" btn-%s",this.options.buttonsClass)+c(" btn-%s",this.options.iconSize)+' dropdown-toggle" data-toggle="dropdown">','<span class="page-size">',n?this.options.formatAllRows():this.options.pageSize,"</span>",' <span class="caret"></span>',"</button>",'<ul class="dropdown-menu" role="menu">'];if("string"==typeof this.options.pageList){var s=this.options.pageList.replace("[","").replace("]","").replace(/ /g,"").split(",");p=[],a.each(s,function(a,b){p.push(b.toUpperCase()===l.options.formatAllRows().toUpperCase()?l.options.formatAllRows():+b)})}for(a.each(p,function(a,b){if(!l.options.smartDisplay||0===a||p[a-1]<l.options.totalRows){var d;d=n?b===l.options.formatAllRows()?' class="active"':"":b===l.options.pageSize?' class="active"':"",r.push(c('<li role="menuitem"%s><a href="#">%s</a></li>',d,b))}}),r.push("</ul></span>"),m.push(this.options.formatRecordsPerPage(r.join(""))),m.push("</span>"),m.push("</div>",'<div class="pull-'+this.options.paginationHAlign+' pagination">','<ul class="pagination'+c(" pagination-%s",this.options.iconSize)+'">','<li class="page-pre"><a href="#">'+this.options.paginationPreText+"</a></li>"),this.totalPages<5?(d=1,e=this.totalPages):(d=this.options.pageNumber-2,e=d+4,1>d&&(d=1,e=5),e>this.totalPages&&(e=this.totalPages,d=e-4)),this.totalPages>=6&&(this.options.pageNumber>=3&&(m.push('<li class="page-first'+(1===this.options.pageNumber?" active":"")+'">','<a href="#">',1,"</a>","</li>"),d++),this.options.pageNumber>=4&&(4==this.options.pageNumber||6==this.totalPages||7==this.totalPages?d--:m.push('<li class="page-first-separator disabled">','<a href="#">...</a>',"</li>"),e--)),this.totalPages>=7&&this.options.pageNumber>=this.totalPages-2&&d--,6==this.totalPages?this.options.pageNumber>=this.totalPages-2&&e++:this.totalPages>=7&&(7==this.totalPages||this.options.pageNumber>=this.totalPages-3)&&e++,b=d;e>=b;b++)m.push('<li class="page-number'+(b===this.options.pageNumber?" active":"")+'">','<a href="#">',b,"</a>","</li>");this.totalPages>=8&&this.options.pageNumber<=this.totalPages-4&&m.push('<li class="page-last-separator disabled">','<a href="#">...</a>',"</li>"),this.totalPages>=6&&this.options.pageNumber<=this.totalPages-3&&m.push('<li class="page-last'+(this.totalPages===this.options.pageNumber?" active":"")+'">','<a href="#">',this.totalPages,"</a>","</li>"),m.push('<li class="page-next"><a href="#">'+this.options.paginationNextText+"</a></li>","</ul>","</div>")}this.$pagination.html(m.join("")),this.options.onlyInfoPagination||(f=this.$pagination.find(".page-list a"),g=this.$pagination.find(".page-first"),h=this.$pagination.find(".page-pre"),i=this.$pagination.find(".page-next"),j=this.$pagination.find(".page-last"),k=this.$pagination.find(".page-number"),this.options.smartDisplay&&(this.totalPages<=1&&this.$pagination.find("div.pagination").hide(),(p.length<2||this.options.totalRows<=p[0])&&this.$pagination.find("span.page-list").hide(),this.$pagination[this.getData().length?"show":"hide"]()),this.options.paginationLoop||(1===this.options.pageNumber&&h.addClass("disabled"),this.options.pageNumber===this.totalPages&&i.addClass("disabled")),n&&(this.options.pageSize=this.options.formatAllRows()),f.off("click").on("click",a.proxy(this.onPageListChange,this)),g.off("click").on("click",a.proxy(this.onPageFirst,this)),h.off("click").on("click",a.proxy(this.onPagePre,this)),i.off("click").on("click",a.proxy(this.onPageNext,this)),j.off("click").on("click",a.proxy(this.onPageLast,this)),k.off("click").on("click",a.proxy(this.onPageNumber,this)))},o.prototype.updatePagination=function(b){b&&a(b.currentTarget).hasClass("disabled")||(this.options.maintainSelected||this.resetRows(),this.initPagination(),"server"===this.options.sidePagination?this.initServer():this.initBody(),this.trigger("page-change",this.options.pageNumber,this.options.pageSize))},o.prototype.onPageListChange=function(b){var c=a(b.currentTarget);return c.parent().addClass("active").siblings().removeClass("active"),this.options.pageSize=c.text().toUpperCase()===this.options.formatAllRows().toUpperCase()?this.options.formatAllRows():+c.text(),this.$toolbar.find(".page-size").text(this.options.pageSize),this.updatePagination(b),!1},o.prototype.onPageFirst=function(a){return this.options.pageNumber=1,this.updatePagination(a),!1},o.prototype.onPagePre=function(a){return this.options.pageNumber-1===0?this.options.pageNumber=this.options.totalPages:this.options.pageNumber--,this.updatePagination(a),!1},o.prototype.onPageNext=function(a){return this.options.pageNumber+1>this.options.totalPages?this.options.pageNumber=1:this.options.pageNumber++,this.updatePagination(a),!1},o.prototype.onPageLast=function(a){return this.options.pageNumber=this.totalPages,this.updatePagination(a),!1},o.prototype.onPageNumber=function(b){return this.options.pageNumber!==+a(b.currentTarget).text()?(this.options.pageNumber=+a(b.currentTarget).text(),this.updatePagination(b),!1):void 0},o.prototype.initRow=function(b,e){var f,g=this,i=[],k={},m=[],n="",o={},p=[];if(!(a.inArray(b,this.hiddenRows)>-1)){if(k=h(this.options,this.options.rowStyle,[b,e],k),k&&k.css)for(f in k.css)m.push(f+": "+k.css[f]);if(o=h(this.options,this.options.rowAttributes,[b,e],o))for(f in o)p.push(c('%s="%s"',f,j(o[f])));return b._data&&!a.isEmptyObject(b._data)&&a.each(b._data,function(a,b){"index"!==a&&(n+=c(' data-%s="%s"',a,b))}),i.push("<tr",c(" %s",p.join(" ")),c(' id="%s"',a.isArray(b)?void 0:b._id),c(' class="%s"',k.classes||(a.isArray(b)?void 0:b._class)),c(' data-index="%s"',e),c(' data-uniqueid="%s"',b[this.options.uniqueId]),c("%s",n),">"),this.options.cardView&&i.push(c('<td colspan="%s"><div class="card-views">',this.header.fields.length)),!this.options.cardView&&this.options.detailView&&i.push("<td>",'<a class="detail-icon" href="#">',c('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.detailOpen),"</a>","</td>"),a.each(this.header.fields,function(f,n){var o="",p=l(b,n,g.options.escape),q="",r="",s={},t="",u=g.header.classes[f],v="",w="",x="",y="",z=g.columns[f];if(!(g.fromHtml&&"undefined"==typeof p||!z.visible||g.options.cardView&&!z.cardVisible)){if(z.escape&&(p=j(p)),k=c('style="%s"',m.concat(g.header.styles[f]).join("; ")),b["_"+n+"_id"]&&(t=c(' id="%s"',b["_"+n+"_id"])),b["_"+n+"_class"]&&(u=c(' class="%s"',b["_"+n+"_class"])),b["_"+n+"_rowspan"]&&(w=c(' rowspan="%s"',b["_"+n+"_rowspan"])),b["_"+n+"_colspan"]&&(x=c(' colspan="%s"',b["_"+n+"_colspan"])),b["_"+n+"_title"]&&(y=c(' title="%s"',b["_"+n+"_title"])),s=h(g.header,g.header.cellStyles[f],[p,b,e,n],s),s.classes&&(u=c(' class="%s"',s.classes)),s.css){var A=[];for(var B in s.css)A.push(B+": "+s.css[B]);k=c('style="%s"',A.concat(g.header.styles[f]).join("; "))}q=h(z,g.header.formatters[f],[p,b,e],p),b["_"+n+"_data"]&&!a.isEmptyObject(b["_"+n+"_data"])&&a.each(b["_"+n+"_data"],function(a,b){"index"!==a&&(v+=c(' data-%s="%s"',a,b))}),z.checkbox||z.radio?(r=z.checkbox?"checkbox":r,r=z.radio?"radio":r,o=[c(g.options.cardView?'<div class="card-view %s">':'<td class="bs-checkbox %s">',z["class"]||""),"<input"+c(' data-index="%s"',e)+c(' name="%s"',g.options.selectItemName)+c(' type="%s"',r)+c(' value="%s"',b[g.options.idField])+c(' checked="%s"',q===!0||p||q&&q.checked?"checked":void 0)+c(' disabled="%s"',!z.checkboxEnabled||q&&q.disabled?"disabled":void 0)+" />",g.header.formatters[f]&&"string"==typeof q?q:"",g.options.cardView?"</div>":"</td>"].join(""),b[g.header.stateField]=q===!0||q&&q.checked):(q="undefined"==typeof q||null===q?g.options.undefinedText:q,o=g.options.cardView?['<div class="card-view">',g.options.showHeader?c('<span class="title" %s>%s</span>',k,d(g.columns,"field","title",n)):"",c('<span class="value">%s</span>',q),"</div>"].join(""):[c("<td%s %s %s %s %s %s %s>",t,u,k,v,w,x,y),q,"</td>"].join(""),g.options.cardView&&g.options.smartDisplay&&""===q&&(o='<div class="card-view"></div>')),i.push(o)}}),this.options.cardView&&i.push("</div></td>"),i.push("</tr>"),i.join(" ")}},o.prototype.initBody=function(b){var d=this,f=this.getData();this.trigger("pre-body",f),this.$body=this.$el.find(">tbody"),this.$body.length||(this.$body=a("<tbody></tbody>").appendTo(this.$el)),this.options.pagination&&"server"!==this.options.sidePagination||(this.pageFrom=1,this.pageTo=f.length);for(var g,i=a(document.createDocumentFragment()),j=this.pageFrom-1;j<this.pageTo;j++){ -var k=f[j],m=this.initRow(k,j,f,i);g=g||!!m,m&&m!==!0&&i.append(m)}g||i.append('<tr class="no-records-found">'+c('<td colspan="%s">%s</td>',this.$header.find("th").length,this.options.formatNoMatches())+"</tr>"),this.$body.html(i),b||this.scrollTo(0),this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick",function(b){var f=a(this),g=f.parent(),h=d.data[g.data("index")],i=f[0].cellIndex,j=d.getVisibleFields(),k=j[d.options.detailView&&!d.options.cardView?i-1:i],m=d.columns[e(d.columns,k)],n=l(h,k,d.options.escape);if(!f.find(".detail-icon").length&&(d.trigger("click"===b.type?"click-cell":"dbl-click-cell",k,n,h,f),d.trigger("click"===b.type?"click-row":"dbl-click-row",h,g,k),"click"===b.type&&d.options.clickToSelect&&m.clickToSelect)){var o=g.find(c('[name="%s"]',d.options.selectItemName));o.length&&o[0].click()}}),this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click",function(){var b=a(this),e=b.parent().parent(),g=e.data("index"),i=f[g];if(e.next().is("tr.detail-view"))b.find("i").attr("class",c("%s %s",d.options.iconsPrefix,d.options.icons.detailOpen)),d.trigger("collapse-row",g,i),e.next().remove();else{b.find("i").attr("class",c("%s %s",d.options.iconsPrefix,d.options.icons.detailClose)),e.after(c('<tr class="detail-view"><td colspan="%s"></td></tr>',e.find("td").length));var j=e.next().find("td"),k=h(d.options,d.options.detailFormatter,[g,i,j],"");1===j.length&&j.append(k),d.trigger("expand-row",g,i,j)}return d.resetView(),!1}),this.$selectItem=this.$body.find(c('[name="%s"]',this.options.selectItemName)),this.$selectItem.off("click").on("click",function(b){b.stopImmediatePropagation();var c=a(this),e=c.prop("checked"),f=d.data[c.data("index")];d.options.maintainSelected&&a(this).is(":radio")&&a.each(d.options.data,function(a,b){b[d.header.stateField]=!1}),f[d.header.stateField]=e,d.options.singleSelect&&(d.$selectItem.not(this).each(function(){d.data[a(this).data("index")][d.header.stateField]=!1}),d.$selectItem.filter(":checked").not(this).prop("checked",!1)),d.updateSelected(),d.trigger(e?"check":"uncheck",f,c)}),a.each(this.header.events,function(b,c){if(c){"string"==typeof c&&(c=h(null,c));var e=d.header.fields[b],f=a.inArray(e,d.getVisibleFields());d.options.detailView&&!d.options.cardView&&(f+=1);for(var g in c)d.$body.find(">tr:not(.no-records-found)").each(function(){var b=a(this),h=b.find(d.options.cardView?".card-view":"td").eq(f),i=g.indexOf(" "),j=g.substring(0,i),k=g.substring(i+1),l=c[g];h.find(k).off(j).on(j,function(a){var c=b.data("index"),f=d.data[c],g=f[e];l.apply(this,[a,g,f,c])})})}}),this.updateSelected(),this.resetView(),this.trigger("post-body",f)},o.prototype.initServer=function(b,c,d){var e,f=this,g={},i={searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder};this.options.pagination&&(i.pageSize=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,i.pageNumber=this.options.pageNumber),(d||this.options.url||this.options.ajax)&&("limit"===this.options.queryParamsType&&(i={search:i.searchText,sort:i.sortName,order:i.sortOrder},this.options.pagination&&(i.offset=this.options.pageSize===this.options.formatAllRows()?0:this.options.pageSize*(this.options.pageNumber-1),i.limit=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize)),a.isEmptyObject(this.filterColumnsPartial)||(i.filter=JSON.stringify(this.filterColumnsPartial,null)),g=h(this.options,this.options.queryParams,[i],g),a.extend(g,c||{}),g!==!1&&(b||this.$tableLoading.show(),e=a.extend({},h(null,this.options.ajaxOptions),{type:this.options.method,url:d||this.options.url,data:"application/json"===this.options.contentType&&"post"===this.options.method?JSON.stringify(g):g,cache:this.options.cache,contentType:this.options.contentType,dataType:this.options.dataType,success:function(a){a=h(f.options,f.options.responseHandler,[a],a),f.load(a),f.trigger("load-success",a),b||f.$tableLoading.hide()},error:function(a){f.trigger("load-error",a.status,a),b||f.$tableLoading.hide()}}),this.options.ajax?h(this,this.options.ajax,[e],null):(this._xhr&&4!==this._xhr.readyState&&this._xhr.abort(),this._xhr=a.ajax(e))))},o.prototype.initSearchText=function(){if(this.options.search&&""!==this.options.searchText){var a=this.$toolbar.find(".search input");a.val(this.options.searchText),this.onSearch({currentTarget:a})}},o.prototype.getCaret=function(){var b=this;a.each(this.$header.find("th"),function(c,d){a(d).find(".sortable").removeClass("desc asc").addClass(a(d).data("field")===b.options.sortName?b.options.sortOrder:"both")})},o.prototype.updateSelected=function(){var b=this.$selectItem.filter(":enabled").length&&this.$selectItem.filter(":enabled").length===this.$selectItem.filter(":enabled").filter(":checked").length;this.$selectAll.add(this.$selectAll_).prop("checked",b),this.$selectItem.each(function(){a(this).closest("tr")[a(this).prop("checked")?"addClass":"removeClass"]("selected")})},o.prototype.updateRows=function(){var b=this;this.$selectItem.each(function(){b.data[a(this).data("index")][b.header.stateField]=a(this).prop("checked")})},o.prototype.resetRows=function(){var b=this;a.each(this.data,function(a,c){b.$selectAll.prop("checked",!1),b.$selectItem.prop("checked",!1),b.header.stateField&&(c[b.header.stateField]=!1)}),this.initHiddenRows()},o.prototype.trigger=function(b){var c=Array.prototype.slice.call(arguments,1);b+=".bs.table",this.options[o.EVENTS[b]].apply(this.options,c),this.$el.trigger(a.Event(b),c),this.options.onAll(b,c),this.$el.trigger(a.Event("all.bs.table"),[b,c])},o.prototype.resetHeader=function(){clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(a.proxy(this.fitHeader,this),this.$el.is(":hidden")?100:0)},o.prototype.fitHeader=function(){var b,d,e,f,h=this;if(h.$el.is(":hidden"))return void(h.timeoutId_=setTimeout(a.proxy(h.fitHeader,h),100));if(b=this.$tableBody.get(0),d=b.scrollWidth>b.clientWidth&&b.scrollHeight>b.clientHeight+this.$header.outerHeight()?g():0,this.$el.css("margin-top",-this.$header.outerHeight()),e=a(":focus"),e.length>0){var i=e.parents("th");if(i.length>0){var j=i.attr("data-field");if(void 0!==j){var k=this.$header.find("[data-field='"+j+"']");k.length>0&&k.find(":input").addClass("focus-temp")}}}this.$header_=this.$header.clone(!0,!0),this.$selectAll_=this.$header_.find('[name="btSelectAll"]'),this.$tableHeader.css({"margin-right":d}).find("table").css("width",this.$el.outerWidth()).html("").attr("class",this.$el.attr("class")).append(this.$header_),f=a(".focus-temp:visible:eq(0)"),f.length>0&&(f.focus(),this.$header.find(".focus-temp").removeClass("focus-temp")),this.$header.find("th[data-field]").each(function(){h.$header_.find(c('th[data-field="%s"]',a(this).data("field"))).data(a(this).data())});var l=this.getVisibleFields(),m=this.$header_.find("th");this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(b){var d=a(this),e=b;h.options.detailView&&!h.options.cardView&&(0===b&&h.$header_.find("th.detail").find(".fht-cell").width(d.innerWidth()),e=b-1);var f=h.$header_.find(c('th[data-field="%s"]',l[e]));f.length>1&&(f=a(m[d[0].cellIndex])),f.find(".fht-cell").width(d.innerWidth())}),this.$tableBody.off("scroll").on("scroll",function(){h.$tableHeader.scrollLeft(a(this).scrollLeft()),h.options.showFooter&&!h.options.cardView&&h.$tableFooter.scrollLeft(a(this).scrollLeft())}),h.trigger("post-header")},o.prototype.resetFooter=function(){var b=this,d=b.getData(),e=[];this.options.showFooter&&!this.options.cardView&&(!this.options.cardView&&this.options.detailView&&e.push('<td><div class="th-inner"> </div><div class="fht-cell"></div></td>'),a.each(this.columns,function(a,f){var g,i="",j="",k=[],l={},m=c(' class="%s"',f["class"]);if(f.visible&&(!b.options.cardView||f.cardVisible)){if(i=c("text-align: %s; ",f.falign?f.falign:f.align),j=c("vertical-align: %s; ",f.valign),l=h(null,b.options.footerStyle),l&&l.css)for(g in l.css)k.push(g+": "+l.css[g]);e.push("<td",m,c(' style="%s"',i+j+k.concat().join("; ")),">"),e.push('<div class="th-inner">'),e.push(h(f,f.footerFormatter,[d]," ")||" "),e.push("</div>"),e.push('<div class="fht-cell"></div>'),e.push("</div>"),e.push("</td>")}}),this.$tableFooter.find("tr").html(e.join("")),this.$tableFooter.show(),clearTimeout(this.timeoutFooter_),this.timeoutFooter_=setTimeout(a.proxy(this.fitFooter,this),this.$el.is(":hidden")?100:0))},o.prototype.fitFooter=function(){var b,c,d;return clearTimeout(this.timeoutFooter_),this.$el.is(":hidden")?void(this.timeoutFooter_=setTimeout(a.proxy(this.fitFooter,this),100)):(c=this.$el.css("width"),d=c>this.$tableBody.width()?g():0,this.$tableFooter.css({"margin-right":d}).find("table").css("width",c).attr("class",this.$el.attr("class")),b=this.$tableFooter.find("td"),void this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(c){var d=a(this);b.eq(c).find(".fht-cell").width(d.innerWidth())}))},o.prototype.toggleColumn=function(a,b,d){if(-1!==a&&(this.columns[a].visible=b,this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns)){var e=this.$toolbar.find(".keep-open input").prop("disabled",!1);d&&e.filter(c('[value="%s"]',a)).prop("checked",b),e.filter(":checked").length<=this.options.minimumCountColumns&&e.filter(":checked").prop("disabled",!0)}},o.prototype.getVisibleFields=function(){var b=this,c=[];return a.each(this.header.fields,function(a,d){var f=b.columns[e(b.columns,d)];f.visible&&c.push(d)}),c},o.prototype.resetView=function(a){var b=0;if(a&&a.height&&(this.options.height=a.height),this.$selectAll.prop("checked",this.$selectItem.length>0&&this.$selectItem.length===this.$selectItem.filter(":checked").length),this.options.height){var c=this.$toolbar.outerHeight(!0),d=this.$pagination.outerHeight(!0),e=this.options.height-c-d;this.$tableContainer.css("height",e+"px")}return this.options.cardView?(this.$el.css("margin-top","0"),this.$tableContainer.css("padding-bottom","0"),void this.$tableFooter.hide()):(this.options.showHeader&&this.options.height?(this.$tableHeader.show(),this.resetHeader(),b+=this.$header.outerHeight()):(this.$tableHeader.hide(),this.trigger("post-header")),this.options.showFooter&&(this.resetFooter(),this.options.height&&(b+=this.$tableFooter.outerHeight()+1)),this.getCaret(),this.$tableContainer.css("padding-bottom",b+"px"),void this.trigger("reset-view"))},o.prototype.getData=function(b){return!this.searchText&&a.isEmptyObject(this.filterColumns)&&a.isEmptyObject(this.filterColumnsPartial)?b?this.options.data.slice(this.pageFrom-1,this.pageTo):this.options.data:b?this.data.slice(this.pageFrom-1,this.pageTo):this.data},o.prototype.load=function(b){var c=!1;"server"===this.options.sidePagination?(this.options.totalRows=b[this.options.totalField],c=b.fixedScroll,b=b[this.options.dataField]):a.isArray(b)||(c=b.fixedScroll,b=b.data),this.initData(b),this.initSearch(),this.initPagination(),this.initBody(c)},o.prototype.append=function(a){this.initData(a,"append"),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},o.prototype.prepend=function(a){this.initData(a,"prepend"),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},o.prototype.remove=function(b){var c,d,e=this.options.data.length;if(b.hasOwnProperty("field")&&b.hasOwnProperty("values")){for(c=e-1;c>=0;c--)d=this.options.data[c],d.hasOwnProperty(b.field)&&-1!==a.inArray(d[b.field],b.values)&&(this.options.data.splice(c,1),"server"===this.options.sidePagination&&(this.options.totalRows-=1));e!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0))}},o.prototype.removeAll=function(){this.options.data.length>0&&(this.options.data.splice(0,this.options.data.length),this.initSearch(),this.initPagination(),this.initBody(!0))},o.prototype.getRowByUniqueId=function(a){var b,c,d,e=this.options.uniqueId,f=this.options.data.length,g=null;for(b=f-1;b>=0;b--){if(c=this.options.data[b],c.hasOwnProperty(e))d=c[e];else{if(!c._data.hasOwnProperty(e))continue;d=c._data[e]}if("string"==typeof d?a=a.toString():"number"==typeof d&&(Number(d)===d&&d%1===0?a=parseInt(a):d===Number(d)&&0!==d&&(a=parseFloat(a))),d===a){g=c;break}}return g},o.prototype.removeByUniqueId=function(a){var b=this.options.data.length,c=this.getRowByUniqueId(a);c&&this.options.data.splice(this.options.data.indexOf(c),1),b!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initBody(!0))},o.prototype.updateByUniqueId=function(b){var c=this,d=a.isArray(b)?b:[b];a.each(d,function(b,d){var e;d.hasOwnProperty("id")&&d.hasOwnProperty("row")&&(e=a.inArray(c.getRowByUniqueId(d.id),c.options.data),-1!==e&&a.extend(c.options.data[e],d.row))}),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},o.prototype.insertRow=function(a){a.hasOwnProperty("index")&&a.hasOwnProperty("row")&&(this.data.splice(a.index,0,a.row),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0))},o.prototype.updateRow=function(b){var c=this,d=a.isArray(b)?b:[b];a.each(d,function(b,d){d.hasOwnProperty("index")&&d.hasOwnProperty("row")&&a.extend(c.options.data[d.index],d.row)}),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},o.prototype.initHiddenRows=function(){this.hiddenRows=[]},o.prototype.showRow=function(a){this.toggleRow(a,!0)},o.prototype.hideRow=function(a){this.toggleRow(a,!1)},o.prototype.toggleRow=function(b,c){var d,e;b.hasOwnProperty("index")?d=this.getData()[b.index]:b.hasOwnProperty("uniqueId")&&(d=this.getRowByUniqueId(b.uniqueId)),d&&(e=a.inArray(d,this.hiddenRows),c||-1!==e?c&&e>-1&&this.hiddenRows.splice(e,1):this.hiddenRows.push(d),this.initBody(!0))},o.prototype.getHiddenRows=function(){var b=this,c=this.getData(),d=[];return a.each(c,function(c,e){a.inArray(e,b.hiddenRows)>-1&&d.push(e)}),this.hiddenRows=d,d},o.prototype.mergeCells=function(b){var c,d,e,f=b.index,g=a.inArray(b.field,this.getVisibleFields()),h=b.rowspan||1,i=b.colspan||1,j=this.$body.find(">tr");if(this.options.detailView&&!this.options.cardView&&(g+=1),e=j.eq(f).find(">td").eq(g),!(0>f||0>g||f>=this.data.length)){for(c=f;f+h>c;c++)for(d=g;g+i>d;d++)j.eq(c).find(">td").eq(d).hide();e.attr("rowspan",h).attr("colspan",i).show()}},o.prototype.updateCell=function(a){a.hasOwnProperty("index")&&a.hasOwnProperty("field")&&a.hasOwnProperty("value")&&(this.data[a.index][a.field]=a.value,a.reinit!==!1&&(this.initSort(),this.initBody(!0)))},o.prototype.getOptions=function(){return this.options},o.prototype.getSelections=function(){var b=this;return a.grep(this.options.data,function(a){return a[b.header.stateField]===!0})},o.prototype.getAllSelections=function(){var b=this;return a.grep(this.options.data,function(a){return a[b.header.stateField]})},o.prototype.checkAll=function(){this.checkAll_(!0)},o.prototype.uncheckAll=function(){this.checkAll_(!1)},o.prototype.checkInvert=function(){var b=this,c=b.$selectItem.filter(":enabled"),d=c.filter(":checked");c.each(function(){a(this).prop("checked",!a(this).prop("checked"))}),b.updateRows(),b.updateSelected(),b.trigger("uncheck-some",d),d=b.getSelections(),b.trigger("check-some",d)},o.prototype.checkAll_=function(a){var b;a||(b=this.getSelections()),this.$selectAll.add(this.$selectAll_).prop("checked",a),this.$selectItem.filter(":enabled").prop("checked",a),this.updateRows(),a&&(b=this.getSelections()),this.trigger(a?"check-all":"uncheck-all",b)},o.prototype.check=function(a){this.check_(!0,a)},o.prototype.uncheck=function(a){this.check_(!1,a)},o.prototype.check_=function(a,b){var d=this.$selectItem.filter(c('[data-index="%s"]',b)).prop("checked",a);this.data[b][this.header.stateField]=a,this.updateSelected(),this.trigger(a?"check":"uncheck",this.data[b],d)},o.prototype.checkBy=function(a){this.checkBy_(!0,a)},o.prototype.uncheckBy=function(a){this.checkBy_(!1,a)},o.prototype.checkBy_=function(b,d){if(d.hasOwnProperty("field")&&d.hasOwnProperty("values")){var e=this,f=[];a.each(this.options.data,function(g,h){if(!h.hasOwnProperty(d.field))return!1;if(-1!==a.inArray(h[d.field],d.values)){var i=e.$selectItem.filter(":enabled").filter(c('[data-index="%s"]',g)).prop("checked",b);h[e.header.stateField]=b,f.push(h),e.trigger(b?"check":"uncheck",h,i)}}),this.updateSelected(),this.trigger(b?"check-some":"uncheck-some",f)}},o.prototype.destroy=function(){this.$el.insertBefore(this.$container),a(this.options.toolbar).insertBefore(this.$el),this.$container.next().remove(),this.$container.remove(),this.$el.html(this.$el_.html()).css("margin-top","0").attr("class",this.$el_.attr("class")||"")},o.prototype.showLoading=function(){this.$tableLoading.show()},o.prototype.hideLoading=function(){this.$tableLoading.hide()},o.prototype.togglePagination=function(){this.options.pagination=!this.options.pagination;var a=this.$toolbar.find('button[name="paginationSwitch"] i');this.options.pagination?a.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchDown):a.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchUp),this.updatePagination()},o.prototype.refresh=function(a){a&&a.url&&(this.options.url=a.url),a&&a.pageNumber&&(this.options.pageNumber=a.pageNumber),a&&a.pageSize&&(this.options.pageSize=a.pageSize),this.initServer(a&&a.silent,a&&a.query,a&&a.url),this.trigger("refresh",a)},o.prototype.resetWidth=function(){this.options.showHeader&&this.options.height&&this.fitHeader(),this.options.showFooter&&this.fitFooter()},o.prototype.showColumn=function(a){this.toggleColumn(e(this.columns,a),!0,!0)},o.prototype.hideColumn=function(a){this.toggleColumn(e(this.columns,a),!1,!0)},o.prototype.getHiddenColumns=function(){return a.grep(this.columns,function(a){return!a.visible})},o.prototype.getVisibleColumns=function(){return a.grep(this.columns,function(a){return a.visible})},o.prototype.toggleAllColumns=function(b){if(a.each(this.columns,function(a){this.columns[a].visible=b}),this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns){var c=this.$toolbar.find(".keep-open input").prop("disabled",!1);c.filter(":checked").length<=this.options.minimumCountColumns&&c.filter(":checked").prop("disabled",!0)}},o.prototype.showAllColumns=function(){this.toggleAllColumns(!0)},o.prototype.hideAllColumns=function(){this.toggleAllColumns(!1)},o.prototype.filterBy=function(b){this.filterColumns=a.isEmptyObject(b)?{}:b,this.options.pageNumber=1,this.initSearch(),this.updatePagination()},o.prototype.scrollTo=function(a){return"string"==typeof a&&(a="bottom"===a?this.$tableBody[0].scrollHeight:0),"number"==typeof a&&this.$tableBody.scrollTop(a),"undefined"==typeof a?this.$tableBody.scrollTop():void 0},o.prototype.getScrollPosition=function(){return this.scrollTo()},o.prototype.selectPage=function(a){a>0&&a<=this.options.totalPages&&(this.options.pageNumber=a,this.updatePagination())},o.prototype.prevPage=function(){this.options.pageNumber>1&&(this.options.pageNumber--,this.updatePagination())},o.prototype.nextPage=function(){this.options.pageNumber<this.options.totalPages&&(this.options.pageNumber++,this.updatePagination())},o.prototype.toggleView=function(){this.options.cardView=!this.options.cardView,this.initHeader(),this.initBody(),this.trigger("toggle",this.options.cardView)},o.prototype.refreshOptions=function(b){i(this.options,b,!0)||(this.options=a.extend(this.options,b),this.trigger("refresh-options",this.options),this.destroy(),this.init())},o.prototype.resetSearch=function(a){var b=this.$toolbar.find(".search input");b.val(a||""),this.onSearch({currentTarget:b})},o.prototype.expandRow_=function(a,b){var d=this.$body.find(c('> tr[data-index="%s"]',b));d.next().is("tr.detail-view")===(a?!1:!0)&&d.find("> td > .detail-icon").click()},o.prototype.expandRow=function(a){this.expandRow_(!0,a)},o.prototype.collapseRow=function(a){this.expandRow_(!1,a)},o.prototype.expandAllRows=function(b){if(b){var d=this.$body.find(c('> tr[data-index="%s"]',0)),e=this,f=null,g=!1,h=-1;if(d.next().is("tr.detail-view")?d.next().next().is("tr.detail-view")||(d.next().find(".detail-icon").click(),g=!0):(d.find("> td > .detail-icon").click(),g=!0),g)try{h=setInterval(function(){f=e.$body.find("tr.detail-view").last().find(".detail-icon"),f.length>0?f.click():clearInterval(h)},1)}catch(i){clearInterval(h)}}else for(var j=this.$body.children(),k=0;k<j.length;k++)this.expandRow_(!0,a(j[k]).data("index"))},o.prototype.collapseAllRows=function(b){if(b)this.expandRow_(!1,0);else for(var c=this.$body.children(),d=0;d<c.length;d++)this.expandRow_(!1,a(c[d]).data("index"))},o.prototype.updateFormatText=function(a,b){this.options[c("format%s",a)]&&("string"==typeof b?this.options[c("format%s",a)]=function(){return b}:"function"==typeof b&&(this.options[c("format%s",a)]=b)),this.initToolbar(),this.initPagination(),this.initBody()};var p=["getOptions","getSelections","getAllSelections","getData","load","append","prepend","remove","removeAll","insertRow","updateRow","updateCell","updateByUniqueId","removeByUniqueId","getRowByUniqueId","showRow","hideRow","getHiddenRows","mergeCells","checkAll","uncheckAll","checkInvert","check","uncheck","checkBy","uncheckBy","refresh","resetView","resetWidth","destroy","showLoading","hideLoading","showColumn","hideColumn","getHiddenColumns","getVisibleColumns","showAllColumns","hideAllColumns","filterBy","scrollTo","getScrollPosition","selectPage","prevPage","nextPage","togglePagination","toggleView","refreshOptions","resetSearch","expandRow","collapseRow","expandAllRows","collapseAllRows","updateFormatText"];a.fn.bootstrapTable=function(b){var c,d=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=a(this),f=e.data("bootstrap.table"),g=a.extend({},o.DEFAULTS,e.data(),"object"==typeof b&&b);if("string"==typeof b){if(a.inArray(b,p)<0)throw new Error("Unknown method: "+b);if(!f)return;c=f[b].apply(f,d),"destroy"===b&&e.removeData("bootstrap.table")}f||e.data("bootstrap.table",f=new o(this,g))}),"undefined"==typeof c?this:c},a.fn.bootstrapTable.Constructor=o,a.fn.bootstrapTable.defaults=o.DEFAULTS,a.fn.bootstrapTable.columnDefaults=o.COLUMN_DEFAULTS,a.fn.bootstrapTable.locales=o.LOCALES,a.fn.bootstrapTable.methods=p,a.fn.bootstrapTable.utils={sprintf:c,getFieldIndex:e,compareObjects:i,calculateObjectValue:h,getItemField:l,objectKeys:n,isIEBrowser:m},a(function(){a('[data-toggle="table"]').bootstrapTable()})}(jQuery);
\ No newline at end of file diff --git a/nz-admin/src/main/resources/statics/libs/bootstrap.min.js b/nz-admin/src/main/resources/statics/libs/bootstrap.min.js deleted file mode 100644 index 9bcd2fcc..00000000 --- a/nz-admin/src/main/resources/statics/libs/bootstrap.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * Bootstrap v3.3.7 (http://getbootstrap.com) - * Copyright 2011-2016 Twitter, Inc. - * Licensed under the MIT license - */ -if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){document===a.target||this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);if(this.$element.trigger(g),!g.isDefaultPrevented())return f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=window.SVGElement&&c instanceof window.SVGElement,g=d?{top:0,left:0}:f?null:b.offset(),h={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},i=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,h,i,g)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){ -this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e<c&&"top";if("bottom"==this.affixed)return null!=c?!(e+this.unpin<=f.top)&&"bottom":!(e+g<=a-d)&&"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&e<=c?"top":null!=d&&i+j>=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
\ No newline at end of file diff --git a/nz-admin/src/main/resources/statics/libs/fastclick.min.js b/nz-admin/src/main/resources/statics/libs/fastclick.min.js deleted file mode 100644 index 131e29e4..00000000 --- a/nz-admin/src/main/resources/statics/libs/fastclick.min.js +++ /dev/null @@ -1 +0,0 @@ -!function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return i(n?n:e)},u,u.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t){!function(){"use strict";function e(t,n){function i(e,t){return function(){return e.apply(t,arguments)}}var o;if(n=n||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=n.touchBoundary||10,this.layer=t,this.tapDelay=n.tapDelay||200,this.tapTimeout=n.tapTimeout||700,!e.notNeeded(t)){for(var s=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],a=this,c=0,l=s.length;l>c;c++)a[s[c]]=i(a[s[c]],a);r&&(t.addEventListener("mouseover",this.onMouse,!0),t.addEventListener("mousedown",this.onMouse,!0),t.addEventListener("mouseup",this.onMouse,!0)),t.addEventListener("click",this.onClick,!0),t.addEventListener("touchstart",this.onTouchStart,!1),t.addEventListener("touchmove",this.onTouchMove,!1),t.addEventListener("touchend",this.onTouchEnd,!1),t.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(t.removeEventListener=function(e,n,r){var i=Node.prototype.removeEventListener;"click"===e?i.call(t,e,n.hijacked||n,r):i.call(t,e,n,r)},t.addEventListener=function(e,n,r){var i=Node.prototype.addEventListener;"click"===e?i.call(t,e,n.hijacked||(n.hijacked=function(e){e.propagationStopped||n(e)}),r):i.call(t,e,n,r)}),"function"==typeof t.onclick&&(o=t.onclick,t.addEventListener("click",function(e){o(e)},!1),t.onclick=null)}}var n=navigator.userAgent.indexOf("Windows Phone")>=0,r=navigator.userAgent.indexOf("Android")>0&&!n,i=/iP(ad|hone|od)/.test(navigator.userAgent)&&!n,o=i&&/OS 4_\d(_\d)?/.test(navigator.userAgent),s=i&&/OS [6-7]_\d/.test(navigator.userAgent),a=navigator.userAgent.indexOf("BB10")>0;e.prototype.needsClick=function(e){switch(e.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(e.disabled)return!0;break;case"input":if(i&&"file"===e.type||e.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(e.className)},e.prototype.needsFocus=function(e){switch(e.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!r;case"input":switch(e.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!e.disabled&&!e.readOnly;default:return/\bneedsfocus\b/.test(e.className)}},e.prototype.sendClick=function(e,t){var n,r;document.activeElement&&document.activeElement!==e&&document.activeElement.blur(),r=t.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(e),!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,e.dispatchEvent(n)},e.prototype.determineEventType=function(e){return r&&"select"===e.tagName.toLowerCase()?"mousedown":"click"},e.prototype.focus=function(e){var t;i&&e.setSelectionRange&&0!==e.type.indexOf("date")&&"time"!==e.type&&"month"!==e.type?(t=e.value.length,e.setSelectionRange(t,t)):e.focus()},e.prototype.updateScrollParent=function(e){var t,n;if(t=e.fastClickScrollParent,!t||!t.contains(e)){n=e;do{if(n.scrollHeight>n.offsetHeight){t=n,e.fastClickScrollParent=n;break}n=n.parentElement}while(n)}t&&(t.fastClickLastScrollTop=t.scrollTop)},e.prototype.getTargetElementFromEventTarget=function(e){return e.nodeType===Node.TEXT_NODE?e.parentNode:e},e.prototype.onTouchStart=function(e){var t,n,r;if(e.targetTouches.length>1)return!0;if(t=this.getTargetElementFromEventTarget(e.target),n=e.targetTouches[0],i){if(r=window.getSelection(),r.rangeCount&&!r.isCollapsed)return!0;if(!o){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return e.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(t)}}return this.trackingClick=!0,this.trackingClickStart=e.timeStamp,this.targetElement=t,this.touchStartX=n.pageX,this.touchStartY=n.pageY,e.timeStamp-this.lastClickTime<this.tapDelay&&e.preventDefault(),!0},e.prototype.touchHasMoved=function(e){var t=e.changedTouches[0],n=this.touchBoundary;return Math.abs(t.pageX-this.touchStartX)>n||Math.abs(t.pageY-this.touchStartY)>n?!0:!1},e.prototype.onTouchMove=function(e){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(e.target)||this.touchHasMoved(e))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},e.prototype.findControl=function(e){return void 0!==e.control?e.control:e.htmlFor?document.getElementById(e.htmlFor):e.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},e.prototype.onTouchEnd=function(e){var t,n,a,c,l,u=this.targetElement;if(!this.trackingClick)return!0;if(e.timeStamp-this.lastClickTime<this.tapDelay)return this.cancelNextClick=!0,!0;if(e.timeStamp-this.trackingClickStart>this.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=e.timeStamp,n=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,s&&(l=e.changedTouches[0],u=document.elementFromPoint(l.pageX-window.pageXOffset,l.pageY-window.pageYOffset)||u,u.fastClickScrollParent=this.targetElement.fastClickScrollParent),a=u.tagName.toLowerCase(),"label"===a){if(t=this.findControl(u)){if(this.focus(u),r)return!1;u=t}}else if(this.needsFocus(u))return e.timeStamp-n>100||i&&window.top!==window&&"input"===a?(this.targetElement=null,!1):(this.focus(u),this.sendClick(u,e),i&&"select"===a||(this.targetElement=null,e.preventDefault()),!1);return i&&!o&&(c=u.fastClickScrollParent,c&&c.fastClickLastScrollTop!==c.scrollTop)?!0:(this.needsClick(u)||(e.preventDefault(),this.sendClick(u,e)),!1)},e.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},e.prototype.onMouse=function(e){return this.targetElement?e.forwardedTouchEvent?!0:e.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(e.stopImmediatePropagation?e.stopImmediatePropagation():e.propagationStopped=!0,e.stopPropagation(),e.preventDefault(),!1):!0:!0},e.prototype.onClick=function(e){var t;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===e.target.type&&0===e.detail?!0:(t=this.onMouse(e),t||(this.targetElement=null),t)},e.prototype.destroy=function(){var e=this.layer;r&&(e.removeEventListener("mouseover",this.onMouse,!0),e.removeEventListener("mousedown",this.onMouse,!0),e.removeEventListener("mouseup",this.onMouse,!0)),e.removeEventListener("click",this.onClick,!0),e.removeEventListener("touchstart",this.onTouchStart,!1),e.removeEventListener("touchmove",this.onTouchMove,!1),e.removeEventListener("touchend",this.onTouchEnd,!1),e.removeEventListener("touchcancel",this.onTouchCancel,!1)},e.notNeeded=function(e){var t,n,i,o;if("undefined"==typeof window.ontouchstart)return!0;if(n=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!r)return!0;if(t=document.querySelector("meta[name=viewport]")){if(-1!==t.content.indexOf("user-scalable=no"))return!0;if(n>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(a&&(i=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),i[1]>=10&&i[2]>=3&&(t=document.querySelector("meta[name=viewport]")))){if(-1!==t.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===e.style.msTouchAction||"manipulation"===e.style.touchAction?!0:(o=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],o>=27&&(t=document.querySelector("meta[name=viewport]"),t&&(-1!==t.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===e.style.touchAction||"manipulation"===e.style.touchAction?!0:!1)},e.attach=function(t,n){return new e(t,n)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return e}):"undefined"!=typeof t&&t.exports?(t.exports=e.attach,t.exports.FastClick=e):window.FastClick=e}()},{}],2:[function(e){window.Origami={fastclick:e("./bower_components/fastclick/lib/fastclick.js")}},{"./bower_components/fastclick/lib/fastclick.js":1}]},{},[2]);;(function() {function trigger(){document.dispatchEvent(new CustomEvent('o.load'))};document.addEventListener('load',trigger);if (document.readyState==='ready') trigger();}());(function() {function trigger(){document.dispatchEvent(new CustomEvent('o.DOMContentLoaded'))};document.addEventListener('DOMContentLoaded',trigger);if (document.readyState==='interactive') trigger();}())
\ No newline at end of file diff --git a/nz-admin/src/main/resources/statics/libs/jquery.min.js b/nz-admin/src/main/resources/statics/libs/jquery.min.js deleted file mode 100644 index 4024b662..00000000 --- a/nz-admin/src/main/resources/statics/libs/jquery.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v2.2.4 | (c) jQuery Foundation | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){var b;if("object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype||{},"isPrototypeOf"))return!1;for(b in a);return void 0===b||k.call(a,b)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=R.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c; -}catch(e){}O.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=N.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function W(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&T.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var X=/^(?:checkbox|radio)$/i,Y=/<([\w:-]+)/,Z=/^$|\/(?:java|ecma)script/i,$={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|&#?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ja(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ha;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return"undefined"!=typeof n&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(G)||[""],j=b.length;while(j--)h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.hasData(a)&&N.get(a);if(r&&(i=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&N.remove(a,"handle events")}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(N.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||d,e=c.documentElement,f=c.body,a.pageX=b.clientX+(e&&e.scrollLeft||f&&f.scrollLeft||0)-(e&&e.clientLeft||f&&f.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||f&&f.scrollTop||0)-(e&&e.clientTop||f&&f.clientTop||0)),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ea.test(f)?this.mouseHooks:da.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=d),3===a.target.nodeType&&(a.target=a.target.parentNode),h.filter?h.filter(a,g):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==ia()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===ia()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ga:ha):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:ha,isPropagationStopped:ha,isImmediatePropagationStopped:ha,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ga,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ga,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ga,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||n.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),n.fn.extend({on:function(a,b,c,d){return ja(this,a,b,c,d)},one:function(a,b,c,d){return ja(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=ha),this.each(function(){n.event.remove(this,a,c,b)})}});var ka=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,la=/<script|<style|<link/i,ma=/checked\s*(?:[^=]|=\s*.checked.)/i,na=/^true\/(.*)/,oa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function pa(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function qa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function ra(a){var b=na.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function sa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(N.hasData(a)&&(f=N.access(a),g=N.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}O.hasData(a)&&(h=O.access(a),i=n.extend({},h),O.set(b,i))}}function ta(a,b){var c=b.nodeName.toLowerCase();"input"===c&&X.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function ua(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&ma.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),ua(f,b,c,d)});if(o&&(e=ca(b,a[0].ownerDocument,!1,a,d),g=e.firstChild,1===e.childNodes.length&&(e=g),g||d)){for(h=n.map(_(e,"script"),qa),i=h.length;o>m;m++)j=e,m!==p&&(j=n.clone(j,!0,!0),i&&n.merge(h,_(j,"script"))),c.call(a[m],j,m);if(i)for(k=h[h.length-1].ownerDocument,n.map(h,ra),m=0;i>m;m++)j=h[m],Z.test(j.type||"")&&!N.access(j,"globalEval")&&n.contains(k,j)&&(j.src?n._evalUrl&&n._evalUrl(j.src):n.globalEval(j.textContent.replace(oa,"")))}return a}function va(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(_(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&aa(_(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(ka,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=_(h),f=_(a),d=0,e=f.length;e>d;d++)ta(f[d],g[d]);if(b)if(c)for(f=f||_(a),g=g||_(h),d=0,e=f.length;e>d;d++)sa(f[d],g[d]);else sa(a,h);return g=_(h,"script"),g.length>0&&aa(g,!i&&_(a,"script")),h},cleanData:function(a){for(var b,c,d,e=n.event.special,f=0;void 0!==(c=a[f]);f++)if(L(c)){if(b=c[N.expando]){if(b.events)for(d in b.events)e[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);c[N.expando]=void 0}c[O.expando]&&(c[O.expando]=void 0)}}}),n.fn.extend({domManip:ua,detach:function(a){return va(this,a,!0)},remove:function(a){return va(this,a)},text:function(a){return K(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.appendChild(a)}})},prepend:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(_(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return K(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!la.test(a)&&!$[(Y.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(_(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return ua(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(_(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),f=e.length-1,h=0;f>=h;h++)c=h===f?this:this.clone(!0),n(e[h])[b](c),g.apply(d,c.get());return this.pushStack(d)}});var wa,xa={HTML:"block",BODY:"block"};function ya(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function za(a){var b=d,c=xa[a];return c||(c=ya(a,b),"none"!==c&&c||(wa=(wa||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=wa[0].contentDocument,b.write(),b.close(),c=ya(a,b),wa.detach()),xa[a]=c),c}var Aa=/^margin/,Ba=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ca=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Da=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Ea=d.documentElement;!function(){var b,c,e,f,g=d.createElement("div"),h=d.createElement("div");if(h.style){h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,g.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",g.appendChild(h);function i(){h.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",h.innerHTML="",Ea.appendChild(g);var d=a.getComputedStyle(h);b="1%"!==d.top,f="2px"===d.marginLeft,c="4px"===d.width,h.style.marginRight="50%",e="4px"===d.marginRight,Ea.removeChild(g)}n.extend(l,{pixelPosition:function(){return i(),b},boxSizingReliable:function(){return null==c&&i(),c},pixelMarginRight:function(){return null==c&&i(),e},reliableMarginLeft:function(){return null==c&&i(),f},reliableMarginRight:function(){var b,c=h.appendChild(d.createElement("div"));return c.style.cssText=h.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",h.style.width="1px",Ea.appendChild(g),b=!parseFloat(a.getComputedStyle(c).marginRight),Ea.removeChild(g),h.removeChild(c),b}})}}();function Fa(a,b,c){var d,e,f,g,h=a.style;return c=c||Ca(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Ba.test(g)&&Aa.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0!==g?g+"":g}function Ga(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Ha=/^(none|table(?!-c[ea]).+)/,Ia={position:"absolute",visibility:"hidden",display:"block"},Ja={letterSpacing:"0",fontWeight:"400"},Ka=["Webkit","O","Moz","ms"],La=d.createElement("div").style;function Ma(a){if(a in La)return a;var b=a[0].toUpperCase()+a.slice(1),c=Ka.length;while(c--)if(a=Ka[c]+b,a in La)return a}function Na(a,b,c){var d=T.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Oa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Pa(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ca(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Fa(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ba.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Oa(a,b,c||(g?"border":"content"),d,f)+"px"}function Qa(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=N.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=N.access(d,"olddisplay",za(d.nodeName)))):(e=V(d),"none"===c&&e||N.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Fa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Ma(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=T.exec(c))&&e[1]&&(c=W(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Ma(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Fa(a,b,d)),"normal"===e&&b in Ja&&(e=Ja[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Ha.test(n.css(a,"display"))&&0===a.offsetWidth?Da(a,Ia,function(){return Pa(a,b,d)}):Pa(a,b,d):void 0},set:function(a,c,d){var e,f=d&&Ca(a),g=d&&Oa(a,b,d,"border-box"===n.css(a,"boxSizing",!1,f),f);return g&&(e=T.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=n.css(a,b)),Na(a,c,g)}}}),n.cssHooks.marginLeft=Ga(l.reliableMarginLeft,function(a,b){return b?(parseFloat(Fa(a,"marginLeft"))||a.getBoundingClientRect().left-Da(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px":void 0}),n.cssHooks.marginRight=Ga(l.reliableMarginRight,function(a,b){return b?Da(a,{display:"inline-block"},Fa,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Aa.test(a)||(n.cssHooks[a+b].set=Na)}),n.fn.extend({css:function(a,b){return K(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ca(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Qa(this,!0)},hide:function(){return Qa(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function Ra(a,b,c,d,e){return new Ra.prototype.init(a,b,c,d,e)}n.Tween=Ra,Ra.prototype={constructor:Ra,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Ra.propHooks[this.prop];return a&&a.get?a.get(this):Ra.propHooks._default.get(this)},run:function(a){var b,c=Ra.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ra.propHooks._default.set(this),this}},Ra.prototype.init.prototype=Ra.prototype,Ra.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},Ra.propHooks.scrollTop=Ra.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=Ra.prototype.init,n.fx.step={};var Sa,Ta,Ua=/^(?:toggle|show|hide)$/,Va=/queueHooks$/;function Wa(){return a.setTimeout(function(){Sa=void 0}),Sa=n.now()}function Xa(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=U[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ya(a,b,c){for(var d,e=(_a.tweeners[b]||[]).concat(_a.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Za(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&V(a),q=N.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?N.get(a,"olddisplay")||za(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Ua.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?za(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=N.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;N.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ya(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function $a(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function _a(a,b,c){var d,e,f=0,g=_a.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Sa||Wa(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:Sa||Wa(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for($a(k,j.opts.specialEasing);g>f;f++)if(d=_a.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,Ya,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(_a,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return W(c.elem,a,T.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],_a.tweeners[c]=_a.tweeners[c]||[],_a.tweeners[c].unshift(b)},prefilters:[Za],prefilter:function(a,b){b?_a.prefilters.unshift(a):_a.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=_a(this,n.extend({},a),f);(e||N.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=N.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Va.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=N.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Xa(b,!0),a,d,e)}}),n.each({slideDown:Xa("show"),slideUp:Xa("hide"),slideToggle:Xa("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Sa=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Sa=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Ta||(Ta=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(Ta),Ta=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",l.checkOn=""!==a.value,l.optSelected=c.selected,b.disabled=!0,l.optDisabled=!c.disabled,a=d.createElement("input"),a.value="t",a.type="radio",l.radioValue="t"===a.value}();var ab,bb=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return K(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ab:void 0)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)}}),ab={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=bb[b]||n.find.attr;bb[b]=function(a,b,d){var e,f;return d||(f=bb[b],bb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,bb[b]=f),e}});var cb=/^(?:input|select|textarea|button)$/i,db=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return K(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,e=n.propHooks[b]), -void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):cb.test(a.nodeName)||db.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var eb=/[\t\r\n\f]/g;function fb(a){return a.getAttribute&&a.getAttribute("class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,fb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,fb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,fb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=fb(this),b&&N.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":N.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+fb(c)+" ").replace(eb," ").indexOf(b)>-1)return!0;return!1}});var gb=/\r/g,hb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(gb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(hb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(n.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var ib=/^(?:focusinfocus|focusoutblur)$/;n.extend(n.event,{trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!ib.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),l=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},f||!o.trigger||o.trigger.apply(e,c)!==!1)){if(!f&&!o.noBubble&&!n.isWindow(e)){for(j=o.delegateType||q,ib.test(j+q)||(h=h.parentNode);h;h=h.parentNode)p.push(h),i=h;i===(e.ownerDocument||d)&&p.push(i.defaultView||i.parentWindow||a)}g=0;while((h=p[g++])&&!b.isPropagationStopped())b.type=g>1?j:o.bindType||q,m=(N.get(h,"events")||{})[b.type]&&N.get(h,"handle"),m&&m.apply(h,c),m=l&&h[l],m&&m.apply&&L(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=q,f||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!L(e)||l&&n.isFunction(e[q])&&!n.isWindow(e)&&(i=e[l],i&&(e[l]=null),n.event.triggered=q,e[q](),n.event.triggered=void 0,i&&(e[l]=i)),b.result}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b)}}),n.fn.extend({trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),l.focusin="onfocusin"in a,l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=N.access(d,b);e||d.addEventListener(a,c,!0),N.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=N.access(d,b)-1;e?N.access(d,b,e):(d.removeEventListener(a,c,!0),N.remove(d,b))}}});var jb=a.location,kb=n.now(),lb=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var mb=/#.*$/,nb=/([?&])_=[^&]*/,ob=/^(.*?):[ \t]*([^\r\n]*)$/gm,pb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,qb=/^(?:GET|HEAD)$/,rb=/^\/\//,sb={},tb={},ub="*/".concat("*"),vb=d.createElement("a");vb.href=jb.href;function wb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function xb(a,b,c,d){var e={},f=a===tb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function yb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function zb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Ab(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:jb.href,type:"GET",isLocal:pb.test(jb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ub,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?yb(yb(a,n.ajaxSettings),b):yb(n.ajaxSettings,a)},ajaxPrefilter:wb(sb),ajaxTransport:wb(tb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m=n.ajaxSetup({},c),o=m.context||m,p=m.context&&(o.nodeType||o.jquery)?n(o):n.event,q=n.Deferred(),r=n.Callbacks("once memory"),s=m.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,getResponseHeader:function(a){var b;if(2===v){if(!h){h={};while(b=ob.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===v?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return v||(a=u[c]=u[c]||a,t[a]=b),this},overrideMimeType:function(a){return v||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>v)for(b in a)s[b]=[s[b],a[b]];else x.always(a[x.status]);return this},abort:function(a){var b=a||w;return e&&e.abort(b),z(0,b),this}};if(q.promise(x).complete=r.add,x.success=x.done,x.error=x.fail,m.url=((b||m.url||jb.href)+"").replace(mb,"").replace(rb,jb.protocol+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=n.trim(m.dataType||"*").toLowerCase().match(G)||[""],null==m.crossDomain){j=d.createElement("a");try{j.href=m.url,j.href=j.href,m.crossDomain=vb.protocol+"//"+vb.host!=j.protocol+"//"+j.host}catch(y){m.crossDomain=!0}}if(m.data&&m.processData&&"string"!=typeof m.data&&(m.data=n.param(m.data,m.traditional)),xb(sb,m,c,x),2===v)return x;k=n.event&&m.global,k&&0===n.active++&&n.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!qb.test(m.type),f=m.url,m.hasContent||(m.data&&(f=m.url+=(lb.test(f)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=nb.test(f)?f.replace(nb,"$1_="+kb++):f+(lb.test(f)?"&":"?")+"_="+kb++)),m.ifModified&&(n.lastModified[f]&&x.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&x.setRequestHeader("If-None-Match",n.etag[f])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",m.contentType),x.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+ub+"; q=0.01":""):m.accepts["*"]);for(l in m.headers)x.setRequestHeader(l,m.headers[l]);if(m.beforeSend&&(m.beforeSend.call(o,x,m)===!1||2===v))return x.abort();w="abort";for(l in{success:1,error:1,complete:1})x[l](m[l]);if(e=xb(tb,m,c,x)){if(x.readyState=1,k&&p.trigger("ajaxSend",[x,m]),2===v)return x;m.async&&m.timeout>0&&(i=a.setTimeout(function(){x.abort("timeout")},m.timeout));try{v=1,e.send(t,z)}catch(y){if(!(2>v))throw y;z(-1,y)}}else z(-1,"No Transport");function z(b,c,d,h){var j,l,t,u,w,y=c;2!==v&&(v=2,i&&a.clearTimeout(i),e=void 0,g=h||"",x.readyState=b>0?4:0,j=b>=200&&300>b||304===b,d&&(u=zb(m,x,d)),u=Ab(m,u,x,j),j?(m.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(n.lastModified[f]=w),w=x.getResponseHeader("etag"),w&&(n.etag[f]=w)),204===b||"HEAD"===m.type?y="nocontent":304===b?y="notmodified":(y=u.state,l=u.data,t=u.error,j=!t)):(t=y,!b&&y||(y="error",0>b&&(b=0))),x.status=b,x.statusText=(c||y)+"",j?q.resolveWith(o,[l,y,x]):q.rejectWith(o,[x,y,t]),x.statusCode(s),s=void 0,k&&p.trigger(j?"ajaxSuccess":"ajaxError",[x,m,j?l:t]),r.fireWith(o,[x,y]),k&&(p.trigger("ajaxComplete",[x,m]),--n.active||n.event.trigger("ajaxStop")))}return x},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return!n.expr.filters.visible(a)},n.expr.filters.visible=function(a){return a.offsetWidth>0||a.offsetHeight>0||a.getClientRects().length>0};var Bb=/%20/g,Cb=/\[\]$/,Db=/\r?\n/g,Eb=/^(?:submit|button|image|reset|file)$/i,Fb=/^(?:input|select|textarea|keygen)/i;function Gb(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Cb.test(a)?d(a,e):Gb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Gb(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Gb(c,a[c],b,e);return d.join("&").replace(Bb,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Fb.test(this.nodeName)&&!Eb.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Db,"\r\n")}}):{name:b.name,value:c.replace(Db,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Hb={0:200,1223:204},Ib=n.ajaxSettings.xhr();l.cors=!!Ib&&"withCredentials"in Ib,l.ajax=Ib=!!Ib,n.ajaxTransport(function(b){var c,d;return l.cors||Ib&&!b.crossDomain?{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Hb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=n("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Jb=[],Kb=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Jb.pop()||n.expando+"_"+kb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Kb.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kb.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Kb,"$1"+e):b.jsonp!==!1&&(b.url+=(lb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Jb.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||d;var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ca([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var Lb=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Lb)return Lb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function Mb(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(e=d.getBoundingClientRect(),c=Mb(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ea})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;n.fn[a]=function(d){return K(this,function(a,d,e){var f=Mb(a);return void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ga(l.pixelPosition,function(a,c){return c?(c=Fa(a,b),Ba.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return K(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)},size:function(){return this.length}}),n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Nb=a.jQuery,Ob=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Ob),b&&a.jQuery===n&&(a.jQuery=Nb),n},b||(a.jQuery=a.$=n),n}); diff --git a/nz-admin/src/main/resources/statics/libs/jquery.slimscroll.min.js b/nz-admin/src/main/resources/statics/libs/jquery.slimscroll.min.js deleted file mode 100644 index 298aa1cd..00000000 --- a/nz-admin/src/main/resources/statics/libs/jquery.slimscroll.min.js +++ /dev/null @@ -1 +0,0 @@ -(function($){$.fn.extend({slimScroll:function(options){var defaults={width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:false,disableFadeOut:false,railVisible:false,railColor:"#333",railOpacity:.2,railDraggable:true,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:false,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"};var o=$.extend(defaults,options);this.each(function(){var isOverPanel,isOverBar,isDragg,queueHide,touchDif,barHeight,percentScroll,lastScroll,divS="<div></div>",minBarHeight=30,releaseScroll=false;var me=$(this);if(me.parent().hasClass(o.wrapperClass)){var offset=me.scrollTop();bar=me.parent().find("."+o.barClass);rail=me.parent().find("."+o.railClass);getBarHeight();if($.isPlainObject(options)){if("height"in options&&options.height=="auto"){me.parent().css("height","auto");me.css("height","auto");var height=me.parent().parent().height();me.parent().css("height",height);me.css("height",height)}if("scrollTo"in options){offset=parseInt(o.scrollTo)}else if("scrollBy"in options){offset+=parseInt(o.scrollBy)}else if("destroy"in options){bar.remove();rail.remove();me.unwrap();return}scrollContent(offset,false,true)}return}else if($.isPlainObject(options)){if("destroy"in options){return}}o.height=o.height=="auto"?me.parent().height():o.height;var wrapper=$(divS).addClass(o.wrapperClass).css({position:"relative",overflow:"hidden",width:o.width,height:o.height});me.css({overflow:"hidden",width:o.width,height:o.height,"-ms-touch-action":"none"});var rail=$(divS).addClass(o.railClass).css({width:o.size,height:"100%",position:"absolute",top:0,display:o.alwaysVisible&&o.railVisible?"block":"none","border-radius":o.railBorderRadius,background:o.railColor,opacity:o.railOpacity,zIndex:90});var bar=$(divS).addClass(o.barClass).css({background:o.color,width:o.size,position:"absolute",top:0,opacity:o.opacity,display:o.alwaysVisible?"block":"none","border-radius":o.borderRadius,BorderRadius:o.borderRadius,MozBorderRadius:o.borderRadius,WebkitBorderRadius:o.borderRadius,zIndex:99});var posCss=o.position=="right"?{right:o.distance}:{left:o.distance};rail.css(posCss);bar.css(posCss);me.wrap(wrapper);me.parent().append(bar);me.parent().append(rail);if(o.railDraggable){bar.bind("mousedown",function(e){var $doc=$(document);isDragg=true;t=parseFloat(bar.css("top"));pageY=e.pageY;$doc.bind("mousemove.slimscroll",function(e){currTop=t+e.pageY-pageY;bar.css("top",currTop);scrollContent(0,bar.position().top,false)});$doc.bind("mouseup.slimscroll",function(e){isDragg=false;hideBar();$doc.unbind(".slimscroll")});return false}).bind("selectstart.slimscroll",function(e){e.stopPropagation();e.preventDefault();return false})}rail.hover(function(){showBar()},function(){hideBar()});bar.hover(function(){isOverBar=true},function(){isOverBar=false});me.hover(function(){isOverPanel=true;showBar();hideBar()},function(){isOverPanel=false;hideBar()});if(window.navigator.msPointerEnabled){me.bind("MSPointerDown",function(e,b){if(e.originalEvent.targetTouches.length){touchDif=e.originalEvent.targetTouches[0].pageY}});me.bind("MSPointerMove",function(e){e.originalEvent.preventDefault();if(e.originalEvent.targetTouches.length){var diff=(touchDif-e.originalEvent.targetTouches[0].pageY)/o.touchScrollStep;scrollContent(diff,true);touchDif=e.originalEvent.targetTouches[0].pageY}})}else{me.bind("touchstart",function(e,b){if(e.originalEvent.touches.length){touchDif=e.originalEvent.touches[0].pageY}});me.bind("touchmove",function(e){if(!releaseScroll){e.originalEvent.preventDefault()}if(e.originalEvent.touches.length){var diff=(touchDif-e.originalEvent.touches[0].pageY)/o.touchScrollStep;scrollContent(diff,true);touchDif=e.originalEvent.touches[0].pageY}})}getBarHeight();if(o.start==="bottom"){bar.css({top:me.outerHeight()-bar.outerHeight()});scrollContent(0,true)}else if(o.start!=="top"){scrollContent($(o.start).position().top,null,true);if(!o.alwaysVisible){bar.hide()}}attachWheel();function _onWheel(e){if(!isOverPanel){return}var e=e||window.event;var delta=0;if(e.wheelDelta){delta=-e.wheelDelta/120}if(e.detail){delta=e.detail/3}var target=e.target||e.srcTarget||e.srcElement;if($(target).closest("."+o.wrapperClass).is(me.parent())){scrollContent(delta,true)}if(e.preventDefault&&!releaseScroll){e.preventDefault()}if(!releaseScroll){e.returnValue=false}}function scrollContent(y,isWheel,isJump){releaseScroll=false;var delta=y;var maxTop=me.outerHeight()-bar.outerHeight();if(isWheel){delta=parseInt(bar.css("top"))+y*parseInt(o.wheelStep)/100*bar.outerHeight();delta=Math.min(Math.max(delta,0),maxTop);delta=y>0?Math.ceil(delta):Math.floor(delta);bar.css({top:delta+"px"})}percentScroll=parseInt(bar.css("top"))/(me.outerHeight()-bar.outerHeight());delta=percentScroll*(me[0].scrollHeight-me.outerHeight());if(isJump){delta=y;var offsetTop=delta/me[0].scrollHeight*me.outerHeight();offsetTop=Math.min(Math.max(offsetTop,0),maxTop);bar.css({top:offsetTop+"px"})}me.scrollTop(delta);me.trigger("slimscrolling",~~delta);showBar();hideBar()}function attachWheel(){if(window.addEventListener){this.addEventListener("DOMMouseScroll",_onWheel,false);this.addEventListener("mousewheel",_onWheel,false)}else{document.attachEvent("onmousewheel",_onWheel)}}function getBarHeight(){barHeight=Math.max(me.outerHeight()/me[0].scrollHeight*me.outerHeight(),minBarHeight);bar.css({height:barHeight+"px"});var display=barHeight==me.outerHeight()?"none":"block";bar.css({display:display})}function showBar(){getBarHeight();clearTimeout(queueHide);if(percentScroll==~~percentScroll){releaseScroll=o.allowPageScroll;if(lastScroll!=percentScroll){var msg=~~percentScroll==0?"top":"bottom";me.trigger("slimscroll",msg)}}else{releaseScroll=false}lastScroll=percentScroll;if(barHeight>=me.outerHeight()){releaseScroll=true;return}bar.stop(true,true).fadeIn("fast");if(o.railVisible){rail.stop(true,true).fadeIn("fast")}}function hideBar(){if(!o.alwaysVisible){queueHide=setTimeout(function(){if(!(o.disableFadeOut&&isOverPanel)&&!isOverBar&&!isDragg){bar.fadeOut("slow");rail.fadeOut("slow")}},1e3)}}});return this}});$.fn.extend({slimscroll:$.fn.slimScroll})})(jQuery);
\ No newline at end of file diff --git a/nz-admin/src/main/resources/statics/libs/lodash.min.js b/nz-admin/src/main/resources/statics/libs/lodash.min.js deleted file mode 100644 index 018b6a76..00000000 --- a/nz-admin/src/main/resources/statics/libs/lodash.min.js +++ /dev/null @@ -1,127 +0,0 @@ -/** - * @license - * lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE - */ -;(function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function r(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function e(t,n,r,e){for(var u=-1,o=t?t.length:0;++u<o;){var i=t[u];n(e,i,r(i),t)}return e}function u(t,n){for(var r=-1,e=t?t.length:0;++r<e&&false!==n(t[r],r,t););return t}function o(t,n){for(var r=t?t.length:0;r--&&false!==n(t[r],r,t);); -return t}function i(t,n){for(var r=-1,e=t?t.length:0;++r<e;)if(!n(t[r],r,t))return false;return true}function f(t,n){for(var r=-1,e=t?t.length:0,u=0,o=[];++r<e;){var i=t[r];n(i,r,t)&&(o[u++]=i)}return o}function c(t,n){return!(!t||!t.length)&&-1<d(t,n,0)}function a(t,n,r){for(var e=-1,u=t?t.length:0;++e<u;)if(r(n,t[e]))return true;return false}function l(t,n){for(var r=-1,e=t?t.length:0,u=Array(e);++r<e;)u[r]=n(t[r],r,t);return u}function s(t,n){for(var r=-1,e=n.length,u=t.length;++r<e;)t[u+r]=n[r];return t}function h(t,n,r,e){ -var u=-1,o=t?t.length:0;for(e&&o&&(r=t[++u]);++u<o;)r=n(r,t[u],u,t);return r}function p(t,n,r,e){var u=t?t.length:0;for(e&&u&&(r=t[--u]);u--;)r=n(r,t[u],u,t);return r}function _(t,n){for(var r=-1,e=t?t.length:0;++r<e;)if(n(t[r],r,t))return true;return false}function v(t,n,r){var e;return r(t,function(t,r,u){return n(t,r,u)?(e=r,false):void 0}),e}function g(t,n,r,e){var u=t.length;for(r+=e?1:-1;e?r--:++r<u;)if(n(t[r],r,t))return r;return-1}function d(t,n,r){if(n!==n)return M(t,r);--r;for(var e=t.length;++r<e;)if(t[r]===n)return r; -return-1}function y(t,n,r,e){--r;for(var u=t.length;++r<u;)if(e(t[r],n))return r;return-1}function b(t,n){var r=t?t.length:0;return r?w(t,n)/r:V}function x(t,n,r,e,u){return u(t,function(t,u,o){r=e?(e=false,t):n(r,t,u,o)}),r}function j(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].c;return t}function w(t,n){for(var r,e=-1,u=t.length;++e<u;){var o=n(t[e]);o!==T&&(r=r===T?o:r+o)}return r}function m(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}function A(t,n){return l(n,function(n){return[n,t[n]]; -})}function O(t){return function(n){return t(n)}}function k(t,n){return l(n,function(n){return t[n]})}function E(t,n){return t.has(n)}function S(t,n){for(var r=-1,e=t.length;++r<e&&-1<d(n,t[r],0););return r}function I(t,n){for(var r=t.length;r--&&-1<d(n,t[r],0););return r}function R(t){return t&&t.Object===Object?t:null}function W(t){return zt[t]}function B(t){return Ut[t]}function L(t){return"\\"+Dt[t]}function M(t,n,r){var e=t.length;for(n+=r?1:-1;r?n--:++n<e;){var u=t[n];if(u!==u)return n}return-1; -}function C(t){var n=false;if(null!=t&&typeof t.toString!="function")try{n=!!(t+"")}catch(r){}return n}function z(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r}function U(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r}function $(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r];i!==n&&"__lodash_placeholder__"!==i||(t[r]="__lodash_placeholder__",o[u++]=r)}return o}function D(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r}function F(t){ -var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=[t,t]}),r}function N(t){if(!t||!Wt.test(t))return t.length;for(var n=It.lastIndex=0;It.test(t);)n++;return n}function P(t){return $t[t]}function Z(R){function At(t,n){return R.setTimeout.call(Kt,t,n)}function Ot(t){if(Te(t)&&!yi(t)&&!(t instanceof Ut)){if(t instanceof zt)return t;if(Wu.call(t,"__wrapped__"))return ae(t)}return new zt(t)}function kt(){}function zt(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0, -this.__values__=T}function Ut(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function $t(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Dt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Pt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Zt(t){var n=-1,r=t?t.length:0; -for(this.__data__=new Pt;++n<r;)this.add(t[n])}function qt(t){this.__data__=new Dt(t)}function Vt(t,n,r,e){return t===T||Ce(t,ku[r])&&!Wu.call(e,r)?n:t}function Jt(t,n,r){(r===T||Ce(t[n],r))&&(typeof n!="number"||r!==T||n in t)||(t[n]=r)}function Yt(t,n,r){var e=t[n];Wu.call(t,n)&&Ce(e,r)&&(r!==T||n in t)||(t[n]=r)}function Ht(t,n){for(var r=t.length;r--;)if(Ce(t[r][0],n))return r;return-1}function Qt(t,n,r,e){return Ao(t,function(t,u,o){n(e,t,r(t),o)}),e}function Xt(t,n){return t&&sr(n,iu(n),t)} -function tn(t,n){for(var r=-1,e=null==t,u=n.length,o=Array(u);++r<u;)o[r]=e?T:uu(t,n[r]);return o}function nn(t,n,r){return t===t&&(r!==T&&(t=r>=t?t:r),n!==T&&(t=t>=n?t:n)),t}function rn(t,n,r,e,o,i,f){var c;if(e&&(c=i?e(t,o,i,f):e(t)),c!==T)return c;if(!Ze(t))return t;if(o=yi(t)){if(c=Kr(t),!n)return lr(t,c)}else{var a=qr(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(bi(t))return or(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!i){if(C(t))return i?t:{};if(c=Gr(l?{}:t), -!n)return hr(t,Xt(c,t))}else{if(!Ct[a])return i?t:{};c=Jr(t,a,rn,n)}}if(f||(f=new qt),i=f.get(t))return i;if(f.set(t,c),!o)var s=r?gn(t,iu,Tr):iu(t);return u(s||t,function(u,o){s&&(o=u,u=t[o]),Yt(c,o,rn(u,n,r,e,o,t,f))}),c}function en(t){var n=iu(t),r=n.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=n[u],i=t[o],f=e[o];if(f===T&&!(o in Object(e))||!i(f))return false}return true}}function un(t){return Ze(t)?Tu(t):{}}function on(t,n,r){if(typeof t!="function")throw new Au("Expected a function"); -return At(function(){t.apply(T,r)},n)}function fn(t,n,r,e){var u=-1,o=c,i=true,f=t.length,s=[],h=n.length;if(!f)return s;r&&(n=l(n,O(r))),e?(o=a,i=false):n.length>=200&&(o=E,i=false,n=new Zt(n));t:for(;++u<f;){var p=t[u],_=r?r(p):p,p=e||0!==p?p:0;if(i&&_===_){for(var v=h;v--;)if(n[v]===_)continue t;s.push(p)}else o(n,_,e)||s.push(p)}return s}function cn(t,n){var r=true;return Ao(t,function(t,e,u){return r=!!n(t,e,u)}),r}function an(t,n,r){for(var e=-1,u=t.length;++e<u;){var o=t[e],i=n(o);if(null!=i&&(f===T?i===i&&!Je(i):r(i,f)))var f=i,c=o; -}return c}function ln(t,n){var r=[];return Ao(t,function(t,e,u){n(t,e,u)&&r.push(t)}),r}function sn(t,n,r,e,u){var o=-1,i=t.length;for(r||(r=Hr),u||(u=[]);++o<i;){var f=t[o];n>0&&r(f)?n>1?sn(f,n-1,r,e,u):s(u,f):e||(u[u.length]=f)}return u}function hn(t,n){return t&&ko(t,n,iu)}function pn(t,n){return t&&Eo(t,n,iu)}function _n(t,n){return f(n,function(n){return Fe(t[n])})}function vn(t,n){n=ne(n,t)?[n]:er(n);for(var r=0,e=n.length;null!=t&&e>r;)t=t[fe(n[r++])];return r&&r==e?t:T}function gn(t,n,r){ -return n=n(t),yi(t)?n:s(n,r(t))}function dn(t,n){return t>n}function yn(t,n){return null!=t&&(Wu.call(t,n)||typeof t=="object"&&n in t&&null===Ju(Object(t)))}function bn(t,n){return null!=t&&n in Object(t)}function xn(t,n,r){for(var e=r?a:c,u=t[0].length,o=t.length,i=o,f=Array(o),s=1/0,h=[];i--;){var p=t[i];i&&n&&(p=l(p,O(n))),s=to(p.length,s),f[i]=!r&&(n||u>=120&&p.length>=120)?new Zt(i&&p):T}var p=t[0],_=-1,v=f[0];t:for(;++_<u&&s>h.length;){var g=p[_],d=n?n(g):g,g=r||0!==g?g:0;if(v?!E(v,d):!e(h,d,r)){ -for(i=o;--i;){var y=f[i];if(y?!E(y,d):!e(t[i],d,r))continue t}v&&v.push(d),h.push(g)}}return h}function jn(t,n,r){var e={};return hn(t,function(t,u,o){n(e,r(t),u,o)}),e}function wn(t,n,e){return ne(n,t)||(n=er(n),t=ie(t,n),n=ve(n)),n=null==t?t:t[fe(n)],null==n?T:r(n,t,e)}function mn(t,n,r,e,u){if(t===n)n=true;else if(null==t||null==n||!Ze(t)&&!Te(n))n=t!==t&&n!==n;else t:{var o=yi(t),i=yi(n),f="[object Array]",c="[object Array]";o||(f=qr(t),f="[object Arguments]"==f?"[object Object]":f),i||(c=qr(n), -c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f&&!C(t),i="[object Object]"==c&&!C(n);if((c=f==c)&&!a)u||(u=new qt),n=o||Ye(t)?zr(t,n,mn,r,e,u):Ur(t,n,f,mn,r,e,u);else{if(!(2&e)&&(o=a&&Wu.call(t,"__wrapped__"),f=i&&Wu.call(n,"__wrapped__"),o||f)){t=o?t.value():t,n=f?n.value():n,u||(u=new qt),n=mn(t,n,r,e,u);break t}if(c)n:if(u||(u=new qt),o=2&e,f=iu(t),i=f.length,c=iu(n).length,i==c||o){for(a=i;a--;){var l=f[a];if(!(o?l in n:yn(n,l))){n=false;break n}}if(c=u.get(t))n=c==n;else{ -c=true,u.set(t,n);for(var s=o;++a<i;){var l=f[a],h=t[l],p=n[l];if(r)var _=o?r(p,h,l,n,t,u):r(h,p,l,t,n,u);if(_===T?h!==p&&!mn(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!s&&(r=t.constructor,e=n.constructor,r!=e&&"constructor"in t&&"constructor"in n&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),u["delete"](t),n=c}}else n=false;else n=false}}return n}function An(t,n,r,e){var u=r.length,o=u,i=!e;if(null==t)return!o;for(t=Object(t);u--;){var f=r[u];if(i&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return false; -}for(;++u<o;){var f=r[u],c=f[0],a=t[c],l=f[1];if(i&&f[2]){if(a===T&&!(c in t))return false}else{if(f=new qt,e)var s=e(a,l,c,t,n,f);if(s===T?!mn(l,a,e,3,f):!s)return false}}return true}function On(t){return!Ze(t)||Iu&&Iu in t?false:(Fe(t)||C(t)?zu:yt).test(ce(t))}function kn(t){return typeof t=="function"?t:null==t?pu:typeof t=="object"?yi(t)?Wn(t[0],t[1]):Rn(t):du(t)}function En(t){t=null==t?t:Object(t);var n,r=[];for(n in t)r.push(n);return r}function Sn(t,n){return n>t}function In(t,n){var r=-1,e=Ue(t)?Array(t.length):[]; -return Ao(t,function(t,u,o){e[++r]=n(t,u,o)}),e}function Rn(t){var n=Pr(t);return 1==n.length&&n[0][2]?ue(n[0][0],n[0][1]):function(r){return r===t||An(r,t,n)}}function Wn(t,n){return ne(t)&&n===n&&!Ze(n)?ue(fe(t),n):function(r){var e=uu(r,t);return e===T&&e===n?ou(r,t):mn(n,e,T,3)}}function Bn(t,n,r,e,o){if(t!==n){if(!yi(n)&&!Ye(n))var i=fu(n);u(i||n,function(u,f){if(i&&(f=u,u=n[f]),Ze(u)){o||(o=new qt);var c=f,a=o,l=t[c],s=n[c],h=a.get(s);if(h)Jt(t,c,h);else{var h=e?e(l,s,c+"",t,n,a):T,p=h===T;p&&(h=s, -yi(s)||Ye(s)?yi(l)?h=l:$e(l)?h=lr(l):(p=false,h=rn(s,true)):Ve(s)||ze(s)?ze(l)?h=ru(l):!Ze(l)||r&&Fe(l)?(p=false,h=rn(s,true)):h=l:p=false),a.set(s,h),p&&Bn(h,s,r,e,a),a["delete"](s),Jt(t,c,h)}}else c=e?e(t[f],u,f+"",t,n,o):T,c===T&&(c=u),Jt(t,f,c)})}}function Ln(t,n){var r=t.length;return r?(n+=0>n?r:0,Xr(n,r)?t[n]:T):void 0}function Mn(t,n,r){var e=-1;return n=l(n.length?n:[pu],O(Fr())),t=In(t,function(t){return{a:l(n,function(n){return n(t)}),b:++e,c:t}}),j(t,function(t,n){var e;t:{e=-1;for(var u=t.a,o=n.a,i=u.length,f=r.length;++e<i;){ -var c=fr(u[e],o[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);break t}}e=t.b-n.b}return e})}function Cn(t,n){return t=Object(t),h(n,function(n,r){return r in t&&(n[r]=t[r]),n},{})}function zn(t,n){for(var r=-1,e=gn(t,fu,Bo),u=e.length,o={};++r<u;){var i=e[r],f=t[i];n(f,i)&&(o[i]=f)}return o}function Un(t){return function(n){return null==n?T:n[t]}}function $n(t){return function(n){return vn(n,t)}}function Dn(t,n,r,e){var u=e?y:d,o=-1,i=n.length,f=t;for(t===n&&(n=lr(n)),r&&(f=l(t,O(r)));++o<i;)for(var c=0,a=n[o],a=r?r(a):a;-1<(c=u(f,a,c,e));)f!==t&&Vu.call(f,c,1), -Vu.call(t,c,1);return t}function Fn(t,n){for(var r=t?n.length:0,e=r-1;r--;){var u=n[r];if(r==e||u!==o){var o=u;if(Xr(u))Vu.call(t,u,1);else if(ne(u,t))delete t[fe(u)];else{var u=er(u),i=ie(t,u);null!=i&&delete i[fe(ve(u))]}}}}function Nn(t,n){return t+Gu(ro()*(n-t+1))}function Pn(t,n){var r="";if(!t||1>n||n>9007199254740991)return r;do n%2&&(r+=t),(n=Gu(n/2))&&(t+=t);while(n);return r}function Zn(t,n,r,e){n=ne(n,t)?[n]:er(n);for(var u=-1,o=n.length,i=o-1,f=t;null!=f&&++u<o;){var c=fe(n[u]);if(Ze(f)){ -var a=r;if(u!=i){var l=f[c],a=e?e(l,c,f):T;a===T&&(a=null==l?Xr(n[u+1])?[]:{}:l)}Yt(f,c,a)}f=f[c]}return t}function Tn(t,n,r){var e=-1,u=t.length;for(0>n&&(n=-n>u?0:u+n),r=r>u?u:r,0>r&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0,r=Array(u);++e<u;)r[e]=t[e+n];return r}function qn(t,n){var r;return Ao(t,function(t,e,u){return r=n(t,e,u),!r}),!!r}function Vn(t,n,r){var e=0,u=t?t.length:e;if(typeof n=="number"&&n===n&&2147483647>=u){for(;u>e;){var o=e+u>>>1,i=t[o];null!==i&&!Je(i)&&(r?n>=i:n>i)?e=o+1:u=o}return u} -return Kn(t,n,pu,r)}function Kn(t,n,r,e){n=r(n);for(var u=0,o=t?t.length:0,i=n!==n,f=null===n,c=Je(n),a=n===T;o>u;){var l=Gu((u+o)/2),s=r(t[l]),h=s!==T,p=null===s,_=s===s,v=Je(s);(i?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?n>=s:n>s)?u=l+1:o=l}return to(o,4294967294)}function Gn(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r],f=n?n(i):i;if(!r||!Ce(f,c)){var c=f;o[u++]=0===i?0:i}}return o}function Jn(t){return typeof t=="number"?t:Je(t)?V:+t}function Yn(t){if(typeof t=="string")return t; -if(Je(t))return mo?mo.call(t):"";var n=t+"";return"0"==n&&1/t==-q?"-0":n}function Hn(t,n,r){var e=-1,u=c,o=t.length,i=true,f=[],l=f;if(r)i=false,u=a;else if(o>=200){if(u=n?null:Io(t))return D(u);i=false,u=E,l=new Zt}else l=n?[]:f;t:for(;++e<o;){var s=t[e],h=n?n(s):s,s=r||0!==s?s:0;if(i&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue t;n&&l.push(h),f.push(s)}else u(l,h,r)||(l!==f&&l.push(h),f.push(s))}return f}function Qn(t,n,r,e){for(var u=t.length,o=e?u:-1;(e?o--:++o<u)&&n(t[o],o,t););return r?Tn(t,e?0:o,e?o+1:u):Tn(t,e?o+1:0,e?u:o); -}function Xn(t,n){var r=t;return r instanceof Ut&&(r=r.value()),h(n,function(t,n){return n.func.apply(n.thisArg,s([t],n.args))},r)}function tr(t,n,r){for(var e=-1,u=t.length;++e<u;)var o=o?s(fn(o,t[e],n,r),fn(t[e],o,n,r)):t[e];return o&&o.length?Hn(o,n,r):[]}function nr(t,n,r){for(var e=-1,u=t.length,o=n.length,i={};++e<u;)r(i,t[e],o>e?n[e]:T);return i}function rr(t){return $e(t)?t:[]}function er(t){return yi(t)?t:Co(t)}function ur(t,n,r){var e=t.length;return r=r===T?e:r,!n&&r>=e?t:Tn(t,n,r)}function or(t,n){ -if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function ir(t){var n=new t.constructor(t.byteLength);return new Fu(n).set(new Fu(t)),n}function fr(t,n){if(t!==n){var r=t!==T,e=null===t,u=t===t,o=Je(t),i=n!==T,f=null===n,c=n===n,a=Je(n);if(!f&&!a&&!o&&t>n||o&&i&&c&&!f&&!a||e&&i&&c||!r&&c||!u)return 1;if(!e&&!o&&!a&&n>t||a&&r&&u&&!e&&!o||f&&r&&u||!i&&u||!c)return-1}return 0}function cr(t,n,r,e){var u=-1,o=t.length,i=r.length,f=-1,c=n.length,a=Xu(o-i,0),l=Array(c+a);for(e=!e;++f<c;)l[f]=n[f]; -for(;++u<i;)(e||o>u)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];return l}function ar(t,n,r,e){var u=-1,o=t.length,i=-1,f=r.length,c=-1,a=n.length,l=Xu(o-f,0),s=Array(l+a);for(e=!e;++u<l;)s[u]=t[u];for(l=u;++c<a;)s[l+c]=n[c];for(;++i<f;)(e||o>u)&&(s[l+r[i]]=t[u++]);return s}function lr(t,n){var r=-1,e=t.length;for(n||(n=Array(e));++r<e;)n[r]=t[r];return n}function sr(t,n,r,e){r||(r={});for(var u=-1,o=n.length;++u<o;){var i=n[u],f=e?e(r[i],t[i],i,r,t):t[i];Yt(r,i,f)}return r}function hr(t,n){return sr(t,Tr(t),n); -}function pr(t,n){return function(r,u){var o=yi(r)?e:Qt,i=n?n():{};return o(r,t,Fr(u),i)}}function _r(t){return Me(function(n,r){var e=-1,u=r.length,o=u>1?r[u-1]:T,i=u>2?r[2]:T,o=t.length>3&&typeof o=="function"?(u--,o):T;for(i&&te(r[0],r[1],i)&&(o=3>u?T:o,u=1),n=Object(n);++e<u;)(i=r[e])&&t(n,i,e,o);return n})}function vr(t,n){return function(r,e){if(null==r)return r;if(!Ue(r))return t(r,e);for(var u=r.length,o=n?u:-1,i=Object(r);(n?o--:++o<u)&&false!==e(i[o],o,i););return r}}function gr(t){return function(n,r,e){ -var u=-1,o=Object(n);e=e(n);for(var i=e.length;i--;){var f=e[t?i:++u];if(false===r(o[f],f,o))break}return n}}function dr(t,n,r){function e(){return(this&&this!==Kt&&this instanceof e?o:t).apply(u?r:this,arguments)}var u=1&n,o=xr(t);return e}function yr(t){return function(n){n=eu(n);var r=Wt.test(n)?n.match(It):T,e=r?r[0]:n.charAt(0);return n=r?ur(r,1).join(""):n.slice(1),e[t]()+n}}function br(t){return function(n){return h(su(lu(n).replace(Et,"")),t,"")}}function xr(t){return function(){var n=arguments; -switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var r=un(t.prototype),n=t.apply(r,n);return Ze(n)?n:r}}function jr(t,n,e){function u(){for(var i=arguments.length,f=Array(i),c=i,a=Dr(u);c--;)f[c]=arguments[c];return c=3>i&&f[0]!==a&&f[i-1]!==a?[]:$(f,a), -i-=c.length,e>i?Br(t,n,Ar,u.placeholder,T,f,c,T,T,e-i):r(this&&this!==Kt&&this instanceof u?o:t,this,f)}var o=xr(t);return u}function wr(t){return function(n,r,e){var u=Object(n);if(r=Fr(r,3),!Ue(n))var o=iu(n);return e=t(o||n,function(t,n){return o&&(n=t,t=u[n]),r(t,n,u)},e),e>-1?n[o?o[e]:e]:T}}function mr(t){return Me(function(n){n=sn(n,1);var r=n.length,e=r,u=zt.prototype.thru;for(t&&n.reverse();e--;){var o=n[e];if(typeof o!="function")throw new Au("Expected a function");if(u&&!i&&"wrapper"==$r(o))var i=new zt([],true); -}for(e=i?e:r;++e<r;)var o=n[e],u=$r(o),f="wrapper"==u?Ro(o):T,i=f&&re(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?i[$r(f[0])].apply(i,f[3]):1==o.length&&re(o)?i[u]():i.thru(o);return function(){var t=arguments,e=t[0];if(i&&1==t.length&&yi(e)&&e.length>=200)return i.plant(e).value();for(var u=0,t=r?n[u].apply(this,t):e;++u<r;)t=n[u].call(this,t);return t}})}function Ar(t,n,r,e,u,o,i,f,c,a){function l(){for(var d=arguments.length,y=Array(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=Dr(l),b=y.length;for(x=0;b--;)y[b]===j&&x++; -}if(e&&(y=cr(y,e,u,_)),o&&(y=ar(y,o,i,_)),d-=x,_&&a>d)return j=$(y,j),Br(t,n,Ar,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[t]:t,d=y.length,f){x=y.length;for(var w=to(f.length,x),m=lr(y);w--;){var A=f[w];y[w]=Xr(A,x)?m[A]:T}}else v&&d>1&&y.reverse();return s&&d>c&&(y.length=c),this&&this!==Kt&&this instanceof l&&(b=g||xr(b)),b.apply(j,y)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?T:xr(t);return l}function Or(t,n){return function(r,e){return jn(r,t,n(e))}}function kr(t){return function(n,r){var e; -if(n===T&&r===T)return 0;if(n!==T&&(e=n),r!==T){if(e===T)return r;typeof n=="string"||typeof r=="string"?(n=Yn(n),r=Yn(r)):(n=Jn(n),r=Jn(r)),e=t(n,r)}return e}}function Er(t){return Me(function(n){return n=1==n.length&&yi(n[0])?l(n[0],O(Fr())):l(sn(n,1,Qr),O(Fr())),Me(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function Sr(t,n){n=n===T?" ":Yn(n);var r=n.length;return 2>r?r?Pn(n,t):n:(r=Pn(n,Ku(t/N(n))),Wt.test(n)?ur(r.match(It),0,t).join(""):r.slice(0,t))}function Ir(t,n,e,u){ -function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Kt&&this instanceof o?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++n];return r(h,i?e:this,s)}var i=1&n,f=xr(t);return o}function Rr(t){return function(n,r,e){e&&typeof e!="number"&&te(n,r,e)&&(r=e=T),n=nu(n),n=n===n?n:0,r===T?(r=n,n=0):r=nu(r)||0,e=e===T?r>n?1:-1:nu(e)||0;var u=-1;r=Xu(Ku((r-n)/(e||1)),0);for(var o=Array(r);r--;)o[t?r:++u]=n,n+=e;return o}}function Wr(t){return function(n,r){return typeof n=="string"&&typeof r=="string"||(n=nu(n), -r=nu(r)),t(n,r)}}function Br(t,n,r,e,u,o,i,f,c,a){var l=8&n,s=l?i:T;i=l?T:i;var h=l?o:T;return o=l?T:o,n=(n|(l?32:64))&~(l?64:32),4&n||(n&=-4),n=[t,n,u,h,s,o,i,f,c,a],r=r.apply(T,n),re(t)&&Mo(r,n),r.placeholder=e,r}function Lr(t){var n=wu[t];return function(t,r){if(t=nu(t),r=to(Xe(r),292)){var e=(eu(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(eu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return n(t)}}function Mr(t){return function(n){var r=qr(n);return"[object Map]"==r?U(n):"[object Set]"==r?F(n):A(n,t(n)); -}}function Cr(t,n,r,e,u,o,i,f){var c=2&n;if(!c&&typeof t!="function")throw new Au("Expected a function");var a=e?e.length:0;if(a||(n&=-97,e=u=T),i=i===T?i:Xu(Xe(i),0),f=f===T?f:Xe(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=T}var h=c?T:Ro(t);return o=[t,n,r,e,u,l,s,o,i,f],h&&(r=o[1],t=h[1],n=r|t,e=128==t&&8==r||128==t&&256==r&&h[8]>=o[7].length||384==t&&h[8]>=h[7].length&&8==r,131>n||e)&&(1&t&&(o[2]=h[2],n|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?cr(e,r,h[4]):r,o[4]=e?$(o[3],"__lodash_placeholder__"):h[4]), -(r=h[5])&&(e=o[5],o[5]=e?ar(e,r,h[6]):r,o[6]=e?$(o[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(o[7]=r),128&t&&(o[8]=null==o[8]?h[8]:to(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=n),t=o[0],n=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:t.length:Xu(o[9]-a,0),!f&&24&n&&(n&=-25),(h?So:Mo)(n&&1!=n?8==n||16==n?jr(t,n,f):32!=n&&33!=n||u.length?Ar.apply(T,o):Ir(t,n,r,e):dr(t,n,r),o)}function zr(t,n,r,e,u,o){var i=2&u,f=t.length,c=n.length;if(f!=c&&!(i&&c>f))return false;if(c=o.get(t))return c==n; -var c=-1,a=true,l=1&u?new Zt:T;for(o.set(t,n);++c<f;){var s=t[c],h=n[c];if(e)var p=i?e(h,s,c,n,t,o):e(s,h,c,t,n,o);if(p!==T){if(p)continue;a=false;break}if(l){if(!_(n,function(t,n){return l.has(n)||s!==t&&!r(s,t,e,u,o)?void 0:l.add(n)})){a=false;break}}else if(s!==h&&!r(s,h,e,u,o)){a=false;break}}return o["delete"](t),a}function Ur(t,n,r,e,u,o,i){switch(r){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)break;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":if(t.byteLength!=n.byteLength||!e(new Fu(t),new Fu(n)))break; -return true;case"[object Boolean]":case"[object Date]":return+t==+n;case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object Number]":return t!=+t?n!=+n:t==+n;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var f=U;case"[object Set]":if(f||(f=D),t.size!=n.size&&!(2&o))break;return(r=i.get(t))?r==n:(o|=1,i.set(t,n),zr(f(t),f(n),e,u,o,i));case"[object Symbol]":if(wo)return wo.call(t)==wo.call(n)}return false}function $r(t){for(var n=t.name+"",r=_o[n],e=Wu.call(_o,n)?r.length:0;e--;){ -var u=r[e],o=u.func;if(null==o||o==t)return u.name}return n}function Dr(t){return(Wu.call(Ot,"placeholder")?Ot:t).placeholder}function Fr(){var t=Ot.iteratee||_u,t=t===_u?kn:t;return arguments.length?t(arguments[0],arguments[1]):t}function Nr(t,n){var r=t.__data__,e=typeof n;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==n:null===n)?r[typeof n=="string"?"string":"hash"]:r.map}function Pr(t){for(var n=iu(t),r=n.length;r--;){var e=n[r],u=t[e];n[r]=[e,u,u===u&&!Ze(u)]}return n; -}function Zr(t,n){var r=null==t?T:t[n];return On(r)?r:T}function Tr(t){return Pu(Object(t))}function qr(t){return Mu.call(t)}function Vr(t,n,r){n=ne(n,t)?[n]:er(n);for(var e,u=-1,o=n.length;++u<o;){var i=fe(n[u]);if(!(e=null!=t&&r(t,i)))break;t=t[i]}return e?e:(o=t?t.length:0,!!o&&Pe(o)&&Xr(i,o)&&(yi(t)||Ge(t)||ze(t)))}function Kr(t){var n=t.length,r=t.constructor(n);return n&&"string"==typeof t[0]&&Wu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Gr(t){return typeof t.constructor!="function"||ee(t)?{}:un(Ju(Object(t))); -}function Jr(r,e,u,o){var i=r.constructor;switch(e){case"[object ArrayBuffer]":return ir(r);case"[object Boolean]":case"[object Date]":return new i(+r);case"[object DataView]":return e=o?ir(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]": -return e=o?ir(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.length);case"[object Map]":return e=o?u(U(r),true):U(r),h(e,t,new r.constructor);case"[object Number]":case"[object String]":return new i(r);case"[object RegExp]":return e=new r.constructor(r.source,_t.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=o?u(D(r),true):D(r),h(e,n,new r.constructor);case"[object Symbol]":return wo?Object(wo.call(r)):{}}}function Yr(t){var n=t?t.length:T;return Pe(n)&&(yi(t)||Ge(t)||ze(t))?m(n,String):null; -}function Hr(t){return yi(t)||ze(t)}function Qr(t){return yi(t)&&!(2==t.length&&!Fe(t[0]))}function Xr(t,n){return n=null==n?9007199254740991:n,!!n&&(typeof t=="number"||xt.test(t))&&t>-1&&0==t%1&&n>t}function te(t,n,r){if(!Ze(r))return false;var e=typeof n;return("number"==e?Ue(r)&&Xr(n,r.length):"string"==e&&n in r)?Ce(r[n],t):false}function ne(t,n){if(yi(t))return false;var r=typeof t;return"number"==r||"symbol"==r||"boolean"==r||null==t||Je(t)?true:ut.test(t)||!et.test(t)||null!=n&&t in Object(n)}function re(t){ -var n=$r(t),r=Ot[n];return typeof r=="function"&&n in Ut.prototype?t===r?true:(n=Ro(r),!!n&&t===n[0]):false}function ee(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||ku)}function ue(t,n){return function(r){return null==r?false:r[t]===n&&(n!==T||t in Object(r))}}function oe(t,n,r,e,u,o){return Ze(t)&&Ze(n)&&Bn(t,n,T,oe,o.set(n,t)),t}function ie(t,n){return 1==n.length?t:vn(t,Tn(n,0,-1))}function fe(t){if(typeof t=="string"||Je(t))return t;var n=t+"";return"0"==n&&1/t==-q?"-0":n}function ce(t){ -if(null!=t){try{return Ru.call(t)}catch(n){}return t+""}return""}function ae(t){if(t instanceof Ut)return t.clone();var n=new zt(t.__wrapped__,t.__chain__);return n.__actions__=lr(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}function le(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Xe(n),Tn(t,0>n?0:n,e)):[]}function se(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Xe(n),n=e-n,Tn(t,0,0>n?0:n)):[]}function he(t,n,r){var e=t?t.length:0;return e?(r=null==r?0:Xe(r),0>r&&(r=Xu(e+r,0)), -g(t,Fr(n,3),r)):-1}function pe(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e-1;return r!==T&&(u=Xe(r),u=0>r?Xu(e+u,0):to(u,e-1)),g(t,Fr(n,3),u,true)}function _e(t){return t&&t.length?t[0]:T}function ve(t){var n=t?t.length:0;return n?t[n-1]:T}function ge(t,n){return t&&t.length&&n&&n.length?Dn(t,n):t}function de(t){return t?uo.call(t):t}function ye(t){if(!t||!t.length)return[];var n=0;return t=f(t,function(t){return $e(t)?(n=Xu(t.length,n),true):void 0}),m(n,function(n){return l(t,Un(n))})}function be(t,n){ -if(!t||!t.length)return[];var e=ye(t);return null==n?e:l(e,function(t){return r(n,T,t)})}function xe(t){return t=Ot(t),t.__chain__=true,t}function je(t,n){return n(t)}function we(){return this}function me(t,n){return(yi(t)?u:Ao)(t,Fr(n,3))}function Ae(t,n){return(yi(t)?o:Oo)(t,Fr(n,3))}function Oe(t,n){return(yi(t)?l:In)(t,Fr(n,3))}function ke(t,n,r){var e=-1,u=He(t),o=u.length,i=o-1;for(n=(r?te(t,n,r):n===T)?1:nn(Xe(n),0,o);++e<n;)t=Nn(e,i),r=u[t],u[t]=u[e],u[e]=r;return u.length=n,u}function Ee(){ -return xu.now()}function Se(t,n,r){return n=r?T:n,n=t&&null==n?t.length:n,Cr(t,128,T,T,T,T,n)}function Ie(t,n){var r;if(typeof n!="function")throw new Au("Expected a function");return t=Xe(t),function(){return 0<--t&&(r=n.apply(this,arguments)),1>=t&&(n=T),r}}function Re(t,n,r){return n=r?T:n,t=Cr(t,8,T,T,T,T,T,n),t.placeholder=Re.placeholder,t}function We(t,n,r){return n=r?T:n,t=Cr(t,16,T,T,T,T,T,n),t.placeholder=We.placeholder,t}function Be(t,n,r){function e(n){var r=c,e=a;return c=a=T,_=n,s=t.apply(e,r); -}function u(t){var r=t-p;return t-=_,p===T||r>=n||0>r||g&&t>=l}function o(){var t=Ee();if(u(t))return i(t);var r;r=t-_,t=n-(t-p),r=g?to(t,l-r):t,h=At(o,r)}function i(t){return h=T,d&&c?e(t):(c=a=T,s)}function f(){var t=Ee(),r=u(t);if(c=arguments,a=this,p=t,r){if(h===T)return _=t=p,h=At(o,n),v?e(t):s;if(g)return h=At(o,n),e(p)}return h===T&&(h=At(o,n)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof t!="function")throw new Au("Expected a function");return n=nu(n)||0,Ze(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Xu(nu(r.maxWait)||0,n):l, -d="trailing"in r?!!r.trailing:d),f.cancel=function(){_=0,c=p=a=h=T},f.flush=function(){return h===T?s:i(Ee())},f}function Le(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=t.apply(this,e),r.cache=o.set(u,e),e)}if(typeof t!="function"||n&&typeof n!="function")throw new Au("Expected a function");return r.cache=new(Le.Cache||Pt),r}function Me(t,n){if(typeof t!="function")throw new Au("Expected a function");return n=Xu(n===T?t.length-1:Xe(n),0),function(){ -for(var e=arguments,u=-1,o=Xu(e.length-n,0),i=Array(o);++u<o;)i[u]=e[n+u];switch(n){case 0:return t.call(this,i);case 1:return t.call(this,e[0],i);case 2:return t.call(this,e[0],e[1],i)}for(o=Array(n+1),u=-1;++u<n;)o[u]=e[u];return o[n]=i,r(t,this,o)}}function Ce(t,n){return t===n||t!==t&&n!==n}function ze(t){return $e(t)&&Wu.call(t,"callee")&&(!qu.call(t,"callee")||"[object Arguments]"==Mu.call(t))}function Ue(t){return null!=t&&Pe(Wo(t))&&!Fe(t)}function $e(t){return Te(t)&&Ue(t)}function De(t){ -return Te(t)?"[object Error]"==Mu.call(t)||typeof t.message=="string"&&typeof t.name=="string":false}function Fe(t){return t=Ze(t)?Mu.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t}function Ne(t){return typeof t=="number"&&t==Xe(t)}function Pe(t){return typeof t=="number"&&t>-1&&0==t%1&&9007199254740991>=t}function Ze(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function Te(t){return!!t&&typeof t=="object"}function qe(t){return typeof t=="number"||Te(t)&&"[object Number]"==Mu.call(t); -}function Ve(t){return!Te(t)||"[object Object]"!=Mu.call(t)||C(t)?false:(t=Ju(Object(t)),null===t?true:(t=Wu.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&Ru.call(t)==Lu))}function Ke(t){return Ze(t)&&"[object RegExp]"==Mu.call(t)}function Ge(t){return typeof t=="string"||!yi(t)&&Te(t)&&"[object String]"==Mu.call(t)}function Je(t){return typeof t=="symbol"||Te(t)&&"[object Symbol]"==Mu.call(t)}function Ye(t){return Te(t)&&Pe(t.length)&&!!Mt[Mu.call(t)]}function He(t){if(!t)return[]; -if(Ue(t))return Ge(t)?t.match(It):lr(t);if(Zu&&t[Zu])return z(t[Zu]());var n=qr(t);return("[object Map]"==n?U:"[object Set]"==n?D:cu)(t)}function Qe(t){return t?(t=nu(t),t===q||t===-q?1.7976931348623157e308*(0>t?-1:1):t===t?t:0):0===t?t:0}function Xe(t){t=Qe(t);var n=t%1;return t===t?n?t-n:t:0}function tu(t){return t?nn(Xe(t),0,4294967295):0}function nu(t){if(typeof t=="number")return t;if(Je(t))return V;if(Ze(t)&&(t=Fe(t.valueOf)?t.valueOf():t,t=Ze(t)?t+"":t),typeof t!="string")return 0===t?t:+t; -t=t.replace(ct,"");var n=dt.test(t);return n||bt.test(t)?Nt(t.slice(2),n?2:8):gt.test(t)?V:+t}function ru(t){return sr(t,fu(t))}function eu(t){return null==t?"":Yn(t)}function uu(t,n,r){return t=null==t?T:vn(t,n),t===T?r:t}function ou(t,n){return null!=t&&Vr(t,n,bn)}function iu(t){var n=ee(t);if(!n&&!Ue(t))return Qu(Object(t));var r,e=Yr(t),u=!!e,e=e||[],o=e.length;for(r in t)!yn(t,r)||u&&("length"==r||Xr(r,o))||n&&"constructor"==r||e.push(r);return e}function fu(t){for(var n=-1,r=ee(t),e=En(t),u=e.length,o=Yr(t),i=!!o,o=o||[],f=o.length;++n<u;){ -var c=e[n];i&&("length"==c||Xr(c,f))||"constructor"==c&&(r||!Wu.call(t,c))||o.push(c)}return o}function cu(t){return t?k(t,iu(t)):[]}function au(t){return qi(eu(t).toLowerCase())}function lu(t){return(t=eu(t))&&t.replace(jt,W).replace(St,"")}function su(t,n,r){return t=eu(t),n=r?T:n,n===T&&(n=Bt.test(t)?Rt:st),t.match(n)||[]}function hu(t){return function(){return t}}function pu(t){return t}function _u(t){return kn(typeof t=="function"?t:rn(t,true))}function vu(t,n,r){var e=iu(n),o=_n(n,e);null!=r||Ze(n)&&(o.length||!e.length)||(r=n, -n=t,t=this,o=_n(n,iu(n)));var i=!(Ze(r)&&"chain"in r&&!r.chain),f=Fe(t);return u(o,function(r){var e=n[r];t[r]=e,f&&(t.prototype[r]=function(){var n=this.__chain__;if(i||n){var r=t(this.__wrapped__);return(r.__actions__=lr(this.__actions__)).push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,s([this.value()],arguments))})}),t}function gu(){}function du(t){return ne(t)?Un(fe(t)):$n(t)}function yu(){return[]}function bu(){return false}R=R?Gt.defaults({},R,Gt.pick(Kt,Lt)):Kt;var xu=R.Date,ju=R.Error,wu=R.Math,mu=R.RegExp,Au=R.TypeError,Ou=R.Array.prototype,ku=R.Object.prototype,Eu=R.String.prototype,Su=R["__core-js_shared__"],Iu=function(){ -var t=/[^.]+$/.exec(Su&&Su.keys&&Su.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ru=R.Function.prototype.toString,Wu=ku.hasOwnProperty,Bu=0,Lu=Ru.call(Object),Mu=ku.toString,Cu=Kt._,zu=mu("^"+Ru.call(Wu).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Uu=Tt?R.Buffer:T,$u=R.Reflect,Du=R.Symbol,Fu=R.Uint8Array,Nu=$u?$u.f:T,Pu=Object.getOwnPropertySymbols,Zu=typeof(Zu=Du&&Du.iterator)=="symbol"?Zu:T,Tu=Object.create,qu=ku.propertyIsEnumerable,Vu=Ou.splice,Ku=wu.ceil,Gu=wu.floor,Ju=Object.getPrototypeOf,Yu=R.isFinite,Hu=Ou.join,Qu=Object.keys,Xu=wu.max,to=wu.min,no=R.parseInt,ro=wu.random,eo=Eu.replace,uo=Ou.reverse,oo=Eu.split,io=Zr(R,"DataView"),fo=Zr(R,"Map"),co=Zr(R,"Promise"),ao=Zr(R,"Set"),lo=Zr(R,"WeakMap"),so=Zr(Object,"create"),ho=lo&&new lo,po=!qu.call({ -valueOf:1},"valueOf"),_o={},vo=ce(io),go=ce(fo),yo=ce(co),bo=ce(ao),xo=ce(lo),jo=Du?Du.prototype:T,wo=jo?jo.valueOf:T,mo=jo?jo.toString:T;Ot.templateSettings={escape:tt,evaluate:nt,interpolate:rt,variable:"",imports:{_:Ot}},Ot.prototype=kt.prototype,Ot.prototype.constructor=Ot,zt.prototype=un(kt.prototype),zt.prototype.constructor=zt,Ut.prototype=un(kt.prototype),Ut.prototype.constructor=Ut,$t.prototype.clear=function(){this.__data__=so?so(null):{}},$t.prototype["delete"]=function(t){return this.has(t)&&delete this.__data__[t]; -},$t.prototype.get=function(t){var n=this.__data__;return so?(t=n[t],"__lodash_hash_undefined__"===t?T:t):Wu.call(n,t)?n[t]:T},$t.prototype.has=function(t){var n=this.__data__;return so?n[t]!==T:Wu.call(n,t)},$t.prototype.set=function(t,n){return this.__data__[t]=so&&n===T?"__lodash_hash_undefined__":n,this},Dt.prototype.clear=function(){this.__data__=[]},Dt.prototype["delete"]=function(t){var n=this.__data__;return t=Ht(n,t),0>t?false:(t==n.length-1?n.pop():Vu.call(n,t,1),true)},Dt.prototype.get=function(t){ -var n=this.__data__;return t=Ht(n,t),0>t?T:n[t][1]},Dt.prototype.has=function(t){return-1<Ht(this.__data__,t)},Dt.prototype.set=function(t,n){var r=this.__data__,e=Ht(r,t);return 0>e?r.push([t,n]):r[e][1]=n,this},Pt.prototype.clear=function(){this.__data__={hash:new $t,map:new(fo||Dt),string:new $t}},Pt.prototype["delete"]=function(t){return Nr(this,t)["delete"](t)},Pt.prototype.get=function(t){return Nr(this,t).get(t)},Pt.prototype.has=function(t){return Nr(this,t).has(t)},Pt.prototype.set=function(t,n){ -return Nr(this,t).set(t,n),this},Zt.prototype.add=Zt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Zt.prototype.has=function(t){return this.__data__.has(t)},qt.prototype.clear=function(){this.__data__=new Dt},qt.prototype["delete"]=function(t){return this.__data__["delete"](t)},qt.prototype.get=function(t){return this.__data__.get(t)},qt.prototype.has=function(t){return this.__data__.has(t)},qt.prototype.set=function(t,n){var r=this.__data__;return r instanceof Dt&&200==r.__data__.length&&(r=this.__data__=new Pt(r.__data__)), -r.set(t,n),this};var Ao=vr(hn),Oo=vr(pn,true),ko=gr(),Eo=gr(true);Nu&&!qu.call({valueOf:1},"valueOf")&&(En=function(t){return z(Nu(t))});var So=ho?function(t,n){return ho.set(t,n),t}:pu,Io=ao&&1/D(new ao([,-0]))[1]==q?function(t){return new ao(t)}:gu,Ro=ho?function(t){return ho.get(t)}:gu,Wo=Un("length");Pu||(Tr=yu);var Bo=Pu?function(t){for(var n=[];t;)s(n,Tr(t)),t=Ju(Object(t));return n}:Tr;(io&&"[object DataView]"!=qr(new io(new ArrayBuffer(1)))||fo&&"[object Map]"!=qr(new fo)||co&&"[object Promise]"!=qr(co.resolve())||ao&&"[object Set]"!=qr(new ao)||lo&&"[object WeakMap]"!=qr(new lo))&&(qr=function(t){ -var n=Mu.call(t);if(t=(t="[object Object]"==n?t.constructor:T)?ce(t):T)switch(t){case vo:return"[object DataView]";case go:return"[object Map]";case yo:return"[object Promise]";case bo:return"[object Set]";case xo:return"[object WeakMap]"}return n});var Lo=Su?Fe:bu,Mo=function(){var t=0,n=0;return function(r,e){var u=Ee(),o=16-(u-n);if(n=u,o>0){if(150<=++t)return r}else t=0;return So(r,e)}}(),Co=Le(function(t){var n=[];return eu(t).replace(ot,function(t,r,e,u){n.push(e?u.replace(ht,"$1"):r||t)}), -n}),zo=Me(function(t,n){return $e(t)?fn(t,sn(n,1,$e,true)):[]}),Uo=Me(function(t,n){var r=ve(n);return $e(r)&&(r=T),$e(t)?fn(t,sn(n,1,$e,true),Fr(r)):[]}),$o=Me(function(t,n){var r=ve(n);return $e(r)&&(r=T),$e(t)?fn(t,sn(n,1,$e,true),T,r):[]}),Do=Me(function(t){var n=l(t,rr);return n.length&&n[0]===t[0]?xn(n):[]}),Fo=Me(function(t){var n=ve(t),r=l(t,rr);return n===ve(r)?n=T:r.pop(),r.length&&r[0]===t[0]?xn(r,Fr(n)):[]}),No=Me(function(t){var n=ve(t),r=l(t,rr);return n===ve(r)?n=T:r.pop(),r.length&&r[0]===t[0]?xn(r,T,n):[]; -}),Po=Me(ge),Zo=Me(function(t,n){n=sn(n,1);var r=t?t.length:0,e=tn(t,n);return Fn(t,l(n,function(t){return Xr(t,r)?+t:t}).sort(fr)),e}),To=Me(function(t){return Hn(sn(t,1,$e,true))}),qo=Me(function(t){var n=ve(t);return $e(n)&&(n=T),Hn(sn(t,1,$e,true),Fr(n))}),Vo=Me(function(t){var n=ve(t);return $e(n)&&(n=T),Hn(sn(t,1,$e,true),T,n)}),Ko=Me(function(t,n){return $e(t)?fn(t,n):[]}),Go=Me(function(t){return tr(f(t,$e))}),Jo=Me(function(t){var n=ve(t);return $e(n)&&(n=T),tr(f(t,$e),Fr(n))}),Yo=Me(function(t){ -var n=ve(t);return $e(n)&&(n=T),tr(f(t,$e),T,n)}),Ho=Me(ye),Qo=Me(function(t){var n=t.length,n=n>1?t[n-1]:T,n=typeof n=="function"?(t.pop(),n):T;return be(t,n)}),Xo=Me(function(t){function n(n){return tn(n,t)}t=sn(t,1);var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return!(r>1||this.__actions__.length)&&u instanceof Ut&&Xr(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:je,args:[n],thisArg:T}),new zt(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(T),t})):this.thru(n)}),ti=pr(function(t,n,r){ -Wu.call(t,r)?++t[r]:t[r]=1}),ni=wr(he),ri=wr(pe),ei=pr(function(t,n,r){Wu.call(t,r)?t[r].push(n):t[r]=[n]}),ui=Me(function(t,n,e){var u=-1,o=typeof n=="function",i=ne(n),f=Ue(t)?Array(t.length):[];return Ao(t,function(t){var c=o?n:i&&null!=t?t[n]:T;f[++u]=c?r(c,t,e):wn(t,n,e)}),f}),oi=pr(function(t,n,r){t[r]=n}),ii=pr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),fi=Me(function(t,n){if(null==t)return[];var r=n.length;return r>1&&te(t,n[0],n[1])?n=[]:r>2&&te(n[0],n[1],n[2])&&(n=[n[0]]), -n=1==n.length&&yi(n[0])?n[0]:sn(n,1,Qr),Mn(t,n,[])}),ci=Me(function(t,n,r){var e=1;if(r.length)var u=$(r,Dr(ci)),e=32|e;return Cr(t,e,n,r,u)}),ai=Me(function(t,n,r){var e=3;if(r.length)var u=$(r,Dr(ai)),e=32|e;return Cr(n,e,t,r,u)}),li=Me(function(t,n){return on(t,1,n)}),si=Me(function(t,n,r){return on(t,nu(n)||0,r)});Le.Cache=Pt;var hi=Me(function(t,n){n=1==n.length&&yi(n[0])?l(n[0],O(Fr())):l(sn(n,1,Qr),O(Fr()));var e=n.length;return Me(function(u){for(var o=-1,i=to(u.length,e);++o<i;)u[o]=n[o].call(this,u[o]); -return r(t,this,u)})}),pi=Me(function(t,n){var r=$(n,Dr(pi));return Cr(t,32,T,n,r)}),_i=Me(function(t,n){var r=$(n,Dr(_i));return Cr(t,64,T,n,r)}),vi=Me(function(t,n){return Cr(t,256,T,T,T,sn(n,1))}),gi=Wr(dn),di=Wr(function(t,n){return t>=n}),yi=Array.isArray,bi=Uu?function(t){return t instanceof Uu}:bu,xi=Wr(Sn),ji=Wr(function(t,n){return n>=t}),wi=_r(function(t,n){if(po||ee(n)||Ue(n))sr(n,iu(n),t);else for(var r in n)Wu.call(n,r)&&Yt(t,r,n[r])}),mi=_r(function(t,n){if(po||ee(n)||Ue(n))sr(n,fu(n),t);else for(var r in n)Yt(t,r,n[r]); -}),Ai=_r(function(t,n,r,e){sr(n,fu(n),t,e)}),Oi=_r(function(t,n,r,e){sr(n,iu(n),t,e)}),ki=Me(function(t,n){return tn(t,sn(n,1))}),Ei=Me(function(t){return t.push(T,Vt),r(Ai,T,t)}),Si=Me(function(t){return t.push(T,oe),r(Li,T,t)}),Ii=Or(function(t,n,r){t[n]=r},hu(pu)),Ri=Or(function(t,n,r){Wu.call(t,n)?t[n].push(r):t[n]=[r]},Fr),Wi=Me(wn),Bi=_r(function(t,n,r){Bn(t,n,r)}),Li=_r(function(t,n,r,e){Bn(t,n,r,e)}),Mi=Me(function(t,n){return null==t?{}:(n=l(sn(n,1),fe),Cn(t,fn(gn(t,fu,Bo),n)))}),Ci=Me(function(t,n){ -return null==t?{}:Cn(t,l(sn(n,1),fe))}),zi=Mr(iu),Ui=Mr(fu),$i=br(function(t,n,r){return n=n.toLowerCase(),t+(r?au(n):n)}),Di=br(function(t,n,r){return t+(r?"-":"")+n.toLowerCase()}),Fi=br(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),Ni=yr("toLowerCase"),Pi=br(function(t,n,r){return t+(r?"_":"")+n.toLowerCase()}),Zi=br(function(t,n,r){return t+(r?" ":"")+qi(n)}),Ti=br(function(t,n,r){return t+(r?" ":"")+n.toUpperCase()}),qi=yr("toUpperCase"),Vi=Me(function(t,n){try{return r(t,T,n)}catch(e){ -return De(e)?e:new ju(e)}}),Ki=Me(function(t,n){return u(sn(n,1),function(n){n=fe(n),t[n]=ci(t[n],t)}),t}),Gi=mr(),Ji=mr(true),Yi=Me(function(t,n){return function(r){return wn(r,t,n)}}),Hi=Me(function(t,n){return function(r){return wn(t,r,n)}}),Qi=Er(l),Xi=Er(i),tf=Er(_),nf=Rr(),rf=Rr(true),ef=kr(function(t,n){return t+n}),uf=Lr("ceil"),of=kr(function(t,n){return t/n}),ff=Lr("floor"),cf=kr(function(t,n){return t*n}),af=Lr("round"),lf=kr(function(t,n){return t-n});return Ot.after=function(t,n){if(typeof n!="function")throw new Au("Expected a function"); -return t=Xe(t),function(){return 1>--t?n.apply(this,arguments):void 0}},Ot.ary=Se,Ot.assign=wi,Ot.assignIn=mi,Ot.assignInWith=Ai,Ot.assignWith=Oi,Ot.at=ki,Ot.before=Ie,Ot.bind=ci,Ot.bindAll=Ki,Ot.bindKey=ai,Ot.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return yi(t)?t:[t]},Ot.chain=xe,Ot.chunk=function(t,n,r){if(n=(r?te(t,n,r):n===T)?1:Xu(Xe(n),0),r=t?t.length:0,!r||1>n)return[];for(var e=0,u=0,o=Array(Ku(r/n));r>e;)o[u++]=Tn(t,e,e+=n);return o},Ot.compact=function(t){for(var n=-1,r=t?t.length:0,e=0,u=[];++n<r;){ -var o=t[n];o&&(u[e++]=o)}return u},Ot.concat=function(){for(var t=arguments.length,n=Array(t?t-1:0),r=arguments[0],e=t;e--;)n[e-1]=arguments[e];return t?s(yi(r)?lr(r):[r],sn(n,1)):[]},Ot.cond=function(t){var n=t?t.length:0,e=Fr();return t=n?l(t,function(t){if("function"!=typeof t[1])throw new Au("Expected a function");return[e(t[0]),t[1]]}):[],Me(function(e){for(var u=-1;++u<n;){var o=t[u];if(r(o[0],this,e))return r(o[1],this,e)}})},Ot.conforms=function(t){return en(rn(t,true))},Ot.constant=hu,Ot.countBy=ti, -Ot.create=function(t,n){var r=un(t);return n?Xt(r,n):r},Ot.curry=Re,Ot.curryRight=We,Ot.debounce=Be,Ot.defaults=Ei,Ot.defaultsDeep=Si,Ot.defer=li,Ot.delay=si,Ot.difference=zo,Ot.differenceBy=Uo,Ot.differenceWith=$o,Ot.drop=le,Ot.dropRight=se,Ot.dropRightWhile=function(t,n){return t&&t.length?Qn(t,Fr(n,3),true,true):[]},Ot.dropWhile=function(t,n){return t&&t.length?Qn(t,Fr(n,3),true):[]},Ot.fill=function(t,n,r,e){var u=t?t.length:0;if(!u)return[];for(r&&typeof r!="number"&&te(t,n,r)&&(r=0,e=u),u=t.length, -r=Xe(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:Xe(e),0>e&&(e+=u),e=r>e?0:tu(e);e>r;)t[r++]=n;return t},Ot.filter=function(t,n){return(yi(t)?f:ln)(t,Fr(n,3))},Ot.flatMap=function(t,n){return sn(Oe(t,n),1)},Ot.flatMapDeep=function(t,n){return sn(Oe(t,n),q)},Ot.flatMapDepth=function(t,n,r){return r=r===T?1:Xe(r),sn(Oe(t,n),r)},Ot.flatten=function(t){return t&&t.length?sn(t,1):[]},Ot.flattenDeep=function(t){return t&&t.length?sn(t,q):[]},Ot.flattenDepth=function(t,n){return t&&t.length?(n=n===T?1:Xe(n),sn(t,n)):[]; -},Ot.flip=function(t){return Cr(t,512)},Ot.flow=Gi,Ot.flowRight=Ji,Ot.fromPairs=function(t){for(var n=-1,r=t?t.length:0,e={};++n<r;){var u=t[n];e[u[0]]=u[1]}return e},Ot.functions=function(t){return null==t?[]:_n(t,iu(t))},Ot.functionsIn=function(t){return null==t?[]:_n(t,fu(t))},Ot.groupBy=ei,Ot.initial=function(t){return se(t,1)},Ot.intersection=Do,Ot.intersectionBy=Fo,Ot.intersectionWith=No,Ot.invert=Ii,Ot.invertBy=Ri,Ot.invokeMap=ui,Ot.iteratee=_u,Ot.keyBy=oi,Ot.keys=iu,Ot.keysIn=fu,Ot.map=Oe, -Ot.mapKeys=function(t,n){var r={};return n=Fr(n,3),hn(t,function(t,e,u){r[n(t,e,u)]=t}),r},Ot.mapValues=function(t,n){var r={};return n=Fr(n,3),hn(t,function(t,e,u){r[e]=n(t,e,u)}),r},Ot.matches=function(t){return Rn(rn(t,true))},Ot.matchesProperty=function(t,n){return Wn(t,rn(n,true))},Ot.memoize=Le,Ot.merge=Bi,Ot.mergeWith=Li,Ot.method=Yi,Ot.methodOf=Hi,Ot.mixin=vu,Ot.negate=function(t){if(typeof t!="function")throw new Au("Expected a function");return function(){return!t.apply(this,arguments)}},Ot.nthArg=function(t){ -return t=Xe(t),Me(function(n){return Ln(n,t)})},Ot.omit=Mi,Ot.omitBy=function(t,n){return n=Fr(n),zn(t,function(t,r){return!n(t,r)})},Ot.once=function(t){return Ie(2,t)},Ot.orderBy=function(t,n,r,e){return null==t?[]:(yi(n)||(n=null==n?[]:[n]),r=e?T:r,yi(r)||(r=null==r?[]:[r]),Mn(t,n,r))},Ot.over=Qi,Ot.overArgs=hi,Ot.overEvery=Xi,Ot.overSome=tf,Ot.partial=pi,Ot.partialRight=_i,Ot.partition=ii,Ot.pick=Ci,Ot.pickBy=function(t,n){return null==t?{}:zn(t,Fr(n))},Ot.property=du,Ot.propertyOf=function(t){ -return function(n){return null==t?T:vn(t,n)}},Ot.pull=Po,Ot.pullAll=ge,Ot.pullAllBy=function(t,n,r){return t&&t.length&&n&&n.length?Dn(t,n,Fr(r)):t},Ot.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?Dn(t,n,T,r):t},Ot.pullAt=Zo,Ot.range=nf,Ot.rangeRight=rf,Ot.rearg=vi,Ot.reject=function(t,n){var r=yi(t)?f:ln;return n=Fr(n,3),r(t,function(t,r,e){return!n(t,r,e)})},Ot.remove=function(t,n){var r=[];if(!t||!t.length)return r;var e=-1,u=[],o=t.length;for(n=Fr(n,3);++e<o;){var i=t[e];n(i,e,t)&&(r.push(i), -u.push(e))}return Fn(t,u),r},Ot.rest=Me,Ot.reverse=de,Ot.sampleSize=ke,Ot.set=function(t,n,r){return null==t?t:Zn(t,n,r)},Ot.setWith=function(t,n,r,e){return e=typeof e=="function"?e:T,null==t?t:Zn(t,n,r,e)},Ot.shuffle=function(t){return ke(t,4294967295)},Ot.slice=function(t,n,r){var e=t?t.length:0;return e?(r&&typeof r!="number"&&te(t,n,r)?(n=0,r=e):(n=null==n?0:Xe(n),r=r===T?e:Xe(r)),Tn(t,n,r)):[]},Ot.sortBy=fi,Ot.sortedUniq=function(t){return t&&t.length?Gn(t):[]},Ot.sortedUniqBy=function(t,n){ -return t&&t.length?Gn(t,Fr(n)):[]},Ot.split=function(t,n,r){return r&&typeof r!="number"&&te(t,n,r)&&(n=r=T),r=r===T?4294967295:r>>>0,r?(t=eu(t))&&(typeof n=="string"||null!=n&&!Ke(n))&&(n=Yn(n),""==n&&Wt.test(t))?ur(t.match(It),0,r):oo.call(t,n,r):[]},Ot.spread=function(t,n){if(typeof t!="function")throw new Au("Expected a function");return n=n===T?0:Xu(Xe(n),0),Me(function(e){var u=e[n];return e=ur(e,0,n),u&&s(e,u),r(t,this,e)})},Ot.tail=function(t){return le(t,1)},Ot.take=function(t,n,r){return t&&t.length?(n=r||n===T?1:Xe(n), -Tn(t,0,0>n?0:n)):[]},Ot.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Xe(n),n=e-n,Tn(t,0>n?0:n,e)):[]},Ot.takeRightWhile=function(t,n){return t&&t.length?Qn(t,Fr(n,3),false,true):[]},Ot.takeWhile=function(t,n){return t&&t.length?Qn(t,Fr(n,3)):[]},Ot.tap=function(t,n){return n(t),t},Ot.throttle=function(t,n,r){var e=true,u=true;if(typeof t!="function")throw new Au("Expected a function");return Ze(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),Be(t,n,{leading:e,maxWait:n, -trailing:u})},Ot.thru=je,Ot.toArray=He,Ot.toPairs=zi,Ot.toPairsIn=Ui,Ot.toPath=function(t){return yi(t)?l(t,fe):Je(t)?[t]:lr(Co(t))},Ot.toPlainObject=ru,Ot.transform=function(t,n,r){var e=yi(t)||Ye(t);if(n=Fr(n,4),null==r)if(e||Ze(t)){var o=t.constructor;r=e?yi(t)?new o:[]:Fe(o)?un(Ju(Object(t))):{}}else r={};return(e?u:hn)(t,function(t,e,u){return n(r,t,e,u)}),r},Ot.unary=function(t){return Se(t,1)},Ot.union=To,Ot.unionBy=qo,Ot.unionWith=Vo,Ot.uniq=function(t){return t&&t.length?Hn(t):[]},Ot.uniqBy=function(t,n){ -return t&&t.length?Hn(t,Fr(n)):[]},Ot.uniqWith=function(t,n){return t&&t.length?Hn(t,T,n):[]},Ot.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=ne(e,r)?[e]:er(e);r=ie(r,e),e=fe(ve(e)),r=!(null!=r&&yn(r,e))||delete r[e]}return r},Ot.unzip=ye,Ot.unzipWith=be,Ot.update=function(t,n,r){return null==t?t:Zn(t,n,(typeof r=="function"?r:pu)(vn(t,n)),void 0)},Ot.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:T,null!=t&&(t=Zn(t,n,(typeof r=="function"?r:pu)(vn(t,n)),e)),t},Ot.values=cu, -Ot.valuesIn=function(t){return null==t?[]:k(t,fu(t))},Ot.without=Ko,Ot.words=su,Ot.wrap=function(t,n){return n=null==n?pu:n,pi(n,t)},Ot.xor=Go,Ot.xorBy=Jo,Ot.xorWith=Yo,Ot.zip=Ho,Ot.zipObject=function(t,n){return nr(t||[],n||[],Yt)},Ot.zipObjectDeep=function(t,n){return nr(t||[],n||[],Zn)},Ot.zipWith=Qo,Ot.entries=zi,Ot.entriesIn=Ui,Ot.extend=mi,Ot.extendWith=Ai,vu(Ot,Ot),Ot.add=ef,Ot.attempt=Vi,Ot.camelCase=$i,Ot.capitalize=au,Ot.ceil=uf,Ot.clamp=function(t,n,r){return r===T&&(r=n,n=T),r!==T&&(r=nu(r), -r=r===r?r:0),n!==T&&(n=nu(n),n=n===n?n:0),nn(nu(t),n,r)},Ot.clone=function(t){return rn(t,false,true)},Ot.cloneDeep=function(t){return rn(t,true,true)},Ot.cloneDeepWith=function(t,n){return rn(t,true,true,n)},Ot.cloneWith=function(t,n){return rn(t,false,true,n)},Ot.deburr=lu,Ot.divide=of,Ot.endsWith=function(t,n,r){t=eu(t),n=Yn(n);var e=t.length;return r=r===T?e:nn(Xe(r),0,e),r-=n.length,r>=0&&t.indexOf(n,r)==r},Ot.eq=Ce,Ot.escape=function(t){return(t=eu(t))&&X.test(t)?t.replace(H,B):t},Ot.escapeRegExp=function(t){ -return(t=eu(t))&&ft.test(t)?t.replace(it,"\\$&"):t},Ot.every=function(t,n,r){var e=yi(t)?i:cn;return r&&te(t,n,r)&&(n=T),e(t,Fr(n,3))},Ot.find=ni,Ot.findIndex=he,Ot.findKey=function(t,n){return v(t,Fr(n,3),hn)},Ot.findLast=ri,Ot.findLastIndex=pe,Ot.findLastKey=function(t,n){return v(t,Fr(n,3),pn)},Ot.floor=ff,Ot.forEach=me,Ot.forEachRight=Ae,Ot.forIn=function(t,n){return null==t?t:ko(t,Fr(n,3),fu)},Ot.forInRight=function(t,n){return null==t?t:Eo(t,Fr(n,3),fu)},Ot.forOwn=function(t,n){return t&&hn(t,Fr(n,3)); -},Ot.forOwnRight=function(t,n){return t&&pn(t,Fr(n,3))},Ot.get=uu,Ot.gt=gi,Ot.gte=di,Ot.has=function(t,n){return null!=t&&Vr(t,n,yn)},Ot.hasIn=ou,Ot.head=_e,Ot.identity=pu,Ot.includes=function(t,n,r,e){return t=Ue(t)?t:cu(t),r=r&&!e?Xe(r):0,e=t.length,0>r&&(r=Xu(e+r,0)),Ge(t)?e>=r&&-1<t.indexOf(n,r):!!e&&-1<d(t,n,r)},Ot.indexOf=function(t,n,r){var e=t?t.length:0;return e?(r=null==r?0:Xe(r),0>r&&(r=Xu(e+r,0)),d(t,n,r)):-1},Ot.inRange=function(t,n,r){return n=nu(n)||0,r===T?(r=n,n=0):r=nu(r)||0,t=nu(t), -t>=to(n,r)&&t<Xu(n,r)},Ot.invoke=Wi,Ot.isArguments=ze,Ot.isArray=yi,Ot.isArrayBuffer=function(t){return Te(t)&&"[object ArrayBuffer]"==Mu.call(t)},Ot.isArrayLike=Ue,Ot.isArrayLikeObject=$e,Ot.isBoolean=function(t){return true===t||false===t||Te(t)&&"[object Boolean]"==Mu.call(t)},Ot.isBuffer=bi,Ot.isDate=function(t){return Te(t)&&"[object Date]"==Mu.call(t)},Ot.isElement=function(t){return!!t&&1===t.nodeType&&Te(t)&&!Ve(t)},Ot.isEmpty=function(t){if(Ue(t)&&(yi(t)||Ge(t)||Fe(t.splice)||ze(t)||bi(t)))return!t.length; -if(Te(t)){var n=qr(t);if("[object Map]"==n||"[object Set]"==n)return!t.size}for(var r in t)if(Wu.call(t,r))return false;return!(po&&iu(t).length)},Ot.isEqual=function(t,n){return mn(t,n)},Ot.isEqualWith=function(t,n,r){var e=(r=typeof r=="function"?r:T)?r(t,n):T;return e===T?mn(t,n,r):!!e},Ot.isError=De,Ot.isFinite=function(t){return typeof t=="number"&&Yu(t)},Ot.isFunction=Fe,Ot.isInteger=Ne,Ot.isLength=Pe,Ot.isMap=function(t){return Te(t)&&"[object Map]"==qr(t)},Ot.isMatch=function(t,n){return t===n||An(t,n,Pr(n)); -},Ot.isMatchWith=function(t,n,r){return r=typeof r=="function"?r:T,An(t,n,Pr(n),r)},Ot.isNaN=function(t){return qe(t)&&t!=+t},Ot.isNative=function(t){if(Lo(t))throw new ju("This method is not supported with `core-js`. Try https://github.com/es-shims.");return On(t)},Ot.isNil=function(t){return null==t},Ot.isNull=function(t){return null===t},Ot.isNumber=qe,Ot.isObject=Ze,Ot.isObjectLike=Te,Ot.isPlainObject=Ve,Ot.isRegExp=Ke,Ot.isSafeInteger=function(t){return Ne(t)&&t>=-9007199254740991&&9007199254740991>=t; -},Ot.isSet=function(t){return Te(t)&&"[object Set]"==qr(t)},Ot.isString=Ge,Ot.isSymbol=Je,Ot.isTypedArray=Ye,Ot.isUndefined=function(t){return t===T},Ot.isWeakMap=function(t){return Te(t)&&"[object WeakMap]"==qr(t)},Ot.isWeakSet=function(t){return Te(t)&&"[object WeakSet]"==Mu.call(t)},Ot.join=function(t,n){return t?Hu.call(t,n):""},Ot.kebabCase=Di,Ot.last=ve,Ot.lastIndexOf=function(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e;if(r!==T&&(u=Xe(r),u=(0>u?Xu(e+u,0):to(u,e-1))+1),n!==n)return M(t,u-1,true); -for(;u--;)if(t[u]===n)return u;return-1},Ot.lowerCase=Fi,Ot.lowerFirst=Ni,Ot.lt=xi,Ot.lte=ji,Ot.max=function(t){return t&&t.length?an(t,pu,dn):T},Ot.maxBy=function(t,n){return t&&t.length?an(t,Fr(n),dn):T},Ot.mean=function(t){return b(t,pu)},Ot.meanBy=function(t,n){return b(t,Fr(n))},Ot.min=function(t){return t&&t.length?an(t,pu,Sn):T},Ot.minBy=function(t,n){return t&&t.length?an(t,Fr(n),Sn):T},Ot.stubArray=yu,Ot.stubFalse=bu,Ot.stubObject=function(){return{}},Ot.stubString=function(){return""},Ot.stubTrue=function(){ -return true},Ot.multiply=cf,Ot.nth=function(t,n){return t&&t.length?Ln(t,Xe(n)):T},Ot.noConflict=function(){return Kt._===this&&(Kt._=Cu),this},Ot.noop=gu,Ot.now=Ee,Ot.pad=function(t,n,r){t=eu(t);var e=(n=Xe(n))?N(t):0;return!n||e>=n?t:(n=(n-e)/2,Sr(Gu(n),r)+t+Sr(Ku(n),r))},Ot.padEnd=function(t,n,r){t=eu(t);var e=(n=Xe(n))?N(t):0;return n&&n>e?t+Sr(n-e,r):t},Ot.padStart=function(t,n,r){t=eu(t);var e=(n=Xe(n))?N(t):0;return n&&n>e?Sr(n-e,r)+t:t},Ot.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n), -t=eu(t).replace(ct,""),no(t,n||(vt.test(t)?16:10))},Ot.random=function(t,n,r){if(r&&typeof r!="boolean"&&te(t,n,r)&&(n=r=T),r===T&&(typeof n=="boolean"?(r=n,n=T):typeof t=="boolean"&&(r=t,t=T)),t===T&&n===T?(t=0,n=1):(t=nu(t)||0,n===T?(n=t,t=0):n=nu(n)||0),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=ro(),to(t+r*(n-t+Ft("1e-"+((r+"").length-1))),n)):Nn(t,n)},Ot.reduce=function(t,n,r){var e=yi(t)?h:x,u=3>arguments.length;return e(t,Fr(n,4),r,u,Ao)},Ot.reduceRight=function(t,n,r){var e=yi(t)?p:x,u=3>arguments.length; -return e(t,Fr(n,4),r,u,Oo)},Ot.repeat=function(t,n,r){return n=(r?te(t,n,r):n===T)?1:Xe(n),Pn(eu(t),n)},Ot.replace=function(){var t=arguments,n=eu(t[0]);return 3>t.length?n:eo.call(n,t[1],t[2])},Ot.result=function(t,n,r){n=ne(n,t)?[n]:er(n);var e=-1,u=n.length;for(u||(t=T,u=1);++e<u;){var o=null==t?T:t[fe(n[e])];o===T&&(e=u,o=r),t=Fe(o)?o.call(t):o}return t},Ot.round=af,Ot.runInContext=Z,Ot.sample=function(t){t=Ue(t)?t:cu(t);var n=t.length;return n>0?t[Nn(0,n-1)]:T},Ot.size=function(t){if(null==t)return 0; -if(Ue(t)){var n=t.length;return n&&Ge(t)?N(t):n}return Te(t)&&(n=qr(t),"[object Map]"==n||"[object Set]"==n)?t.size:iu(t).length},Ot.snakeCase=Pi,Ot.some=function(t,n,r){var e=yi(t)?_:qn;return r&&te(t,n,r)&&(n=T),e(t,Fr(n,3))},Ot.sortedIndex=function(t,n){return Vn(t,n)},Ot.sortedIndexBy=function(t,n,r){return Kn(t,n,Fr(r))},Ot.sortedIndexOf=function(t,n){var r=t?t.length:0;if(r){var e=Vn(t,n);if(r>e&&Ce(t[e],n))return e}return-1},Ot.sortedLastIndex=function(t,n){return Vn(t,n,true)},Ot.sortedLastIndexBy=function(t,n,r){ -return Kn(t,n,Fr(r),true)},Ot.sortedLastIndexOf=function(t,n){if(t&&t.length){var r=Vn(t,n,true)-1;if(Ce(t[r],n))return r}return-1},Ot.startCase=Zi,Ot.startsWith=function(t,n,r){return t=eu(t),r=nn(Xe(r),0,t.length),t.lastIndexOf(Yn(n),r)==r},Ot.subtract=lf,Ot.sum=function(t){return t&&t.length?w(t,pu):0},Ot.sumBy=function(t,n){return t&&t.length?w(t,Fr(n)):0},Ot.template=function(t,n,r){var e=Ot.templateSettings;r&&te(t,n,r)&&(n=T),t=eu(t),n=Ai({},n,e,Vt),r=Ai({},n.imports,e.imports,Vt);var u,o,i=iu(r),f=k(r,i),c=0; -r=n.interpolate||wt;var a="__p+='";r=mu((n.escape||wt).source+"|"+r.source+"|"+(r===rt?pt:wt).source+"|"+(n.evaluate||wt).source+"|$","g");var l="sourceURL"in n?"//# sourceURL="+n.sourceURL+"\n":"";if(t.replace(r,function(n,r,e,i,f,l){return e||(e=i),a+=t.slice(c,l).replace(mt,L),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+n.length,n}),a+="';",(n=n.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(K,""):a).replace(G,"$1").replace(J,"$1;"), -a="function("+(n||"obj")+"){"+(n?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",n=Vi(function(){return Function(i,l+"return "+a).apply(T,f)}),n.source=a,De(n))throw n;return n},Ot.times=function(t,n){if(t=Xe(t),1>t||t>9007199254740991)return[];var r=4294967295,e=to(t,4294967295);for(n=Fr(n),t-=4294967295,e=m(e,n);++r<t;)n(r);return e},Ot.toFinite=Qe,Ot.toInteger=Xe,Ot.toLength=tu,Ot.toLower=function(t){ -return eu(t).toLowerCase()},Ot.toNumber=nu,Ot.toSafeInteger=function(t){return nn(Xe(t),-9007199254740991,9007199254740991)},Ot.toString=eu,Ot.toUpper=function(t){return eu(t).toUpperCase()},Ot.trim=function(t,n,r){return(t=eu(t))&&(r||n===T)?t.replace(ct,""):t&&(n=Yn(n))?(t=t.match(It),n=n.match(It),ur(t,S(t,n),I(t,n)+1).join("")):t},Ot.trimEnd=function(t,n,r){return(t=eu(t))&&(r||n===T)?t.replace(lt,""):t&&(n=Yn(n))?(t=t.match(It),n=I(t,n.match(It))+1,ur(t,0,n).join("")):t},Ot.trimStart=function(t,n,r){ -return(t=eu(t))&&(r||n===T)?t.replace(at,""):t&&(n=Yn(n))?(t=t.match(It),n=S(t,n.match(It)),ur(t,n).join("")):t},Ot.truncate=function(t,n){var r=30,e="...";if(Ze(n))var u="separator"in n?n.separator:u,r="length"in n?Xe(n.length):r,e="omission"in n?Yn(n.omission):e;t=eu(t);var o=t.length;if(Wt.test(t))var i=t.match(It),o=i.length;if(r>=o)return t;if(o=r-N(e),1>o)return e;if(r=i?ur(i,0,o).join(""):t.slice(0,o),u===T)return r+e;if(i&&(o+=r.length-o),Ke(u)){if(t.slice(o).search(u)){var f=r;for(u.global||(u=mu(u.source,eu(_t.exec(u))+"g")), -u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===T?o:c)}}else t.indexOf(Yn(u),o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},Ot.unescape=function(t){return(t=eu(t))&&Q.test(t)?t.replace(Y,P):t},Ot.uniqueId=function(t){var n=++Bu;return eu(t)+n},Ot.upperCase=Ti,Ot.upperFirst=qi,Ot.each=me,Ot.eachRight=Ae,Ot.first=_e,vu(Ot,function(){var t={};return hn(Ot,function(n,r){Wu.call(Ot.prototype,r)||(t[r]=n)}),t}(),{chain:false}),Ot.VERSION="4.13.1",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){ -Ot[t].placeholder=Ot}),u(["drop","take"],function(t,n){Ut.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new Ut(this);r=r===T?1:Xu(Xe(r),0);var u=this.clone();return e?u.__takeCount__=to(r,u.__takeCount__):u.__views__.push({size:to(r,4294967295),type:t+(0>u.__dir__?"Right":"")}),u},Ut.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){var r=n+1,e=1==r||3==r;Ut.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({ -iteratee:Fr(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");Ut.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right");Ut.prototype[t]=function(){return this.__filtered__?new Ut(this):this[r](1)}}),Ut.prototype.compact=function(){return this.filter(pu)},Ut.prototype.find=function(t){return this.filter(t).head()},Ut.prototype.findLast=function(t){return this.reverse().find(t); -},Ut.prototype.invokeMap=Me(function(t,n){return typeof t=="function"?new Ut(this):this.map(function(r){return wn(r,t,n)})}),Ut.prototype.reject=function(t){return t=Fr(t,3),this.filter(function(n){return!t(n)})},Ut.prototype.slice=function(t,n){t=Xe(t);var r=this;return r.__filtered__&&(t>0||0>n)?new Ut(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==T&&(n=Xe(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},Ut.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ut.prototype.toArray=function(){ -return this.take(4294967295)},hn(Ut.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=Ot[e?"take"+("last"==n?"Right":""):n],o=e||/^find/.test(n);u&&(Ot.prototype[n]=function(){function n(t){return t=u.apply(Ot,s([t],f)),e&&h?t[0]:t}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof Ut,a=f[0],l=c||yi(i);l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=o&&!h,c=c&&!p;return!o&&l?(i=c?i:new Ut(this), -i=t.apply(i,f),i.__actions__.push({func:je,args:[n],thisArg:T}),new zt(i,h)):a&&c?t.apply(this,f):(i=this.thru(n),a?e?i.value()[0]:i.value():i)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=Ou[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t);Ot.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){var u=this.value();return n.apply(yi(u)?u:[],t)}return this[r](function(r){return n.apply(yi(r)?r:[],t)})}}),hn(Ut.prototype,function(t,n){ -var r=Ot[n];if(r){var e=r.name+"";(_o[e]||(_o[e]=[])).push({name:n,func:r})}}),_o[Ar(T,2).name]=[{name:"wrapper",func:T}],Ut.prototype.clone=function(){var t=new Ut(this.__wrapped__);return t.__actions__=lr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=lr(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=lr(this.__views__),t},Ut.prototype.reverse=function(){if(this.__filtered__){var t=new Ut(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(), -t.__dir__*=-1;return t},Ut.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=yi(n),u=0>r,o=e?n.length:0;t=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++c<a;){var l=i[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":t-=s;break;case"take":t=to(t,f+s);break;case"takeRight":f=Xu(f,t-s)}}if(t={start:f,end:t},i=t.start,f=t.end,t=f-i,u=u?f:i-1,i=this.__iteratees__,f=i.length,c=0,a=to(t,this.__takeCount__),!e||200>o||o==t&&a==t)return Xn(n,this.__actions__);e=[]; -t:for(;t--&&a>c;){for(u+=r,o=-1,l=n[u];++o<f;){var h=i[o],s=h.type,h=(0,h.iteratee)(l);if(2==s)l=h;else if(!h){if(1==s)continue t;break t}}e[c++]=l}return e},Ot.prototype.at=Xo,Ot.prototype.chain=function(){return xe(this)},Ot.prototype.commit=function(){return new zt(this.value(),this.__chain__)},Ot.prototype.next=function(){this.__values__===T&&(this.__values__=He(this.value()));var t=this.__index__>=this.__values__.length,n=t?T:this.__values__[this.__index__++];return{done:t,value:n}},Ot.prototype.plant=function(t){ -for(var n,r=this;r instanceof kt;){var e=ae(r);e.__index__=0,e.__values__=T,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},Ot.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof Ut?(this.__actions__.length&&(t=new Ut(this)),t=t.reverse(),t.__actions__.push({func:je,args:[de],thisArg:T}),new zt(t,this.__chain__)):this.thru(de)},Ot.prototype.toJSON=Ot.prototype.valueOf=Ot.prototype.value=function(){return Xn(this.__wrapped__,this.__actions__)},Zu&&(Ot.prototype[Zu]=we), -Ot}var T,q=1/0,V=NaN,K=/\b__p\+='';/g,G=/\b(__p\+=)''\+/g,J=/(__e\(.*?\)|\b__t\))\+'';/g,Y=/&(?:amp|lt|gt|quot|#39|#96);/g,H=/[&<>"'`]/g,Q=RegExp(Y.source),X=RegExp(H.source),tt=/<%-([\s\S]+?)%>/g,nt=/<%([\s\S]+?)%>/g,rt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ut=/^\w*$/,ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ft=RegExp(it.source),ct=/^\s+|\s+$/g,at=/^\s+/,lt=/\s+$/,st=/[a-zA-Z0-9]+/g,ht=/\\(\\)?/g,pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_t=/\w*$/,vt=/^0x/i,gt=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,yt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,xt=/^(?:0|[1-9]\d*)$/,jt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,wt=/($^)/,mt=/['\n\r\u2028\u2029\\]/g,At="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",Ot="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+At,kt="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",Et=RegExp("['\u2019]","g"),St=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),It=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+kt+At,"g"),Rt=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d+",Ot].join("|"),"g"),Wt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),Bt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Lt="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ isFinite parseInt setTimeout".split(" "),Mt={}; -Mt["[object Float32Array]"]=Mt["[object Float64Array]"]=Mt["[object Int8Array]"]=Mt["[object Int16Array]"]=Mt["[object Int32Array]"]=Mt["[object Uint8Array]"]=Mt["[object Uint8ClampedArray]"]=Mt["[object Uint16Array]"]=Mt["[object Uint32Array]"]=true,Mt["[object Arguments]"]=Mt["[object Array]"]=Mt["[object ArrayBuffer]"]=Mt["[object Boolean]"]=Mt["[object DataView]"]=Mt["[object Date]"]=Mt["[object Error]"]=Mt["[object Function]"]=Mt["[object Map]"]=Mt["[object Number]"]=Mt["[object Object]"]=Mt["[object RegExp]"]=Mt["[object Set]"]=Mt["[object String]"]=Mt["[object WeakMap]"]=false; -var Ct={};Ct["[object Arguments]"]=Ct["[object Array]"]=Ct["[object ArrayBuffer]"]=Ct["[object DataView]"]=Ct["[object Boolean]"]=Ct["[object Date]"]=Ct["[object Float32Array]"]=Ct["[object Float64Array]"]=Ct["[object Int8Array]"]=Ct["[object Int16Array]"]=Ct["[object Int32Array]"]=Ct["[object Map]"]=Ct["[object Number]"]=Ct["[object Object]"]=Ct["[object RegExp]"]=Ct["[object Set]"]=Ct["[object String]"]=Ct["[object Symbol]"]=Ct["[object Uint8Array]"]=Ct["[object Uint8ClampedArray]"]=Ct["[object Uint16Array]"]=Ct["[object Uint32Array]"]=true, -Ct["[object Error]"]=Ct["[object Function]"]=Ct["[object WeakMap]"]=false;var zt={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O", -"\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Ut={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},$t={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Dt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ft=parseFloat,Nt=parseInt,Pt=typeof exports=="object"&&exports,Zt=Pt&&typeof module=="object"&&module,Tt=Zt&&Zt.exports===Pt,qt=R(typeof self=="object"&&self),Vt=R(typeof this=="object"&&this),Kt=R(typeof global=="object"&&global)||qt||Vt||Function("return this")(),Gt=Z(); -(qt||{})._=Gt,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return Gt}):Zt?((Zt.exports=Gt)._=Gt,Pt._=Gt):Kt._=Gt}).call(this);
\ No newline at end of file diff --git a/nz-admin/src/main/resources/statics/libs/router.js b/nz-admin/src/main/resources/statics/libs/router.js deleted file mode 100644 index 57ff6efa..00000000 --- a/nz-admin/src/main/resources/statics/libs/router.js +++ /dev/null @@ -1,97 +0,0 @@ -(function() { - window.Router = function() { - var self = this; - - self.hashList = {}; /* 路由表 */ - self.index = null; - self.key = '!'; - - window.onhashchange = function() { - self.reload(); - }; - }; - - /** - * 添加路由,如果路由已经存在则会覆盖 - * @param addr: 地址 - * @param callback: 回调函数,调用回调函数的时候同时也会传入相应参数 - */ - Router.prototype.add = function(addr, callback) { - var self = this; - - self.hashList[addr] = callback; - }; - - /** - * 删除路由 - * @param addr: 地址 - */ - Router.prototype.remove = function(addr) { - var self = this; - - delete self.hashList[addr]; - }; - - /** - * 设置主页地址 - * @param index: 主页地址 - */ - Router.prototype.setIndex = function(index) { - var self = this; - - self.index = index; - }; - - - /** - * 跳转到指定地址 - * @param addr: 地址值 - */ - Router.prototype.go = function(addr) { - var self = this; - - window.location.hash = '#' + self.key + addr; - }; - - /** - * 重载页面 - */ - Router.prototype.reload = function() { - var self = this; - - var hash = window.location.hash.replace('#' + self.key, ''); - //var addr = hash.split('/')[0]; - var addr = hash; - var cb = getCb(addr, self.hashList); - if(cb != false) { - var arr = hash.split('/'); - arr.shift(); - cb.apply(self, arr); - } - else { - self.index && self.go(self.index); - } - }; - - /** - * 开始路由,实际上只是为了当直接访问路由路由地址的时候能够及时调用回调 - */ - Router.prototype.start = function() { - var self = this; - - self.reload(); - } - - /** - * 获取callback - * @return false or callback - */ - function getCb(addr, hashList) { - for(var key in hashList) { - if(key == addr) { - return hashList[key] - } - } - return false; - } -})();
\ No newline at end of file diff --git a/nz-admin/src/main/resources/statics/libs/validator.js b/nz-admin/src/main/resources/statics/libs/validator.js deleted file mode 100644 index c5967c35..00000000 --- a/nz-admin/src/main/resources/statics/libs/validator.js +++ /dev/null @@ -1,1305 +0,0 @@ -/*! - * Copyright (c) 2016 Chris O'Hara <[email protected]> - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global.validator = factory()); -}(this, (function () { 'use strict'; - -function assertString(input) { - var isString = typeof input === 'string' || input instanceof String; - - if (!isString) { - throw new TypeError('This library (validator.js) validates strings only'); - } -} - -function toDate(date) { - assertString(date); - date = Date.parse(date); - return !isNaN(date) ? new Date(date) : null; -} - -function toFloat(str) { - assertString(str); - return parseFloat(str); -} - -function toInt(str, radix) { - assertString(str); - return parseInt(str, radix || 10); -} - -function toBoolean(str, strict) { - assertString(str); - if (strict) { - return str === '1' || str === 'true'; - } - return str !== '0' && str !== 'false' && str !== ''; -} - -function equals(str, comparison) { - assertString(str); - return str === comparison; -} - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; -} : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; -}; - -function toString(input) { - if ((typeof input === 'undefined' ? 'undefined' : _typeof(input)) === 'object' && input !== null) { - if (typeof input.toString === 'function') { - input = input.toString(); - } else { - input = '[object Object]'; - } - } else if (input === null || typeof input === 'undefined' || isNaN(input) && !input.length) { - input = ''; - } - return String(input); -} - -function contains(str, elem) { - assertString(str); - return str.indexOf(toString(elem)) >= 0; -} - -function matches(str, pattern, modifiers) { - assertString(str); - if (Object.prototype.toString.call(pattern) !== '[object RegExp]') { - pattern = new RegExp(pattern, modifiers); - } - return pattern.test(str); -} - -function merge() { - var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var defaults = arguments[1]; - - for (var key in defaults) { - if (typeof obj[key] === 'undefined') { - obj[key] = defaults[key]; - } - } - return obj; -} - -/* eslint-disable prefer-rest-params */ -function isByteLength(str, options) { - assertString(str); - var min = void 0; - var max = void 0; - if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') { - min = options.min || 0; - max = options.max; - } else { - // backwards compatibility: isByteLength(str, min [, max]) - min = arguments[1]; - max = arguments[2]; - } - var len = encodeURI(str).split(/%..|./).length - 1; - return len >= min && (typeof max === 'undefined' || len <= max); -} - -var default_fqdn_options = { - require_tld: true, - allow_underscores: false, - allow_trailing_dot: false -}; - -function isFDQN(str, options) { - assertString(str); - options = merge(options, default_fqdn_options); - - /* Remove the optional trailing dot before checking validity */ - if (options.allow_trailing_dot && str[str.length - 1] === '.') { - str = str.substring(0, str.length - 1); - } - var parts = str.split('.'); - if (options.require_tld) { - var tld = parts.pop(); - if (!parts.length || !/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) { - return false; - } - // disallow spaces - if (/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(tld)) { - return false; - } - } - for (var part, i = 0; i < parts.length; i++) { - part = parts[i]; - if (options.allow_underscores) { - part = part.replace(/_/g, ''); - } - if (!/^[a-z\u00a1-\uffff0-9-]+$/i.test(part)) { - return false; - } - // disallow full-width chars - if (/[\uff01-\uff5e]/.test(part)) { - return false; - } - if (part[0] === '-' || part[part.length - 1] === '-') { - return false; - } - } - return true; -} - -var default_email_options = { - allow_display_name: false, - require_display_name: false, - allow_utf8_local_part: true, - require_tld: true -}; - -/* eslint-disable max-len */ -/* eslint-disable no-control-regex */ -var displayName = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i; -var emailUserPart = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i; -var quotedEmailUser = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i; -var emailUserUtf8Part = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i; -var quotedEmailUserUtf8 = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i; -/* eslint-enable max-len */ -/* eslint-enable no-control-regex */ - -function isEmail(str, options) { - assertString(str); - options = merge(options, default_email_options); - - if (options.require_display_name || options.allow_display_name) { - var display_email = str.match(displayName); - if (display_email) { - str = display_email[1]; - } else if (options.require_display_name) { - return false; - } - } - - var parts = str.split('@'); - var domain = parts.pop(); - var user = parts.join('@'); - - var lower_domain = domain.toLowerCase(); - if (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com') { - user = user.replace(/\./g, '').toLowerCase(); - } - - if (!isByteLength(user, { max: 64 }) || !isByteLength(domain, { max: 254 })) { - return false; - } - - if (!isFDQN(domain, { require_tld: options.require_tld })) { - return false; - } - - if (user[0] === '"') { - user = user.slice(1, user.length - 1); - return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user); - } - - var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart; - - var user_parts = user.split('.'); - for (var i = 0; i < user_parts.length; i++) { - if (!pattern.test(user_parts[i])) { - return false; - } - } - - return true; -} - -var ipv4Maybe = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/; -var ipv6Block = /^[0-9A-F]{1,4}$/i; - -function isIP(str) { - var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; - - assertString(str); - version = String(version); - if (!version) { - return isIP(str, 4) || isIP(str, 6); - } else if (version === '4') { - if (!ipv4Maybe.test(str)) { - return false; - } - var parts = str.split('.').sort(function (a, b) { - return a - b; - }); - return parts[3] <= 255; - } else if (version === '6') { - var blocks = str.split(':'); - var foundOmissionBlock = false; // marker to indicate :: - - // At least some OS accept the last 32 bits of an IPv6 address - // (i.e. 2 of the blocks) in IPv4 notation, and RFC 3493 says - // that '::ffff:a.b.c.d' is valid for IPv4-mapped IPv6 addresses, - // and '::a.b.c.d' is deprecated, but also valid. - var foundIPv4TransitionBlock = isIP(blocks[blocks.length - 1], 4); - var expectedNumberOfBlocks = foundIPv4TransitionBlock ? 7 : 8; - - if (blocks.length > expectedNumberOfBlocks) { - return false; - } - // initial or final :: - if (str === '::') { - return true; - } else if (str.substr(0, 2) === '::') { - blocks.shift(); - blocks.shift(); - foundOmissionBlock = true; - } else if (str.substr(str.length - 2) === '::') { - blocks.pop(); - blocks.pop(); - foundOmissionBlock = true; - } - - for (var i = 0; i < blocks.length; ++i) { - // test for a :: which can not be at the string start/end - // since those cases have been handled above - if (blocks[i] === '' && i > 0 && i < blocks.length - 1) { - if (foundOmissionBlock) { - return false; // multiple :: in address - } - foundOmissionBlock = true; - } else if (foundIPv4TransitionBlock && i === blocks.length - 1) { - // it has been checked before that the last - // block is a valid IPv4 address - } else if (!ipv6Block.test(blocks[i])) { - return false; - } - } - if (foundOmissionBlock) { - return blocks.length >= 1; - } - return blocks.length === expectedNumberOfBlocks; - } - return false; -} - -var default_url_options = { - protocols: ['http', 'https', 'ftp'], - require_tld: true, - require_protocol: false, - require_host: true, - require_valid_protocol: true, - allow_underscores: false, - allow_trailing_dot: false, - allow_protocol_relative_urls: false -}; - -var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/; - -function isRegExp(obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; -} - -function checkHost(host, matches) { - for (var i = 0; i < matches.length; i++) { - var match = matches[i]; - if (host === match || isRegExp(match) && match.test(host)) { - return true; - } - } - return false; -} - -function isURL(url, options) { - assertString(url); - if (!url || url.length >= 2083 || /[\s<>]/.test(url)) { - return false; - } - if (url.indexOf('mailto:') === 0) { - return false; - } - options = merge(options, default_url_options); - var protocol = void 0, - auth = void 0, - host = void 0, - hostname = void 0, - port = void 0, - port_str = void 0, - split = void 0, - ipv6 = void 0; - - split = url.split('#'); - url = split.shift(); - - split = url.split('?'); - url = split.shift(); - - split = url.split('://'); - if (split.length > 1) { - protocol = split.shift(); - if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) { - return false; - } - } else if (options.require_protocol) { - return false; - } else if (options.allow_protocol_relative_urls && url.substr(0, 2) === '//') { - split[0] = url.substr(2); - } - url = split.join('://'); - - if (url === '') { - return false; - } - - split = url.split('/'); - url = split.shift(); - - if (url === '' && !options.require_host) { - return true; - } - - split = url.split('@'); - if (split.length > 1) { - auth = split.shift(); - if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) { - return false; - } - } - hostname = split.join('@'); - - port_str = null; - ipv6 = null; - var ipv6_match = hostname.match(wrapped_ipv6); - if (ipv6_match) { - host = ''; - ipv6 = ipv6_match[1]; - port_str = ipv6_match[2] || null; - } else { - split = hostname.split(':'); - host = split.shift(); - if (split.length) { - port_str = split.join(':'); - } - } - - if (port_str !== null) { - port = parseInt(port_str, 10); - if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) { - return false; - } - } - - if (!isIP(host) && !isFDQN(host, options) && (!ipv6 || !isIP(ipv6, 6))) { - return false; - } - - host = host || ipv6; - - if (options.host_whitelist && !checkHost(host, options.host_whitelist)) { - return false; - } - if (options.host_blacklist && checkHost(host, options.host_blacklist)) { - return false; - } - - return true; -} - -var macAddress = /^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/; - -function isMACAddress(str) { - assertString(str); - return macAddress.test(str); -} - -function isBoolean(str) { - assertString(str); - return ['true', 'false', '1', '0'].indexOf(str) >= 0; -} - -var alpha = { - 'en-US': /^[A-Z]+$/i, - 'cs-CZ': /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, - 'da-DK': /^[A-ZÆØÅ]+$/i, - 'de-DE': /^[A-ZÄÖÜß]+$/i, - 'es-ES': /^[A-ZÁÉÍÑÓÚÜ]+$/i, - 'fr-FR': /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, - 'nl-NL': /^[A-ZÉËÏÓÖÜ]+$/i, - 'hu-HU': /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i, - 'pl-PL': /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i, - 'pt-PT': /^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i, - 'ru-RU': /^[А-ЯЁ]+$/i, - 'sr-RS@latin': /^[A-ZČĆŽŠĐ]+$/i, - 'sr-RS': /^[А-ЯЂЈЉЊЋЏ]+$/i, - 'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i, - 'uk-UA': /^[А-ЩЬЮЯЄIЇҐ]+$/i, - ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/ -}; - -var alphanumeric = { - 'en-US': /^[0-9A-Z]+$/i, - 'cs-CZ': /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, - 'da-DK': /^[0-9A-ZÆØÅ]$/i, - 'de-DE': /^[0-9A-ZÄÖÜß]+$/i, - 'es-ES': /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i, - 'fr-FR': /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, - 'hu-HU': /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i, - 'nl-NL': /^[0-9A-ZÉËÏÓÖÜ]+$/i, - 'pl-PL': /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i, - 'pt-PT': /^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i, - 'ru-RU': /^[0-9А-ЯЁ]+$/i, - 'sr-RS@latin': /^[0-9A-ZČĆŽŠĐ]+$/i, - 'sr-RS': /^[0-9А-ЯЂЈЉЊЋЏ]+$/i, - 'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i, - 'uk-UA': /^[0-9А-ЩЬЮЯЄIЇҐ]+$/i, - ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/ -}; - -var englishLocales = ['AU', 'GB', 'HK', 'IN', 'NZ', 'ZA', 'ZM']; - -for (var locale, i = 0; i < englishLocales.length; i++) { - locale = 'en-' + englishLocales[i]; - alpha[locale] = alpha['en-US']; - alphanumeric[locale] = alphanumeric['en-US']; -} - -alpha['pt-BR'] = alpha['pt-PT']; -alphanumeric['pt-BR'] = alphanumeric['pt-PT']; - -// Source: http://www.localeplanet.com/java/ -var arabicLocales = ['AE', 'BH', 'DZ', 'EG', 'IQ', 'JO', 'KW', 'LB', 'LY', 'MA', 'QM', 'QA', 'SA', 'SD', 'SY', 'TN', 'YE']; - -for (var _locale, _i = 0; _i < arabicLocales.length; _i++) { - _locale = 'ar-' + arabicLocales[_i]; - alpha[_locale] = alpha.ar; - alphanumeric[_locale] = alphanumeric.ar; -} - -function isAlpha(str) { - var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US'; - - assertString(str); - if (locale in alpha) { - return alpha[locale].test(str); - } - throw new Error('Invalid locale \'' + locale + '\''); -} - -function isAlphanumeric(str) { - var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US'; - - assertString(str); - if (locale in alphanumeric) { - return alphanumeric[locale].test(str); - } - throw new Error('Invalid locale \'' + locale + '\''); -} - -var numeric = /^[-+]?[0-9]+$/; - -function isNumeric(str) { - assertString(str); - return numeric.test(str); -} - -function isLowercase(str) { - assertString(str); - return str === str.toLowerCase(); -} - -function isUppercase(str) { - assertString(str); - return str === str.toUpperCase(); -} - -/* eslint-disable no-control-regex */ -var ascii = /^[\x00-\x7F]+$/; -/* eslint-enable no-control-regex */ - -function isAscii(str) { - assertString(str); - return ascii.test(str); -} - -var fullWidth = /[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; - -function isFullWidth(str) { - assertString(str); - return fullWidth.test(str); -} - -var halfWidth = /[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; - -function isHalfWidth(str) { - assertString(str); - return halfWidth.test(str); -} - -function isVariableWidth(str) { - assertString(str); - return fullWidth.test(str) && halfWidth.test(str); -} - -/* eslint-disable no-control-regex */ -var multibyte = /[^\x00-\x7F]/; -/* eslint-enable no-control-regex */ - -function isMultibyte(str) { - assertString(str); - return multibyte.test(str); -} - -var surrogatePair = /[\uD800-\uDBFF][\uDC00-\uDFFF]/; - -function isSurrogatePair(str) { - assertString(str); - return surrogatePair.test(str); -} - -var int = /^(?:[-+]?(?:0|[1-9][0-9]*))$/; -var intLeadingZeroes = /^[-+]?[0-9]+$/; - -function isInt(str, options) { - assertString(str); - options = options || {}; - - // Get the regex to use for testing, based on whether - // leading zeroes are allowed or not. - var regex = options.hasOwnProperty('allow_leading_zeroes') && !options.allow_leading_zeroes ? int : intLeadingZeroes; - - // Check min/max/lt/gt - var minCheckPassed = !options.hasOwnProperty('min') || str >= options.min; - var maxCheckPassed = !options.hasOwnProperty('max') || str <= options.max; - var ltCheckPassed = !options.hasOwnProperty('lt') || str < options.lt; - var gtCheckPassed = !options.hasOwnProperty('gt') || str > options.gt; - - return regex.test(str) && minCheckPassed && maxCheckPassed && ltCheckPassed && gtCheckPassed; -} - -var float = /^(?:[-+])?(?:[0-9]+)?(?:\.[0-9]*)?(?:[eE][\+\-]?(?:[0-9]+))?$/; - -function isFloat(str, options) { - assertString(str); - options = options || {}; - if (str === '' || str === '.') { - return false; - } - return float.test(str) && (!options.hasOwnProperty('min') || str >= options.min) && (!options.hasOwnProperty('max') || str <= options.max) && (!options.hasOwnProperty('lt') || str < options.lt) && (!options.hasOwnProperty('gt') || str > options.gt); -} - -var decimal = /^[-+]?([0-9]+|\.[0-9]+|[0-9]+\.[0-9]+)$/; - -function isDecimal(str) { - assertString(str); - return str !== '' && decimal.test(str); -} - -var hexadecimal = /^[0-9A-F]+$/i; - -function isHexadecimal(str) { - assertString(str); - return hexadecimal.test(str); -} - -function isDivisibleBy(str, num) { - assertString(str); - return toFloat(str) % parseInt(num, 10) === 0; -} - -var hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{6})$/i; - -function isHexColor(str) { - assertString(str); - return hexcolor.test(str); -} - -// see http://isrc.ifpi.org/en/isrc-standard/code-syntax -var isrc = /^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/; - -function isISRC(str) { - assertString(str); - return isrc.test(str); -} - -var md5 = /^[a-f0-9]{32}$/; - -function isMD5(str) { - assertString(str); - return md5.test(str); -} - -function isJSON(str) { - assertString(str); - try { - var obj = JSON.parse(str); - return !!obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object'; - } catch (e) {/* ignore */} - return false; -} - -function isEmpty(str) { - assertString(str); - return str.length === 0; -} - -/* eslint-disable prefer-rest-params */ -function isLength(str, options) { - assertString(str); - var min = void 0; - var max = void 0; - if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') { - min = options.min || 0; - max = options.max; - } else { - // backwards compatibility: isLength(str, min [, max]) - min = arguments[1]; - max = arguments[2]; - } - var surrogatePairs = str.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g) || []; - var len = str.length - surrogatePairs.length; - return len >= min && (typeof max === 'undefined' || len <= max); -} - -var uuid = { - 3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i, - 4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, - 5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, - all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i -}; - -function isUUID(str) { - var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'all'; - - assertString(str); - var pattern = uuid[version]; - return pattern && pattern.test(str); -} - -function isMongoId(str) { - assertString(str); - return isHexadecimal(str) && str.length === 24; -} - -function isAfter(str) { - var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(new Date()); - - assertString(str); - var comparison = toDate(date); - var original = toDate(str); - return !!(original && comparison && original > comparison); -} - -function isBefore(str) { - var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(new Date()); - - assertString(str); - var comparison = toDate(date); - var original = toDate(str); - return !!(original && comparison && original < comparison); -} - -function isIn(str, options) { - assertString(str); - var i = void 0; - if (Object.prototype.toString.call(options) === '[object Array]') { - var array = []; - for (i in options) { - if ({}.hasOwnProperty.call(options, i)) { - array[i] = toString(options[i]); - } - } - return array.indexOf(str) >= 0; - } else if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') { - return options.hasOwnProperty(str); - } else if (options && typeof options.indexOf === 'function') { - return options.indexOf(str) >= 0; - } - return false; -} - -/* eslint-disable max-len */ -var creditCard = /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|62[0-9]{14})$/; -/* eslint-enable max-len */ - -function isCreditCard(str) { - assertString(str); - var sanitized = str.replace(/[- ]+/g, ''); - if (!creditCard.test(sanitized)) { - return false; - } - var sum = 0; - var digit = void 0; - var tmpNum = void 0; - var shouldDouble = void 0; - for (var i = sanitized.length - 1; i >= 0; i--) { - digit = sanitized.substring(i, i + 1); - tmpNum = parseInt(digit, 10); - if (shouldDouble) { - tmpNum *= 2; - if (tmpNum >= 10) { - sum += tmpNum % 10 + 1; - } else { - sum += tmpNum; - } - } else { - sum += tmpNum; - } - shouldDouble = !shouldDouble; - } - return !!(sum % 10 === 0 ? sanitized : false); -} - -var isin = /^[A-Z]{2}[0-9A-Z]{9}[0-9]$/; - -function isISIN(str) { - assertString(str); - if (!isin.test(str)) { - return false; - } - - var checksumStr = str.replace(/[A-Z]/g, function (character) { - return parseInt(character, 36); - }); - - var sum = 0; - var digit = void 0; - var tmpNum = void 0; - var shouldDouble = true; - for (var i = checksumStr.length - 2; i >= 0; i--) { - digit = checksumStr.substring(i, i + 1); - tmpNum = parseInt(digit, 10); - if (shouldDouble) { - tmpNum *= 2; - if (tmpNum >= 10) { - sum += tmpNum + 1; - } else { - sum += tmpNum; - } - } else { - sum += tmpNum; - } - shouldDouble = !shouldDouble; - } - - return parseInt(str.substr(str.length - 1), 10) === (10000 - sum) % 10; -} - -var isbn10Maybe = /^(?:[0-9]{9}X|[0-9]{10})$/; -var isbn13Maybe = /^(?:[0-9]{13})$/; -var factor = [1, 3]; - -function isISBN(str) { - var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; - - assertString(str); - version = String(version); - if (!version) { - return isISBN(str, 10) || isISBN(str, 13); - } - var sanitized = str.replace(/[\s-]+/g, ''); - var checksum = 0; - var i = void 0; - if (version === '10') { - if (!isbn10Maybe.test(sanitized)) { - return false; - } - for (i = 0; i < 9; i++) { - checksum += (i + 1) * sanitized.charAt(i); - } - if (sanitized.charAt(9) === 'X') { - checksum += 10 * 10; - } else { - checksum += 10 * sanitized.charAt(9); - } - if (checksum % 11 === 0) { - return !!sanitized; - } - } else if (version === '13') { - if (!isbn13Maybe.test(sanitized)) { - return false; - } - for (i = 0; i < 12; i++) { - checksum += factor[i % 2] * sanitized.charAt(i); - } - if (sanitized.charAt(12) - (10 - checksum % 10) % 10 === 0) { - return !!sanitized; - } - } - return false; -} - -var issn = '^\\d{4}-?\\d{3}[\\dX]$'; - -function isISSN(str) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - assertString(str); - var testIssn = issn; - testIssn = options.require_hyphen ? testIssn.replace('?', '') : testIssn; - testIssn = options.case_sensitive ? new RegExp(testIssn) : new RegExp(testIssn, 'i'); - if (!testIssn.test(str)) { - return false; - } - var issnDigits = str.replace('-', ''); - var position = 8; - var checksum = 0; - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = issnDigits[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var digit = _step.value; - - var digitValue = digit.toUpperCase() === 'X' ? 10 : +digit; - checksum += digitValue * position; - --position; - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - return checksum % 11 === 0; -} - -/* eslint-disable max-len */ -var phones = { - 'ar-DZ': /^(\+?213|0)(5|6|7)\d{8}$/, - 'ar-SY': /^(!?(\+?963)|0)?9\d{8}$/, - 'ar-SA': /^(!?(\+?966)|0)?5\d{8}$/, - 'en-US': /^(\+?1)?[2-9]\d{2}[2-9](?!11)\d{6}$/, - 'cs-CZ': /^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/, - 'de-DE': /^(\+?49[ \.\-])?([\(]{1}[0-9]{1,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/, - 'da-DK': /^(\+?45)?(\d{8})$/, - 'el-GR': /^(\+?30)?(69\d{8})$/, - 'en-AU': /^(\+?61|0)4\d{8}$/, - 'en-GB': /^(\+?44|0)7\d{9}$/, - 'en-HK': /^(\+?852\-?)?[569]\d{3}\-?\d{4}$/, - 'en-IN': /^(\+?91|0)?[789]\d{9}$/, - 'en-KE': /^(\+?254|0)?[7]\d{8}$/, - 'en-NG': /^(\+?234|0)?[789]\d{9}$/, - 'en-NZ': /^(\+?64|0)2\d{7,9}$/, - 'en-UG': /^(\+?256|0)?[7]\d{8}$/, - 'en-RW': /^(\+?250|0)?[7]\d{8}$/, - 'en-TZ': /^(\+?255|0)?[67]\d{8}$/, - 'en-ZA': /^(\+?27|0)\d{9}$/, - 'en-ZM': /^(\+?26)?09[567]\d{7}$/, - 'es-ES': /^(\+?34)?(6\d{1}|7[1234])\d{7}$/, - 'fi-FI': /^(\+?358|0)\s?(4(0|1|2|4|5|6)?|50)\s?(\d\s?){4,8}\d$/, - 'fa-IR': /^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/, - 'fr-FR': /^(\+?33|0)[67]\d{8}$/, - 'he-IL': /^(\+972|0)([23489]|5[0248]|77)[1-9]\d{6}/, - 'hu-HU': /^(\+?36)(20|30|70)\d{7}$/, - 'lt-LT': /^(\+370|8)\d{8}$/, - 'id-ID': /^(\+?62|0[1-9])[\s|\d]+$/, - 'it-IT': /^(\+?39)?\s?3\d{2} ?\d{6,7}$/, - 'ko-KR': /^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/, - 'ja-JP': /^(\+?81|0)\d{1,4}[ \-]?\d{1,4}[ \-]?\d{4}$/, - 'ms-MY': /^(\+?6?01){1}(([145]{1}(\-|\s)?\d{7,8})|([236789]{1}(\s|\-)?\d{7}))$/, - 'nb-NO': /^(\+?47)?[49]\d{7}$/, - 'nl-BE': /^(\+?32|0)4?\d{8}$/, - 'nn-NO': /^(\+?47)?[49]\d{7}$/, - 'pl-PL': /^(\+?48)? ?[5-8]\d ?\d{3} ?\d{2} ?\d{2}$/, - 'pt-BR': /^(\+?55|0)\-?[1-9]{2}\-?[2-9]{1}\d{3,4}\-?\d{4}$/, - 'pt-PT': /^(\+?351)?9[1236]\d{7}$/, - 'ro-RO': /^(\+?4?0)\s?7\d{2}(\/|\s|\.|\-)?\d{3}(\s|\.|\-)?\d{3}$/, - 'en-PK': /^((\+92)|(0092))-{0,1}\d{3}-{0,1}\d{7}$|^\d{11}$|^\d{4}-\d{7}$/, - 'ru-RU': /^(\+?7|8)?9\d{9}$/, - 'sr-RS': /^(\+3816|06)[- \d]{5,9}$/, - 'tr-TR': /^(\+?90|0)?5\d{9}$/, - 'vi-VN': /^(\+?84|0)?((1(2([0-9])|6([2-9])|88|99))|(9((?!5)[0-9])))([0-9]{7})$/, - 'zh-CN': /^(\+?0?86\-?)?1[345789]\d{9}$/, - 'zh-TW': /^(\+?886\-?|0)?9\d{8}$/ -}; -/* eslint-enable max-len */ - -// aliases -phones['en-CA'] = phones['en-US']; -phones['fr-BE'] = phones['nl-BE']; -phones['zh-HK'] = phones['en-HK']; - -function isMobilePhone(str, locale) { - assertString(str); - if (locale in phones) { - return phones[locale].test(str); - } else if (locale === 'any') { - return !!Object.values(phones).find(function (phone) { - return phone.test(str); - }); - } - throw new Error('Invalid locale \'' + locale + '\''); -} - -function currencyRegex(options) { - var symbol = '(\\' + options.symbol.replace(/\./g, '\\.') + ')' + (options.require_symbol ? '' : '?'), - negative = '-?', - whole_dollar_amount_without_sep = '[1-9]\\d*', - whole_dollar_amount_with_sep = '[1-9]\\d{0,2}(\\' + options.thousands_separator + '\\d{3})*', - valid_whole_dollar_amounts = ['0', whole_dollar_amount_without_sep, whole_dollar_amount_with_sep], - whole_dollar_amount = '(' + valid_whole_dollar_amounts.join('|') + ')?', - decimal_amount = '(\\' + options.decimal_separator + '\\d{2})?'; - var pattern = whole_dollar_amount + decimal_amount; - - // default is negative sign before symbol, but there are two other options (besides parens) - if (options.allow_negatives && !options.parens_for_negatives) { - if (options.negative_sign_after_digits) { - pattern += negative; - } else if (options.negative_sign_before_digits) { - pattern = negative + pattern; - } - } - - // South African Rand, for example, uses R 123 (space) and R-123 (no space) - if (options.allow_negative_sign_placeholder) { - pattern = '( (?!\\-))?' + pattern; - } else if (options.allow_space_after_symbol) { - pattern = ' ?' + pattern; - } else if (options.allow_space_after_digits) { - pattern += '( (?!$))?'; - } - - if (options.symbol_after_digits) { - pattern += symbol; - } else { - pattern = symbol + pattern; - } - - if (options.allow_negatives) { - if (options.parens_for_negatives) { - pattern = '(\\(' + pattern + '\\)|' + pattern + ')'; - } else if (!(options.negative_sign_before_digits || options.negative_sign_after_digits)) { - pattern = negative + pattern; - } - } - - // ensure there's a dollar and/or decimal amount, and that - // it doesn't start with a space or a negative sign followed by a space - return new RegExp('^(?!-? )(?=.*\\d)' + pattern + '$'); -} - -var default_currency_options = { - symbol: '$', - require_symbol: false, - allow_space_after_symbol: false, - symbol_after_digits: false, - allow_negatives: true, - parens_for_negatives: false, - negative_sign_before_digits: false, - negative_sign_after_digits: false, - allow_negative_sign_placeholder: false, - thousands_separator: ',', - decimal_separator: '.', - allow_space_after_digits: false -}; - -function isCurrency(str, options) { - assertString(str); - options = merge(options, default_currency_options); - return currencyRegex(options).test(str); -} - -/* eslint-disable max-len */ -// from http://goo.gl/0ejHHW -var iso8601 = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/; -/* eslint-enable max-len */ - -var isISO8601 = function (str) { - assertString(str); - return iso8601.test(str); -}; - -var notBase64 = /[^A-Z0-9+\/=]/i; - -function isBase64(str) { - assertString(str); - var len = str.length; - if (!len || len % 4 !== 0 || notBase64.test(str)) { - return false; - } - var firstPaddingChar = str.indexOf('='); - return firstPaddingChar === -1 || firstPaddingChar === len - 1 || firstPaddingChar === len - 2 && str[len - 1] === '='; -} - -var dataURI = /^\s*data:([a-z]+\/[a-z0-9\-\+]+(;[a-z\-]+=[a-z0-9\-]+)?)?(;base64)?,[a-z0-9!\$&',\(\)\*\+,;=\-\._~:@\/\?%\s]*\s*$/i; // eslint-disable-line max-len - -function isDataURI(str) { - assertString(str); - return dataURI.test(str); -} - -function ltrim(str, chars) { - assertString(str); - var pattern = chars ? new RegExp('^[' + chars + ']+', 'g') : /^\s+/g; - return str.replace(pattern, ''); -} - -function rtrim(str, chars) { - assertString(str); - var pattern = chars ? new RegExp('[' + chars + ']') : /\s/; - - var idx = str.length - 1; - while (idx >= 0 && pattern.test(str[idx])) { - idx--; - } - - return idx < str.length ? str.substr(0, idx + 1) : str; -} - -function trim(str, chars) { - return rtrim(ltrim(str, chars), chars); -} - -function escape(str) { - assertString(str); - return str.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, ''').replace(/</g, '<').replace(/>/g, '>').replace(/\//g, '/').replace(/\\/g, '\').replace(/`/g, '`'); -} - -function unescape(str) { - assertString(str); - return str.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, "'").replace(/</g, '<').replace(/>/g, '>').replace(///g, '/').replace(/`/g, '`'); -} - -function blacklist(str, chars) { - assertString(str); - return str.replace(new RegExp('[' + chars + ']+', 'g'), ''); -} - -function stripLow(str, keep_new_lines) { - assertString(str); - var chars = keep_new_lines ? '\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F' : '\\x00-\\x1F\\x7F'; - return blacklist(str, chars); -} - -function whitelist(str, chars) { - assertString(str); - return str.replace(new RegExp('[^' + chars + ']+', 'g'), ''); -} - -function isWhitelisted(str, chars) { - assertString(str); - for (var i = str.length - 1; i >= 0; i--) { - if (chars.indexOf(str[i]) === -1) { - return false; - } - } - return true; -} - -var default_normalize_email_options = { - // The following options apply to all email addresses - // Lowercases the local part of the email address. - // Please note this may violate RFC 5321 as per http://stackoverflow.com/a/9808332/192024). - // The domain is always lowercased, as per RFC 1035 - all_lowercase: true, - - // The following conversions are specific to GMail - // Lowercases the local part of the GMail address (known to be case-insensitive) - gmail_lowercase: true, - // Removes dots from the local part of the email address, as that's ignored by GMail - gmail_remove_dots: true, - // Removes the subaddress (e.g. "+foo") from the email address - gmail_remove_subaddress: true, - // Conversts the googlemail.com domain to gmail.com - gmail_convert_googlemaildotcom: true, - - // The following conversions are specific to Outlook.com / Windows Live / Hotmail - // Lowercases the local part of the Outlook.com address (known to be case-insensitive) - outlookdotcom_lowercase: true, - // Removes the subaddress (e.g. "+foo") from the email address - outlookdotcom_remove_subaddress: true, - - // The following conversions are specific to Yahoo - // Lowercases the local part of the Yahoo address (known to be case-insensitive) - yahoo_lowercase: true, - // Removes the subaddress (e.g. "-foo") from the email address - yahoo_remove_subaddress: true, - - // The following conversions are specific to iCloud - // Lowercases the local part of the iCloud address (known to be case-insensitive) - icloud_lowercase: true, - // Removes the subaddress (e.g. "+foo") from the email address - icloud_remove_subaddress: true -}; - -// List of domains used by iCloud -var icloud_domains = ['icloud.com', 'me.com']; - -// List of domains used by Outlook.com and its predecessors -// This list is likely incomplete. -// Partial reference: -// https://blogs.office.com/2013/04/17/outlook-com-gets-two-step-verification-sign-in-by-alias-and-new-international-domains/ -var outlookdotcom_domains = ['hotmail.at', 'hotmail.be', 'hotmail.ca', 'hotmail.cl', 'hotmail.co.il', 'hotmail.co.nz', 'hotmail.co.th', 'hotmail.co.uk', 'hotmail.com', 'hotmail.com.ar', 'hotmail.com.au', 'hotmail.com.br', 'hotmail.com.gr', 'hotmail.com.mx', 'hotmail.com.pe', 'hotmail.com.tr', 'hotmail.com.vn', 'hotmail.cz', 'hotmail.de', 'hotmail.dk', 'hotmail.es', 'hotmail.fr', 'hotmail.hu', 'hotmail.id', 'hotmail.ie', 'hotmail.in', 'hotmail.it', 'hotmail.jp', 'hotmail.kr', 'hotmail.lv', 'hotmail.my', 'hotmail.ph', 'hotmail.pt', 'hotmail.sa', 'hotmail.sg', 'hotmail.sk', 'live.be', 'live.co.uk', 'live.com', 'live.com.ar', 'live.com.mx', 'live.de', 'live.es', 'live.eu', 'live.fr', 'live.it', 'live.nl', 'msn.com', 'outlook.at', 'outlook.be', 'outlook.cl', 'outlook.co.il', 'outlook.co.nz', 'outlook.co.th', 'outlook.com', 'outlook.com.ar', 'outlook.com.au', 'outlook.com.br', 'outlook.com.gr', 'outlook.com.pe', 'outlook.com.tr', 'outlook.com.vn', 'outlook.cz', 'outlook.de', 'outlook.dk', 'outlook.es', 'outlook.fr', 'outlook.hu', 'outlook.id', 'outlook.ie', 'outlook.in', 'outlook.it', 'outlook.jp', 'outlook.kr', 'outlook.lv', 'outlook.my', 'outlook.ph', 'outlook.pt', 'outlook.sa', 'outlook.sg', 'outlook.sk', 'passport.com']; - -// List of domains used by Yahoo Mail -// This list is likely incomplete -var yahoo_domains = ['rocketmail.com', 'yahoo.ca', 'yahoo.co.uk', 'yahoo.com', 'yahoo.de', 'yahoo.fr', 'yahoo.in', 'yahoo.it', 'ymail.com']; - -function normalizeEmail(email, options) { - options = merge(options, default_normalize_email_options); - - if (!isEmail(email)) { - return false; - } - - var raw_parts = email.split('@'); - var domain = raw_parts.pop(); - var user = raw_parts.join('@'); - var parts = [user, domain]; - - // The domain is always lowercased, as it's case-insensitive per RFC 1035 - parts[1] = parts[1].toLowerCase(); - - if (parts[1] === 'gmail.com' || parts[1] === 'googlemail.com') { - // Address is GMail - if (options.gmail_remove_subaddress) { - parts[0] = parts[0].split('+')[0]; - } - if (options.gmail_remove_dots) { - parts[0] = parts[0].replace(/\./g, ''); - } - if (!parts[0].length) { - return false; - } - if (options.all_lowercase || options.gmail_lowercase) { - parts[0] = parts[0].toLowerCase(); - } - parts[1] = options.gmail_convert_googlemaildotcom ? 'gmail.com' : parts[1]; - } else if (~icloud_domains.indexOf(parts[1])) { - // Address is iCloud - if (options.icloud_remove_subaddress) { - parts[0] = parts[0].split('+')[0]; - } - if (!parts[0].length) { - return false; - } - if (options.all_lowercase || options.icloud_lowercase) { - parts[0] = parts[0].toLowerCase(); - } - } else if (~outlookdotcom_domains.indexOf(parts[1])) { - // Address is Outlook.com - if (options.outlookdotcom_remove_subaddress) { - parts[0] = parts[0].split('+')[0]; - } - if (!parts[0].length) { - return false; - } - if (options.all_lowercase || options.outlookdotcom_lowercase) { - parts[0] = parts[0].toLowerCase(); - } - } else if (~yahoo_domains.indexOf(parts[1])) { - // Address is Yahoo - if (options.yahoo_remove_subaddress) { - var components = parts[0].split('-'); - parts[0] = components.length > 1 ? components.slice(0, -1).join('-') : components[0]; - } - if (!parts[0].length) { - return false; - } - if (options.all_lowercase || options.yahoo_lowercase) { - parts[0] = parts[0].toLowerCase(); - } - } else if (options.all_lowercase) { - // Any other address - parts[0] = parts[0].toLowerCase(); - } - return parts.join('@'); -} - -var version = '8.0.0'; - -var validator = { - version: version, - toDate: toDate, - toFloat: toFloat, - toInt: toInt, - toBoolean: toBoolean, - equals: equals, - contains: contains, - matches: matches, - isEmail: isEmail, - isURL: isURL, - isMACAddress: isMACAddress, - isIP: isIP, - isFQDN: isFDQN, - isBoolean: isBoolean, - isAlpha: isAlpha, - isAlphanumeric: isAlphanumeric, - isNumeric: isNumeric, - isLowercase: isLowercase, - isUppercase: isUppercase, - isAscii: isAscii, - isFullWidth: isFullWidth, - isHalfWidth: isHalfWidth, - isVariableWidth: isVariableWidth, - isMultibyte: isMultibyte, - isSurrogatePair: isSurrogatePair, - isInt: isInt, - isFloat: isFloat, - isDecimal: isDecimal, - isHexadecimal: isHexadecimal, - isDivisibleBy: isDivisibleBy, - isHexColor: isHexColor, - isISRC: isISRC, - isMD5: isMD5, - isJSON: isJSON, - isEmpty: isEmpty, - isLength: isLength, - isByteLength: isByteLength, - isUUID: isUUID, - isMongoId: isMongoId, - isAfter: isAfter, - isBefore: isBefore, - isIn: isIn, - isCreditCard: isCreditCard, - isISIN: isISIN, - isISBN: isISBN, - isISSN: isISSN, - isMobilePhone: isMobilePhone, - isCurrency: isCurrency, - isISO8601: isISO8601, - isBase64: isBase64, - isDataURI: isDataURI, - ltrim: ltrim, - rtrim: rtrim, - trim: trim, - escape: escape, - unescape: unescape, - stripLow: stripLow, - whitelist: whitelist, - blacklist: blacklist, - isWhitelisted: isWhitelisted, - normalizeEmail: normalizeEmail, - toString: toString -}; - -return validator; - -}))); diff --git a/nz-admin/src/main/resources/statics/libs/validators.min.js b/nz-admin/src/main/resources/statics/libs/validators.min.js deleted file mode 100644 index 6126dbb6..00000000 --- a/nz-admin/src/main/resources/statics/libs/validators.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.validators=t():e.validators=t()}(window,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var u=t[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=25)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"withParams",{enumerable:!0,get:function(){return u.default}}),t.regex=t.ref=t.len=t.req=void 0;var n,u=(n=r(23))&&n.__esModule?n:{default:n};function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(e){if(Array.isArray(e))return!!e.length;if(void 0===e||null===e)return!1;if(!1===e)return!0;if(e instanceof Date)return!isNaN(e.getTime());if("object"===o(e)){for(var t in e)return!0;return!1}return!!String(e).length};t.req=i;t.len=function(e){return Array.isArray(e)?e.length:"object"===o(e)?Object.keys(e).length:String(e).length};t.ref=function(e,t,r){return"function"==typeof e?e.call(t,r):r[e]};t.regex=function(e,t){return(0,u.default)({type:e},function(e){return!i(e)||t.test(e)})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=(0,r(0).regex)("decimal",/^[-]?\d*(\.\d+)?$/);t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=(0,r(0).regex)("integer",/^-?[0-9]*$/);t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(0);t.default=function(e){return(0,n.withParams)({type:"maxValue",max:e},function(t){return!(0,n.req)(t)||(!/\s/.test(t)||t instanceof Date)&&+t<=+e})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(0);t.default=function(e){return(0,n.withParams)({type:"minValue",min:e},function(t){return!(0,n.req)(t)||(!/\s/.test(t)||t instanceof Date)&&+t>=+e})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(0);t.default=function(e){return(0,n.withParams)({type:"not"},function(t,r){return!(0,n.req)(t)||!e.call(this,t,r)})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(0);t.default=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.withParams)({type:"and"},function(){for(var e=this,r=arguments.length,n=new Array(r),u=0;u<r;u++)n[u]=arguments[u];return t.length>0&&t.reduce(function(t,r){return t&&r.apply(e,n)},!0)})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(0);t.default=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.withParams)({type:"or"},function(){for(var e=this,r=arguments.length,n=new Array(r),u=0;u<r;u++)n[u]=arguments[u];return t.length>0&&t.reduce(function(t,r){return t||r.apply(e,n)},!1)})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=(0,r(0).regex)("url",/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:[/?#]\S*)?$/i);t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(0);t.default=function(e){return(0,n.withParams)({type:"sameAs",eq:e},function(t,r){return t===(0,n.ref)(e,this,r)})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(0);t.default=function(e){return(0,n.withParams)({type:"requiredUnless",prop:e},function(t,r){return!!(0,n.ref)(e,this,r)||(0,n.req)(t)})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(0);t.default=function(e){return(0,n.withParams)({type:"requiredIf",prop:e},function(t,r){return!(0,n.ref)(e,this,r)||(0,n.req)(t)})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(0),u=(0,n.withParams)({type:"required"},n.req);t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(0);t.default=function(e){return(0,n.withParams)({type:"minLength",min:e},function(t){return!(0,n.req)(t)||(0,n.len)(t)>=e})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(0);t.default=function(e){return(0,n.withParams)({type:"maxLength",max:e},function(t){return!(0,n.req)(t)||(0,n.len)(t)<=e})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(0);t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:":";return(0,n.withParams)({type:"macAddress"},function(t){if(!(0,n.req)(t))return!0;if("string"!=typeof t)return!1;var r="string"==typeof e&&""!==e?t.split(e):12===t.length||16===t.length?t.match(/.{2}/g):null;return null!==r&&(6===r.length||8===r.length)&&r.every(u)})};var u=function(e){return e.toLowerCase().match(/^[0-9a-f]{2}$/)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(0),u=(0,n.withParams)({type:"ipAddress"},function(e){if(!(0,n.req)(e))return!0;if("string"!=typeof e)return!1;var t=e.split(".");return 4===t.length&&t.every(o)});t.default=u;var o=function(e){if(e.length>3||0===e.length)return!1;if("0"===e[0]&&"0"!==e)return!1;if(!e.match(/^\d+$/))return!1;var t=0|+e;return t>=0&&t<=255}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=(0,r(0).regex)("email",/(^$|^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$)/);t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(0);t.default=function(e,t){return(0,n.withParams)({type:"between",min:e,max:t},function(r){return!(0,n.req)(r)||(!/\s/.test(r)||r instanceof Date)&&+e<=+r&&+t>=+r})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=(0,r(0).regex)("numeric",/^[0-9]*$/);t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=(0,r(0).regex)("alphaNum",/^[a-zA-Z0-9]*$/);t.default=n},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";(function(e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.withParams=void 0;var n="undefined"!=typeof window?window:void 0!==e?e:{},u=n.vuelidate?n.vuelidate.withParams:function(e,t){return"object"===r(e)&&void 0!==t?t:e(function(){})};t.withParams=u}).call(this,r(21))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(22).withParams;t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=(0,r(0).regex)("alpha",/^[a-zA-Z]*$/);t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"alpha",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"alphaNum",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"numeric",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"between",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"email",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"ipAddress",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"macAddress",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"maxLength",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"minLength",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"required",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"requiredIf",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"requiredUnless",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"sameAs",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"url",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"or",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,"and",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(t,"not",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"minValue",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"maxValue",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(t,"integer",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(t,"decimal",{enumerable:!0,get:function(){return _.default}}),t.helpers=void 0;var n=M(r(24)),u=M(r(20)),o=M(r(19)),i=M(r(18)),f=M(r(17)),a=M(r(16)),l=M(r(15)),d=M(r(14)),c=M(r(13)),s=M(r(12)),p=M(r(11)),y=M(r(10)),v=M(r(9)),b=M(r(8)),m=M(r(7)),P=M(r(6)),g=M(r(5)),h=M(r(4)),j=M(r(3)),O=M(r(2)),_=M(r(1)),w=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(0));function M(e){return e&&e.__esModule?e:{default:e}}t.helpers=w}])});
\ No newline at end of file diff --git a/nz-admin/src/main/resources/statics/libs/vue-easytable.css b/nz-admin/src/main/resources/statics/libs/vue-easytable.css deleted file mode 100644 index 16ec535f..00000000 --- a/nz-admin/src/main/resources/statics/libs/vue-easytable.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:fontello;src:url(../font/fontello.eot);src:url(../font/fontello.eot#iefix) format("embedded-opentype"),url(../font/fontello.woff2) format("woff2"),url(../font/fontello.woff) format("woff"),url(../font/fontello.ttf) format("truetype"),url(../font/fontello.svg#fontello) format("svg");font-weight:400;font-style:normal}[class*=" v-icon-"]:before,[class^=v-icon-]:before{font-family:fontello;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.v-icon-down-dir:before{content:"\E800"}.v-icon-up-dir:before{content:"\E801"}.v-icon-cancel:before{content:"\E802"}.v-icon-spin3:before{content:"\E832"}.v-icon-spin4:before{content:"\E834"}.v-icon-spin5:before{content:"\E838"}.v-icon-filter:before{content:"\F0B0"}.v-icon-angle-double-left:before{content:"\F100"}.v-icon-angle-double-right:before{content:"\F101"}.v-icon-angle-left:before{content:"\F104"}.v-icon-angle-right:before{content:"\F105"}.animate-loading-05{-moz-animation:spin .5s infinite linear;-o-animation:spin .5s infinite linear;-webkit-animation:spin .5s infinite linear;animation:spin .5s infinite linear;display:inline-block}.animate-loading-08{-moz-animation:spin .8s infinite linear;-o-animation:spin .8s infinite linear;-webkit-animation:spin .8s infinite linear;animation:spin .8s infinite linear;display:inline-block}.animate-loading-11{-moz-animation:spin 1.1s infinite linear;-o-animation:spin 1.1s infinite linear;-webkit-animation:spin 1.1s infinite linear;animation:spin 1.1s infinite linear;display:inline-block}.animate-loading-14{-moz-animation:spin 1.4s infinite linear;-o-animation:spin 1.4s infinite linear;-webkit-animation:spin 1.4s infinite linear;animation:spin 1.4s infinite linear;display:inline-block}.animate-loading-17{-moz-animation:spin 1.7s infinite linear;-o-animation:spin 1.7s infinite linear;-webkit-animation:spin 1.7s infinite linear;animation:spin 1.7s infinite linear;display:inline-block}.animate-loading-20{-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;display:inline-block}.animate-loading-23{-moz-animation:spin 2.3s infinite linear;-o-animation:spin 2.3s infinite linear;-webkit-animation:spin 2.3s infinite linear;animation:spin 2.3s infinite linear;display:inline-block}.animate-loading-26{-moz-animation:spin 2.6s infinite linear;-o-animation:spin 2.6s infinite linear;-webkit-animation:spin 2.6s infinite linear;animation:spin 2.6s infinite linear;display:inline-block}.animate-loading-29{-moz-animation:spin 2.9s infinite linear;-o-animation:spin 2.9s infinite linear;-webkit-animation:spin 2.9s infinite linear;animation:spin 2.9s infinite linear;display:inline-block}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-o-keyframes spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-ms-keyframes spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}*,:after,:before{box-sizing:border-box}.v-page--large .v-page-goto,.v-page--large .v-page-goto .v-page-goto-input,.v-page--large .v-page-li,.v-page--large .v-page-select,.v-page--large .v-page-total{font-size:16px;height:40px;line-height:40px}.v-page--large .v-page-li{min-width:40px}.v-page--large .v-page-li i{font-size:120%}.v-page--large .v-page-goto .v-page-goto-input{width:50px}.v-page--middle .v-page-goto,.v-page--middle .v-page-goto .v-page-goto-input,.v-page--middle .v-page-li,.v-page--middle .v-page-select,.v-page--middle .v-page-total{font-size:14px;height:32px;line-height:32px}.v-page--middle .v-page-li{min-width:32px}.v-page--middle .v-page-li i{font-size:120%}.v-page--middle .v-page-goto .v-page-goto-input{width:50px}.v-page--small .v-page-goto,.v-page--small .v-page-goto .v-page-goto-input,.v-page--small .v-page-li,.v-page--small .v-page-select,.v-page--small .v-page-total{font-size:12px;height:24px;line-height:24px}.v-page--small .v-page-li{min-width:24px}.v-page--small .v-page-li i{font-size:120%}.v-page--small .v-page-goto .v-page-goto-input{width:45px}.v-page-ul{margin:0;padding:0;display:inline-block;margin:0 4px;list-style-type:none;-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.v-page-total{float:left;display:inline-block;margin:0 4px}.v-page-select{float:left}.v-page-li{float:left;margin-right:4px;cursor:pointer;transition:all .1s ease-in-out;text-align:center;list-style:none;background-color:#fff;border:1px solid #c8cdd4;border-radius:4px}.v-page-li a{color:#333}.v-page-li:hover{border-color:#0092dd}.v-page-li:hover a{color:#0092dd}.v-page-li-active{border-color:#0092dd;background-color:#0092dd}.v-page-li-active a{color:#fff}.v-page-li-active:hover{border-color:#0092dd;background-color:#0092dd}.v-page-li-active:hover a{color:#fff}.v-page-next i,.v-page-prev i{color:#666}.v-page-jump-next:after,.v-page-jump-prev:after{content:"\2022\2022\2022";display:block;letter-spacing:1px;color:#666;text-align:center}.v-page-jump-next:hover:after,.v-page-jump-next i,.v-page-jump-prev:hover:after,.v-page-jump-prev i{display:none}.v-page-jump-next:hover i,.v-page-jump-prev:hover i{display:inline;color:#0092dd}.v-page-select{display:inline-block;margin:0 4px}.v-page-pager{float:left}.v-page-goto{float:left;display:inline-block;margin:0 4px}.v-page-goto-input{padding:1px 7px;display:inline-block;border:1px solid #c8cdd4;background-color:#fff;background-image:none;transition:border .2s ease-in-out,background .2s ease-in-out,box-shadow .2s ease-in-out;border-radius:4px}.v-page-goto-input:hover{border-color:#0092dd}.v-page-disabled{cursor:not-allowed;border-color:#d7dde4}.v-page-disabled i{color:#ccc}.v-page-disabled:hover{border-color:#d7dde4}.v-page-disabled:hover i{color:#ccc;cursor:not-allowed}.v-select--large .v-select-items-li,.v-select--large .v-select-selected{font-size:16px;height:40px;line-height:40px}.v-select--large .v-select-selected-i{line-height:40px!important}.v-select--middle .v-select-items-li,.v-select--middle .v-select-selected{font-size:14px;height:32px;line-height:32px}.v-select--middle .v-select-selected-i{line-height:32px!important}.v-select--small .v-select-items-li,.v-select--small .v-select-selected{font-size:13px;height:24px;line-height:24px}.v-select--small .v-select-selected-i{line-height:24px!important}.v-select-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-image:none;border:1px solid #fff;box-sizing:border-box;color:#1f2d3d;display:inline-block;font-size:inherit;line-height:1;outline:none;padding-left:2px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:80%;text-align:left}.v-select-selected-span{width:80%;display:block!important;text-align:center;cursor:pointer;white-space:nowrap;overflow:hidden;padding-left:2px}.v-select-selected-i{display:inline-block;position:absolute;top:0;right:0;font-size:120%}.v-table-views,.v-table-views *,.v-table-views :after,.v-table-views :before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.v-table-views{position:relative;overflow:hidden;border:1px solid #ddd;padding:0;background-color:#fff}.v-table-footer{border-top:1px solid #ddd}.v-table-leftview,.v-table-rightview{position:absolute;overflow:hidden;top:0}.v-table-leftview{left:0}.v-table-header{overflow:hidden;background-position:0 0;background-size:initial;background-attachment:scroll;background-origin:initial;background-clip:initial;background-color:initial;background-repeat-x:repeat;background-repeat-y:no-repeat}.v-table-footer-inner,.v-table-header,.v-table-pager,.v-table-toolbar{border-color:#ddd}.v-table-header-inner{float:left;width:10000px}.v-table-btable,.v-table-ftable,.v-table-htable{border-collapse:separate}.v-table-body td,.v-table-footer td,.v-table-header td{margin:0;padding:0}.v-table-body-cell{padding:0 3px;margin:0;white-space:nowrap;word-wrap:normal;overflow:hidden;border:0 solid #ddd;text-overflow:ellipsis}.v-table-body{margin:0;padding:0;zoom:1}.v-table-rightview .v-table-body,.v-table-rightview .v-table-footer{overflow-x:auto;overflow-y:auto}.v-table-leftview .v-table-body{overflow-x:hidden!important;overflow-y:hidden!important}.v-table-body-inner-pb{padding-bottom:20px}.v-table-rightview{right:0}.v-table-title-cell{margin:0;border:0 solid #ddd}.v-table-title-cell:before{content:"";display:inline-block;height:100%;vertical-align:middle}.table-title{padding:0 3px;word-break:break-all;line-height:1.2em}.table-title,.v-table-sort-icon{display:inline-block;vertical-align:middle;overflow:hidden}.v-table-sort-icon{position:relative;width:16px;height:19px;margin-left:-5px;cursor:pointer}.v-table-sort-icon i{position:absolute;display:block;width:16px;height:15px;overflow:hidden;color:#a6a6a6;transition:color .2s ease-in-out}.v-table-sort-icon i:first-child{top:-5px}.v-table-sort-icon i:last-child{bottom:1px}.v-table-header .cursorPointer{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.vertical-border{border-right-width:1px!important}.horizontal-border{border-bottom-width:1px!important}.v-table-rightview-special-border td:last-child .v-table-body-cell{border-right-width:0!important}.v-table-dropdown{margin-left:-3px!important}.v-table-filter-icon{font-size:14px;cursor:pointer}.v-table-empty-content,.v-table-empty-scroll{position:absolute;overflow-y:hidden;text-align:center}.v-table-empty-content{overflow-x:auto}.v-table-empty-inner{overflow:hidden}.v-table-loading{position:relative;display:block;z-index:99999;background-color:#fff;height:100%;width:100%}.v-table-loading-content{z-index:9999999;position:absolute;left:50%}.v-table-drag-line{position:absolute;left:0;top:0;bottom:0;width:0;border-left:2px dashed #ddd;z-index:10}.v-checkbox-wrapper{font-size:12px}.v-checkbox,.v-checkbox-wrapper{cursor:pointer;display:inline-block;position:relative}.v-checkbox{white-space:nowrap;outline:none;line-height:1;vertical-align:text-bottom}.v-checkbox-checked:after{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:2px;border:1px solid #108ee9;content:"";-webkit-animation-fill-mode:both;animation-fill-mode:both;visibility:hidden}.v-checkbox-input{position:absolute;left:0;z-index:1;cursor:pointer;opacity:0;filter:alpha(opacity=0);top:0;bottom:0;right:0}.v-checkbox-inner{position:relative;top:0;left:0;display:block;width:14px;height:14px;border:1px solid #abbacc;border-radius:2px;background-color:#fff;-webkit-transition:all .3s;transition:all .3s}.v-checkbox-inner:after{-webkit-transform:rotate(45deg) scale(0);-ms-transform:rotate(45deg) scale(0);transform:rotate(45deg) scale(0);left:4px;top:1px;width:5px;height:8px;-webkit-transition:all .1s cubic-bezier(.71,-.46,.88,.6);transition:all .1s cubic-bezier(.71,-.46,.88,.6)}.v-checkbox-checked .v-checkbox-inner:after,.v-checkbox-inner:after{position:absolute;display:table;border:2px solid #fff;border-top:0;border-left:0;content:" "}.v-checkbox-checked .v-checkbox-inner:after{-webkit-transform:rotate(45deg) scale(1);-ms-transform:rotate(45deg) scale(1);transform:rotate(45deg) scale(1);-webkit-transition:all .2s cubic-bezier(.12,.4,.29,1.46) .1s;transition:all .2s cubic-bezier(.12,.4,.29,1.46) .1s}.v-checkbox-checked .v-checkbox-inner,.v-checkbox-indeterminate .v-checkbox-inner{background-color:#108ee9;border-color:#108ee9}.v-checkbox-input:focus+.v-checkbox-inner,.v-checkbox-wrapper:hover .v-checkbox-inner,.v-checkbox:hover .v-checkbox-inner{border-color:#108ee9}.v-checkbox-disabled{cursor:not-allowed}.v-checkbox-disabled.v-checkbox-checked .v-checkbox-inner:after{-webkit-animation-name:none;animation-name:none;border-color:rgba(0,0,0,.25)}.v-checkbox-disabled .v-checkbox-input{cursor:not-allowed}.v-checkbox-disabled .v-checkbox-inner{border-color:#d9d9d9!important;background-color:#f7f7f7}.v-checkbox-disabled .v-checkbox-inner:after{-webkit-animation-name:none;animation-name:none;border-color:#f7f7f7}.v-checkbox-disabled+span{color:rgba(0,0,0,.25);cursor:not-allowed}.v-checkbox-indeterminate .v-checkbox-inner:after{content:" ";-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);position:absolute;left:2px;top:5px;width:8px;height:1px}.v-checkbox-indeterminate.v-checkbox-disabled .v-checkbox-inner:after{border-color:rgba(0,0,0,.25)}.v-select-items-multiple{display:table;width:100%;padding:5px}.v-select-items-multiple span{vertical-align:middle;font-size:14px;font-weight:400;color:rgba(0,0,0,.65)}.v-select-items-multiple:hover{background-color:#e6f7ff}.v-dropdown--large .v-dropdown-items-li,.v-dropdown--large .v-dropdown-selected{font-size:16px;height:40px;line-height:40px}.v-dropdown--large .v-dropdown-selected-i{line-height:40px!important}.v-dropdown--middle .v-dropdown-items-li,.v-dropdown--middle .v-dropdown-selected{font-size:14px;height:32px;line-height:32px}.v-dropdown--middle .v-dropdown-selected-i{line-height:32px!important}.v-dropdown--small .v-dropdown-items-li,.v-dropdown--small .v-dropdown-selected{font-size:13px;height:24px;line-height:24px}.v-dropdown--small .v-dropdown-selected-i{line-height:24px!important}.v-dropdown{display:inline-table;margin:0}.v-dropdown-dd,.v-dropdown-dt{z-index:9999}.v-dropdown-dd,.v-dropdown-dt,.v-dropdown-items{margin:0;padding:0;background-color:#fff}.v-dropdown-items{overflow:hidden;text-overflow:ellipsis;word-wrap:normal;white-space:nowrap}.v-dropdown a,.v-dropdown a:visited{color:#000;text-decoration:none;outline:none}.v-dropdown-selected{position:relative;display:block;border:1px solid #c8cdd4;border-radius:2px}.v-dropdown-selected:hover{color:#0092dd;border-color:#0092dd}.v-dropdown-selected-span{width:80%;display:block!important;text-align:center;cursor:pointer;white-space:nowrap;overflow:hidden;padding-left:2px}.v-dropdown-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-image:none;border:1px solid #fff;box-sizing:border-box;color:#1f2d3d;display:inline-block;font-size:inherit;line-height:1;outline:none;padding-left:2px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:80%;text-align:left}.v-dropdown-selected-i{display:inline-block;position:absolute;top:0;right:0;font-size:120%}.v-dropdown-dd{position:absolute!important;z-index:9999999}.v-dropdown-items{position:fixed;top:2px;left:0;list-style:none;border-radius:2px;background-color:#fff;box-shadow:0 2px 4px rgba(0,0,0,.12),0 0 6px rgba(0,0,0,.04);border:1px solid #d1dbe5;color:#c5c0b0;padding:5px 0;width:auto}.v-dropdown-items-li{white-space:nowrap}.v-dropdown-items-li.active{background-color:#0092dd}.v-dropdown-items-li.active a{color:#fff}.v-dropdown-items-li-a{width:100%;display:block;padding-left:8px;padding-right:8px}.v-dropdown-items-li-a-left{text-align:left}.v-dropdown-items-li-a-center{text-align:center}.v-dropdown-items-li-a-right{text-align:right}.v-dropdown-items-li:hover{background-color:#e4e8f1;color:#fff}.v-dropdown-items-li.active:hover{background-color:#0092dd}.v-dropdown-items-multiple{display:table;width:100%;padding:5px}.v-dropdown-items-multiple span{vertical-align:middle;font-size:14px;font-weight:400;color:rgba(0,0,0,.65)}.v-dropdown-items-multiple:hover{background-color:#e6f7ff}.v-dropdown-operation{padding:8px 0 3px;font-size:14px;border-top:1px solid #e8e8e8}.v-dropdown-operation-item{padding:0 8px;color:#495060}.v-dropdown-operation-item:last-child{float:right}.v-dropdown-operation-item:hover{color:#1890ff}.v-table-sort-icon .checked{color:#48576a}.v-table-filter-icon{color:#999}.v-table-filter-icon.checked{color:#48576a}
\ No newline at end of file diff --git a/nz-admin/src/main/resources/statics/libs/vue-easytable.js b/nz-admin/src/main/resources/statics/libs/vue-easytable.js deleted file mode 100644 index a106a3c0..00000000 --- a/nz-admin/src/main/resources/statics/libs/vue-easytable.js +++ /dev/null @@ -1,5139 +0,0 @@ -!function (e) { - function t(i) { - if (n[i]) - return n[i].exports; - var module = n[i] = { - i: i, - l: !1, - exports: {} - }; - return e[i].call(module.exports, module, module.exports, t), - module.l = !0, - module.exports - } - var n = {}; - t.m = e, - t.c = n, - t.d = function (exports, e, n) { - t.o(exports, e) || Object.defineProperty(exports, e, { - configurable: !1, - enumerable: !0, - get: n - }) - }, - t.n = function (module) { - var e = module && module.__esModule ? function () { - return module.default - } - : function () { - return module - }; - return t.d(e, "a", e), - e - }, - t.o = function (e, t) { - return Object.prototype.hasOwnProperty.call(e, t) - }, - t.p = "", - t(t.s = 10) -} -([function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var t = e(2), - n = function (e) { - return e && e.__esModule ? e : { - default: - e - } - } - (t); - exports.default = { - getViewportOffset: function (e) { - var t = document.documentElement, - n = void 0 !== e.getBoundingClientRect ? e.getBoundingClientRect() : 0, - i = (window.pageXOffset || t.scrollLeft) - (t.clientLeft || 0), - o = (window.pageYOffset || t.scrollTop) - (t.clientTop || 0), - r = n.left + window.pageXOffset, - l = n.top + window.pageYOffset, - s = r - i, - a = l - o; - return { - left: s, - top: a, - right: window.document.documentElement.clientWidth - n.width - s, - bottom: window.document.documentElement.clientHeight - n.height - a, - right2: window.document.documentElement.clientWidth - s, - bottom2: window.document.documentElement.clientHeight - a - } - }, - bind: function (e, t, n) { - e && "undefined" !== e && t && n && (t = "mousewheel" === t ? void 0 !== document.onmousewheel ? "mousewheel" : "DOMMouseScroll" : t, document.attachEvent ? e.attachEvent("on" + t, n) : e.addEventListener(t, n, !1)) - }, - unbind: function (e, t, n) { - if (e && "undefined" !== e && t && n) { - t = "mousewheel" === t ? void 0 !== document.onmousewheel ? "mousewheel" : "DOMMouseScroll" : t; - var i = []; - Array.isArray(n) && n.length > 0 ? i = n : i.push(n), - document.removeEventListener ? i.forEach(function (n) { - e.removeEventListener(t, n, !1) - }) : i.forEach(function (n) { - e.removeEventListener("on" + t, n) - }) - } - }, - isHtml: function (e) { - return /<[a-z][\s\S]*>/i.test(e) - }, - getDisplayValue: function (e) { - if (e) - return e.currentStyle ? e.currentStyle.display : getComputedStyle(e, null).display - }, - hasHorizontalScrollBar: function (e) { - if (e) - return e.scrollWidth > e.clientWidth - }, - hasVerticalScrollBar: function (e) { - if (e) - return e.scrollHeight > e.clientHeight - }, - getScrollbarWidth: function () { - var e = document.createElement("div"); - e.className = n.default.scrollbarClass, - e.style.visibility = "hidden", - e.style.width = "100px", - e.style.position = "absolute", - e.style.top = "-9999px", - document.body.appendChild(e); - var t = e.offsetWidth; - e.style.overflow = "scroll"; - var i = document.createElement("div"); - i.style.width = "100%", - e.appendChild(i); - var o = i.offsetWidth; - return e.parentNode.removeChild(e), - t - o - }, - getParentCompByName: function (e, t) { - for (var n = e.$parent; n; ) { - if (n.$options.name === t) - return n; - n = n.$parent - } - return null - }, - getChildCompsByName: function (e, t) { - for (var n = [], i = e.$children; i && i.length > 0; ) - i.forEach(function (e) { - i = e.$children ? e.$children : null, - e.$options.name === t && n.push(e) - }); - return n - } - } -}, function (module, exports) { - module.exports = function (e, t, n, i, o) { - var r, - l = e = e || {}, - s = typeof e.default; - "object" !== s && "function" !== s || (r = e, l = e.default); - var a = "function" == typeof l ? l.options : l; - t && (a.render = t.render, a.staticRenderFns = t.staticRenderFns), - i && (a._scopeId = i); - var u; - if (o ? (u = function (e) { - e = e || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, - e || "undefined" == typeof __VUE_SSR_CONTEXT__ || (e = __VUE_SSR_CONTEXT__), - n && n.call(this, e), - e && e._registeredComponents && e._registeredComponents.add(o) - }, a._ssrRegister = u) : n && (u = n), u) { - var c = a.functional, - h = c ? a.render : a.beforeCreate; - c ? a.render = function (e, t) { - return u.call(t), - h(e, t) - } - : a.beforeCreate = h ? [].concat(h, u) : [u] - } - return { - esModule: r, - exports: l, - options: a - } - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }), - exports.default = { - sizeMaps: { - large: 40, - middle: 32, - small: 24 - }, - sizeMapDefault: 32, - scrollbarClass: "v-scrollbar-wrap" - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var t = e(43), - n = function (e) { - return e && e.__esModule ? e : { - default: - e - } - } - (t); - n.default.install = function (e) { - e.component(n.default.name, n.default) - }, - exports.default = n.default -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var t = e(46), - n = function (e) { - return e && e.__esModule ? e : { - default: - e - } - } - (t); - n.default.install = function (e) { - e.component(n.default.name, n.default) - }, - exports.default = n.default -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var t = e(49), - n = function (e) { - return e && e.__esModule ? e : { - default: - e - } - } - (t); - n.default.install = function (e) { - e.component(n.default.name, n.default) - }, - exports.default = n.default -}, function (module, exports, e) { - "use strict"; - function t(e, t) { - if (!e || !t) - return !1; - if (-1 !== t.indexOf(" ")) - throw new Error("className should not contain space."); - return e.classList ? e.classList.contains(t) : (" " + e.className + " ").indexOf(" " + t + " ") > -1 - } - function n(e, t) { - if (e && t) - if (e.classList) - e.classList.add(t); - else { - var n = e.className.split(" "); - -1 === n.indexOf(t) && (e.className += " " + t) - } - } - function i(e, t) { - if (e && t) - if (e.classList) - e.classList.remove(t); - else { - var n = new RegExp("(\\s|^)" + t + "(\\s|$)"); - e.className = e.className.replace(n, " ") - } - } - Object.defineProperty(exports, "__esModule", { - value: !0 - }), - exports.hasClass = t, - exports.addClass = n, - exports.removeClass = i -}, function (module, exports, e) { - "use strict"; - (function (e, module) { - var t = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { - return typeof e - } - : function (e) { - return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e - }, - n = function () { - function n(e, t) { - return null != t && e instanceof t - } - function i(o, r, l, s, d) { - function f(o, l) { - if (null === o) - return null; - if (0 === l) - return o; - var m, - b; - if ("object" != (void 0 === o ? "undefined" : t(o))) - return o; - if (n(o, u)) - m = new u; - else if (n(o, c)) - m = new c; - else if (n(o, h)) - m = new h(function (e, t) { - o.then(function (t) { - e(f(t, l - 1)) - }, function (e) { - t(f(e, l - 1)) - }) - }); - else if (i.__isArray(o)) - m = []; - else if (i.__isRegExp(o)) - m = new RegExp(o.source, a(o)), o.lastIndex && (m.lastIndex = o.lastIndex); - else if (i.__isDate(o)) - m = new Date(o.getTime()); - else { - if (v && e.isBuffer(o)) - return m = new e(o.length), o.copy(m), m; - n(o, Error) ? m = Object.create(o) : void 0 === s ? (b = Object.getPrototypeOf(o), m = Object.create(b)) : (m = Object.create(s), b = s) - } - if (r) { - var w = p.indexOf(o); - if (-1 != w) - return g[w]; - p.push(o), - g.push(m) - } - n(o, u) && o.forEach(function (e, t) { - var n = f(t, l - 1), - i = f(e, l - 1); - m.set(n, i) - }), - n(o, c) && o.forEach(function (e) { - var t = f(e, l - 1); - m.add(t) - }); - for (var y in o) { - var C; - b && (C = Object.getOwnPropertyDescriptor(b, y)), - C && null == C.set || (m[y] = f(o[y], l - 1)) - } - if (Object.getOwnPropertySymbols) - for (var _ = Object.getOwnPropertySymbols(o), y = 0; y < _.length; y++) { - var x = _[y], - k = Object.getOwnPropertyDescriptor(o, x); - (!k || k.enumerable || d) && (m[x] = f(o[x], l - 1), k.enumerable || Object.defineProperty(m, x, { - enumerable: !1 - })) - } - if (d) - for (var S = Object.getOwnPropertyNames(o), y = 0; y < S.length; y++) { - var M = S[y], - k = Object.getOwnPropertyDescriptor(o, M); - k && k.enumerable || (m[M] = f(o[M], l - 1), Object.defineProperty(m, M, { - enumerable: !1 - })) - } - return m - } - "object" === (void 0 === r ? "undefined" : t(r)) && (l = r.depth, s = r.prototype, d = r.includeNonEnumerable, r = r.circular); - var p = [], - g = [], - v = void 0 !== e; - return void 0 === r && (r = !0), - void 0 === l && (l = 1 / 0), - f(o, l) - } - function o(e) { - return Object.prototype.toString.call(e) - } - function r(e) { - return "object" === (void 0 === e ? "undefined" : t(e)) && "[object Date]" === o(e) - } - function l(e) { - return "object" === (void 0 === e ? "undefined" : t(e)) && "[object Array]" === o(e) - } - function s(e) { - return "object" === (void 0 === e ? "undefined" : t(e)) && "[object RegExp]" === o(e) - } - function a(e) { - var t = ""; - return e.global && (t += "g"), - e.ignoreCase && (t += "i"), - e.multiline && (t += "m"), - t - } - var u; - try { - u = Map - } catch (e) { - u = function () {} - } - var c; - try { - c = Set - } catch (e) { - c = function () {} - } - var h; - try { - h = Promise - } catch (e) { - h = function () {} - } - return i.clonePrototype = function (e) { - if (null === e) - return null; - var t = function () {}; - return t.prototype = e, - new t - }, - i.__objToStr = o, - i.__isDate = r, - i.__isArray = l, - i.__isRegExp = s, - i.__getRegExpFlags = a, - i - } - (); - "object" === t(module) && module.exports && (module.exports = n) - }).call(exports, e(28).Buffer, e(33)(module)) -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var t = e(0), - n = function (e) { - return e && e.__esModule ? e : { - default: - e - } - } - (t), - i = []; - exports.default = { - methods: { - layerAdjustmentOnce: function (e, t, i) { - var o = n.default.getViewportOffset(t), - r = void 0 !== e.getBoundingClientRect ? e.getBoundingClientRect().height : e.clientHeight; - o.bottom < r ? e.style.top = o.top - r - i + "px" : e.style.top = o.top + t.clientHeight + i + "px", - e.style.left = o.left + "px" - }, - layerAdjustmentBind: function (e, t, o) { - var r = this, - l = function (n) { - setTimeout(function (n) { - r.layerAdjustmentOnce(e, t, o) - }) - }; - i.push(l), - n.default.bind(window, "scroll", l), - n.default.bind(window, "resize", l) - } - }, - beforeDestroy: function () { - n.default.unbind(window, "scroll", i), - n.default.unbind(window, "resize", i) - } - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var t = e(59), - n = function (e) { - return e && e.__esModule ? e : { - default: - e - } - } - (t); - n.default.install = function (e) { - e.component(n.default.name, n.default) - }, - exports.default = n.default -}, function (module, exports, e) { - "use strict"; - e(11), - e(12) -}, function (module, exports) {}, function (module, exports, e) { - "use strict"; - function t(e) { - return e && e.__esModule ? e : { - default: - e - } - } - var n = e(13), - i = t(n), - o = e(54), - r = t(o), - l = e(4), - s = t(l), - a = e(3), - u = t(a), - c = e(9), - h = t(c), - d = e(5), - f = t(d); - "undefined" != typeof window && window.Vue && function (e) { - arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; - e.component(i.default.name, i.default), - e.component(r.default.name, r.default), - e.component(s.default.name, s.default), - e.component(u.default.name, u.default), - e.component(h.default.name, h.default), - e.component(f.default.name, f.default) - } - (window.Vue), - module.exports = { - VPagination: r.default, - VTable: i.default, - VCheckbox: s.default, - VCheckboxGroup: u.default, - VSelect: h.default, - VDropdown: f.default - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var t = e(14), - n = function (e) { - return e && e.__esModule ? e : { - default: - e - } - } - (t); - n.default.install = function (e) { - e.component(n.default.name, n.default) - }, - exports.default = n.default -}, function (module, exports, e) { - var t = e(1)(e(15), e(53), null, null, null); - t.options.__file = "E:\\practice\\vue-easytable\\packages\\v-table\\src\\table.vue", - t.esModule && Object.keys(t.esModule).some(function (e) { - return "default" !== e && "__" !== e.substr(0, 2) - }) && console.error("named exports are not supported in *.vue files."), - t.options.functional && console.error("[vue-loader] table.vue: functional components are not supported with templates, they should use render functions."), - module.exports = t.exports -}, function (module, exports, e) { - "use strict"; - function t(e) { - return e && e.__esModule ? e : { - default: - e - } - } - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var n = e(16), - i = t(n), - o = e(17), - r = t(o), - l = e(18), - s = t(l), - a = e(19), - u = t(a), - c = e(20), - h = t(c), - d = e(21), - f = t(d), - p = e(22), - g = t(p), - v = e(23), - m = t(v), - b = e(24), - w = t(b), - y = e(25), - C = t(y), - _ = e(26), - x = t(_), - k = e(27), - S = t(k), - M = e(34), - P = t(M), - T = e(35), - R = t(T), - A = e(36), - E = t(A), - O = e(0), - B = t(O), - z = e(7), - H = t(z), - I = e(37), - D = t(I), - F = e(40), - j = t(F), - N = e(3), - $ = t(N), - W = e(4), - L = t(W), - V = e(5), - U = t(V); - exports.default = { - name: "v-table", - mixins: [i.default, u.default, s.default, r.default, h.default, f.default, g.default, m.default, w.default, C.default, x.default, S.default, P.default, R.default, E.default], - components: { - tableEmpty: D.default, - loading: j.default, - VCheckboxGroup: $.default, - VCheckbox: L.default, - VDropdown: U.default - }, - data: function () { - return { - internalTableData: [], - internalWidth: 0, - internalHeight: 0, - internalColumns: [], - internalTitleRows: [], - errorMsg: " V-Table error: ", - maxWidth: 5e3, - hasFrozenColumn: !1, - resizeTimer: null - } - }, - props: { - width: [Number, String], - minWidth: { - type: Number, - default: - 50 - }, - height: { - type: Number, - require: !1 - }, - minHeight: { - type: Number, - default: - 50 - }, - titleRowHeight: { - type: Number, - default: - 38 - }, - isHorizontalResize: { - type: Boolean, - default: - !1 - }, - isVerticalResize: { - type: Boolean, - default: - !1 - }, - verticalResizeOffset: { - type: Number, - default: - 0 - }, - tableBgColor: { - type: String, - default: - "#fff" - }, - titleBgColor: { - type: String, - default: - "#fff" - }, - oddBgColor: { - type: String, - default: - "" - }, - evenBgColor: { - type: String, - default: - "" - }, - rowHeight: { - type: Number, - default: - 40 - }, - multipleSort: { - type: Boolean, - default: - !0 - }, - sortAlways: { - type: Boolean, - default: - !1 - }, - columns: { - type: Array, - require: !0 - }, - titleRows: { - type: Array, - require: !0, - default: - function () { - return [] - } - }, - tableData: { - type: Array, - require: !0, - default: - function () { - return [] - } - }, - pagingIndex: Number, - errorContent: { - type: String, - default: - "暂无数据" - }, - errorContentHeight: { - type: Number, - default: - 50 - }, - isLoading: { - type: Boolean, - default: - !1 - }, - loadingContent: { - type: String, - default: - '<span><i class="v-icon-spin5 animate-loading-23" style="font-size: 28px;opacity:0.6;"></i></span>' - }, - rowHoverColor: { - type: String - }, - rowClickColor: { - type: String - }, - showVerticalBorder: { - type: Boolean, - default: - !0 - }, - showHorizontalBorder: { - type: Boolean, - default: - !0 - }, - footer: { - type: Array, - default: - function () { - return [] - } - }, - footerRowHeight: { - type: Number, - default: - 40 - }, - columnWidthDrag: { - type: Boolean, - default: - !1 - }, - loadingOpacity: { - type: Number, - default: - .6 - }, - columnCellClassName: Function, - footerCellClassName: Function, - rowClick: Function, - rowDblclick: Function, - titleClick: Function, - titleDblclick: Function, - rowMouseEnter: Function, - rowMouseLeave: Function, - cellEditDone: Function, - cellMerge: Function, - selectAll: Function, - selectChange: Function, - selectGroupChange: Function, - filterMethod: Function - }, - computed: { - isComplexTitle: function () { - return Array.isArray(this.internalTitleRows) && this.internalTitleRows.length > 0 - }, - getTableHeight: function () { - return this.isTableEmpty ? this.tableEmptyHeight : this.internalHeight - }, - leftViewWidth: function () { - var e = 0; - return this.hasFrozenColumn && (e = this.frozenCols.reduce(function (e, t) { - return e + t.width - }, 0)), - e - }, - rightViewWidth: function () { - var e = this.internalWidth - this.leftViewWidth; - return this.hasFrozenColumn ? e - 2 : e - }, - bodyViewHeight: function () { - var e; - return e = this.internalTitleRows.length > 0 ? this.internalHeight - this.titleRowHeight * (this.internalTitleRows.length + this.getTitleRowspanTotalCount) : this.internalHeight - this.titleRowHeight, - e -= this.footerTotalHeight + 1 - }, - totalColumnsWidth: function () { - return this.internalColumns.reduce(function (e, t) { - return t.width ? e + t.width : e - }, 0) - }, - totalNoFrozenColumnsWidth: function () { - return this.noFrozenCols.reduce(function (e, t) { - return t.width ? e + t.width : e - }, 0) - }, - getColumnsFields: function () { - return this.internalColumns.map(function (e) { - return e.field - }) - }, - getNoFrozenColumnsFields: function () { - return this.internalColumns.filter(function (e) { - return !e.isFrozen - }).map(function (e) { - return e.field - }) - }, - getFrozenColumnsFields: function () { - return this.internalColumns.filter(function (e) { - return e.isFrozen - }).map(function (e) { - return e.field - }) - } - }, - methods: { - customCompFunc: function (e) { - this.$emit("on-custom-comp", e) - }, - trBgColor: function (e) { - if (this.evenBgColor && this.evenBgColor.length > 0 || this.oddBgColor && this.oddBgColor.length > 0) - return e % 2 == 0 ? { - "background-color": this.evenBgColor - } - : { - "background-color": this.oddBgColor - } - }, - setColumnCellClassName: function (e, t, n) { - return this.columnCellClassName && this.columnCellClassName(e, t, n) - }, - titleColumnWidth: function (e) { - var t = 0; - if (Array.isArray(e)) { - t = this.internalColumns.filter(function (t, n) { - return e.some(function (e) { - return e === t.field - }) - }).reduce(function (e, t) { - return e + t.width - }, 0) - } else - console.error(this.errorMsg + "the fields attribute must be a array in titleRows"); - return t - }, - titleColumnHeight: function (e) { - return e && e > 0 ? this.titleRowHeight * e : this.titleRowHeight - }, - overflowTitle: function (e, t, n) { - var i = ""; - if ("function" == typeof n.formatter) { - var o = n.formatter(e, t, this.pagingIndex, n.field); - i = B.default.isHtml(o) ? "" : o - } else - i = e[n.field]; - return i - }, - getTotalColumnsHeight: function () { - var e = this.internalTitleRows && this.internalTitleRows.length > 0 ? this.titleRowHeight * this.internalTitleRows.length : this.titleRowHeight; - return (e += this.footerTotalHeight) + this.internalTableData.length * this.rowHeight + 1 - }, - initTableWidth: function () { - this.internalWidth = this.isHorizontalResize ? this.maxWidth : this.width - }, - initColumns: function () { - this.internalHeight = this.height, - this.footerTotalHeight = this.getFooterTotalRowHeight, - this.internalColumns = Array.isArray(this.columns) ? (0, H.default)(this.columns) : [], - this.internalTitleRows = Array.isArray(this.titleRows) ? (0, H.default)(this.titleRows) : [], - this.initColumnsFilters(), - this.initResizeColumns(), - this.hasFrozenColumn = this.internalColumns.some(function (e) { - return e.isFrozen - }), - this.initTableWidth(), - this.setSortColumns(); - var e = this, - t = 0; - e.internalWidth && e.internalWidth > 0 && e.internalColumns.map(function (n) { - n.width && n.width > 0 || (t++, e.isHorizontalResize ? console.error(e.errorMsg + "If you are using the isHorizontalResize property,Please set the value for each column's width") : n.width = e.internalWidth - e.totalColumnsWidth) - }), - t > 1 && console.error(this.errorMsg + "Only allow one column is not set width") - }, - initView: function () { - this.internalWidth && this.internalWidth > 0 || this.columns && this.columns.length > 0 && (this.internalWidth = this.columns.reduce(function (e, t) { - return e + t.width - }, 0)); - var e = this.getTotalColumnsHeight(); - !(this.height && this.height > 0) || this.height > e ? this.isVerticalResize || (this.internalHeight = e) : this.height <= e && (this.internalHeight = this.height) - }, - initInternalTableData: function () { - return Array.isArray(this.tableData) ? (0, H.default)(this.tableData) : [] - }, - resize: function () { - var e = this; - this.resizeTimer = setTimeout(function (t) { - e.tableResize() - }) - } - }, - created: function () { - this.internalTableData = this.initInternalTableData(this.tableData), - Array.isArray(this.columns) && this.columns.length > 0 && this.initColumns(), - this.updateCheckboxGroupModel(), - this.initView() - }, - mounted: function () { - this.setScrollbarWidth(), - this.tableEmpty(), - this.tableResize(), - Array.isArray(this.tableData) && this.tableData.length > 0 && this.scrollControl(), - this.controlScrollBar() - }, - watch: { - columns: { - handler: function (e) { - this.initColumns(), - this.tableResize() - }, - deep: !0 - }, - titleRows: { - handler: function (e) { - this.initColumns() - }, - deep: !0 - }, - tableData: { - handler: function (e) { - this.skipRenderCells = [], - this.internalTableData = this.initInternalTableData(e), - this.updateCheckboxGroupModel(), - this.tableEmpty(), - Array.isArray(e) && e.length > 0 && (this.initView(), this.scrollControl()), - this.resize() - }, - deep: !0 - }, - pagingIndex: { - handler: function () { - this.clearCurrentRow(), - this.bodyScrollTop() - } - } - }, - beforeDestroy: function () { - clearTimeout(this.resizeTimer) - } - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var t = e(2), - n = function (e) { - return e && e.__esModule ? e : { - default: - e - } - } - (t); - exports.default = { - computed: { - vTableRightBody: function () { - var e = { - "v-table-rightview-special-border": !0 - }; - return e[n.default.scrollbarClass] = !0, - e - }, - vTableFooter: function () { - var e = { - "v-table-rightview-special-border": !0 - }; - return e[n.default.scrollbarClass] = !0, - e - }, - vTableBodyInner: function () { - return { - "v-table-body-inner-pb": !this.hasTableFooter - } - }, - vTableBodyCell: function () { - return { - "vertical-border": this.showVerticalBorder, - "horizontal-border": this.showHorizontalBorder - } - } - }, - methods: { - vTableFiltersIcon: function (e) { - var t = this; - return { - "v-icon-filter": !0, - checked: e.some(function (e) { - return e.selected && e.value !== t.filterSpecialValue - }) - } - } - } - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var t = e(0), - n = function (e) { - return e && e.__esModule ? e : { - default: - e - } - } - (t); - exports.default = { - methods: { - body1Mousewheel: function (e) { - var t = this.$el.querySelector(".v-table-rightview .v-table-body"), - n = e.originalEvent || window.event || e, - i = n.wheelDelta || -1 * n.detail; - t.scrollTop = t.scrollTop - i - }, - bodyScrollTop: function () { - var e = this.$el.querySelector(".v-table-leftview .v-table-body"), - t = this.$el.querySelector(".v-table-rightview .v-table-body"); - e && (e.scrollTop = 0), - t.scrollTop = 0 - }, - body2Scroll: function (e) { - var t = this.$el.querySelector(".v-table-rightview"), - n = this.$el.querySelector(".v-table-leftview .v-table-body"), - i = this.$el.querySelector(".v-table-rightview .v-table-body"); - n && (n.scrollTop = i.scrollTop), - t.querySelector(".v-table-header").scrollLeft = i.scrollLeft - }, - rightViewFooterScroll: function () { - var e = this.$el.querySelector(".v-table-rightview"), - t = this.$el.querySelector(".v-table-rightview .v-table-footer"); - e.querySelector(".v-table-header").scrollLeft = t.scrollLeft, - e.querySelector(".v-table-body").scrollLeft = t.scrollLeft - }, - scrollControl: function () { - var e = this; - this.unbindEvents(), - setTimeout(function (t) { - var i = e.$el.querySelector(".v-table-leftview .v-table-body"), - o = e.$el.querySelector(".v-table-rightview .v-table-body"), - r = e.$el.querySelector(".v-table-rightview .v-table-footer"); - n.default.bind(i, "mousewheel", e.body1Mousewheel), - n.default.bind(o, "scroll", e.body2Scroll), - n.default.bind(r, "scroll", e.rightViewFooterScroll) - }) - }, - unbindEvents: function () { - var e = this.$el.querySelector(".v-table-leftview .v-table-body"), - t = this.$el.querySelector(".v-table-rightview .v-table-body"), - i = this.$el.querySelector(".v-table-rightview .v-table-footer"); - n.default.unbind(e, "mousewheel", this.body1Mousewheel), - n.default.unbind(t, "scroll", this.body2Scroll), - n.default.unbind(i, "scroll", this.rightViewFooterScroll) - }, - scrollToTop: function () { - this.bodyScrollTop() - } - }, - beforeDestroy: function () { - this.unbindEvents() - } - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }), - exports.default = { - computed: { - frozenCols: function () { - return this.internalColumns.filter(function (e) { - return !0 === e.isFrozen - }) - }, - noFrozenCols: function () { - return this.internalColumns.filter(function (e) { - return !0 !== e.isFrozen - }) - }, - frozenTitleCols: function () { - var e = [], - t = this; - if (this.internalTitleRows.length > 0) { - var n = this.frozenCols.map(function (e) { - return e.field - }); - this.internalTitleRows.forEach(function (i) { - var o = i.filter(function (e) { - if (Array.isArray(e.fields) && e.fields.every(function (e) { - return -1 !== n.indexOf(e) - })) - return !0 - }); - if (o.length > 0) { - e.push(o); - var r = t.getMinRowspan(o); - if (r && r > 0) - for (var l = 0; l < r; l++) - e.push([]) - } - }) - } - return e - }, - noFrozenTitleCols: function () { - var e = [], - t = this; - if (this.internalTitleRows.length > 0) { - var n = this.noFrozenCols.map(function (e) { - return e.field - }); - this.internalTitleRows.forEach(function (i) { - var o = i.filter(function (e) { - if (Array.isArray(e.fields)) - return e.fields.every(function (e) { - return -1 !== n.indexOf(e) - }) - }); - if (o.length > 0) { - e.push(o); - var r = t.getMinRowspan(o); - if (r && r > 0) - for (var l = 0; l < r; l++) - e.push([]) - } - }) - } - return e - } - } - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var t = e(0), - n = function (e) { - return e && e.__esModule ? e : { - default: - e - } - } - (t); - exports.default = { - data: function () { - return { - resizeColumns: [], - initTotalColumnsWidth: 0, - hasContainerWidth: !1, - containerWidthCheckTimer: null - } - }, - methods: { - getResizeColumns: function () { - var e = []; - this.internalColumns.forEach(function (t) { - t.isResize && e.push({ - width: t.width, - field: t.field - }) - }), - this.resizeColumns = e - }, - initResizeColumns: function () { - this.initTotalColumnsWidth = this.totalColumnsWidth, - this.getResizeColumns() - }, - containerWidthCheck: function () { - var e = this; - this.containerWidthCheckTimer = setTimeout(function (t) { - e.$el.clientWidth - e.internalWidth > 3 && e.tableResize() - }) - }, - adjustHeight: function (e) { - if (!this.$el || this.isVerticalResize) - return !1; - var t = this.getTotalColumnsHeight(), - n = this.scrollbarWidth; - this.hasTableFooter ? e ? this.footerTotalHeight === this.getFooterTotalRowHeight && (this.footerTotalHeight += n, this.height && this.height > 0 && !(this.height > t) || (this.internalHeight += n)) : e || this.footerTotalHeight > this.getFooterTotalRowHeight && (this.footerTotalHeight -= n, this.height && this.height > 0 && !(this.height > t) || (this.internalHeight -= n)) : this.height && this.height > 0 && !(this.height > t) || (e && this.internalHeight + 2 < t + n ? this.internalHeight += n : e || (this.internalHeight = this.getTotalColumnsHeight())) - }, - tableResize: function () { - if (!this.isHorizontalResize && !this.isVerticalResize) - return !1; - var e = this.getTotalColumnsHeight(), - t = this.maxWidth, - i = this.height && this.height > 0 ? this.height : e, - o = this.minWidth, - r = this.minHeight > e ? e : this.minHeight, - l = this.$el, - s = n.default.getViewportOffset(l), - a = "undefined" !== l.getBoundingClientRect ? l.getBoundingClientRect().width : l.clientWidth, - u = "undefined" !== l.getBoundingClientRect ? l.getBoundingClientRect().height : l.clientHeight, - c = window.document.documentElement.clientHeight - u - s.top - 2, - h = s.bottom2, - d = this.scrollbarWidth; - if (this.isHorizontalResize && this.internalWidth && this.internalWidth > 0 && a > 0 && (a = a > t ? t : a, a = a < o ? o : a, this.internalWidth = a), this.isVerticalResize && u > 0) { - if (c -= this.verticalResizeOffset, u += c, u = u > i ? i : u, u = u < r ? r : u, a <= this.initTotalColumnsWidth && !this.isTableEmpty) { - h -= this.verticalResizeOffset; - var f = h - e; - h > e + d ? u += d : f > 0 && f < d && (u += f) - } - this.internalHeight = u - } - this.changeColumnsWidth(a) - }, - changeColumnsWidth: function (e) { - var t = this, - n = e - this.totalColumnsWidth, - i = this.initTotalColumnsWidth, - o = this.$el.querySelector(".v-table-rightview .v-table-body"), - r = this.$el.querySelector(".v-table-rightview .v-table-footer"); - e <= i && !this.isTableEmpty ? (this.hasTableFooter ? r.style.overflowX = "scroll" : o.style.overflowX = "scroll", this.adjustHeight(!0)) : (this.getTotalColumnsHeight() > this.internalHeight && (n -= this.scrollbarWidth), this.hasTableFooter ? r.style.overflowX = "hidden" : o.style.overflowX = "hidden", this.adjustHeight(!1)), - this.hasFrozenColumn && (n -= 1), - e >= i || n > 0 ? this.setColumnsWidth(n) : this.columns.forEach(function (e, n) { - e.isResize && (t.internalColumns[n].width = e.width) - }), - this.containerWidthCheck() - }, - setColumnsWidth: function (e) { - for (var t = this.resizeColumns.length, n = Math.floor(e / t), i = n * t, o = e - i, r = Math.floor(o), l = new Array(t).fill(n), s = 0, a = 0; a < r; a++) - l[a] += 1; - l[t - 1] += o - r, - this.internalColumns.map(function (e) { - return e.isResize && (e.width += l[s++]), - e - }) - } - }, - mounted: function () { - n.default.bind(window, "resize", this.tableResize) - }, - beforeDestroy: function () { - n.default.unbind(window, "resize", this.tableResize), - clearTimeout(this.containerWidthCheckTimer) - } - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }), - exports.default = { - data: function () { - return { - sortColumns: {} - } - }, - methods: { - enableSort: function (e) { - return "string" == typeof e - }, - setSortColumns: function () { - var e = this, - t = {}, - n = []; - e.internalTitleRows.length > 0 && e.internalTitleRows.filter(function (e) { - e.filter(function (e, t) { - "string" == typeof e.orderBy && 1 === e.fields.length && (e.field = e.fields[0], n.push(e)) - }) - }), - (n.length > 0 ? n : e.internalColumns).filter(function (n, i) { - e.enableSort(n.orderBy) && (t[n.field] = n.orderBy) - }), - this.sortColumns = t, - this.singleSortInit() - }, - getCurrentSort: function (e) { - return this.sortColumns[e] - }, - sortControl: function (e) { - var t = this.sortColumns[e]; - if (this.enableSort(t)) { - if (this.sortAlways ? this.sortColumns[e] = "asc" === t ? "desc" : "asc" : this.sortColumns[e] = "asc" === t ? "desc" : "desc" === this.sortColumns[e] ? "" : "asc", !this.multipleSort) - for (var n in this.sortColumns) - n !== e && (this.sortColumns[n] = ""); - this.$emit("sort-change", this.sortColumns) - } - }, - singleSortInit: function () { - var e = this, - t = !1; - if (!e.multipleSort && e.sortColumns) - for (var n in e.sortColumns) - t && (e.sortColumns[n] = ""), t = !0 - }, - resetOrder: function () { - this.setSortColumns(), - this.$emit("sort-change", this.sortColumns) - } - } - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var t = e(0), - n = function (e) { - return e && e.__esModule ? e : { - default: - e - } - } - (t); - exports.default = { - data: function () { - return { - isTableEmpty: !1, - tableEmptyHeight: 0 - } - }, - methods: { - tableEmpty: function () { - var e = this, - t = this.internalTableData, - n = 0; - if (Array.isArray(t) && t.length > 0) - return this.isTableEmpty = !1, !1; - this.isTableEmpty = !0, - n = this.getTotalColumnsHeight() + this.errorContentHeight, - this.tableEmptyHeight = n, - this.$nextTick(function (t) { - e.tableEmptyScroll() - }) - }, - tableEmptyScrollEvent: function (e) { - var t = this.$el.querySelector(".v-table-rightview .v-table-header"), - n = this.$el.querySelector(".v-table-empty .v-table-empty-scroll"); - n && (t.scrollLeft = n.scrollLeft) - }, - tableEmptyScroll: function () { - var e = this.$el.querySelector(".v-table-empty .v-table-empty-scroll"); - n.default.bind(e, "scroll", this.tableEmptyScrollEvent) - } - }, - beforeDestroy: function () { - var e = this.$el.querySelector(".v-table-empty .v-table-empty-scroll"); - n.default.unbind(e, "scroll", this.tableEmptyScrollEvent) - } - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var t = e(0), - n = function (e) { - return e && e.__esModule ? e : { - default: - e - } - } - (t), - i = e(6); - exports.default = { - data: function () { - return { - draggingColumn: null, - isDragging: !1, - draggingStartX: 0, - draggingEndX: 0, - minColumnWidth: 15 - } - }, - methods: { - handleTitleMouseMove: function (e, t) { - if (!this.columnWidthDrag) - return !1; - var n = void 0, - o = void 0; - if (this.isDragging && this.setDragLinePosition(e), Array.isArray(t)) { - if (t.length > 1) - return !1; - t = t[0] - } - if (!this.showVerticalBorder) - return !1; - for (n = e.target; n && (n.className && !(0, i.hasClass)(n, "v-table-title-cell") || !n.className); ) - n = n.parentNode; - o = n.getBoundingClientRect(); - var r = document.body.style; - o.width >= this.minColumnWidth && o.right - e.pageX < 10 ? (this.isDragging || (this.draggingColumn = this.internalColumns.find(function (e) { - return e.field === t - })), r.cursor = "col-resize") : this.isDragging || (this.draggingColumn = null, r.cursor = "") - }, - handleTitleMouseOut: function () { - this.isDragging || (document.body.style.cursor = "") - }, - handleTitleMouseDown: function (e, t) { - if (!this.draggingColumn || !this.showVerticalBorder) - return !1; - this.isDragging = !0, - this.draggingStartX = e.clientX, - this.setDragLinePosition(e), - document.onselectstart = function () { - return !1 - }, - document.ondragstart = function () { - return !1 - }, - n.default.bind(document, "mousemove", this.handleDragMouseMove), - n.default.bind(document, "mouseup", this.handleDragMouseUp) - }, - handleDragMouseMove: function (e) { - if (!this.isDragging) - return !1; - this.setDragLinePosition(e) - }, - setDragLinePosition: function (e) { - var t = n.default.getViewportOffset(this.$el).left, - i = this.$el.querySelector(".v-table-drag-line"), - o = e.clientX; - this.draggingColumn.width + (o - this.draggingStartX) <= this.minColumnWidth || (i.style.left = o - t + "px") - }, - handleDragMouseUp: function (e) { - if (!this.isDragging) - return !1; - this.draggingEndX = e.clientX; - var t = this.draggingEndX - this.draggingStartX; - if (Math.abs(t) > 1) { - var o = this.draggingColumn; - o.width + t < this.minColumnWidth ? o.width = this.minColumnWidth : o.width += t - } - var r = this.$el.querySelector(".v-table-rightview .v-table-body"), - l = this.$el.querySelector(".v-table-rightview .v-table-footer"), - s = this.hasTableFooter; - this.totalColumnsWidth < this.internalWidth ? s ? l.style.overflowX = "hidden" : (r.style.overflowX = "hidden", (0, i.removeClass)(r, "v-table-rightview-special-border"), r.classList.remove("v-table-rightview-special-border")) : s ? l.style.overflowX = "scroll" : (r.style.overflowX = "scroll", this.hasFrozenColumn || (0, i.addClass)(r, "v-table-rightview-special-border")), - this.draggingColumn = null, - document.body.style.cursor = "", - this.isDragging = !1, - document.onselectstart = function () { - return !0 - }, - document.ondragstart = function () { - return !0 - }, - n.default.unbind(document, "mousemove", this.handleDragMouseMove), - n.default.unbind(document, "mouseup", this.handleDragMouseUp) - } - } - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var t = e(0), - n = function (e) { - return e && e.__esModule ? e : { - default: - e - } - } - (t), - i = e(6); - exports.default = { - methods: { - cellEdit: function (e, t, o, r, l) { - for (var s = e.target, a = void 0, u = void 0, c = void 0, h = void 0, d = void 0, f = void 0; s.className && -1 === s.className.indexOf("v-table-body-cell") || !s.className; ) - s = s.parentNode; - if (f = s.children[0], f.style.display = "none", (0, i.hasClass)(s, "cell-editing")) - return !1; - if ((0, i.addClass)(s, "cell-editing"), a = f.innerText.trim(), s.style.textAlign && (d = s.style.textAlign), u = document.createElement("input"), u.value = a, u.className = "cell-edit-input", u.style.textAlign = d, u.style.width = "100%", u.style.height = "100%", s.appendChild(u), u.focus(), c = u.value.length, document.selection) { - var p = u.createTextRange(); - p.moveStart("character", c), - p.collapse(), - p.select() - } else - "number" == typeof u.selectionStart && "number" == typeof u.selectionEnd && (u.selectionStart = u.selectionEnd = c); - h = function (e) { - if (void 0 === e.keyCode || 0 === e.keyCode || 13 == e.keyCode) { - if (!(0, i.hasClass)(s, "cell-editing")) - return !1; - (0, i.removeClass)(s, "cell-editing"), - f.style.display = "", - t(u.value, a), - n.default.unbind(u, "blur", h), - n.default.unbind(u, "keydown", h), - s.removeChild(u) - } - }, - n.default.bind(u, "blur", h), - n.default.bind(u, "keydown", h) - }, - cellEditClick: function (e, t, n, i, o) { - if (t) { - var r = this, - l = function (e, t) { - r.cellEditDone && r.cellEditDone(e, t, o, n, i) - }; - this.cellEdit(e, l, o, n, i) - } - } - } - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }), - exports.default = { - data: function () { - return { - skipRenderCells: [] - } - }, - methods: { - cellMergeInit: function (e, t, n, i) { - if (-1 !== this.skipRenderCells.indexOf(e + "-" + t)) - return !1; - var o = this.cellMerge && this.cellMerge(e, n, t); - return o && (o.colSpan && o.colSpan > 1 || o.rowSpan && o.rowSpan > 1) && this.setSkipRenderCells(o.colSpan, o.rowSpan, e, t, i), - !0 - }, - setSkipRenderCells: function (e, t, n, i, o) { - var r = o ? this.getFrozenColumnsFields : this.getNoFrozenColumnsFields, - l = "", - s = void 0, - a = void 0, - u = void 0, - c = void 0; - a = s = r.indexOf(i), - e && e > 1 && (a = s + e - 1), - c = u = n, - t && t > 1 && (c = n + t - 1); - for (var h = s; h <= a; h++) - for (var d = u; d <= c; d++) - h == s && d == u || (l = d + "-" + r[h], -1 === this.skipRenderCells.indexOf(l) && this.skipRenderCells.push(l)) - }, - setColRowSpan: function (e, t, n) { - var i = { - colSpan: "", - rowSpan: "" - }, - o = this.cellMerge && this.cellMerge(e, n, t); - return o && (i = { - colSpan: o.colSpan ? o.colSpan : "", - rowSpan: o.rowSpan ? o.rowSpan : "" - }), - i - }, - isCellMergeRender: function (e, t, n) { - var i = this.cellMerge && this.cellMerge(e, n, t); - return !(!i || !(i.colSpan && i.colSpan > 0 || i.rowSpan && i.rowSpan > 0)) - }, - getRowHeightByRowSpan: function (e, t, n) { - var i = this.cellMerge && this.cellMerge(e, n, t); - return i && i.rowSpan && i.rowSpan > 1 ? this.rowHeight * i.rowSpan : this.rowHeight - }, - getRowWidthByColSpan: function (e, t, n) { - var i = void 0, - o = void 0, - r = this.getColumnsFields, - l = this.cellMerge && this.cellMerge(e, n, t), - s = l.colSpan, - a = 0; - if (l && s && s >= 1) { - o = r.indexOf(t), - i = o + s - 1; - for (var u = o; u <= i; u++) - this.internalColumns.forEach(function (e) { - r[u] === e.field && (a += e.width) - }) - } - return a - }, - cellMergeContentType: function (e, t, n) { - var i = { - isComponent: !1, - isContent: !1 - }, - o = this.cellMerge && this.cellMerge(e, n, t); - return o && (o.componentName && "string" == typeof o.componentName && o.componentName.length > 0 ? i.isComponent = !0 : o.content && o.content.length > 0 && (i.isContent = !0)), - i - } - } - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }), - exports.default = { - computed: { - getTitleRowspanTotalCount: function () { - var e = this, - t = 0, - n = 0, - i = void 0, - o = void 0; - return this.noFrozenTitleCols.forEach(function (n) { - i = e.getTitleRowspanCountArr(n), - Array.isArray(i) && i.length > 0 && (o = Math.min.apply(null, i), t += o - 1) - }), - this.frozenTitleCols.forEach(function (t) { - i = e.getTitleRowspanCountArr(t), - Array.isArray(i) && i.length > 0 && (o = Math.min.apply(null, i), n += o - 1) - }), - t < n ? t : n - } - }, - methods: { - getTitleRowspanCountArr: function (e) { - var t = []; - return e.every(function (e) { - return !!(e.rowspan && parseInt(e.rowspan) > 1) && (t.push(parseInt(e.rowspan)), !0) - }) ? t : [] - }, - getMinRowspan: function (e) { - var t = void 0, - n = this.getTitleRowspanCountArr(e); - return Array.isArray(n) && n.length > 0 && (t = Math.min.apply(null, n)), - t - 1 - } - } - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }), - exports.default = { - data: function () { - return { - isAllChecked: !1, - checkboxGroupModel: [], - indeterminate: !1 - } - }, - computed: { - disabledUnChecked: function () { - var e = []; - return this.internalTableData.filter(function (t, n) { - t._disabled && !t._checked && e.push(n) - }), - e - }, - getCheckedTableRow: function () { - var e = this; - return this.internalTableData.filter(function (t, n) { - return e.checkboxGroupModel.indexOf(n) > -1 - }) - }, - hasSelectionColumns: function () { - return this.internalColumns.some(function (e) { - return e.type && "selection" === e.type - }) - } - }, - methods: { - isSelectionCol: function (e) { - return !(!Array.isArray(e) || 1 !== e.length) && this.internalColumns.some(function (t) { - return t.field === e[0] && "selection" === t.type - }) - }, - disabledChecked: function () { - var e = []; - return this.internalTableData.filter(function (t, n) { - t._disabled && t._checked && e.push(n) - }), - e - }, - handleCheckAll: function () { - if (this.isAllChecked) { - this.checkboxGroupModel = []; - var e = this.internalTableData.length; - if (e > 0) - for (var t = 0; t < e; t++) - - 1 === this.disabledUnChecked.indexOf(t) && this.checkboxGroupModel.push(t) - } else - this.checkboxGroupModel = this.disabledChecked(); - this.selectAll && this.selectAll(this.getCheckedTableRow), - this.setIndeterminateState() - }, - handleCheckChange: function (e) { - var t = this; - this.$nextTick(function (n) { - t.selectChange && t.selectChange(t.getCheckedTableRow, e) - }) - }, - handleCheckGroupChange: function () { - this.selectGroupChange && this.selectGroupChange(this.getCheckedTableRow), - this.setCheckState() - }, - setIndeterminateState: function () { - var e = this.checkboxGroupModel.length, - t = this.internalTableData.length; - this.indeterminate = !(e > 0 && e === t) && (e > 0 && e < t) - }, - setCheckState: function () { - var e = this.checkboxGroupModel.length, - t = this.internalTableData.length; - e > 0 && e === t ? (this.indeterminate = !1, this.isAllChecked = !0) : e > 0 && e < t ? (this.isAllChecked = !1, this.indeterminate = !0) : (this.indeterminate = !1, this.isAllChecked = !1) - }, - updateCheckboxGroupModel: function () { - var e = this; - if (!this.hasSelectionColumns) - return !1; - this.checkboxGroupModel = [], - this.internalTableData.filter(function (t, n) { - t._checked && e.checkboxGroupModel.push(n) - }), - - this.setCheckState() - } - } - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var t = e(7), - n = function (e) { - return e && e.__esModule ? e : { - default: - e - } - } - (t); - exports.default = { - data: function () { - return { - footerTotalHeight: 0 - } - }, - computed: { - frozenFooterCols: function () { - var e = []; - return this.initInternalFooter.length > 0 && this.initInternalFooter.forEach(function (t) { - e.push(t.filter(function (e) { - return e.isFrozen - })) - }), - e - }, - noFrozenFooterCols: function () { - var e = []; - return this.initInternalFooter.length > 0 && this.initInternalFooter.forEach(function (t) { - e.push(t.filter(function (e) { - return !e.isFrozen - })) - }), - e - }, - getFooterTotalRowHeight: function () { - return Array.isArray(this.footer) && this.footer.length > 0 ? this.footer.length * this.footerRowHeight : 0 - }, - hasTableFooter: function () { - return Array.isArray(this.footer) && this.footer.length - }, - initInternalFooter: function () { - if (!(Array.isArray(this.footer) && this.footer.length > 0)) - return []; - var e, - t = [], - i = []; - return e = (0, n.default)(this.internalColumns), - e.sort(function (e, t) { - return e.isFrozen ? -1 : t.isFrozen ? 1 : 0 - }), - this.footer.forEach(function (n, o) { - i = [], - n.forEach(function (t, n) { - i.push({ - content: t, - width: e[n].width, - align: e[n].columnAlign, - isFrozen: !!e[n].isFrozen - }) - }), - t.push(i) - }), - t - } - }, - methods: { - setFooterCellClassName: function (e, t, n, i) { - var o = n; - return !e && this.hasFrozenColumn && (o += this.frozenCols.length), - this.footerCellClassName && this.footerCellClassName(t, o, i) - } - } - } -}, function (module, exports, e) { - "use strict"; - (function (t) { - function n() { - return o.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823 - } - function i(e, t) { - if (n() < t) - throw new RangeError("Invalid typed array length"); - return o.TYPED_ARRAY_SUPPORT ? (e = new Uint8Array(t), e.__proto__ = o.prototype) : (null === e && (e = new o(t)), e.length = t), - e - } - function o(e, t, n) { - if (!(o.TYPED_ARRAY_SUPPORT || this instanceof o)) - return new o(e, t, n); - if ("number" == typeof e) { - if ("string" == typeof t) - throw new Error("If encoding is specified then the first argument must be a string"); - return a(this, e) - } - return r(this, e, t, n) - } - function r(e, t, n, i) { - if ("number" == typeof t) - throw new TypeError('"value" argument must not be a number'); - return "undefined" != typeof ArrayBuffer && t instanceof ArrayBuffer ? h(e, t, n, i) : "string" == typeof t ? u(e, t, n) : d(e, t) - } - function l(e) { - if ("number" != typeof e) - throw new TypeError('"size" argument must be a number'); - if (e < 0) - throw new RangeError('"size" argument must not be negative') - } - function s(e, t, n, o) { - return l(t), - t <= 0 ? i(e, t) : void 0 !== n ? "string" == typeof o ? i(e, t).fill(n, o) : i(e, t).fill(n) : i(e, t) - } - function a(e, t) { - if (l(t), e = i(e, t < 0 ? 0 : 0 | f(t)), !o.TYPED_ARRAY_SUPPORT) - for (var n = 0; n < t; ++n) - e[n] = 0; - return e - } - function u(e, t, n) { - if ("string" == typeof n && "" !== n || (n = "utf8"), !o.isEncoding(n)) - throw new TypeError('"encoding" must be a valid string encoding'); - var r = 0 | g(t, n); - e = i(e, r); - var l = e.write(t, n); - return l !== r && (e = e.slice(0, l)), - e - } - function c(e, t) { - var n = t.length < 0 ? 0 : 0 | f(t.length); - e = i(e, n); - for (var o = 0; o < n; o += 1) - e[o] = 255 & t[o]; - return e - } - function h(e, t, n, i) { - if (t.byteLength, n < 0 || t.byteLength < n) - throw new RangeError("'offset' is out of bounds"); - if (t.byteLength < n + (i || 0)) - throw new RangeError("'length' is out of bounds"); - return t = void 0 === n && void 0 === i ? new Uint8Array(t) : void 0 === i ? new Uint8Array(t, n) : new Uint8Array(t, n, i), - o.TYPED_ARRAY_SUPPORT ? (e = t, e.__proto__ = o.prototype) : e = c(e, t), - e - } - function d(e, t) { - if (o.isBuffer(t)) { - var n = 0 | f(t.length); - return e = i(e, n), - 0 === e.length ? e : (t.copy(e, 0, 0, n), e) - } - if (t) { - if ("undefined" != typeof ArrayBuffer && t.buffer instanceof ArrayBuffer || "length" in t) - return "number" != typeof t.length || q(t.length) ? i(e, 0) : c(e, t); - if ("Buffer" === t.type && Z(t.data)) - return c(e, t.data) - } - throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.") - } - function f(e) { - if (e >= n()) - throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + n().toString(16) + " bytes"); - return 0 | e - } - function p(e) { - return +e != e && (e = 0), - o.alloc(+e) - } - function g(e, t) { - if (o.isBuffer(e)) - return e.length; - if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer.isView && (ArrayBuffer.isView(e) || e instanceof ArrayBuffer)) - return e.byteLength; - "string" != typeof e && (e = "" + e); - var n = e.length; - if (0 === n) - return 0; - for (var i = !1; ; ) - switch (t) { - case "ascii": - case "latin1": - case "binary": - return n; - case "utf8": - case "utf-8": - case void 0: - return L(e).length; - case "ucs2": - case "ucs-2": - case "utf16le": - case "utf-16le": - return 2 * n; - case "hex": - return n >>> 1; - case "base64": - return G(e).length; - default: - if (i) - return L(e).length; - t = ("" + t).toLowerCase(), - i = !0 - } - } - function v(e, t, n) { - var i = !1; - if ((void 0 === t || t < 0) && (t = 0), t > this.length) - return ""; - if ((void 0 === n || n > this.length) && (n = this.length), n <= 0) - return ""; - if (n >>>= 0, t >>>= 0, n <= t) - return ""; - for (e || (e = "utf8"); ; ) - switch (e) { - case "hex": - return E(this, t, n); - case "utf8": - case "utf-8": - return P(this, t, n); - case "ascii": - return R(this, t, n); - case "latin1": - case "binary": - return A(this, t, n); - case "base64": - return M(this, t, n); - case "ucs2": - case "ucs-2": - case "utf16le": - case "utf-16le": - return O(this, t, n); - default: - if (i) - throw new TypeError("Unknown encoding: " + e); - e = (e + "").toLowerCase(), - i = !0 - } - } - function m(e, t, n) { - var i = e[t]; - e[t] = e[n], - e[n] = i - } - function b(e, t, n, i, r) { - if (0 === e.length) - return -1; - if ("string" == typeof n ? (i = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, isNaN(n) && (n = r ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) { - if (r) - return -1; - n = e.length - 1 - } else if (n < 0) { - if (!r) - return -1; - n = 0 - } - if ("string" == typeof t && (t = o.from(t, i)), o.isBuffer(t)) - return 0 === t.length ? -1 : w(e, t, n, i, r); - if ("number" == typeof t) - return t &= 255, o.TYPED_ARRAY_SUPPORT && "function" == typeof Uint8Array.prototype.indexOf ? r ? Uint8Array.prototype.indexOf.call(e, t, n) : Uint8Array.prototype.lastIndexOf.call(e, t, n) : w(e, [t], n, i, r); - throw new TypeError("val must be string, number or Buffer") - } - function w(e, t, n, i, o) { - function r(e, t) { - return 1 === l ? e[t] : e.readUInt16BE(t * l) - } - var l = 1, - s = e.length, - a = t.length; - if (void 0 !== i && ("ucs2" === (i = String(i).toLowerCase()) || "ucs-2" === i || "utf16le" === i || "utf-16le" === i)) { - if (e.length < 2 || t.length < 2) - return -1; - l = 2, - s /= 2, - a /= 2, - n /= 2 - } - var u; - if (o) { - var c = -1; - for (u = n; u < s; u++) - if (r(e, u) === r(t, -1 === c ? 0 : u - c)) { - if (-1 === c && (c = u), u - c + 1 === a) - return c * l - } else - 1 !== c && (u -= u - c), c = -1 - } else - for (n + a > s && (n = s - a), u = n; u >= 0; u--) { - for (var h = !0, d = 0; d < a; d++) - if (r(e, u + d) !== r(t, d)) { - h = !1; - break - } - if (h) - return u - } - return -1 - } - function y(e, t, n, i) { - n = Number(n) || 0; - var o = e.length - n; - i ? (i = Number(i)) > o && (i = o) : i = o; - var r = t.length; - if (r % 2 != 0) - throw new TypeError("Invalid hex string"); - i > r / 2 && (i = r / 2); - for (var l = 0; l < i; ++l) { - var s = parseInt(t.substr(2 * l, 2), 16); - if (isNaN(s)) - return l; - e[n + l] = s - } - return l - } - function C(e, t, n, i) { - return Y(L(t, e.length - n), e, n, i) - } - function _(e, t, n, i) { - return Y(V(t), e, n, i) - } - function x(e, t, n, i) { - return _(e, t, n, i) - } - function k(e, t, n, i) { - return Y(G(t), e, n, i) - } - function S(e, t, n, i) { - return Y(U(t, e.length - n), e, n, i) - } - function M(e, t, n) { - return 0 === t && n === e.length ? X.fromByteArray(e) : X.fromByteArray(e.slice(t, n)) - } - function P(e, t, n) { - n = Math.min(e.length, n); - for (var i = [], o = t; o < n; ) { - var r = e[o], - l = null, - s = r > 239 ? 4 : r > 223 ? 3 : r > 191 ? 2 : 1; - if (o + s <= n) { - var a, - u, - c, - h; - switch (s) { - case 1: - r < 128 && (l = r); - break; - case 2: - a = e[o + 1], - 128 == (192 & a) && (h = (31 & r) << 6 | 63 & a) > 127 && (l = h); - break; - case 3: - a = e[o + 1], - u = e[o + 2], - 128 == (192 & a) && 128 == (192 & u) && (h = (15 & r) << 12 | (63 & a) << 6 | 63 & u) > 2047 && (h < 55296 || h > 57343) && (l = h); - break; - case 4: - a = e[o + 1], - u = e[o + 2], - c = e[o + 3], - 128 == (192 & a) && 128 == (192 & u) && 128 == (192 & c) && (h = (15 & r) << 18 | (63 & a) << 12 | (63 & u) << 6 | 63 & c) > 65535 && h < 1114112 && (l = h) - } - } - null === l ? (l = 65533, s = 1) : l > 65535 && (l -= 65536, i.push(l >>> 10 & 1023 | 55296), l = 56320 | 1023 & l), - i.push(l), - o += s - } - return T(i) - } - function T(e) { - var t = e.length; - if (t <= K) - return String.fromCharCode.apply(String, e); - for (var n = "", i = 0; i < t; ) - n += String.fromCharCode.apply(String, e.slice(i, i += K)); - return n - } - function R(e, t, n) { - var i = ""; - n = Math.min(e.length, n); - for (var o = t; o < n; ++o) - i += String.fromCharCode(127 & e[o]); - return i - } - function A(e, t, n) { - var i = ""; - n = Math.min(e.length, n); - for (var o = t; o < n; ++o) - i += String.fromCharCode(e[o]); - return i - } - function E(e, t, n) { - var i = e.length; - (!t || t < 0) && (t = 0), - (!n || n < 0 || n > i) && (n = i); - for (var o = "", r = t; r < n; ++r) - o += W(e[r]); - return o - } - function O(e, t, n) { - for (var i = e.slice(t, n), o = "", r = 0; r < i.length; r += 2) - o += String.fromCharCode(i[r] + 256 * i[r + 1]); - return o - } - function B(e, t, n) { - if (e % 1 != 0 || e < 0) - throw new RangeError("offset is not uint"); - if (e + t > n) - throw new RangeError("Trying to access beyond buffer length") - } - function z(e, t, n, i, r, l) { - if (!o.isBuffer(e)) - throw new TypeError('"buffer" argument must be a Buffer instance'); - if (t > r || t < l) - throw new RangeError('"value" argument is out of bounds'); - if (n + i > e.length) - throw new RangeError("Index out of range") - } - function H(e, t, n, i) { - t < 0 && (t = 65535 + t + 1); - for (var o = 0, r = Math.min(e.length - n, 2); o < r; ++o) - e[n + o] = (t & 255 << 8 * (i ? o : 1 - o)) >>> 8 * (i ? o : 1 - o) - } - function I(e, t, n, i) { - t < 0 && (t = 4294967295 + t + 1); - for (var o = 0, r = Math.min(e.length - n, 4); o < r; ++o) - e[n + o] = t >>> 8 * (i ? o : 3 - o) & 255 - } - function D(e, t, n, i, o, r) { - if (n + i > e.length) - throw new RangeError("Index out of range"); - if (n < 0) - throw new RangeError("Index out of range") - } - function F(e, t, n, i, o) { - return o || D(e, t, n, 4, 3.4028234663852886e38, -3.4028234663852886e38), - J.write(e, t, n, i, 23, 4), - n + 4 - } - function j(e, t, n, i, o) { - return o || D(e, t, n, 8, 1.7976931348623157e308, -1.7976931348623157e308), - J.write(e, t, n, i, 52, 8), - n + 8 - } - function N(e) { - if (e = $(e).replace(Q, ""), e.length < 2) - return ""; - for (; e.length % 4 != 0; ) - e += "="; - return e - } - function $(e) { - return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "") - } - function W(e) { - return e < 16 ? "0" + e.toString(16) : e.toString(16) - } - function L(e, t) { - t = t || 1 / 0; - for (var n, i = e.length, o = null, r = [], l = 0; l < i; ++l) { - if ((n = e.charCodeAt(l)) > 55295 && n < 57344) { - if (!o) { - if (n > 56319) { - (t -= 3) > -1 && r.push(239, 191, 189); - continue - } - if (l + 1 === i) { - (t -= 3) > -1 && r.push(239, 191, 189); - continue - } - o = n; - continue - } - if (n < 56320) { - (t -= 3) > -1 && r.push(239, 191, 189), - o = n; - continue - } - n = 65536 + (o - 55296 << 10 | n - 56320) - } else - o && (t -= 3) > -1 && r.push(239, 191, 189); - if (o = null, n < 128) { - if ((t -= 1) < 0) - break; - r.push(n) - } else if (n < 2048) { - if ((t -= 2) < 0) - break; - r.push(n >> 6 | 192, 63 & n | 128) - } else if (n < 65536) { - if ((t -= 3) < 0) - break; - r.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128) - } else { - if (!(n < 1114112)) - throw new Error("Invalid code point"); - if ((t -= 4) < 0) - break; - r.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n | 128) - } - } - return r - } - function V(e) { - for (var t = [], n = 0; n < e.length; ++n) - t.push(255 & e.charCodeAt(n)); - return t - } - function U(e, t) { - for (var n, i, o, r = [], l = 0; l < e.length && !((t -= 2) < 0); ++l) - n = e.charCodeAt(l), i = n >> 8, o = n % 256, r.push(o), r.push(i); - return r - } - function G(e) { - return X.toByteArray(N(e)) - } - function Y(e, t, n, i) { - for (var o = 0; o < i && !(o + n >= t.length || o >= e.length); ++o) - t[o + n] = e[o]; - return o - } - function q(e) { - return e !== e - } - var X = e(30), - J = e(31), - Z = e(32); - exports.Buffer = o, - exports.SlowBuffer = p, - exports.INSPECT_MAX_BYTES = 50, - o.TYPED_ARRAY_SUPPORT = void 0 !== t.TYPED_ARRAY_SUPPORT ? t.TYPED_ARRAY_SUPPORT : function () { - try { - var e = new Uint8Array(1); - return e.__proto__ = { - __proto__: Uint8Array.prototype, - foo: function () { - return 42 - } - }, - 42 === e.foo() && "function" == typeof e.subarray && 0 === e.subarray(1, 1).byteLength - } catch (e) { - return !1 - } - } - (), - exports.kMaxLength = n(), - o.poolSize = 8192, - o._augment = function (e) { - return e.__proto__ = o.prototype, - e - }, - o.from = function (e, t, n) { - return r(null, e, t, n) - }, - o.TYPED_ARRAY_SUPPORT && (o.prototype.__proto__ = Uint8Array.prototype, o.__proto__ = Uint8Array, "undefined" != typeof Symbol && Symbol.species && o[Symbol.species] === o && Object.defineProperty(o, Symbol.species, { - value: null, - configurable: !0 - })), - o.alloc = function (e, t, n) { - return s(null, e, t, n) - }, - o.allocUnsafe = function (e) { - return a(null, e) - }, - o.allocUnsafeSlow = function (e) { - return a(null, e) - }, - o.isBuffer = function (e) { - return !(null == e || !e._isBuffer) - }, - o.compare = function (e, t) { - if (!o.isBuffer(e) || !o.isBuffer(t)) - throw new TypeError("Arguments must be Buffers"); - if (e === t) - return 0; - for (var n = e.length, i = t.length, r = 0, l = Math.min(n, i); r < l; ++r) - if (e[r] !== t[r]) { - n = e[r], - i = t[r]; - break - } - return n < i ? -1 : i < n ? 1 : 0 - }, - o.isEncoding = function (e) { - switch (String(e).toLowerCase()) { - case "hex": - case "utf8": - case "utf-8": - case "ascii": - case "latin1": - case "binary": - case "base64": - case "ucs2": - case "ucs-2": - case "utf16le": - case "utf-16le": - return !0; - default: - return !1 - } - }, - o.concat = function (e, t) { - if (!Z(e)) - throw new TypeError('"list" argument must be an Array of Buffers'); - if (0 === e.length) - return o.alloc(0); - var n; - if (void 0 === t) - for (t = 0, n = 0; n < e.length; ++n) - t += e[n].length; - var i = o.allocUnsafe(t), - r = 0; - for (n = 0; n < e.length; ++n) { - var l = e[n]; - if (!o.isBuffer(l)) - throw new TypeError('"list" argument must be an Array of Buffers'); - l.copy(i, r), - r += l.length - } - return i - }, - o.byteLength = g, - o.prototype._isBuffer = !0, - o.prototype.swap16 = function () { - var e = this.length; - if (e % 2 != 0) - throw new RangeError("Buffer size must be a multiple of 16-bits"); - for (var t = 0; t < e; t += 2) - m(this, t, t + 1); - return this - }, - o.prototype.swap32 = function () { - var e = this.length; - if (e % 4 != 0) - throw new RangeError("Buffer size must be a multiple of 32-bits"); - for (var t = 0; t < e; t += 4) - m(this, t, t + 3), m(this, t + 1, t + 2); - return this - }, - o.prototype.swap64 = function () { - var e = this.length; - if (e % 8 != 0) - throw new RangeError("Buffer size must be a multiple of 64-bits"); - for (var t = 0; t < e; t += 8) - m(this, t, t + 7), m(this, t + 1, t + 6), m(this, t + 2, t + 5), m(this, t + 3, t + 4); - return this - }, - o.prototype.toString = function () { - var e = 0 | this.length; - return 0 === e ? "" : 0 === arguments.length ? P(this, 0, e) : v.apply(this, arguments) - }, - o.prototype.equals = function (e) { - if (!o.isBuffer(e)) - throw new TypeError("Argument must be a Buffer"); - return this === e || 0 === o.compare(this, e) - }, - o.prototype.inspect = function () { - var e = "", - t = exports.INSPECT_MAX_BYTES; - return this.length > 0 && (e = this.toString("hex", 0, t).match(/.{2}/g).join(" "), this.length > t && (e += " ... ")), - "<Buffer " + e + ">" - }, - o.prototype.compare = function (e, t, n, i, r) { - if (!o.isBuffer(e)) - throw new TypeError("Argument must be a Buffer"); - if (void 0 === t && (t = 0), void 0 === n && (n = e ? e.length : 0), void 0 === i && (i = 0), void 0 === r && (r = this.length), t < 0 || n > e.length || i < 0 || r > this.length) - throw new RangeError("out of range index"); - if (i >= r && t >= n) - return 0; - if (i >= r) - return -1; - if (t >= n) - return 1; - if (t >>>= 0, n >>>= 0, i >>>= 0, r >>>= 0, this === e) - return 0; - for (var l = r - i, s = n - t, a = Math.min(l, s), u = this.slice(i, r), c = e.slice(t, n), h = 0; h < a; ++h) - if (u[h] !== c[h]) { - l = u[h], - s = c[h]; - break - } - return l < s ? -1 : s < l ? 1 : 0 - }, - o.prototype.includes = function (e, t, n) { - return -1 !== this.indexOf(e, t, n) - }, - o.prototype.indexOf = function (e, t, n) { - return b(this, e, t, n, !0) - }, - o.prototype.lastIndexOf = function (e, t, n) { - return b(this, e, t, n, !1) - }, - o.prototype.write = function (e, t, n, i) { - if (void 0 === t) - i = "utf8", n = this.length, t = 0; - else if (void 0 === n && "string" == typeof t) - i = t, n = this.length, t = 0; - else { - if (!isFinite(t)) - throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported"); - t |= 0, - isFinite(n) ? (n |= 0, void 0 === i && (i = "utf8")) : (i = n, n = void 0) - } - var o = this.length - t; - if ((void 0 === n || n > o) && (n = o), e.length > 0 && (n < 0 || t < 0) || t > this.length) - throw new RangeError("Attempt to write outside buffer bounds"); - i || (i = "utf8"); - for (var r = !1; ; ) - switch (i) { - case "hex": - return y(this, e, t, n); - case "utf8": - case "utf-8": - return C(this, e, t, n); - case "ascii": - return _(this, e, t, n); - case "latin1": - case "binary": - return x(this, e, t, n); - case "base64": - return k(this, e, t, n); - case "ucs2": - case "ucs-2": - case "utf16le": - case "utf-16le": - return S(this, e, t, n); - default: - if (r) - throw new TypeError("Unknown encoding: " + i); - i = ("" + i).toLowerCase(), - r = !0 - } - }, - o.prototype.toJSON = function () { - return { - type: "Buffer", - data: Array.prototype.slice.call(this._arr || this, 0) - } - }; - var K = 4096; - o.prototype.slice = function (e, t) { - var n = this.length; - e = ~~e, - t = void 0 === t ? n : ~~t, - e < 0 ? (e += n) < 0 && (e = 0) : e > n && (e = n), - t < 0 ? (t += n) < 0 && (t = 0) : t > n && (t = n), - t < e && (t = e); - var i; - if (o.TYPED_ARRAY_SUPPORT) - i = this.subarray(e, t), i.__proto__ = o.prototype; - else { - var r = t - e; - i = new o(r, void 0); - for (var l = 0; l < r; ++l) - i[l] = this[l + e] - } - return i - }, - o.prototype.readUIntLE = function (e, t, n) { - e |= 0, - t |= 0, - n || B(e, t, this.length); - for (var i = this[e], o = 1, r = 0; ++r < t && (o *= 256); ) - i += this[e + r] * o; - return i - }, - o.prototype.readUIntBE = function (e, t, n) { - e |= 0, - t |= 0, - n || B(e, t, this.length); - for (var i = this[e + --t], o = 1; t > 0 && (o *= 256); ) - i += this[e + --t] * o; - return i - }, - o.prototype.readUInt8 = function (e, t) { - return t || B(e, 1, this.length), - this[e] - }, - o.prototype.readUInt16LE = function (e, t) { - return t || B(e, 2, this.length), - this[e] | this[e + 1] << 8 - }, - o.prototype.readUInt16BE = function (e, t) { - return t || B(e, 2, this.length), - this[e] << 8 | this[e + 1] - }, - o.prototype.readUInt32LE = function (e, t) { - return t || B(e, 4, this.length), - (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3] - }, - o.prototype.readUInt32BE = function (e, t) { - return t || B(e, 4, this.length), - 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]) - }, - o.prototype.readIntLE = function (e, t, n) { - e |= 0, - t |= 0, - n || B(e, t, this.length); - for (var i = this[e], o = 1, r = 0; ++r < t && (o *= 256); ) - i += this[e + r] * o; - return o *= 128, - i >= o && (i -= Math.pow(2, 8 * t)), - i - }, - o.prototype.readIntBE = function (e, t, n) { - e |= 0, - t |= 0, - n || B(e, t, this.length); - for (var i = t, o = 1, r = this[e + --i]; i > 0 && (o *= 256); ) - r += this[e + --i] * o; - return o *= 128, - r >= o && (r -= Math.pow(2, 8 * t)), - r - }, - o.prototype.readInt8 = function (e, t) { - return t || B(e, 1, this.length), - 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e] - }, - o.prototype.readInt16LE = function (e, t) { - t || B(e, 2, this.length); - var n = this[e] | this[e + 1] << 8; - return 32768 & n ? 4294901760 | n : n - }, - o.prototype.readInt16BE = function (e, t) { - t || B(e, 2, this.length); - var n = this[e + 1] | this[e] << 8; - return 32768 & n ? 4294901760 | n : n - }, - o.prototype.readInt32LE = function (e, t) { - return t || B(e, 4, this.length), - this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24 - }, - o.prototype.readInt32BE = function (e, t) { - return t || B(e, 4, this.length), - this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3] - }, - o.prototype.readFloatLE = function (e, t) { - return t || B(e, 4, this.length), - J.read(this, e, !0, 23, 4) - }, - o.prototype.readFloatBE = function (e, t) { - return t || B(e, 4, this.length), - J.read(this, e, !1, 23, 4) - }, - o.prototype.readDoubleLE = function (e, t) { - return t || B(e, 8, this.length), - J.read(this, e, !0, 52, 8) - }, - o.prototype.readDoubleBE = function (e, t) { - return t || B(e, 8, this.length), - J.read(this, e, !1, 52, 8) - }, - o.prototype.writeUIntLE = function (e, t, n, i) { - if (e = +e, t |= 0, n |= 0, !i) { - z(this, e, t, n, Math.pow(2, 8 * n) - 1, 0) - } - var o = 1, - r = 0; - for (this[t] = 255 & e; ++r < n && (o *= 256); ) - this[t + r] = e / o & 255; - return t + n - }, - o.prototype.writeUIntBE = function (e, t, n, i) { - if (e = +e, t |= 0, n |= 0, !i) { - z(this, e, t, n, Math.pow(2, 8 * n) - 1, 0) - } - var o = n - 1, - r = 1; - for (this[t + o] = 255 & e; --o >= 0 && (r *= 256); ) - this[t + o] = e / r & 255; - return t + n - }, - o.prototype.writeUInt8 = function (e, t, n) { - return e = +e, - t |= 0, - n || z(this, e, t, 1, 255, 0), - o.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), - this[t] = 255 & e, - t + 1 - }, - o.prototype.writeUInt16LE = function (e, t, n) { - return e = +e, - t |= 0, - n || z(this, e, t, 2, 65535, 0), - o.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8) : H(this, e, t, !0), - t + 2 - }, - o.prototype.writeUInt16BE = function (e, t, n) { - return e = +e, - t |= 0, - n || z(this, e, t, 2, 65535, 0), - o.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8, this[t + 1] = 255 & e) : H(this, e, t, !1), - t + 2 - }, - o.prototype.writeUInt32LE = function (e, t, n) { - return e = +e, - t |= 0, - n || z(this, e, t, 4, 4294967295, 0), - o.TYPED_ARRAY_SUPPORT ? (this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = 255 & e) : I(this, e, t, !0), - t + 4 - }, - o.prototype.writeUInt32BE = function (e, t, n) { - return e = +e, - t |= 0, - n || z(this, e, t, 4, 4294967295, 0), - o.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e) : I(this, e, t, !1), - t + 4 - }, - o.prototype.writeIntLE = function (e, t, n, i) { - if (e = +e, t |= 0, !i) { - var o = Math.pow(2, 8 * n - 1); - z(this, e, t, n, o - 1, -o) - } - var r = 0, - l = 1, - s = 0; - for (this[t] = 255 & e; ++r < n && (l *= 256); ) - e < 0 && 0 === s && 0 !== this[t + r - 1] && (s = 1), this[t + r] = (e / l >> 0) - s & 255; - return t + n - }, - o.prototype.writeIntBE = function (e, t, n, i) { - if (e = +e, t |= 0, !i) { - var o = Math.pow(2, 8 * n - 1); - z(this, e, t, n, o - 1, -o) - } - var r = n - 1, - l = 1, - s = 0; - for (this[t + r] = 255 & e; --r >= 0 && (l *= 256); ) - e < 0 && 0 === s && 0 !== this[t + r + 1] && (s = 1), this[t + r] = (e / l >> 0) - s & 255; - return t + n - }, - o.prototype.writeInt8 = function (e, t, n) { - return e = +e, - t |= 0, - n || z(this, e, t, 1, 127, -128), - o.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), - e < 0 && (e = 255 + e + 1), - this[t] = 255 & e, - t + 1 - }, - o.prototype.writeInt16LE = function (e, t, n) { - return e = +e, - t |= 0, - n || z(this, e, t, 2, 32767, -32768), - o.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8) : H(this, e, t, !0), - t + 2 - }, - o.prototype.writeInt16BE = function (e, t, n) { - return e = +e, - t |= 0, - n || z(this, e, t, 2, 32767, -32768), - o.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8, this[t + 1] = 255 & e) : H(this, e, t, !1), - t + 2 - }, - o.prototype.writeInt32LE = function (e, t, n) { - return e = +e, - t |= 0, - n || z(this, e, t, 4, 2147483647, -2147483648), - o.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24) : I(this, e, t, !0), - t + 4 - }, - o.prototype.writeInt32BE = function (e, t, n) { - return e = +e, - t |= 0, - n || z(this, e, t, 4, 2147483647, -2147483648), - e < 0 && (e = 4294967295 + e + 1), - o.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e) : I(this, e, t, !1), - t + 4 - }, - o.prototype.writeFloatLE = function (e, t, n) { - return F(this, e, t, !0, n) - }, - o.prototype.writeFloatBE = function (e, t, n) { - return F(this, e, t, !1, n) - }, - o.prototype.writeDoubleLE = function (e, t, n) { - return j(this, e, t, !0, n) - }, - o.prototype.writeDoubleBE = function (e, t, n) { - return j(this, e, t, !1, n) - }, - o.prototype.copy = function (e, t, n, i) { - if (n || (n = 0), i || 0 === i || (i = this.length), t >= e.length && (t = e.length), t || (t = 0), i > 0 && i < n && (i = n), i === n) - return 0; - if (0 === e.length || 0 === this.length) - return 0; - if (t < 0) - throw new RangeError("targetStart out of bounds"); - if (n < 0 || n >= this.length) - throw new RangeError("sourceStart out of bounds"); - if (i < 0) - throw new RangeError("sourceEnd out of bounds"); - i > this.length && (i = this.length), - e.length - t < i - n && (i = e.length - t + n); - var r, - l = i - n; - if (this === e && n < t && t < i) - for (r = l - 1; r >= 0; --r) - e[r + t] = this[r + n]; - else if (l < 1e3 || !o.TYPED_ARRAY_SUPPORT) - for (r = 0; r < l; ++r) - e[r + t] = this[r + n]; - else - Uint8Array.prototype.set.call(e, this.subarray(n, n + l), t); - return l - }, - o.prototype.fill = function (e, t, n, i) { - if ("string" == typeof e) { - if ("string" == typeof t ? (i = t, t = 0, n = this.length) : "string" == typeof n && (i = n, n = this.length), 1 === e.length) { - var r = e.charCodeAt(0); - r < 256 && (e = r) - } - if (void 0 !== i && "string" != typeof i) - throw new TypeError("encoding must be a string"); - if ("string" == typeof i && !o.isEncoding(i)) - throw new TypeError("Unknown encoding: " + i) - } else - "number" == typeof e && (e &= 255); - if (t < 0 || this.length < t || this.length < n) - throw new RangeError("Out of range index"); - if (n <= t) - return this; - t >>>= 0, - n = void 0 === n ? this.length : n >>> 0, - e || (e = 0); - var l; - if ("number" == typeof e) - for (l = t; l < n; ++l) - this[l] = e; - else { - var s = o.isBuffer(e) ? e : L(new o(e, i).toString()), - a = s.length; - for (l = 0; l < n - t; ++l) - this[l + t] = s[l % a] - } - return this - }; - var Q = /[^+\/0-9A-Za-z-_]/g - }).call(exports, e(29)) -}, function (module, exports) { - var e; - e = function () { - return this - } - (); - try { - e = e || Function("return this")() || (0, eval)("this") - } catch (t) { - "object" == typeof window && (e = window) - } - module.exports = e -}, function (module, exports, e) { - "use strict"; - function t(e) { - var t = e.length; - if (t % 4 > 0) - throw new Error("Invalid string. Length must be a multiple of 4"); - var n = e.indexOf("="); - return -1 === n && (n = t), - [n, n === t ? 0 : 4 - n % 4] - } - function n(e) { - var n = t(e), - i = n[0], - o = n[1]; - return 3 * (i + o) / 4 - o - } - function i(e, t, n) { - return 3 * (t + n) / 4 - n - } - function o(e) { - for (var n, o = t(e), r = o[0], l = o[1], s = new c(i(e, r, l)), a = 0, h = l > 0 ? r - 4 : r, d = 0; d < h; d += 4) - n = u[e.charCodeAt(d)] << 18 | u[e.charCodeAt(d + 1)] << 12 | u[e.charCodeAt(d + 2)] << 6 | u[e.charCodeAt(d + 3)], s[a++] = n >> 16 & 255, s[a++] = n >> 8 & 255, s[a++] = 255 & n; - return 2 === l && (n = u[e.charCodeAt(d)] << 2 | u[e.charCodeAt(d + 1)] >> 4, s[a++] = 255 & n), - 1 === l && (n = u[e.charCodeAt(d)] << 10 | u[e.charCodeAt(d + 1)] << 4 | u[e.charCodeAt(d + 2)] >> 2, s[a++] = n >> 8 & 255, s[a++] = 255 & n), - s - } - function r(e) { - return a[e >> 18 & 63] + a[e >> 12 & 63] + a[e >> 6 & 63] + a[63 & e] - } - function l(e, t, n) { - for (var i, o = [], l = t; l < n; l += 3) - i = (e[l] << 16 & 16711680) + (e[l + 1] << 8 & 65280) + (255 & e[l + 2]), o.push(r(i)); - return o.join("") - } - function s(e) { - for (var t, n = e.length, i = n % 3, o = [], r = 0, s = n - i; r < s; r += 16383) - o.push(l(e, r, r + 16383 > s ? s : r + 16383)); - return 1 === i ? (t = e[n - 1], o.push(a[t >> 2] + a[t << 4 & 63] + "==")) : 2 === i && (t = (e[n - 2] << 8) + e[n - 1], o.push(a[t >> 10] + a[t >> 4 & 63] + a[t << 2 & 63] + "=")), - o.join("") - } - exports.byteLength = n, - exports.toByteArray = o, - exports.fromByteArray = s; - for (var a = [], u = [], c = "undefined" != typeof Uint8Array ? Uint8Array : Array, h = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", d = 0, f = h.length; d < f; ++d) - a[d] = h[d], u[h.charCodeAt(d)] = d; - u["-".charCodeAt(0)] = 62, - u["_".charCodeAt(0)] = 63 -}, function (module, exports) { - exports.read = function (e, t, n, i, o) { - var r, - l, - s = 8 * o - i - 1, - a = (1 << s) - 1, - u = a >> 1, - c = -7, - h = n ? o - 1 : 0, - d = n ? -1 : 1, - f = e[t + h]; - for (h += d, r = f & (1 << -c) - 1, f >>= -c, c += s; c > 0; r = 256 * r + e[t + h], h += d, c -= 8); - for (l = r & (1 << -c) - 1, r >>= -c, c += i; c > 0; l = 256 * l + e[t + h], h += d, c -= 8); - if (0 === r) - r = 1 - u; - else { - if (r === a) - return l ? NaN : 1 / 0 * (f ? -1 : 1); - l += Math.pow(2, i), - r -= u - } - return (f ? -1 : 1) * l * Math.pow(2, r - i) - }, - exports.write = function (e, t, n, i, o, r) { - var l, - s, - a, - u = 8 * r - o - 1, - c = (1 << u) - 1, - h = c >> 1, - d = 23 === o ? Math.pow(2, -24) - Math.pow(2, -77) : 0, - f = i ? 0 : r - 1, - p = i ? 1 : -1, - g = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0; - for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (s = isNaN(t) ? 1 : 0, l = c) : (l = Math.floor(Math.log(t) / Math.LN2), t * (a = Math.pow(2, -l)) < 1 && (l--, a *= 2), t += l + h >= 1 ? d / a : d * Math.pow(2, 1 - h), t * a >= 2 && (l++, a /= 2), l + h >= c ? (s = 0, l = c) : l + h >= 1 ? (s = (t * a - 1) * Math.pow(2, o), l += h) : (s = t * Math.pow(2, h - 1) * Math.pow(2, o), l = 0)); o >= 8; e[n + f] = 255 & s, f += p, s /= 256, o -= 8); - for (l = l << o | s, u += o; u > 0; e[n + f] = 255 & l, f += p, l /= 256, u -= 8); - e[n + f - p] |= 128 * g - } -}, function (module, exports) { - var e = {} - .toString; - module.exports = Array.isArray || function (t) { - return "[object Array]" == e.call(t) - } -}, function (module, exports) { - module.exports = function (module) { - return module.webpackPolyfill || (module.deprecate = function () {}, module.paths = [], module.children || (module.children = []), Object.defineProperty(module, "loaded", { - enumerable: !0, - get: function () { - return module.l - } - }), Object.defineProperty(module, "id", { - enumerable: !0, - get: function () { - return module.i - } - }), module.webpackPolyfill = 1), - module - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var t = e(0), - n = function (e) { - return e && e.__esModule ? e : { - default: - e - } - } - (t); - exports.default = { - data: function () { - return { - scrollbarWidth: 0 - } - }, - methods: { - controlScrollBar: function () { - if (this.hasTableFooter) { - this.$el.querySelector(".v-table-rightview .v-table-body").style.overflowX = "hidden" - } - }, - setScrollbarWidth: function () { - this.scrollbarWidth = n.default.getScrollbarWidth() - } - } - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }), - exports.default = { - data: function () { - return { - hoverRowIndex: -1, - clickRowIndex: -1 - } - }, - methods: { - handleMouseEnter: function (e) { - this.rowHoverColor && this.rowHoverColor.length > 0 && (this.hoverRowIndex = e), - this.rowMouseEnter && this.rowMouseEnter(e) - }, - handleMouseOut: function (e) { - this.rowHoverColor && this.rowHoverColor.length > 0 && (this.hoverRowIndex = -1), - this.rowMouseLeave && this.rowMouseLeave(e) - }, - titleCellClick: function (e, t) { - this.titleClick && this.titleClick(t, e) - }, - titleCellDblClick: function (e, t) { - this.titleDblclick && this.titleDblclick(t, e) - }, - rowCellClick: function (e, t, n) { - this.rowClickColor && this.rowClickColor.length > 0 && (this.clickRowIndex = e), - this.rowClick && this.rowClick(e, t, n) - }, - rowCellDbClick: function (e, t, n) { - this.rowDblclick && this.rowDblclick(e, t, n) - }, - getHighPriorityBgColor: function (e) { - var t = ""; - return this.clickRowIndex === e ? t = this.rowClickColor : this.hoverRowIndex === e && (t = this.rowHoverColor), - t.length <= 0 && (this.evenBgColor && this.evenBgColor.length > 0 || this.oddBgColor && this.oddBgColor.length > 0) && (t = (e + 1) % 2 == 0 ? this.evenBgColor : this.oddBgColor), - t.length <= 0 && (t = this.tableBgColor), - t - }, - setRowBgColor: function (e, t, n) { - var i = this, - o = this.$el; - if (!o) - return !1; - var r = [], - l = void 0, - s = void 0; - this.hasFrozenColumn && r.push(o.querySelectorAll(".v-table-leftview .v-table-row")), - r.push(o.querySelectorAll(".v-table-rightview .v-table-row")), - r.forEach(function (o) { - l = o[t], - s = o[e], - l && (l.style.backgroundColor = i.getHighPriorityBgColor(t)), - s && (s.style.backgroundColor = n) - }) - }, - clearCurrentRow: function () { - this.clickRowIndex = -1 - } - }, - watch: { - hoverRowIndex: function (e, t) { - this.setRowBgColor(e, t, this.rowHoverColor) - }, - clickRowIndex: function (e, t) { - this.setRowBgColor(e, t, this.rowClickColor) - } - } - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }), - exports.default = { - data: function () { - return { - filterSpecialValue: "__all__" - } - }, - methods: { - initColumnsFilters: function () { - var e = this; - this.isComplexTitle ? this.internalTitleRows.forEach(function (t) { - t.forEach(function (t) { - e.enableFilters(t.filters, t.fields) && !t.filterMultiple && t.filters.unshift({ - label: "全部", - value: e.filterSpecialValue, - selected: !0 - }) - }) - }) : this.internalColumns.map(function (t) { - e.enableFilters(t.filters) && !t.filterMultiple && t.filters.unshift({ - label: "全部", - value: e.filterSpecialValue, - selected: !0 - }) - }) - }, - filterConditionChange: function (e) { - e || this.filterSummary() - }, - enableFilters: function (e, t) { - var n = !1; - return Array.isArray(t) && t.length > 1 && (n = !1), - Array.isArray(e) && e.length > 0 && (n = !0), - n - }, - filterEvent: function () { - this.filterSummary() - }, - filterSummary: function () { - var e = this, - t = {}, - n = [], - i = []; - this.isComplexTitle ? (n = this.internalTitleRows, n.forEach(function (n) { - n.forEach(function (n) { - i = [], - e.enableFilters(n.filters, n.fields) && (n.filters.forEach(function (t) { - t.selected && t.value !== e.filterSpecialValue && i.push(t.value) - }), t[n.fields[0]] = i.length > 0 ? i : null) - }) - })) : (n = this.internalColumns, n.forEach(function (n) { - i = [], - e.enableFilters(n.filters) && (n.filters.forEach(function (t) { - t.selected && t.value !== e.filterSpecialValue && i.push(t.value) - }), t[n.field] = i.length > 0 ? i : null) - })), - this.filterMethod && this.filterMethod(t) - } - } - } -}, function (module, exports, e) { - var t = e(1)(e(38), e(39), null, null, null); - t.options.__file = "E:\\practice\\vue-easytable\\packages\\v-table\\src\\table-empty.vue", - t.esModule && Object.keys(t.esModule).some(function (e) { - return "default" !== e && "__" !== e.substr(0, 2) - }) && console.error("named exports are not supported in *.vue files."), - t.options.functional && console.error("[vue-loader] table-empty.vue: functional components are not supported with templates, they should use render functions."), - module.exports = t.exports -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var t = e(0); - !function (e) { - e && e.__esModule - } - (t); - exports.default = { - props: { - titleHeight: [Number, String], - contentHeight: [Number, String], - width: [Number, String], - totalColumnsWidth: [Number, String], - errorContent: { - type: [String] - }, - isLoading: [Boolean] - }, - computed: { - getCurrentContent: function () { - var e = ""; - return this.isLoading || (e = this.errorContent), - e - } - } - } -}, function (module, exports, e) { - module.exports = { - render: function () { - var e = this, - t = e.$createElement, - n = e._self._c || t; - return n("div", { - staticClass: "v-table-empty" - }, [n("div", { - staticClass: "v-table-empty-content", - style: { - height: e.contentHeight + "px", - width: e.width + "px", - top: e.titleHeight + "px" - } - }, [n("div", { - staticClass: "v-table-empty-inner", - style: { - height: e.contentHeight + "px", - width: "100%", - "line-height": e.contentHeight + "px" - }, - domProps: { - innerHTML: e._s(e.getCurrentContent) - } - })]), e._v(" "), n("div", { - staticClass: "v-table-empty-scroll", - style: { - height: e.contentHeight + "px", - width: e.width + "px", - top: e.titleHeight + "px" - } - }, [n("div", { - staticClass: "v-table-empty-inner", - style: { - height: "1px", - width: e.totalColumnsWidth + "px" - } - })])]) - }, - staticRenderFns: [] - }, - module.exports.render._withStripped = !0 -}, function (module, exports, e) { - var t = e(1)(e(41), e(42), null, null, null); - t.options.__file = "E:\\practice\\vue-easytable\\packages\\v-table\\src\\loading.vue", - t.esModule && Object.keys(t.esModule).some(function (e) { - return "default" !== e && "__" !== e.substr(0, 2) - }) && console.error("named exports are not supported in *.vue files."), - t.options.functional && console.error("[vue-loader] loading.vue: functional components are not supported with templates, they should use render functions."), - module.exports = t.exports -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }), - exports.default = { - props: { - loadingContent: [String], - loadingOpacity: [Number], - titleRows: [Array], - titleRowHeight: [Number], - columns: [Array] - }, - methods: { - setPosition: function () { - var e = this.$el, - t = this.$el.querySelector(".v-table-loading-content"), - n = 0; - this.columns && this.columns.length > 0 && (n = this.titleRows && this.titleRows.length > 0 ? this.titleRows.length * this.titleRowHeight : this.titleRowHeight), - t.style.top = (e.clientHeight + n) / 2 - t.clientHeight / 2 + "px" - } - }, - mounted: function () { - var e = this; - this.$nextTick(function (t) { - e.setPosition() - }) - } - } -}, function (module, exports, e) { - module.exports = { - render: function () { - var e = this, - t = e.$createElement, - n = e._self._c || t; - return n("div", { - staticStyle: { - width: "100%", - height: "100%" - } - }, [n("div", { - staticClass: "v-table-loading", - style: { - opacity: e.loadingOpacity - } - }), e._v(" "), n("div", { - staticClass: "v-table-loading-content", - domProps: { - innerHTML: e._s(e.loadingContent) - } - })]) - }, - staticRenderFns: [] - }, - module.exports.render._withStripped = !0 -}, function (module, exports, e) { - var t = e(1)(e(44), e(45), null, null, null); - t.options.__file = "E:\\practice\\vue-easytable\\packages\\v-checkbox-group\\src\\checkbox-group.vue", - t.esModule && Object.keys(t.esModule).some(function (e) { - return "default" !== e && "__" !== e.substr(0, 2) - }) && console.error("named exports are not supported in *.vue files."), - t.options.functional && console.error("[vue-loader] checkbox-group.vue: functional components are not supported with templates, they should use render functions."), - module.exports = t.exports -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var t = e(0), - n = function (e) { - return e && e.__esModule ? e : { - default: - e - } - } - (t); - exports.default = { - name: "v-checkbox-group", - props: { - value: { - type: Array, - default: - function () { - return [] - } - }, - isVerticalShow: { - type: Boolean, - default: - !1 - } - }, - methods: { - updateModel: function (e, t) { - var n = this.value.indexOf(e); - n > -1 ? t || this.value.splice(n, 1) : t && this.value.push(e), - this.$emit("input", this.value), - this.$emit("change") - } - }, - watch: { - value: function (e) { - var t = n.default.getChildCompsByName(this, "v-checkbox"); - t.length > 0 && t.forEach(function (t) { - t.updateModelByGroup(e) - }) - } - } - } -}, function (module, exports, e) { - module.exports = { - render: function () { - var e = this, - t = e.$createElement; - return (e._self._c || t)("div", { - staticClass: "v-checkbox-group" - }, [e._t("default")], 2) - }, - staticRenderFns: [] - }, - module.exports.render._withStripped = !0 -}, function (module, exports, e) { - var t = e(1)(e(47), e(48), null, null, null); - t.options.__file = "E:\\practice\\vue-easytable\\packages\\v-checkbox\\src\\checkbox.vue", - t.esModule && Object.keys(t.esModule).some(function (e) { - return "default" !== e && "__" !== e.substr(0, 2) - }) && console.error("named exports are not supported in *.vue files."), - t.options.functional && console.error("[vue-loader] checkbox.vue: functional components are not supported with templates, they should use render functions."), - module.exports = t.exports -}, function (module, exports, e) { - "use strict"; - function t(e, t, n) { - return t in e ? Object.defineProperty(e, t, { - value: n, - enumerable: !0, - configurable: !0, - writable: !0 - }) : e[t] = n, - e - } - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var n = e(0), - i = function (e) { - return e && e.__esModule ? e : { - default: - e - } - } - (n); - exports.default = { - name: "v-checkbox", - props: { - value: { - type: [String, Number, Boolean] - }, - label: { - type: [String, Number], - require: !0 - }, - disabled: Boolean, - indeterminate: Boolean, - showSlot: { - type: Boolean, - default: - !0 - } - }, - data: function () { - return { - model: this.value, - _checkboxGroup: {} - } - }, - computed: { - checkboxClasses: function () { - var e; - return ["v-checkbox", (e = {}, t(e, "v-checkbox-checked", this.model), t(e, "v-checkbox-disabled", this.disabled), t(e, "v-checkbox-indeterminate", this.indeterminate), e)] - }, - isCheckBoxGroup: function () { - return this._checkboxGroup = i.default.getParentCompByName(this, "v-checkbox-group"), - !!this._checkboxGroup - }, - displayType: function () { - var e = "inline-block"; - return this._checkboxGroup && (e = this._checkboxGroup.isVerticalShow ? "block" : "inline-block"), - e - } - }, - methods: { - change: function (e) { - if (this.disabled) - return this.model = !this.model, !1; - var t = e.target.checked; - this.$emit("input", t), - this.$emit("change"), - this.isCheckBoxGroup && this._checkboxGroup.updateModel(this.label, t) - }, - initModel: function () { - if (this.isCheckBoxGroup) { - var e = this._checkboxGroup; - Array.isArray(e.value) && e.value.length > 0 && e.value.indexOf(this.label) > -1 && (this.model = !0) - } else - this.model = this.value - }, - updateModelBySingle: function () { - this.disabled || (this.model = this.value) - }, - updateModelByGroup: function (e) { - e.indexOf(this.label) > -1 ? this.disabled || (this.model = !0) : this.disabled || (this.model = !1) - } - }, - created: function () { - this.initModel() - }, - watch: { - value: function (e) { - this.updateModelBySingle() - } - } - } -}, function (module, exports, e) { - module.exports = { - render: function () { - var e = this, - t = e.$createElement, - n = e._self._c || t; - return n("label", { - staticClass: "v-checkbox-wrapper", - style: { - display: e.displayType - } - }, [n("span", { - class: e.checkboxClasses - }, [n("input", { - directives: [{ - name: "model", - rawName: "v-model", - value: e.model, - expression: "model" - } - ], - staticClass: "v-checkbox-input", - attrs: { - type: "checkbox" - }, - domProps: { - value: e.label, - checked: Array.isArray(e.model) ? e._i(e.model, e.label) > -1 : e.model - }, - on: { - change: [function (t) { - var n = e.model, - i = t.target, - o = !!i.checked; - if (Array.isArray(n)) { - var r = e.label, - l = e._i(n, r); - i.checked ? l < 0 && (e.model = n.concat([r])) : l > -1 && (e.model = n.slice(0, l).concat(n.slice(l + 1))) - } else - e.model = o - }, e.change] - } - }), e._v(" "), n("span", { - staticClass: "v-checkbox-inner" - })]), e._v(" "), n("span", [e.showSlot ? e._t("default", [e._v(e._s(e.label))]) : e._e()], 2)]) - }, - staticRenderFns: [] - }, - module.exports.render._withStripped = !0 -}, function (module, exports, e) { - var t = e(1)(e(50), e(52), null, null, null); - t.options.__file = "E:\\practice\\vue-easytable\\packages\\v-dropdown\\src\\dropdown.vue", - t.esModule && Object.keys(t.esModule).some(function (e) { - return "default" !== e && "__" !== e.substr(0, 2) - }) && console.error("named exports are not supported in *.vue files."), - t.options.functional && console.error("[vue-loader] dropdown.vue: functional components are not supported with templates, they should use render functions."), - module.exports = t.exports -}, function (module, exports, e) { - "use strict"; - function t(e) { - return e && e.__esModule ? e : { - default: - e - } - } - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var n = e(2), - i = t(n), - o = e(51), - r = t(o), - l = e(3), - s = t(l), - a = e(4), - u = t(a), - c = e(8), - h = t(c); - exports.default = { - name: "v-dropdown", - components: { - VCheckboxGroup: s.default, - VCheckbox: u.default - }, - mixins: [h.default], - directives: { - "click-outside": r.default - }, - data: function () { - return { - visible: !1, - internalOptions: [], - checkboxGroupList: [], - textAlignPrefix: "v-dropdown-items-li-a-", - inputValue: "", - isOperationChange: null - } - }, - props: { - isSelect: { - type: Boolean, - default: - !1 - }, - showOperation: { - type: Boolean, - default: - !1 - }, - size: { - type: String - }, - width: { - type: Number, - default: - 90 - }, - maxWidth: { - type: Number - }, - isMultiple: { - type: Boolean, - default: - !1 - }, - value: [Object, Array], - placeholder: { - type: String, - default: - "请选择", - validator: function (e) { - return e.length > 0 - } - }, - textAlign: { - type: String, - default: - "left" - }, - min: { - type: Number, - default: - 0 - }, - max: { - type: Number, - default: - 999 - }, - isInput: { - type: Boolean, - default: - !1 - } - }, - computed: { - sizeClass: function () { - var e = i.default.sizeMaps[this.size] || i.default.sizeMapDefault; - return e === i.default.sizeMaps.large ? " v-dropdown--large" : e === i.default.sizeMaps.middle ? " v-dropdown--middle" : " v-dropdown--small" - }, - getMaxWidth: function () { - var e = 1 / 0, - t = this.maxWidth, - n = this.width; - return t && t > 0 && t > n && (e = t), - e - } - }, - methods: { - init: function () { - this.internalOptions = Object.assign([], this.value), - this.checkboxGroupList = this.selectedLabels(), - this.isInput && this.setInputValue() - }, - confirm: function () { - this.isOperationChange && (this.$emit("on-filter-method", this.internalOptions), this.isOperationChange = !1), - this.hideDropDown() - }, - rest: function () { - var e = this; - this.internalOptions.some(function (e) { - return e.selected - }) && (this.internalOptions.map(function (e) { - return e.selected && (e.selected = !1), - e - }), this.checkboxGroupList = [], this.$emit("input", this.internalOptions), this.$emit("change")), - setTimeout(function (t) { - e.hideDropDown() - }, 50) - }, - hideDropDown: function () { - this.showOperation && this.isOperationChange && (this.$emit("on-filter-method", this.internalOptions), this.isOperationChange = !1), - this.visible = !1 - }, - showDropDown: function () { - this.visible = !0 - }, - setInputValue: function () { - var e, - t; - t = this.selectedLabels(), - Array.isArray(t) && t.length > 0 && (e = t.join()), - this.inputValue = e - }, - checkboxGroupChange: function () { - this.selectOptionClick() - }, - toggleItems: function () { - var e = this; - this.visible ? this.hideDropDown() : (this.showDropDown(), this.$nextTick(function (t) { - e.dropDownClick() - })) - }, - selectOptionClick: function (e) { - var t = this; - this.isMultiple ? this.internalOptions.map(function (e) { - return t.checkboxGroupList.includes(e.label) ? e.selected = !0 : e.selected = !1, - e - }) : this.internalOptions.map(function (t) { - return e.label === t.label ? t.selected = !0 : t.selected = !1, - t - }), - this.isMultiple || this.toggleItems(), - this.isInput && this.setInputValue(), - this.$emit("input", this.internalOptions), - this.$emit("change") - }, - getTextAlignClass: function () { - return this.textAlignPrefix + this.textAlign - }, - selectedLabels: function () { - return this.internalOptions.filter(function (e) { - return e.selected - }).map(function (e) { - if (e.selected) - return e.label - }) - }, - clickOutside: function () { - this.hideDropDown() - }, - dropDownClick: function () { - var e = this.$el.querySelector(".v-dropdown-dt"), - t = this.$el.querySelector(".v-dropdown-items"); - return this.layerAdjustmentOnce(t, e, 2), - !1 - }, - dropdownAdjust: function () { - var e = this.$el.querySelector(".v-dropdown-dt"), - t = this.$el.querySelector(".v-dropdown-items"); - this.layerAdjustmentBind(t, e, 2) - } - }, - created: function () { - this.init() - }, - mounted: function () { - this.dropdownAdjust() - }, - watch: { - value: function (e) { - this.init() - }, - internalOptions: function (e) { - this.isOperationChange = !(!this.showOperation || null === this.isOperationChange) - } - } - } -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }), - exports.default = { - bind: function (e, t, n) { - if ("function" != typeof t.value) { - var i = "in [clickoutside] directives, provided expression '" + t.expression + "' is not a function ", - o = n.context.name; - o && (i += "in " + o), - console.error(i) - } - var r = function (n) { - if (e.contains(n.target) || e === n.target) - return !1; - t.value(n) - }; - e.__clickOutSide__ = r, - document.addEventListener("click", r, !0) - }, - unbind: function (e) { - document.removeEventListener("click", e.__clickOutSide__, !0), - e.__clickOutSide__ = null - } - } -}, function (module, exports, e) { - module.exports = { - render: function () { - var e = this, - t = e.$createElement, - n = e._self._c || t; - return n("dl", { - directives: [{ - name: "click-outside", - rawName: "v-click-outside", - value: e.clickOutside, - expression: "clickOutside" - } - ], - class: ["v-dropdown", e.sizeClass] - }, [n("dt", { - staticClass: "v-dropdown-dt" - }, [n("a", { - class: [e.isSelect ? "v-dropdown-selected" : ""], - style: { - width: e.width + "px" - }, - on: { - click: function (t) { - t.stopPropagation(), - t.preventDefault(), - e.toggleItems() - } - } - }, [e._t("default")], 2)]), e._v(" "), n("dd", { - directives: [{ - name: "show", - rawName: "v-show", - value: e.visible, - expression: "visible" - } - ], - staticClass: "v-dropdown-dd" - }, [n("ul", { - staticClass: "v-dropdown-items", - style: { - "min-width": e.width + "px", - "max-width": e.getMaxWidth + "px" - } - }, [e.isMultiple ? [n("v-checkbox-group", { - attrs: { - "is-vertical-show": "", - min: e.min, - max: e.max - }, - on: { - change: e.checkboxGroupChange - }, - model: { - value: e.checkboxGroupList, - callback: function (t) { - e.checkboxGroupList = t - }, - expression: "checkboxGroupList" - } - }, e._l(e.internalOptions, function (t) { - return n("li", { - class: ["v-dropdown-items-multiple", e.getTextAlignClass()] - }, [n("v-checkbox", { - key: t.label, - attrs: { - label: t.label, - showLine: t.showLine - } - })], 1) - }), 0)] : e._l(e.internalOptions, function (t) { - return n("li", { - class: ["v-dropdown-items-li", t.selected ? "active" : ""], - on: { - click: function (n) { - n.stopPropagation(), - e.selectOptionClick(t) - } - } - }, [n("a", { - class: ["v-dropdown-items-li-a", e.getTextAlignClass()], - attrs: { - href: "javascript:void(0);" - } - }, [e._v(e._s(t.label))])]) - }), e._v(" "), e.showOperation ? n("li", { - staticClass: "v-dropdown-operation" - }, [n("a", { - staticClass: "v-dropdown-operation-item", - attrs: { - href: "javascript:void(0)" - }, - on: { - click: function (t) { - return t.stopPropagation(), - e.confirm(t) - } - } - }, [e._v("确认")]), e._v(" "), n("a", { - staticClass: "v-dropdown-operation-item", - attrs: { - href: "javascript:void(0)" - }, - on: { - click: function (t) { - return t.stopPropagation(), - e.rest(t) - } - } - }, [e._v("重置")])]) : e._e()], 2)])]) - }, - staticRenderFns: [] - }, - module.exports.render._withStripped = !0 -}, function (module, exports, e) { - module.exports = { - render: function () { - var e = this, - t = e.$createElement, - n = e._self._c || t; - return n("div", { - staticClass: "v-table-views v-table-class", - style: { - width: e.internalWidth + "px", - height: e.getTableHeight + "px", - "background-color": e.tableBgColor - } - }, [e.frozenCols.length > 0 ? [n("div", { - staticClass: "v-table-leftview", - style: { - width: e.leftViewWidth + "px" - } - }, [n("div", { - staticClass: "v-table-header v-table-title-class", - style: { - width: e.leftViewWidth + "px", - "background-color": e.titleBgColor - } - }, [n("div", { - staticClass: "v-table-header-inner", - staticStyle: { - display: "block" - } - }, [n("table", { - staticClass: "v-table-htable", - attrs: { - border: "0", - cellspacing: "0", - cellpadding: "0" - } - }, [n("tbody", [e.frozenTitleCols.length > 0 ? e._l(e.frozenTitleCols, function (t) { - return n("tr", e._l(t, function (t) { - return n("td", { - class: [t.titleCellClassName], - attrs: { - colspan: t.colspan, - rowspan: t.rowspan - }, - on: { - mousemove: function (n) { - n.stopPropagation(), - e.handleTitleMouseMove(n, t.fields) - }, - mousedown: function (t) { - t.stopPropagation(), - e.handleTitleMouseDown(t) - }, - mouseout: function (t) { - t.stopPropagation(), - e.handleTitleMouseOut() - }, - click: function (n) { - n.stopPropagation(), - e.titleCellClick(t.fields, t.title) - }, - dblclick: function (n) { - n.stopPropagation(), - e.titleCellDblClick(t.fields, t.title) - } - } - }, [n("div", { - class: ["v-table-title-cell", e.showVerticalBorder ? "vertical-border" : "", e.showHorizontalBorder ? "horizontal-border" : ""], - style: { - width: e.titleColumnWidth(t.fields) + "px", - height: e.titleColumnHeight(t.rowspan) + "px", - "text-align": t.titleAlign - } - }, [n("span", { - staticClass: "table-title" - }, [e.isSelectionCol(t.fields) ? n("span", [n("v-checkbox", { - attrs: { - indeterminate: e.indeterminate, - "show-slot": !1, - label: "check-all" - }, - on: { - change: e.handleCheckAll - }, - model: { - value: e.isAllChecked, - callback: function (t) { - e.isAllChecked = t - }, - expression: "isAllChecked" - } - })], 1) : n("span", { - domProps: { - innerHTML: e._s(t.title) - } - }), e._v(" "), e.enableSort(t.orderBy) ? n("span", { - staticClass: "v-table-sort-icon", - on: { - click: function (n) { - n.stopPropagation(), - e.sortControl(t.fields[0]) - } - } - }, [n("i", { - class: ["v-icon-up-dir", "asc" === e.getCurrentSort(t.fields[0]) ? "checked" : ""] - }), e._v(" "), n("i", { - class: ["v-icon-down-dir", "desc" === e.getCurrentSort(t.fields[0]) ? "checked" : ""] - })]) : e._e()]), e._v(" "), e.enableFilters(t.filters, t.fields) ? n("v-dropdown", { - staticClass: "v-table-dropdown", - attrs: { - "show-operation": t.filterMultiple, - "is-multiple": t.filterMultiple - }, - on: { - "on-filter-method": e.filterEvent, - change: function (n) { - e.filterConditionChange(t.filterMultiple) - } - }, - model: { - value: t.filters, - callback: function (n) { - e.$set(t, "filters", n) - }, - expression: "col.filters" - } - }, [n("i", { - class: ["v-table-filter-icon", e.vTableFiltersIcon(t.filters)] - })]) : e._e()], 1)]) - }), 0) - }) : [n("tr", { - staticClass: "v-table-header-row" - }, e._l(e.frozenCols, function (t) { - return n("td", { - class: [t.titleCellClassName], - on: { - mousemove: function (n) { - n.stopPropagation(), - e.handleTitleMouseMove(n, t.field) - }, - mousedown: function (t) { - t.stopPropagation(), - e.handleTitleMouseDown(t) - }, - mouseout: function (t) { - t.stopPropagation(), - e.handleTitleMouseOut() - }, - click: function (n) { - n.stopPropagation(), - e.titleCellClick(t.field, t.title) - }, - dblclick: function (n) { - n.stopPropagation(), - e.titleCellDblClick(t.field, t.title) - } - } - }, [n("div", { - class: ["v-table-title-cell", e.showVerticalBorder ? "vertical-border" : "", e.showHorizontalBorder ? "horizontal-border" : ""], - style: { - width: t.width + "px", - height: e.titleRowHeight + "px", - "text-align": t.titleAlign - } - }, [n("span", { - staticClass: "table-title" - }, ["selection" === t.type ? n("span", [n("v-checkbox", { - attrs: { - indeterminate: e.indeterminate, - "show-slot": !1, - label: "check-all" - }, - on: { - change: e.handleCheckAll - }, - model: { - value: e.isAllChecked, - callback: function (t) { - e.isAllChecked = t - }, - expression: "isAllChecked" - } - })], 1) : n("span", { - domProps: { - innerHTML: e._s(t.title) - } - }), e._v(" "), e.enableSort(t.orderBy) ? n("span", { - staticClass: "v-table-sort-icon", - on: { - click: function (n) { - n.stopPropagation(), - e.sortControl(t.field) - } - } - }, [n("i", { - class: ["v-icon-up-dir", "asc" === e.getCurrentSort(t.field) ? "checked" : ""] - }), e._v(" "), n("i", { - class: ["v-icon-down-dir", "desc" === e.getCurrentSort(t.field) ? "checked" : ""] - })]) : e._e()]), e._v(" "), e.enableFilters(t.filters) ? n("v-dropdown", { - staticClass: "v-table-dropdown", - attrs: { - "show-operation": t.filterMultiple, - "is-multiple": t.filterMultiple - }, - on: { - "on-filter-method": e.filterEvent, - change: function (n) { - e.filterConditionChange(t.filterMultiple) - } - }, - model: { - value: t.filters, - callback: function (n) { - e.$set(t, "filters", n) - }, - expression: "col.filters" - } - }, [n("i", { - class: ["v-table-filter-icon", e.vTableFiltersIcon(t.filters)] - })]) : e._e()], 1)]) - }), 0)]], 2)])])]), e._v(" "), n("div", { - staticClass: "v-table-body v-table-body-class", - style: { - width: e.leftViewWidth + "px", - height: e.bodyViewHeight + "px" - } - }, [n("div", { - class: ["v-table-body-inner", e.vTableBodyInner] - }, [n("v-checkbox-group", { - on: { - change: e.handleCheckGroupChange - }, - model: { - value: e.checkboxGroupModel, - callback: function (t) { - e.checkboxGroupModel = t - }, - expression: "checkboxGroupModel" - } - }, [n("table", { - staticClass: "v-table-btable", - attrs: { - cellspacing: "0", - cellpadding: "0", - border: "0" - } - }, [n("tbody", e._l(e.internalTableData, function (t, i) { - return n("tr", { - staticClass: "v-table-row", - style: [e.trBgColor(i + 1)], - on: { - mouseenter: function (t) { - t.stopPropagation(), - e.handleMouseEnter(i) - }, - mouseleave: function (t) { - t.stopPropagation(), - e.handleMouseOut(i) - } - } - }, e._l(e.frozenCols, function (o, r) { - return e.cellMergeInit(i, o.field, t, !0) ? n("td", { - key: r, - class: [e.setColumnCellClassName(i, o.field, t)], - attrs: { - colSpan: e.setColRowSpan(i, o.field, t).colSpan, - rowSpan: e.setColRowSpan(i, o.field, t).rowSpan - } - }, [e.isCellMergeRender(i, o.field, t) ? n("div", { - class: ["v-table-body-cell", e.showVerticalBorder ? "vertical-border" : "", e.showHorizontalBorder ? "horizontal-border" : ""], - style: { - width: e.getRowWidthByColSpan(i, o.field, t) + "px", - height: e.getRowHeightByRowSpan(i, o.field, t) + "px", - "line-height": e.getRowHeightByRowSpan(i, o.field, t) + "px", - "text-align": o.columnAlign - }, - attrs: { - title: o.overflowTitle ? e.overflowTitle(t, i, o) : "" - }, - on: { - click: function (n) { - n.stopPropagation(), - e.rowCellClick(i, t, o), - e.cellEditClick(n, o.isEdit, t, o.field, i) - }, - dblclick: function (n) { - n.stopPropagation(), - e.rowCellDbClick(i, t, o) - } - } - }, [e.cellMergeContentType(i, o.field, t).isComponent ? n("span", [n(e.cellMerge(i, t, o.field).componentName, { - tag: "component", - attrs: { - rowData: t, - field: o.field ? o.field : "", - index: i - }, - on: { - "on-custom-comp": e.customCompFunc - } - })], 1) : n("span", { - domProps: { - innerHTML: e._s(e.cellMerge(i, t, o.field).content) - } - })]) : n("div", { - class: ["v-table-body-cell", e.showVerticalBorder ? "vertical-border" : "", e.showHorizontalBorder ? "horizontal-border" : ""], - style: { - width: o.width + "px", - height: e.rowHeight + "px", - "line-height": e.rowHeight + "px", - "text-align": o.columnAlign - }, - attrs: { - title: o.overflowTitle ? e.overflowTitle(t, i, o) : "" - }, - on: { - click: function (n) { - n.stopPropagation(), - e.rowCellClick(i, t, o), - e.cellEditClick(n, o.isEdit, t, o.field, i) - }, - dblclick: function (n) { - n.stopPropagation(), - e.rowCellDbClick(i, t, o) - } - } - }, ["string" == typeof o.componentName && o.componentName.length > 0 ? n("span", [n(o.componentName, { - tag: "component", - attrs: { - rowData: t, - field: o.field ? o.field : "", - index: i - }, - on: { - "on-custom-comp": e.customCompFunc - } - })], 1) : "function" == typeof o.formatter ? n("span", { - domProps: { - innerHTML: e._s(o.formatter(t, i, e.pagingIndex, o.field)) - } - }) : "selection" === o.type ? n("span", [n("v-checkbox", { - attrs: { - "show-slot": !1, - disabled: t._disabled, - label: i - }, - on: { - change: function (n) { - e.handleCheckChange(t) - } - } - })], 1) : n("span", [e._v("\n " + e._s(t[o.field]) + "\n ")])])]) : e._e() - }), 0) - }), 0)])])], 1)]), e._v(" "), e.frozenFooterCols.length > 0 ? n("div", { - class: ["v-table-footer", "v-table-footer-class"], - style: { - width: e.leftViewWidth + "px", - height: e.footerTotalHeight - } - }, [n("table", { - staticClass: "v-table-ftable", - attrs: { - cellspacing: "0", - cellpadding: "0", - border: "0" - } - }, e._l(e.frozenFooterCols, function (t, i) { - return n("tr", { - staticClass: "v-table-row" - }, e._l(t, function (t, o) { - return n("td", { - class: e.setFooterCellClassName(!0, i, o, t.content) - }, [n("div", { - class: ["v-table-body-cell", e.vTableBodyCell], - style: { - height: e.footerRowHeight + "px", - "line-height": e.footerRowHeight + "px", - width: t.width + "px", - "text-align": t.align - }, - domProps: { - innerHTML: e._s(t.content) - } - })]) - }), 0) - }), 0)]) : e._e()])] : e._e(), e._v(" "), n("div", { - staticClass: "v-table-rightview", - style: { - width: e.rightViewWidth + "px" - } - }, [n("div", { - staticClass: "v-table-header v-table-title-class", - style: { - width: e.rightViewWidth - 1 + "px", - "background-color": e.titleBgColor - } - }, [n("div", { - staticClass: "v-table-header-inner", - staticStyle: { - display: "block" - } - }, [n("table", { - staticClass: "v-table-htable", - attrs: { - border: "0", - cellspacing: "0", - cellpadding: "0" - } - }, [n("tbody", [e.noFrozenTitleCols.length > 0 ? e._l(e.noFrozenTitleCols, function (t) { - return n("tr", e._l(t, function (t) { - return n("td", { - class: [t.titleCellClassName], - attrs: { - colspan: t.colspan, - rowspan: t.rowspan - }, - on: { - mousemove: function (n) { - n.stopPropagation(), - e.handleTitleMouseMove(n, t.fields) - }, - mousedown: function (t) { - t.stopPropagation(), - e.handleTitleMouseDown(t) - }, - mouseout: function (t) { - t.stopPropagation(), - e.handleTitleMouseOut() - }, - click: function (n) { - n.stopPropagation(), - e.titleCellClick(t.fields, t.title) - }, - dblclick: function (n) { - n.stopPropagation(), - e.titleCellDblClick(t.fields, t.title) - } - } - }, [n("div", { - class: ["v-table-title-cell", e.showVerticalBorder ? "vertical-border" : "", e.showHorizontalBorder ? "horizontal-border" : ""], - style: { - width: e.titleColumnWidth(t.fields) + "px", - height: e.titleColumnHeight(t.rowspan) + "px", - "text-align": t.titleAlign - } - }, [n("span", { - staticClass: "table-title" - }, [e.isSelectionCol(t.fields) ? n("span", [n("v-checkbox", { - attrs: { - indeterminate: e.indeterminate, - "show-slot": !1, - label: "check-all" - }, - on: { - change: e.handleCheckAll - }, - model: { - value: e.isAllChecked, - callback: function (t) { - e.isAllChecked = t - }, - expression: "isAllChecked" - } - })], 1) : n("span", { - domProps: { - innerHTML: e._s(t.title) - } - }), e._v(" "), e.enableSort(t.orderBy) ? n("span", { - staticClass: "v-table-sort-icon", - on: { - click: function (n) { - n.stopPropagation(), - e.sortControl(t.fields[0]) - } - } - }, [n("i", { - class: ["v-icon-up-dir", "asc" === e.getCurrentSort(t.fields[0]) ? "checked" : ""] - }), e._v(" "), n("i", { - class: ["v-icon-down-dir", "desc" === e.getCurrentSort(t.fields[0]) ? "checked" : ""] - })]) : e._e()]), e._v(" "), e.enableFilters(t.filters, t.fields) ? n("v-dropdown", { - staticClass: "v-table-dropdown", - attrs: { - "show-operation": t.filterMultiple, - "is-multiple": t.filterMultiple - }, - on: { - "on-filter-method": e.filterEvent, - change: function (n) { - e.filterConditionChange(t.filterMultiple) - } - }, - model: { - value: t.filters, - callback: function (n) { - e.$set(t, "filters", n) - }, - expression: "col.filters" - } - }, [n("i", { - class: ["v-table-filter-icon", e.vTableFiltersIcon(t.filters)] - })]) : e._e()], 1)]) - }), 0) - }) : [n("tr", { - staticClass: "v-table-header-row" - }, e._l(e.noFrozenCols, function (t, i) { - return n("td", { - class: [t.titleCellClassName], - on: { - mousemove: function (n) { - n.stopPropagation(), - e.handleTitleMouseMove(n, t.field) - }, - mousedown: function (t) { - t.stopPropagation(), - e.handleTitleMouseDown(t) - }, - mouseout: function (t) { - t.stopPropagation(), - e.handleTitleMouseOut() - }, - click: function (n) { - n.stopPropagation(), - e.titleCellClick(t.field, t.title) - }, - dblclick: function (n) { - n.stopPropagation(), - e.titleCellDblClick(t.field, t.title) - } - } - }, [n("div", { - class: ["v-table-title-cell", e.showVerticalBorder ? "vertical-border" : "", e.showHorizontalBorder ? "horizontal-border" : ""], - style: { - width: t.width + "px", - height: e.titleRowHeight + "px", - "text-align": t.titleAlign - } - }, [n("span", { - staticClass: "table-title" - }, ["selection" === t.type ? n("span", [n("v-checkbox", { - attrs: { - indeterminate: e.indeterminate, - "show-slot": !1, - label: "check-all" - }, - on: { - change: e.handleCheckAll - }, - model: { - value: e.isAllChecked, - callback: function (t) { - e.isAllChecked = t - }, - expression: "isAllChecked" - } - })], 1) : n("span", { - domProps: { - innerHTML: e._s(t.title) - } - }), e._v(" "), e.enableSort(t.orderBy) ? n("span", { - staticClass: "v-table-sort-icon", - on: { - click: function (n) { - n.stopPropagation(), - e.sortControl(t.field) - } - } - }, [n("i", { - class: ["v-icon-up-dir", "asc" === e.getCurrentSort(t.field) ? "checked" : ""] - }), e._v(" "), n("i", { - class: ["v-icon-down-dir", "desc" === e.getCurrentSort(t.field) ? "checked" : ""] - })]) : e._e(), e._v(" "), e.enableFilters(t.filters) ? n("v-dropdown", { - staticClass: "v-table-dropdown", - attrs: { - "show-operation": t.filterMultiple, - "is-multiple": t.filterMultiple - }, - on: { - "on-filter-method": e.filterEvent, - change: function (n) { - e.filterConditionChange(t.filterMultiple) - } - }, - model: { - value: t.filters, - callback: function (n) { - e.$set(t, "filters", n) - }, - expression: "col.filters" - } - }, [n("i", { - class: ["v-table-filter-icon", e.vTableFiltersIcon(t.filters)] - })]) : e._e()], 1)])]) - }), 0)]], 2)])])]), e._v(" "), n("div", { - class: ["v-table-body v-table-body-class", e.vTableRightBody], - style: { - width: e.rightViewWidth + "px", - height: e.bodyViewHeight + "px" - } - }, [n("v-checkbox-group", { - on: { - change: e.handleCheckGroupChange - }, - model: { - value: e.checkboxGroupModel, - callback: function (t) { - e.checkboxGroupModel = t - }, - expression: "checkboxGroupModel" - } - }, [n("table", { - staticClass: "v-table-btable", - attrs: { - cellspacing: "0", - cellpadding: "0", - border: "0" - } - }, [n("tbody", e._l(e.internalTableData, function (t, i) { - return n("tr", { - key: i, - staticClass: "v-table-row", - style: [e.trBgColor(i + 1)], - on: { - mouseenter: function (t) { - t.stopPropagation(), - e.handleMouseEnter(i) - }, - mouseleave: function (t) { - t.stopPropagation(), - e.handleMouseOut(i) - } - } - }, e._l(e.noFrozenCols, function (o, r) { - return e.cellMergeInit(i, o.field, t, !1) ? n("td", { - key: r, - class: [e.setColumnCellClassName(i, o.field, t)], - attrs: { - colSpan: e.setColRowSpan(i, o.field, t).colSpan, - rowSpan: e.setColRowSpan(i, o.field, t).rowSpan - } - }, [e.isCellMergeRender(i, o.field, t) ? n("div", { - class: ["v-table-body-cell", e.showVerticalBorder ? "vertical-border" : "", e.showHorizontalBorder ? "horizontal-border" : ""], - style: { - width: e.getRowWidthByColSpan(i, o.field, t) + "px", - height: e.getRowHeightByRowSpan(i, o.field, t) + "px", - "line-height": e.getRowHeightByRowSpan(i, o.field, t) + "px", - "text-align": o.columnAlign - }, - attrs: { - title: o.overflowTitle ? e.overflowTitle(t, i, o) : "" - }, - on: { - click: function (n) { - n.stopPropagation(), - e.rowCellClick(i, t, o), - e.cellEditClick(n, o.isEdit, t, o.field, i) - }, - dblclick: function (n) { - n.stopPropagation(), - e.rowCellDbClick(i, t, o) - } - } - }, [e.cellMergeContentType(i, o.field, t).isComponent ? n("span", [n(e.cellMerge(i, t, o.field).componentName, { - tag: "component", - attrs: { - rowData: t, - field: o.field ? o.field : "", - index: i - }, - on: { - "on-custom-comp": e.customCompFunc - } - })], 1) : n("span", { - domProps: { - innerHTML: e._s(e.cellMerge(i, t, o.field).content) - } - })]) : n("div", { - class: ["v-table-body-cell", e.showVerticalBorder ? "vertical-border" : "", e.showHorizontalBorder ? "horizontal-border" : ""], - style: { - width: o.width + "px", - height: e.rowHeight + "px", - "line-height": e.rowHeight + "px", - "text-align": o.columnAlign - }, - attrs: { - title: o.overflowTitle ? e.overflowTitle(t, i, o) : "" - }, - on: { - click: function (n) { - n.stopPropagation(), - e.rowCellClick(i, t, o), - e.cellEditClick(n, o.isEdit, t, o.field, i) - }, - dblclick: function (n) { - n.stopPropagation(), - e.rowCellDbClick(i, t, o) - } - } - }, ["string" == typeof o.componentName && o.componentName.length > 0 ? n("span", [n(o.componentName, { - tag: "component", - attrs: { - rowData: t, - field: o.field ? o.field : "", - index: i - }, - on: { - "on-custom-comp": e.customCompFunc - } - })], 1) : "function" == typeof o.formatter ? n("span", { - domProps: { - innerHTML: e._s(o.formatter(t, i, e.pagingIndex, o.field)) - } - }) : "selection" === o.type ? n("span", [n("v-checkbox", { - attrs: { - "show-slot": !1, - disabled: t._disabled, - label: i - }, - on: { - change: function (n) { - e.handleCheckChange(t) - } - } - })], 1) : n("span", [e._v("\n " + e._s(t[o.field]) + "\n ")])])]) : e._e() - }), 0) - }), 0)])])], 1), e._v(" "), e.noFrozenFooterCols.length > 0 ? n("div", { - class: ["v-table-footer", "v-table-footer-class", e.vTableFooter], - style: { - width: e.rightViewWidth + "px", - height: e.footerTotalHeight - } - }, [n("table", { - staticClass: "v-table-ftable", - attrs: { - cellspacing: "0", - cellpadding: "0", - border: "0" - } - }, e._l(e.noFrozenFooterCols, function (t, i) { - return n("tr", { - staticClass: "v-table-row" - }, e._l(t, function (t, o) { - return n("td", { - class: e.setFooterCellClassName(!1, i, o, t.content) - }, [n("div", { - class: ["v-table-body-cell", e.vTableBodyCell], - style: { - height: e.footerRowHeight + "px", - "line-height": e.footerRowHeight + "px", - width: t.width + "px", - "text-align": t.align - }, - domProps: { - innerHTML: e._s(t.content) - } - })]) - }), 0) - }), 0)]) : e._e()]), e._v(" "), e.isTableEmpty ? n("table-empty", { - attrs: { - width: e.internalWidth, - "total-columns-width": e.totalColumnsWidth, - "content-height": e.errorContentHeight, - "title-height": e.getTotalColumnsHeight(), - "error-content": e.errorContent, - "is-loading": e.isLoading - } - }) : e._e(), e._v(" "), e.isLoading ? n("loading", { - attrs: { - "loading-content": e.loadingContent, - "title-rows": e.internalTitleRows, - "title-row-height": e.titleRowHeight, - columns: e.internalColumns, - "loading-opacity": e.loadingOpacity - } - }) : e._e(), e._v(" "), n("div", { - directives: [{ - name: "show", - rawName: "v-show", - value: e.isDragging, - expression: "isDragging" - } - ], - staticClass: "v-table-drag-line" - })], 2) - }, - staticRenderFns: [] - }, - module.exports.render._withStripped = !0 -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var t = e(55), - n = function (e) { - return e && e.__esModule ? e : { - default: - e - } - } - (t); - n.default.install = function (e) { - e.component(n.default.name, n.default) - }, - exports.default = n.default -}, function (module, exports, e) { - "use strict"; - function t(e) { - return e && e.__esModule ? e : { - default: - e - } - } - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var n = e(56), - i = t(n), - o = e(9), - r = t(o), - l = e(2), - s = t(l); - exports.default = { - name: "v-pagination", - props: { - layout: { - type: Array, - default: - function () { - return ["total", "prev", "pager", "next", "sizer", "jumper"] - } - }, - size: { - type: String - }, - total: { - type: Number, - require: !0 - }, - pageIndex: { - type: Number - }, - showPagingCount: { - type: Number, - default: - 5 - }, - pageSize: { - type: Number, - default: - 10 - }, - pageSizeOption: { - type: Array, - default: - function () { - return [10, 20, 30] - } - } - }, - data: function () { - return { - newPageIndex: this.pageIndex && this.pageIndex > 0 ? parseInt(this.pageIndex) : 1, - newPageSize: this.pageSize, - newPageSizeOption: [] - } - }, - computed: { - pageCount: function () { - return Math.ceil(this.total / this.newPageSize) - } - }, - render: function (e) { - var t = e("ul", { - class: "v-page-ul" - }), - n = { - total: e("total"), - prev: e("prev"), - pager: e("pager", { - attrs: { - pageCount: this.pageCount, - pageIndex: this.newPageIndex, - showPagingCount: this.showPagingCount - }, - on: { - jumpPageHandler: this.jumpPageHandler - } - }), - next: e("next"), - sizer: e("sizer"), - jumper: e("jumper", { - on: { - jumpPageHandler: this.jumpPageHandler - } - }) - }; - t.children = t.children || [], - this.layout.forEach(function (e) { - t.children.push(n[e]) - }); - var i = s.default.sizeMaps[this.size] || s.default.sizeMapDefault, - o = i === s.default.sizeMaps.large ? " v-page--large" : i === s.default.sizeMaps.middle ? " v-page--middle" : " v-page--small"; - return t.data.class += o, - t - }, - components: { - Total: { - render: function (e) { - return e("span", { - class: "v-page-total" - }, [" 共 ", this.$parent.total, " 条 "]) - } - }, - Prev: { - render: function (e) { - return e("li", { - on: { - click: this.$parent.prevPage - }, - class: [1 === this.$parent.newPageIndex ? "v-page-disabled" : "", "v-page-li", "v-page-prev"] - }, [e("a", [e("i", { - class: "v-icon-angle-left" - })])]) - } - }, - pager: i.default, - Next: { - render: function (e) { - return e("li", { - on: { - click: this.$parent.nextPage - }, - class: [this.$parent.newPageIndex === this.$parent.pageCount ? "v-page-disabled" : "", "v-page-li", "v-page-next"] - }, [e("a", [e("i", { - class: "v-icon-angle-right" - })])]) - } - }, - Sizer: { - components: { - VSelect: r.default - }, - render: function (e) { - return e("v-select", { - attrs: { - size: this.$parent.size, - value: this.$parent.newPageSizeOption - }, - class: "v-page-select", - on: { - input: this.handleChange - }, - directives: [{ - name: "model", - value: this.$parent.newPageSizeOption - } - ] - }) - }, - methods: { - handleChange: function (e) { - if (Array.isArray(e) && e.length > 0) { - var t = e.find(function (e) { - return e.selected - }); - t && this.$parent.pageSizeChangeHandler(t.value) - } - } - }, - created: function () {} - }, - Jumper: { - methods: { - jumperEnter: function (e) { - if (13 === e.keyCode) { - var t = this.$parent.getValidNum(e.target.value); - this.$parent.newPageIndex = t, - this.$emit("jumpPageHandler", t) - } - } - }, - render: function (e) { - return e("span", { - class: "v-page-goto" - }, [" 前往 ", e("input", { - class: "v-page-goto-input", - domProps: { - value: this.$parent.newPageIndex - }, - on: { - keyup: this.jumperEnter - }, - attrs: { - type: "input" - } - }), " 页 "]) - } - } - }, - methods: { - getValidNum: function (e) { - return e = parseInt(e, 10), - isNaN(e) || e < 1 ? 1 : e < 1 ? 1 : e > this.pageCount ? this.pageCount : e - }, - jumpPageHandler: function (e) { - this.newPageIndex = e, - this.$emit("page-change", this.newPageIndex) - }, - prevPage: function () { - this.newPageIndex > 1 && (this.newPageIndex = this.newPageIndex - 1, this.$emit("page-change", this.newPageIndex)) - }, - nextPage: function () { - this.newPageIndex < this.pageCount && (this.newPageIndex = this.newPageIndex + 1, this.$emit("page-change", this.newPageIndex)) - }, - pageSizeChangeHandler: function () { - var e = this.newPageSizeOption.find(function (e) { - return e.selected - }); - e && (this.newPageSize = e.value, this.newPageIndex = 1, this.$emit("page-size-change", this.newPageSize)) - }, - initSelectOption: function () { - var e = this; - this.newPageSizeOption = this.pageSizeOption.map(function (t) { - var n = {}; - return n.value = t, - n.label = t + " 条/页", - e.newPageSize == t && (n.selected = !0), - n - }) - }, - goBackPageIndex: function () { - this.newPageIndex = this.pageIndex && this.pageIndex > 0 ? parseInt(this.pageIndex) : 1 - }, - goBackPageSize: function () { - this.pageSize > 0 && (this.newPageSize = this.pageSize, this.initSelectOption()) - } - }, - watch: { - pageIndex: function (e, t) { - this.newPageIndex = e - }, - pageSize: function (e, t) { - this.newPageSize = e, - this.initSelectOption() - } - }, - created: function () { - this.initSelectOption() - } - } -}, function (module, exports, e) { - var t = e(1)(e(57), e(58), null, null, null); - t.options.__file = "E:\\practice\\vue-easytable\\packages\\v-pagination\\src\\pager.vue", - t.esModule && Object.keys(t.esModule).some(function (e) { - return "default" !== e && "__" !== e.substr(0, 2) - }) && console.error("named exports are not supported in *.vue files."), - t.options.functional && console.error("[vue-loader] pager.vue: functional components are not supported with templates, they should use render functions."), - module.exports = t.exports -}, function (module, exports, e) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: !0 - }), - exports.default = { - props: { - pageCount: Number, - pageIndex: Number, - showPagingCount: Number - }, - computed: { - numOffset: function () { - return Math.floor((this.showPagingCount + 2) / 2) - 1 - }, - showJumpPrev: function () { - return this.pageCount > this.showPagingCount + 2 && this.pageIndex > this.showPagingCount - }, - showJumpNext: function () { - return this.pageCount > this.showPagingCount + 2 && this.pageIndex <= this.pageCount - this.showPagingCount - }, - pagingCounts: function () { - var e = this, - t = void 0, - n = [], - i = e.showJumpPrev, - o = e.showJumpNext; - if (i && !o) { - t = e.pageCount - e.showPagingCount; - for (var r = t; r < e.pageCount; r++) - n.push(r) - } else if (!i && o) - for (var l = 2; l < e.showPagingCount + 2; l++) - n.push(l); - else if (i && o) - for (var s = e.pageIndex - e.numOffset; s <= e.pageIndex + e.numOffset; s++) - n.push(s); - else - for (var a = 2; a < e.pageCount; a++) - n.push(a); - return n - } - }, - methods: { - jumpPage: function (e) { - this.$emit("jumpPageHandler", e) - } - }, - created: function () {} - } -}, function (module, exports, e) { - module.exports = { - render: function () { - var e = this, - t = e.$createElement, - n = e._self._c || t; - return n("span", { - staticClass: "v-page-pager" - }, [n("li", { - class: [1 === e.pageIndex ? "v-page-li-active" : "", "v-page-li"], - on: { - click: function (t) { - t.stopPropagation(), - t.preventDefault(), - e.jumpPage(1) - } - } - }, [n("a", [e._v("1")])]), e._v(" "), e.showJumpPrev ? n("li", { - class: [1 === e.pageIndex ? "disabled" : "", "v-page-li", "v-page-jump-prev"], - attrs: { - title: "向前 " + e.showPagingCount + " 页" - }, - on: { - click: function (t) { - t.stopPropagation(), - t.preventDefault(), - e.jumpPage(e.pageIndex - e.showPagingCount) - } - } - }, [e._m(0)]) : e._e(), e._v(" "), e._l(e.pagingCounts, function (t) { - return n("li", { - class: [t === e.pageIndex ? "v-page-li-active" : "", "v-page-li"], - on: { - click: function (n) { - n.stopPropagation(), - n.preventDefault(), - e.jumpPage(t) - } - } - }, [n("a", [e._v(e._s(t))])]) - }), e._v(" "), e.showJumpNext ? n("li", { - staticClass: "v-page-li v-page-jump-next", - attrs: { - title: "向后 " + e.showPagingCount + " 页" - }, - on: { - click: function (t) { - t.stopPropagation(), - t.preventDefault(), - e.jumpPage(e.pageIndex + e.showPagingCount) - } - } - }, [e._m(1)]) : e._e(), e.pageCount > 1 ? n("li", { - class: [e.pageIndex === e.pageCount ? "v-page-li-active" : "", "v-page-li"], - on: { - click: function (t) { - t.stopPropagation(), - t.preventDefault(), - e.jumpPage(e.pageCount) - } - } - }, [n("a", [e._v(e._s(e.pageCount))])]) : e._e()], 2) - }, - staticRenderFns: [function () { - var e = this, - t = e.$createElement, - n = e._self._c || t; - return n("a", [n("i", { - staticClass: "v-icon-angle-double-left" - })]) - }, function () { - var e = this, - t = e.$createElement, - n = e._self._c || t; - return n("a", [n("i", { - staticClass: "v-icon-angle-double-right" - })]) - } - ] - }, - module.exports.render._withStripped = !0 -}, function (module, exports, e) { - var t = e(1)(e(60), e(61), null, null, null); - t.options.__file = "E:\\practice\\vue-easytable\\packages\\v-select\\src\\select.vue", - t.esModule && Object.keys(t.esModule).some(function (e) { - return "default" !== e && "__" !== e.substr(0, 2) - }) && console.error("named exports are not supported in *.vue files."), - t.options.functional && console.error("[vue-loader] select.vue: functional components are not supported with templates, they should use render functions."), - module.exports = t.exports -}, function (module, exports, e) { - "use strict"; - function t(e) { - return e && e.__esModule ? e : { - default: - e - } - } - Object.defineProperty(exports, "__esModule", { - value: !0 - }); - var n = e(0), - i = (t(n), e(2)), - o = (t(i), e(8)), - r = t(o), - l = e(5), - s = t(l); - exports.default = { - name: "v-select", - components: { - VDropdown: s.default - }, - mixins: [r.default], - data: function () { - return { - visible: !1, - internalOptions: [], - textAlignPrefix: "v-select-items-li-a-", - inputValue: "" - } - }, - props: { - size: { - type: String - }, - width: { - type: Number, - default: - 90 - }, - maxWidth: { - type: Number - }, - isMultiple: { - type: Boolean, - default: - !1 - }, - value: [Object, Array], - placeholder: { - type: String, - default: - "请选择", - validator: function (e) { - return e.length > 0 - } - }, - textAlign: { - type: String, - default: - "left" - }, - min: { - type: Number, - default: - 0 - }, - max: { - type: Number, - default: - 999 - }, - isInput: { - type: Boolean, - default: - !1 - } - }, - methods: { - init: function () { - this.internalOptions = Object.assign([], this.value), - this.isInput && this.setInputValue() - }, - showSelectInfo: function () { - var e; - return e = this.selectedLabels(), - Array.isArray(e) && e.length > 0 ? e.join() : this.placeholder - }, - selectedLabels: function () { - return this.internalOptions.filter(function (e) { - return e.selected - }).map(function (e) { - if (e.selected) - return e.label - }) - }, - dropdownChange: function () { - this.$emit("input", this.internalOptions), - this.$emit("change") - } - }, - created: function () { - this.init() - }, - watch: { - value: function (e) { - this.init() - } - } - } -}, function (module, exports, e) { - module.exports = { - render: function () { - var e = this, - t = e.$createElement, - n = e._self._c || t; - return n("v-dropdown", { - staticClass: "v-select", - style: { - width: e.width - }, - attrs: { - "is-select": "", - size: e.size, - width: e.width, - maxWidth: e.maxWidth, - isMultiple: e.isMultiple, - textAlign: e.textAlign, - min: e.min, - max: e.max, - isInput: e.isInput - }, - on: { - change: e.dropdownChange - }, - model: { - value: e.internalOptions, - callback: function (t) { - e.internalOptions = t - }, - expression: "internalOptions" - } - }, [n("span", [e.isInput ? [n("input", { - directives: [{ - name: "model", - rawName: "v-model", - value: e.inputValue, - expression: "inputValue" - } - ], - staticClass: "v-select-input", - attrs: { - placeholder: e.placeholder, - type: "text" - }, - domProps: { - value: e.inputValue - }, - on: { - input: function (t) { - t.target.composing || (e.inputValue = t.target.value) - } - } - })] : [n("span", { - staticClass: "v-select-selected-span" - }, [e._v(e._s(e.showSelectInfo()))])], e._v(" "), n("i", { - staticClass: "v-select-selected-i v-icon-down-dir" - })], 2)]) - }, - staticRenderFns: [] - }, - module.exports.render._withStripped = !0 -} -]); diff --git a/nz-admin/src/main/resources/statics/libs/vue-multiselect.min.css b/nz-admin/src/main/resources/statics/libs/vue-multiselect.min.css deleted file mode 100644 index f9c50c56..00000000 --- a/nz-admin/src/main/resources/statics/libs/vue-multiselect.min.css +++ /dev/null @@ -1 +0,0 @@ -fieldset[disabled] .multiselect{pointer-events:none}.multiselect__spinner{position:absolute;right:1px;top:1px;width:48px;height:35px;background:#fff;display:block}.multiselect__spinner:after,.multiselect__spinner:before{position:absolute;content:"";top:50%;left:50%;margin:-8px 0 0 -8px;width:16px;height:16px;border-radius:100%;border-color:#41b883 transparent transparent;border-style:solid;border-width:2px;box-shadow:0 0 0 1px transparent}.multiselect__spinner:before{animation:a 2.4s cubic-bezier(.41,.26,.2,.62);animation-iteration-count:infinite}.multiselect__spinner:after{animation:a 2.4s cubic-bezier(.51,.09,.21,.8);animation-iteration-count:infinite}.multiselect__loading-enter-active,.multiselect__loading-leave-active{transition:opacity .4s ease-in-out;opacity:1}.multiselect__loading-enter,.multiselect__loading-leave-active{opacity:0}.multiselect,.multiselect__input,.multiselect__single{font-family:inherit;font-size:16px;-ms-touch-action:manipulation;touch-action:manipulation}.multiselect{box-sizing:content-box;display:block;position:relative;width:100%;min-height:40px;text-align:left;color:#35495e}.multiselect *{box-sizing:border-box}.multiselect:focus{outline:none}.multiselect--disabled{opacity:.6}.multiselect--active{z-index:1}.multiselect--active:not(.multiselect--above) .multiselect__current,.multiselect--active:not(.multiselect--above) .multiselect__input,.multiselect--active:not(.multiselect--above) .multiselect__tags{border-bottom-left-radius:0;border-bottom-right-radius:0}.multiselect--active .multiselect__select{transform:rotate(180deg)}.multiselect--above.multiselect--active .multiselect__current,.multiselect--above.multiselect--active .multiselect__input,.multiselect--above.multiselect--active .multiselect__tags{border-top-left-radius:0;border-top-right-radius:0}.multiselect__input,.multiselect__single{position:relative;display:inline-block;min-height:20px;line-height:20px;border:none;border-radius:5px;background:#fff;padding:0 0 0 5px;width:100%;transition:border .1s ease;box-sizing:border-box;margin-bottom:8px;vertical-align:top}.multiselect__input::-webkit-input-placeholder{color:#35495e}.multiselect__input:-ms-input-placeholder{color:#35495e}.multiselect__input::placeholder{color:#35495e}.multiselect__tag~.multiselect__input,.multiselect__tag~.multiselect__single{width:auto}.multiselect__input:hover,.multiselect__single:hover{border-color:#cfcfcf}.multiselect__input:focus,.multiselect__single:focus{border-color:#a8a8a8;outline:none}.multiselect__single{padding-left:5px;margin-bottom:8px}.multiselect__tags-wrap{display:inline}.multiselect__tags{min-height:40px;display:block;padding:8px 40px 0 8px;border-radius:5px;border:1px solid #e8e8e8;background:#fff;font-size:14px}.multiselect__tag{position:relative;display:inline-block;padding:4px 26px 4px 10px;border-radius:5px;margin-right:10px;color:#fff;line-height:1;background:#41b883;margin-bottom:5px;white-space:nowrap;overflow:hidden;max-width:100%;text-overflow:ellipsis}.multiselect__tag-icon{cursor:pointer;margin-left:7px;position:absolute;right:0;top:0;bottom:0;font-weight:700;font-style:normal;width:22px;text-align:center;line-height:22px;transition:all .2s ease;border-radius:5px}.multiselect__tag-icon:after{content:"\D7";color:#266d4d;font-size:14px}.multiselect__tag-icon:focus,.multiselect__tag-icon:hover{background:#369a6e}.multiselect__tag-icon:focus:after,.multiselect__tag-icon:hover:after{color:#fff}.multiselect__current{min-height:40px;overflow:hidden;padding:8px 12px 0;padding-right:30px;white-space:nowrap;border-radius:5px;border:1px solid #e8e8e8}.multiselect__current,.multiselect__select{line-height:16px;box-sizing:border-box;display:block;margin:0;text-decoration:none;cursor:pointer}.multiselect__select{position:absolute;width:40px;height:38px;right:1px;top:1px;padding:4px 8px;text-align:center;transition:transform .2s ease}.multiselect__select:before{position:relative;right:0;top:65%;color:#999;margin-top:4px;border-style:solid;border-width:5px 5px 0;border-color:#999 transparent transparent;content:""}.multiselect__placeholder{color:#adadad;display:inline-block;margin-bottom:10px;padding-top:2px}.multiselect--active .multiselect__placeholder{display:none}.multiselect__content-wrapper{position:absolute;display:block;background:#fff;width:100%;max-height:240px;overflow:auto;border:1px solid #e8e8e8;border-top:none;border-bottom-left-radius:5px;border-bottom-right-radius:5px;z-index:1;-webkit-overflow-scrolling:touch}.multiselect__content{list-style:none;display:inline-block;padding:0;margin:0;min-width:100%;vertical-align:top}.multiselect--above .multiselect__content-wrapper{bottom:100%;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:5px;border-top-right-radius:5px;border-bottom:none;border-top:1px solid #e8e8e8}.multiselect__content::webkit-scrollbar{display:none}.multiselect__element{display:block}.multiselect__option{display:block;padding:12px;min-height:40px;line-height:16px;text-decoration:none;text-transform:none;vertical-align:middle;position:relative;cursor:pointer;white-space:nowrap}.multiselect__option:after{top:0;right:0;position:absolute;line-height:40px;padding-right:12px;padding-left:20px;font-size:13px}.multiselect__option--highlight{background:#41b883;outline:none;color:#fff}.multiselect__option--highlight:after{content:attr(data-select);background:#41b883;color:#fff}.multiselect__option--selected{background:#f3f3f3;color:#35495e;font-weight:700}.multiselect__option--selected:after{content:attr(data-selected);color:silver}.multiselect__option--selected.multiselect__option--highlight{background:#ff6a6a;color:#fff}.multiselect__option--selected.multiselect__option--highlight:after{background:#ff6a6a;content:attr(data-deselect);color:#fff}.multiselect--disabled{background:#ededed;pointer-events:none}.multiselect--disabled .multiselect__current,.multiselect--disabled .multiselect__select,.multiselect__option--disabled{background:#ededed;color:#a6a6a6}.multiselect__option--disabled{cursor:text;pointer-events:none}.multiselect__option--group{background:#ededed;color:#35495e}.multiselect__option--group.multiselect__option--highlight{background:#35495e;color:#fff}.multiselect__option--group.multiselect__option--highlight:after{background:#35495e}.multiselect__option--disabled.multiselect__option--highlight{background:#dedede}.multiselect__option--group-selected.multiselect__option--highlight{background:#ff6a6a;color:#fff}.multiselect__option--group-selected.multiselect__option--highlight:after{background:#ff6a6a;content:attr(data-deselect);color:#fff}.multiselect-enter-active,.multiselect-leave-active{transition:all .15s ease}.multiselect-enter,.multiselect-leave-active{opacity:0}.multiselect__strong{margin-bottom:8px;line-height:20px;display:inline-block;vertical-align:top}[dir=rtl] .multiselect{text-align:right}[dir=rtl] .multiselect__select{right:auto;left:1px}[dir=rtl] .multiselect__tags{padding:8px 8px 0 40px}[dir=rtl] .multiselect__content{text-align:right}[dir=rtl] .multiselect__option:after{right:auto;left:0}[dir=rtl] .multiselect__clear{right:auto;left:12px}[dir=rtl] .multiselect__spinner{right:auto;left:1px}@keyframes a{0%{transform:rotate(0)}to{transform:rotate(2turn)}}
\ No newline at end of file diff --git a/nz-admin/src/main/resources/statics/libs/vue-multiselect.min.js b/nz-admin/src/main/resources/statics/libs/vue-multiselect.min.js deleted file mode 100644 index 90e4a609..00000000 --- a/nz-admin/src/main/resources/statics/libs/vue-multiselect.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueMultiselect=e():t.VueMultiselect=e()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=66)}([function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){t.exports=!n(12)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(10),r=n(43),o=n(31),s=Object.defineProperty;e.f=n(1)?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var i=n(77),r=n(21);t.exports=function(t){return i(r(t))}},function(t,e,n){var i=n(9),r=n(52),o=n(18),s=n(55),u=n(53),a=function(t,e,n){var l,c,f,p,h=t&a.F,d=t&a.G,v=t&a.S,y=t&a.P,g=t&a.B,b=d?i:v?i[e]||(i[e]={}):(i[e]||{}).prototype,m=d?r:r[e]||(r[e]={}),_=m.prototype||(m.prototype={});d&&(n=e);for(l in n)c=!h&&b&&void 0!==b[l],f=(c?b:n)[l],p=g&&c?u(f,i):y&&"function"==typeof f?u(Function.call,f):f,b&&s(b,l,f,t&a.U),m[l]!=f&&o(m,l,p),y&&_[l]!=f&&(_[l]=f)};i.core=r,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,n){var i=n(3),r=n(15);t.exports=n(1)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var i=n(29)("wks"),r=n(16),o=n(0).Symbol,s="function"==typeof o;(t.exports=function(t){return i[t]||(i[t]=s&&o[t]||(s?o:r)("Symbol."+t))}).store=i},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var i=n(13);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var i=n(48),r=n(22);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var i=n(109),r=n(110);t.exports=n(35)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var i=n(8);t.exports=function(t,e){return!!t&&i(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var i=n(0),r=n(11),o=n(74),s=n(6),u=function(t,e,n){var a,l,c,f=t&u.F,p=t&u.G,h=t&u.S,d=t&u.P,v=t&u.B,y=t&u.W,g=p?r:r[e]||(r[e]={}),b=g.prototype,m=p?i:h?i[e]:(i[e]||{}).prototype;p&&(n=e);for(a in n)(l=!f&&m&&void 0!==m[a])&&a in g||(c=l?m[a]:n[a],g[a]=p&&"function"!=typeof m[a]?n[a]:v&&l?o(c,i):y&&m[a]==c?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(c):d&&"function"==typeof c?o(Function.call,c):c,d&&((g.virtual||(g.virtual={}))[a]=c,t&u.R&&b&&!b[a]&&s(b,a,c)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){t.exports={}},function(t,e){t.exports=!0},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var i=n(3).f,r=n(2),o=n(7)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},function(t,e,n){var i=n(29)("keys"),r=n(16);t.exports=function(t){return i[t]||(i[t]=r(t))}},function(t,e,n){var i=n(0),r=i["__core-js_shared__"]||(i["__core-js_shared__"]={});t.exports=function(t){return r[t]||(r[t]={})}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(13);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var i=n(0),r=n(11),o=n(25),s=n(33),u=n(3).f;t.exports=function(t){var e=r.Symbol||(r.Symbol=o?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||u(e,t,{value:s.f(t)})}},function(t,e,n){e.f=n(7)},function(t,e,n){var i=n(53),r=n(36),o=n(57),s=n(37),u=n(104);t.exports=function(t,e){var n=1==t,a=2==t,l=3==t,c=4==t,f=6==t,p=5==t||f,h=e||u;return function(e,u,d){for(var v,y,g=o(e),b=r(g),m=i(u,d,3),_=s(b.length),x=0,w=n?h(e,_):a?h(e,0):void 0;_>x;x++)if((p||x in b)&&(v=b[x],y=m(v,x,g),t))if(n)w[x]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:w.push(v)}else if(c)return!1;return f?-1:l||c?c:w}}},function(t,e,n){t.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(51);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,n){var i=n(56),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t,e,n){var i=n(111)("wks"),r=n(58),o=n(9).Symbol,s="function"==typeof o;(t.exports=function(t){return i[t]||(i[t]=s&&o[t]||(s?o:r)("Symbol."+t))}).store=i},function(t,e,n){"use strict";function i(t){return 0!==t&&(!(!Array.isArray(t)||0!==t.length)||!t)}function r(t){return function(){return!t.apply(void 0,arguments)}}function o(t,e){return void 0===t&&(t="undefined"),null===t&&(t="null"),!1===t&&(t="false"),-1!==t.toString().toLowerCase().indexOf(e.trim())}function s(t,e,n,i){return t.filter(function(t){return o(i(t,n),e)})}function u(t){return t.filter(function(t){return!t.$isLabel})}function a(t,e){return function(n){return n.reduce(function(n,i){return i[t]&&i[t].length?(n.push({$groupLabel:i[e],$isLabel:!0}),n.concat(i[t])):n},[])}}function l(t,e,n,i,r){return function(o){return o.map(function(o){var u;if(!o[n])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];var a=s(o[n],t,e,r);return a.length?(u={},v()(u,i,o[i]),v()(u,n,a),u):[]})}}var c=n(65),f=n.n(c),p=n(59),h=(n.n(p),n(122)),d=(n.n(h),n(64)),v=n.n(d),y=n(120),g=(n.n(y),n(121)),b=(n.n(g),n(117)),m=(n.n(b),n(123)),_=(n.n(m),n(118)),x=(n.n(_),n(119)),w=(n.n(x),function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return e.reduce(function(t,e){return e(t)},t)}});e.a={data:function(){return{search:"",isOpen:!1,prefferedOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},value:{type:null,default:function(){return[]}},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default:function(t,e){return i(t)?"":e?t[e]:t}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default:function(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1}},mounted:function(){this.multiple||this.clearOnSelect||console.warn("[Vue-Multiselect warn]: ClearOnSelect and Multiple props can’t be both set to false."),!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue:function(){return this.value||0===this.value?Array.isArray(this.value)?this.value:[this.value]:[]},filteredOptions:function(){var t=this.search||"",e=t.toLowerCase().trim(),n=this.options.concat();return n=this.internalSearch?this.groupValues?this.filterAndFlat(n,e,this.label):s(n,e,this.label,this.customLabel):this.groupValues?a(this.groupValues,this.groupLabel)(n):n,n=this.hideSelected?n.filter(r(this.isSelected)):n,this.taggable&&e.length&&!this.isExistingOption(e)&&("bottom"===this.tagPosition?n.push({isTag:!0,label:t}):n.unshift({isTag:!0,label:t})),n.slice(0,this.optionsLimit)},valueKeys:function(){var t=this;return this.trackBy?this.internalValue.map(function(e){return e[t.trackBy]}):this.internalValue},optionKeys:function(){var t=this;return(this.groupValues?this.flatAndStrip(this.options):this.options).map(function(e){return t.customLabel(e,t.label).toString().toLowerCase()})},currentOptionLabel:function(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:function(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("input",this.multiple?[]:null))},search:function(){this.$emit("search-change",this.search,this.id)}},methods:{getValue:function(){return this.multiple?this.internalValue:0===this.internalValue.length?null:this.internalValue[0]},filterAndFlat:function(t,e,n){return w(l(e,n,this.groupValues,this.groupLabel,this.customLabel),a(this.groupValues,this.groupLabel))(t)},flatAndStrip:function(t){return w(a(this.groupValues,this.groupLabel),u)(t)},updateSearch:function(t){this.search=t},isExistingOption:function(t){return!!this.options&&this.optionKeys.indexOf(t)>-1},isSelected:function(t){var e=this.trackBy?t[this.trackBy]:t;return this.valueKeys.indexOf(e)>-1},getOptionLabel:function(t){if(i(t))return"";if(t.isTag)return t.label;if(t.$isLabel)return t.$groupLabel;var e=this.customLabel(t,this.label);return i(e)?"":e},select:function(t,e){if(t.$isLabel&&this.groupSelect)return void this.selectGroup(t);if(!(-1!==this.blockKeys.indexOf(e)||this.disabled||t.$isDisabled||t.$isLabel)&&(!this.max||!this.multiple||this.internalValue.length!==this.max)&&("Tab"!==e||this.pointerDirty)){if(t.isTag)this.$emit("tag",t.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(t))return void("Tab"!==e&&this.removeElement(t));this.$emit("select",t,this.id),this.multiple?this.$emit("input",this.internalValue.concat([t]),this.id):this.$emit("input",t,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup:function(t){var e=this,n=this.options.find(function(n){return n[e.groupLabel]===t.$groupLabel});if(n)if(this.wholeGroupSelected(n)){this.$emit("remove",n[this.groupValues],this.id);var i=this.internalValue.filter(function(t){return-1===n[e.groupValues].indexOf(t)});this.$emit("input",i,this.id)}else{var o=n[this.groupValues].filter(r(this.isSelected));this.$emit("select",o,this.id),this.$emit("input",this.internalValue.concat(o),this.id)}},wholeGroupSelected:function(t){return t[this.groupValues].every(this.isSelected)},removeElement:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.disabled){if(!this.allowEmpty&&this.internalValue.length<=1)return void this.deactivate();var n="object"===f()(t)?this.valueKeys.indexOf(t[this.trackBy]):this.valueKeys.indexOf(t);if(this.$emit("remove",t,this.id),this.multiple){var i=this.internalValue.slice(0,n).concat(this.internalValue.slice(n+1));this.$emit("input",i,this.id)}else this.$emit("input",null,this.id);this.closeOnSelect&&e&&this.deactivate()}},removeLastElement:function(){-1===this.blockKeys.indexOf("Delete")&&0===this.search.length&&Array.isArray(this.internalValue)&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate:function(){var t=this;this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&0===this.pointer&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.$nextTick(function(){return t.$refs.search.focus()})):this.$el.focus(),this.$emit("open",this.id))},deactivate:function(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search.blur():this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle:function(){this.isOpen?this.deactivate():this.activate()},adjustPosition:function(){if("undefined"!=typeof window){var t=this.$el.getBoundingClientRect().top,e=window.innerHeight-this.$el.getBoundingClientRect().bottom;e>this.maxHeight||e>t||"below"===this.openDirection||"bottom"===this.openDirection?(this.prefferedOpenDirection="below",this.optimizedHeight=Math.min(e-40,this.maxHeight)):(this.prefferedOpenDirection="above",this.optimizedHeight=Math.min(t-40,this.maxHeight))}}}}},function(t,e,n){"use strict";var i=n(59);n.n(i);e.a={data:function(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition:function(){return this.pointer*this.optionHeight},visibleElements:function(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions:function(){this.pointerAdjust()},isOpen:function(){this.pointerDirty=!1}},methods:{optionHighlight:function(t,e){return{"multiselect__option--highlight":t===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(e)}},groupHighlight:function(t,e){var n=this;if(!this.groupSelect)return["multiselect__option--disabled"];var i=this.options.find(function(t){return t[n.groupLabel]===e.$groupLabel});return[this.groupSelect?"multiselect__option--group":"multiselect__option--disabled",{"multiselect__option--highlight":t===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(i)}]},addPointerElement:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Enter",e=t.key;this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward:function(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward:function(){this.pointer>0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset:function(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust:function(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet:function(t){this.pointer=t,this.pointerDirty=!0}}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var i=n(13),r=n(0).document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e,n){t.exports=!n(1)&&!n(12)(function(){return 7!=Object.defineProperty(n(42)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var i=n(25),r=n(23),o=n(49),s=n(6),u=n(2),a=n(24),l=n(79),c=n(27),f=n(86),p=n(7)("iterator"),h=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,v,y,g,b){l(n,e,v);var m,_,x,w=function(t){if(!h&&t in P)return P[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",O="values"==y,L=!1,P=t.prototype,k=P[p]||P["@@iterator"]||y&&P[y],E=k||w(y),j=y?O?w("entries"):E:void 0,V="Array"==e?P.entries||k:k;if(V&&(x=f(V.call(new t)))!==Object.prototype&&(c(x,S,!0),i||u(x,p)||s(x,p,d)),O&&k&&"values"!==k.name&&(L=!0,E=function(){return k.call(this)}),i&&!b||!h&&!L&&P[p]||s(P,p,E),a[e]=E,a[S]=d,y)if(m={values:O?E:w("values"),keys:g?E:w("keys"),entries:j},b)for(_ in m)_ in P||o(P,_,m[_]);else r(r.P+r.F*(h||L),e,m);return m}},function(t,e,n){var i=n(10),r=n(83),o=n(22),s=n(28)("IE_PROTO"),u=function(){},a=function(){var t,e=n(42)("iframe"),i=o.length;for(e.style.display="none",n(76).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),a=t.F;i--;)delete a.prototype[o[i]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(u.prototype=i(t),n=new u,u.prototype=null,n[s]=t):n=a(),void 0===e?n:r(n,e)}},function(t,e,n){var i=n(48),r=n(22).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var i=n(2),r=n(4),o=n(73)(!1),s=n(28)("IE_PROTO");t.exports=function(t,e){var n,u=r(t),a=0,l=[];for(n in u)n!=s&&i(u,n)&&l.push(n);for(;e.length>a;)i(u,n=e[a++])&&(~o(l,n)||l.push(n));return l}},function(t,e,n){t.exports=n(6)},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){var i=n(50);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var i=n(51);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){var i=n(9),r=n(18),o=n(107),s=n(58)("src"),u=Function.toString,a=(""+u).split("toString");n(52).inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,u){var l="function"==typeof n;l&&(o(n,"name")||r(n,"name",e)),t[e]!==n&&(l&&(o(n,s)||r(n,s,t[e]?""+t[e]:a.join(String(e)))),t===i?t[e]=n:u?t[e]?t[e]=n:r(t,e,n):(delete t[e],r(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[s]||u.call(this)})},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(17);t.exports=function(t){return Object(i(t))}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e,n){"use strict";var i=n(5),r=n(34)(5),o=!0;"find"in[]&&Array(1).find(function(){o=!1}),i(i.P+i.F*o,"Array",{find:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),n(99)("find")},function(t,e,n){"use strict";function i(t){n(124)}var r=n(67),o=n(126),s=n(125),u=i,a=s(r.a,o.a,!1,u,null,null);e.a=a.exports},function(t,e,n){t.exports=n(68)},function(t,e,n){t.exports=n(69)},function(t,e,n){t.exports=n(70)},function(t,e,n){function i(t,e,n){return e in t?r(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var r=n(61);t.exports=i},function(t,e,n){function i(t){return(i="function"==typeof s&&"symbol"==typeof o?function(t){return typeof t}:function(t){return t&&"function"==typeof s&&t.constructor===s&&t!==s.prototype?"symbol":typeof t})(t)}function r(e){return"function"==typeof s&&"symbol"===i(o)?t.exports=r=function(t){return i(t)}:t.exports=r=function(t){return t&&"function"==typeof s&&t.constructor===s&&t!==s.prototype?"symbol":i(t)},r(e)}var o=n(63),s=n(62);t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(60),r=n(39),o=n(40);n.d(e,"Multiselect",function(){return i.a}),n.d(e,"multiselectMixin",function(){return r.a}),n.d(e,"pointerMixin",function(){return o.a}),e.default=i.a},function(t,e,n){"use strict";var i=n(39),r=n(40);e.a={name:"vue-multiselect",mixins:[i.a,r.a],props:{name:{type:String,default:""},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:function(t){return"and ".concat(t," more")}},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{isSingleLabelVisible:function(){return this.singleValue&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible:function(){return!(this.internalValue.length||this.searchable&&this.isOpen)},visibleValues:function(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue:function(){return this.internalValue[0]},deselectLabelText:function(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText:function(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText:function(){return this.showLabels?this.selectLabel:""},selectGroupLabelText:function(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText:function(){return this.showLabels?this.selectedLabel:""},inputStyle:function(){if(this.multiple&&this.value&&this.value.length)return this.isOpen?{width:"auto"}:{width:"0",position:"absolute",padding:"0"}},contentStyle:function(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove:function(){return"above"===this.openDirection||"top"===this.openDirection||"below"!==this.openDirection&&"bottom"!==this.openDirection&&"above"===this.prefferedOpenDirection},showSearchInput:function(){return this.searchable&&(!this.hasSingleSelectedSlot||!this.visibleSingleValue&&0!==this.visibleSingleValue||this.isOpen)}}}},function(t,e,n){n(92);var i=n(11).Object;t.exports=function(t,e,n){return i.defineProperty(t,e,n)}},function(t,e,n){n(95),n(93),n(96),n(97),t.exports=n(11).Symbol},function(t,e,n){n(94),n(98),t.exports=n(33).f("iterator")},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(){}},function(t,e,n){var i=n(4),r=n(89),o=n(88);t.exports=function(t){return function(e,n,s){var u,a=i(e),l=r(a.length),c=o(s,l);if(t&&n!=n){for(;l>c;)if((u=a[c++])!=u)return!0}else for(;l>c;c++)if((t||c in a)&&a[c]===n)return t||c||0;return!t&&-1}}},function(t,e,n){var i=n(71);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var i=n(14),r=n(47),o=n(26);t.exports=function(t){var e=i(t),n=r.f;if(n)for(var s,u=n(t),a=o.f,l=0;u.length>l;)a.call(t,s=u[l++])&&e.push(s);return e}},function(t,e,n){t.exports=n(0).document&&document.documentElement},function(t,e,n){var i=n(41);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,n){var i=n(41);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){"use strict";var i=n(45),r=n(15),o=n(27),s={};n(6)(s,n(7)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=i(s,{next:r(1,n)}),o(t,e+" Iterator")}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var i=n(14),r=n(4);t.exports=function(t,e){for(var n,o=r(t),s=i(o),u=s.length,a=0;u>a;)if(o[n=s[a++]]===e)return n}},function(t,e,n){var i=n(16)("meta"),r=n(13),o=n(2),s=n(3).f,u=0,a=Object.isExtensible||function(){return!0},l=!n(12)(function(){return a(Object.preventExtensions({}))}),c=function(t){s(t,i,{value:{i:"O"+ ++u,w:{}}})},f=function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,i)){if(!a(t))return"F";if(!e)return"E";c(t)}return t[i].i},p=function(t,e){if(!o(t,i)){if(!a(t))return!0;if(!e)return!1;c(t)}return t[i].w},h=function(t){return l&&d.NEED&&a(t)&&!o(t,i)&&c(t),t},d=t.exports={KEY:i,NEED:!1,fastKey:f,getWeak:p,onFreeze:h}},function(t,e,n){var i=n(3),r=n(10),o=n(14);t.exports=n(1)?Object.defineProperties:function(t,e){r(t);for(var n,s=o(e),u=s.length,a=0;u>a;)i.f(t,n=s[a++],e[n]);return t}},function(t,e,n){var i=n(26),r=n(15),o=n(4),s=n(31),u=n(2),a=n(43),l=Object.getOwnPropertyDescriptor;e.f=n(1)?l:function(t,e){if(t=o(t),e=s(e,!0),a)try{return l(t,e)}catch(t){}if(u(t,e))return r(!i.f.call(t,e),t[e])}},function(t,e,n){var i=n(4),r=n(46).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(t){try{return r(t)}catch(t){return s.slice()}};t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?u(t):r(i(t))}},function(t,e,n){var i=n(2),r=n(90),o=n(28)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),i(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){var i=n(30),r=n(21);t.exports=function(t){return function(e,n){var o,s,u=String(r(e)),a=i(n),l=u.length;return a<0||a>=l?t?"":void 0:(o=u.charCodeAt(a),o<55296||o>56319||a+1===l||(s=u.charCodeAt(a+1))<56320||s>57343?t?u.charAt(a):o:t?u.slice(a,a+2):s-56320+(o-55296<<10)+65536)}}},function(t,e,n){var i=n(30),r=Math.max,o=Math.min;t.exports=function(t,e){return t=i(t),t<0?r(t+e,0):o(t,e)}},function(t,e,n){var i=n(30),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t,e,n){var i=n(21);t.exports=function(t){return Object(i(t))}},function(t,e,n){"use strict";var i=n(72),r=n(80),o=n(24),s=n(4);t.exports=n(44)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):"keys"==e?r(0,n):"values"==e?r(0,t[n]):r(0,[n,t[n]])},"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(t,e,n){var i=n(23);i(i.S+i.F*!n(1),"Object",{defineProperty:n(3).f})},function(t,e){},function(t,e,n){"use strict";var i=n(87)(!0);n(44)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var i=n(0),r=n(2),o=n(1),s=n(23),u=n(49),a=n(82).KEY,l=n(12),c=n(29),f=n(27),p=n(16),h=n(7),d=n(33),v=n(32),y=n(81),g=n(75),b=n(78),m=n(10),_=n(4),x=n(31),w=n(15),S=n(45),O=n(85),L=n(84),P=n(3),k=n(14),E=L.f,j=P.f,V=O.f,C=i.Symbol,T=i.JSON,A=T&&T.stringify,$=h("_hidden"),D=h("toPrimitive"),F={}.propertyIsEnumerable,M=c("symbol-registry"),B=c("symbols"),N=c("op-symbols"),R=Object.prototype,H="function"==typeof C,G=i.QObject,I=!G||!G.prototype||!G.prototype.findChild,K=o&&l(function(){return 7!=S(j({},"a",{get:function(){return j(this,"a",{value:7}).a}})).a})?function(t,e,n){var i=E(R,e);i&&delete R[e],j(t,e,n),i&&t!==R&&j(R,e,i)}:j,z=function(t){var e=B[t]=S(C.prototype);return e._k=t,e},U=H&&"symbol"==typeof C.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof C},W=function(t,e,n){return t===R&&W(N,e,n),m(t),e=x(e,!0),m(n),r(B,e)?(n.enumerable?(r(t,$)&&t[$][e]&&(t[$][e]=!1),n=S(n,{enumerable:w(0,!1)})):(r(t,$)||j(t,$,w(1,{})),t[$][e]=!0),K(t,e,n)):j(t,e,n)},J=function(t,e){m(t);for(var n,i=g(e=_(e)),r=0,o=i.length;o>r;)W(t,n=i[r++],e[n]);return t},q=function(t,e){return void 0===e?S(t):J(S(t),e)},X=function(t){var e=F.call(this,t=x(t,!0));return!(this===R&&r(B,t)&&!r(N,t))&&(!(e||!r(this,t)||!r(B,t)||r(this,$)&&this[$][t])||e)},Y=function(t,e){if(t=_(t),e=x(e,!0),t!==R||!r(B,e)||r(N,e)){var n=E(t,e);return!n||!r(B,e)||r(t,$)&&t[$][e]||(n.enumerable=!0),n}},Q=function(t){for(var e,n=V(_(t)),i=[],o=0;n.length>o;)r(B,e=n[o++])||e==$||e==a||i.push(e);return i},Z=function(t){for(var e,n=t===R,i=V(n?N:_(t)),o=[],s=0;i.length>s;)!r(B,e=i[s++])||n&&!r(R,e)||o.push(B[e]);return o};H||(C=function(){if(this instanceof C)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===R&&e.call(N,n),r(this,$)&&r(this[$],t)&&(this[$][t]=!1),K(this,t,w(1,n))};return o&&I&&K(R,t,{configurable:!0,set:e}),z(t)},u(C.prototype,"toString",function(){return this._k}),L.f=Y,P.f=W,n(46).f=O.f=Q,n(26).f=X,n(47).f=Z,o&&!n(25)&&u(R,"propertyIsEnumerable",X,!0),d.f=function(t){return z(h(t))}),s(s.G+s.W+s.F*!H,{Symbol:C});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;)h(tt[et++]);for(var tt=k(h.store),et=0;tt.length>et;)v(tt[et++]);s(s.S+s.F*!H,"Symbol",{for:function(t){return r(M,t+="")?M[t]:M[t]=C(t)},keyFor:function(t){if(U(t))return y(M,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){I=!0},useSimple:function(){I=!1}}),s(s.S+s.F*!H,"Object",{create:q,defineProperty:W,defineProperties:J,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),T&&s(s.S+s.F*(!H||l(function(){var t=C();return"[null]"!=A([t])||"{}"!=A({a:t})||"{}"!=A(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!U(t)){for(var e,n,i=[t],r=1;arguments.length>r;)i.push(arguments[r++]);return e=i[1],"function"==typeof e&&(n=e),!n&&b(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!U(e))return e}),i[1]=e,A.apply(T,i)}}}),C.prototype[D]||n(6)(C.prototype,D,C.prototype.valueOf),f(C,"Symbol"),f(Math,"Math",!0),f(i.JSON,"JSON",!0)},function(t,e,n){n(32)("asyncIterator")},function(t,e,n){n(32)("observable")},function(t,e,n){n(91);for(var i=n(0),r=n(6),o=n(24),s=n(7)("toStringTag"),u=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],a=0;a<5;a++){var l=u[a],c=i[l],f=c&&c.prototype;f&&!f[s]&&r(f,s,l),o[l]=o.Array}},function(t,e,n){var i=n(38)("unscopables"),r=Array.prototype;void 0==r[i]&&n(18)(r,i,{}),t.exports=function(t){r[i][t]=!0}},function(t,e,n){var i=n(19);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var i=n(115),r=n(37),o=n(114);t.exports=function(t){return function(e,n,s){var u,a=i(e),l=r(a.length),c=o(s,l);if(t&&n!=n){for(;l>c;)if((u=a[c++])!=u)return!0}else for(;l>c;c++)if((t||c in a)&&a[c]===n)return t||c||0;return!t&&-1}}},function(t,e,n){var i=n(50),r=n(57),o=n(36),s=n(37);t.exports=function(t,e,n,u,a){i(e);var l=r(t),c=o(l),f=s(l.length),p=a?f-1:0,h=a?-1:1;if(n<2)for(;;){if(p in c){u=c[p],p+=h;break}if(p+=h,a?p<0:f<=p)throw TypeError("Reduce of empty array with no initial value")}for(;a?p>=0:f>p;p+=h)p in c&&(u=e(u,c[p],p,l));return u}},function(t,e,n){var i=n(19),r=n(54),o=n(38)("species");t.exports=function(t){var e;return r(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!r(e.prototype)||(e=void 0),i(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},function(t,e,n){var i=n(103);t.exports=function(t,e){return new(i(t))(e)}},function(t,e,n){var i=n(19),r=n(9).document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e,n){"use strict";var i=n(18),r=n(55),o=n(8),s=n(17),u=n(38);t.exports=function(t,e,n){var a=u(t),l=n(s,a,""[t]),c=l[0],f=l[1];o(function(){var e={};return e[a]=function(){return 7},7!=""[t](e)})&&(r(String.prototype,t,c),i(RegExp.prototype,a,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)}))}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){t.exports=!n(35)&&!n(8)(function(){return 7!=Object.defineProperty(n(105)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(100),r=n(108),o=n(116),s=Object.defineProperty;e.f=n(35)?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var i=n(9),r=i["__core-js_shared__"]||(i["__core-js_shared__"]={});t.exports=function(t){return r[t]||(r[t]={})}},function(t,e,n){var i=n(5),r=n(17),o=n(8),s=n(113),u="["+s+"]",a="
",l=RegExp("^"+u+u+"*"),c=RegExp(u+u+"*$"),f=function(t,e,n){var r={},u=o(function(){return!!s[t]()||a[t]()!=a}),l=r[t]=u?e(p):s[t];n&&(r[n]=l),i(i.P+i.F*u,"String",r)},p=f.trim=function(t,e){return t=String(r(t)),1&e&&(t=t.replace(l,"")),2&e&&(t=t.replace(c,"")),t};t.exports=f},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,n){var i=n(56),r=Math.max,o=Math.min;t.exports=function(t,e){return t=i(t),t<0?r(t+e,0):o(t,e)}},function(t,e,n){var i=n(36),r=n(17);t.exports=function(t){return i(r(t))}},function(t,e,n){var i=n(19);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){"use strict";var i=n(5),r=n(34)(2);i(i.P+i.F*!n(20)([].filter,!0),"Array",{filter:function(t){return r(this,t,arguments[1])}})},function(t,e,n){"use strict";var i=n(5),r=n(101)(!1),o=[].indexOf,s=!!o&&1/[1].indexOf(1,-0)<0;i(i.P+i.F*(s||!n(20)(o)),"Array",{indexOf:function(t){return s?o.apply(this,arguments)||0:r(this,t,arguments[1])}})},function(t,e,n){var i=n(5);i(i.S,"Array",{isArray:n(54)})},function(t,e,n){"use strict";var i=n(5),r=n(34)(1);i(i.P+i.F*!n(20)([].map,!0),"Array",{map:function(t){return r(this,t,arguments[1])}})},function(t,e,n){"use strict";var i=n(5),r=n(102);i(i.P+i.F*!n(20)([].reduce,!0),"Array",{reduce:function(t){return r(this,t,arguments.length,arguments[1],!1)}})},function(t,e,n){n(106)("search",1,function(t,e,n){return[function(n){"use strict";var i=t(this),r=void 0==n?void 0:n[e];return void 0!==r?r.call(n,i):new RegExp(n)[e](String(i))},n]})},function(t,e,n){"use strict";n(112)("trim",function(t){return function(){return t(this,3)}})},function(t,e){},function(t,e){t.exports=function(t,e,n,i,r,o){var s,u=t=t||{},a=typeof t.default;"object"!==a&&"function"!==a||(s=t,u=t.default);var l="function"==typeof u?u.options:u;e&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0),n&&(l.functional=!0),r&&(l._scopeId=r);var c;if(o?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=c):i&&(c=i),c){var f=l.functional,p=f?l.render:l.beforeCreate;f?(l._injectStyles=c,l.render=function(t,e){return c.call(e),p(t,e)}):l.beforeCreate=p?[].concat(p,c):[c]}return{esModule:s,exports:u,options:l}}},function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"multiselect",class:{"multiselect--active":t.isOpen,"multiselect--disabled":t.disabled,"multiselect--above":t.isAbove},attrs:{tabindex:t.searchable?-1:t.tabindex},on:{focus:function(e){t.activate()},blur:function(e){!t.searchable&&t.deactivate()},keydown:[function(e){return"button"in e||!t._k(e.keyCode,"down",40,e.key,"ArrowDown")?e.target!==e.currentTarget?null:(e.preventDefault(),void t.pointerForward()):null},function(e){return"button"in e||!t._k(e.keyCode,"up",38,e.key,"ArrowUp")?e.target!==e.currentTarget?null:(e.preventDefault(),void t.pointerBackward()):null},function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")||!t._k(e.keyCode,"tab",9,e.key,"Tab")?(e.stopPropagation(),e.target!==e.currentTarget?null:void t.addPointerElement(e)):null}],keyup:function(e){if(!("button"in e)&&t._k(e.keyCode,"esc",27,e.key,"Escape"))return null;t.deactivate()}}},[t._t("caret",[n("div",{staticClass:"multiselect__select",on:{mousedown:function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}}})],{toggle:t.toggle}),t._v(" "),t._t("clear",null,{search:t.search}),t._v(" "),n("div",{ref:"tags",staticClass:"multiselect__tags"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.visibleValues.length>0,expression:"visibleValues.length > 0"}],staticClass:"multiselect__tags-wrap"},[t._l(t.visibleValues,function(e){return[t._t("tag",[n("span",{staticClass:"multiselect__tag"},[n("span",{domProps:{textContent:t._s(t.getOptionLabel(e))}}),t._v(" "),n("i",{staticClass:"multiselect__tag-icon",attrs:{"aria-hidden":"true",tabindex:"1"},on:{keydown:function(n){if(!("button"in n)&&t._k(n.keyCode,"enter",13,n.key,"Enter"))return null;n.preventDefault(),t.removeElement(e)},mousedown:function(n){n.preventDefault(),t.removeElement(e)}}})])],{option:e,search:t.search,remove:t.removeElement})]})],2),t._v(" "),t.internalValue&&t.internalValue.length>t.limit?[t._t("limit",[n("strong",{staticClass:"multiselect__strong",domProps:{textContent:t._s(t.limitText(t.internalValue.length-t.limit))}})])]:t._e(),t._v(" "),n("transition",{attrs:{name:"multiselect__loading"}},[t._t("loading",[n("div",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}],staticClass:"multiselect__spinner"})])],2),t._v(" "),n("input",{directives:[{name:"show",rawName:"v-show",value:t.isOpen&&t.searchable,expression:"isOpen && searchable"}],ref:"search",staticClass:"multiselect__input",style:t.inputStyle,attrs:{name:t.name,id:t.id,type:"text",autocomplete:"off",placeholder:t.placeholder,disabled:t.disabled,tabindex:t.tabindex},domProps:{value:t.search},on:{input:function(e){t.updateSearch(e.target.value)},focus:function(e){e.preventDefault(),t.activate()},blur:function(e){e.preventDefault(),t.deactivate()},keyup:function(e){if(!("button"in e)&&t._k(e.keyCode,"esc",27,e.key,"Escape"))return null;t.deactivate()},keydown:[function(e){if(!("button"in e)&&t._k(e.keyCode,"down",40,e.key,"ArrowDown"))return null;e.preventDefault(),t.pointerForward()},function(e){if(!("button"in e)&&t._k(e.keyCode,"up",38,e.key,"ArrowUp"))return null;e.preventDefault(),t.pointerBackward()},function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?(e.preventDefault(),e.stopPropagation(),e.target!==e.currentTarget?null:void t.addPointerElement(e)):null},function(e){if(!("button"in e)&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete"]))return null;e.stopPropagation(),t.removeLastElement()}]}}),t._v(" "),t.isSingleLabelVisible?n("span",{staticClass:"multiselect__single",on:{mousedown:function(e){return e.preventDefault(),t.toggle(e)}}},[t._t("singleLabel",[[t._v(t._s(t.currentOptionLabel))]],{option:t.singleValue})],2):t._e(),t._v(" "),t.isPlaceholderVisible?n("span",{on:{mousedown:function(e){return e.preventDefault(),t.toggle(e)}}},[t._t("placeholder",[n("span",{staticClass:"multiselect__single"},[t._v("\n "+t._s(t.placeholder)+"\n ")])])],2):t._e()],2),t._v(" "),n("transition",{attrs:{name:"multiselect"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isOpen,expression:"isOpen"}],ref:"list",staticClass:"multiselect__content-wrapper",style:{maxHeight:t.optimizedHeight+"px"},on:{focus:t.activate,mousedown:function(t){t.preventDefault()}}},[n("ul",{staticClass:"multiselect__content",style:t.contentStyle},[t._t("beforeList"),t._v(" "),t.multiple&&t.max===t.internalValue.length?n("li",[n("span",{staticClass:"multiselect__option"},[t._t("maxElements",[t._v("Maximum of "+t._s(t.max)+" options selected. First remove a selected option to select another.")])],2)]):t._e(),t._v(" "),!t.max||t.internalValue.length<t.max?t._l(t.filteredOptions,function(e,i){return n("li",{key:i,staticClass:"multiselect__element"},[e&&(e.$isLabel||e.$isDisabled)?t._e():n("span",{staticClass:"multiselect__option",class:t.optionHighlight(i,e),attrs:{"data-select":e&&e.isTag?t.tagPlaceholder:t.selectLabelText,"data-selected":t.selectedLabelText,"data-deselect":t.deselectLabelText},on:{click:function(n){n.stopPropagation(),t.select(e)},mouseenter:function(e){if(e.target!==e.currentTarget)return null;t.pointerSet(i)}}},[t._t("option",[n("span",[t._v(t._s(t.getOptionLabel(e)))])],{option:e,search:t.search})],2),t._v(" "),e&&(e.$isLabel||e.$isDisabled)?n("span",{staticClass:"multiselect__option",class:t.groupHighlight(i,e),attrs:{"data-select":t.groupSelect&&t.selectGroupLabelText,"data-deselect":t.groupSelect&&t.deselectGroupLabelText},on:{mouseenter:function(e){if(e.target!==e.currentTarget)return null;t.groupSelect&&t.pointerSet(i)},mousedown:function(n){n.preventDefault(),t.selectGroup(e)}}},[t._t("option",[n("span",[t._v(t._s(t.getOptionLabel(e)))])],{option:e,search:t.search})],2):t._e()])}):t._e(),t._v(" "),n("li",{directives:[{name:"show",rawName:"v-show",value:t.showNoResults&&0===t.filteredOptions.length&&t.search&&!t.loading,expression:"showNoResults && (filteredOptions.length === 0 && search && !loading)"}]},[n("span",{staticClass:"multiselect__option"},[t._t("noResult",[t._v("No elements found. Consider changing the search query.")])],2)]),t._v(" "),t._t("afterList")],2)])])],2)},r=[],o={render:i,staticRenderFns:r};e.a=o}])});
\ No newline at end of file diff --git a/nz-admin/src/main/resources/statics/libs/vue-validator.min.js b/nz-admin/src/main/resources/statics/libs/vue-validator.min.js deleted file mode 100644 index 8252b4f4..00000000 --- a/nz-admin/src/main/resources/statics/libs/vue-validator.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * vue-validator v3.0.0-alpha.1 - * (c) 2016 kazuya kawaguchi - * Released under the MIT License. - */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueValidator=e()}(this,function(){"use strict";function t(t,e){window.console&&(console.warn("[vue-validator] "+t),e&&console.warn(e.stack))}function e(t,e){return t===e||!(!u(t)||!u(e))&&JSON.stringify(t)===JSON.stringify(e)}function i(t){var e=t.className;return"object"==typeof e&&(e=e.baseVal||""),e}function n(t,e){D&&!/svg$/.test(t.namespaceURI)?t.className=e:t.setAttribute("class",e)}function s(t,e){if(t.classList)t.classList.add(e);else{var s=" "+i(t)+" ";s.indexOf(" "+e+" ")<0&&n(t,(s+e).trim())}}function r(t,e){if(t.classList)t.classList.remove(e);else{for(var s=" "+i(t)+" ",r=" "+e+" ";s.indexOf(r)>=0;)s=s.replace(r," ");n(t,s.trim())}t.className||t.removeAttribute("class")}function a(t,e,i){if(t){if(e=e.trim(),e.indexOf(" ")===-1)return void i(t,e);for(var n=e.split(/\s+/),s=0,r=n.length;s<r;s++)i(t,n[s])}}function o(t,e,i){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),i&&i(n),t.dispatchEvent(n)}function l(e){var i={};return d(e).forEach(function(e){var n=e.key,s=e.val;i[n]=function(){var e=this.$validation;if(!this._isMounted)return null;var i=s.split("."),n=i.shift();if("$validation"!==n)return t("unknown validation result path: "+s),null;var r,a=e;do r=i.shift(),a=a[r];while(i.length>0);return a}}),i}function u(t){return null!==t&&"object"==typeof t}function d(t){return Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}})}function h(t){if(Array.isArray(t)){if(0!==t.length){for(var e=!0,i=0,n=t.length;i<n&&(e=h(t[i]),e);i++);return e}return!1}return"number"==typeof t||"function"==typeof t||("boolean"==typeof t?t:"string"==typeof t?t.length>0:null!==t&&"object"==typeof t&&Object.keys(t).length>0)}function c(t,e){if("string"!=typeof e)return!1;var i=e.match(new RegExp("^/(.*?)/([gimy]*)$"));return!!i&&new RegExp(i[1],i[2]).test(t)}function v(t,e){return"string"==typeof t?y(e,10)&&t.length>=parseInt(e,10):!!Array.isArray(t)&&t.length>=parseInt(e,10)}function f(t,e){return"string"==typeof t?y(e,10)&&t.length<=parseInt(e,10):!!Array.isArray(t)&&t.length<=parseInt(e,10)}function p(t,e){return!isNaN(+t)&&!isNaN(+e)&&+t>=+e}function _(t,e){return!isNaN(+t)&&!isNaN(+e)&&+t<=+e}function y(t){return/^(-?[1-9]\d*|0)$/.test(t)}function g(t){var e;return e="string"==typeof t?[t]:Array.isArray(t)?t:Object.keys(t)}function m(t){var e={};return t.forEach(function(t){e[t]=void 0}),e}function b(t){var e={};return t.forEach(function(t){e[t]=""}),e}function E(t,e){return"boolean"==typeof e&&!e||!("string"!=typeof e||!e)&&e}function w(t){t[S]="DOM"}function V(t){var i=t.data&&t.data.directives||[],n=i.find(function(t){return"model"===t.name});return n&&void 0!==n.oldValue?e(n.value,n.oldValue):null}function M(t){for(var e=[],i=0,n=t.options.length;i<n;i++){var s=t.options[i];!s.disabled&&s.selected&&e.push(s.value)}return e}function O(t){var e=Object.create(null);return function(i){for(var n=[],s=arguments.length-1;s-- >0;)n[s]=arguments[s+1];var r=e[i];return r||(e[i]=t.apply(void 0,n))}}function I(t){var e=t._vnode;return t.multiple?new X(t):new Y(t,e)}function k(t){return(t.data&&t.data.directives||[]).find(function(t){return"model"===t.name})}function $(t){var e={},i=e.listeners=t.componentOptions?t.componentOptions.listeners:t.data&&t.data.on;return e.type="input"===t.tag&&"text"===(t.data&&t.data.attrs&&t.data.attrs.type)||t.tag&&t.tag.match(/vue-component/)?"input":"change",i&&(e.orgListeners=i[e.type]),e}function R(t){return t&&"function"==typeof t.then}function x(t,e,i){i.forEach(function(i){i&&i.componentOptions&&i.componentOptions.propsData&&"validity-control"===i.componentOptions.tag&&(i.componentOptions.propsData.validation={instance:t,name:e}),i.children&&x(t,e,i.children)})}function L(e,i){return void 0===i&&(i={}),ut?void t("already installed."):(U(e),K(e),j(e),N(e),void(ut=!0))}function j(t){t.mixin(B(t))}function N(t){var e=lt(t);Object.keys(e).forEach(function(i){t.component(i,e[i])})}var C="undefined"!=typeof window&&"[object Object]"!==Object.prototype.toString.call(window),A=C&&window.navigator.userAgent.toLowerCase(),D=A&&A.indexOf("msie 9.0")>0,S="__VUE_VALIDATOR_MODEL_NOTIFY_EVENT__",T={classes:{}},U=function(t){Object.defineProperty(t.config,"validator",{enumerable:!0,configurable:!0,get:function(){return T},set:function(t){T=t}})},G=Object.freeze({required:h,pattern:c,minlength:v,maxlength:f,min:p,max:_}),K=function(t){function e(e,i){return void 0===i?t.options.validators[e]:(t.options.validators[e]=i,void(null===i&&delete t.options.validators.id))}var i=t.util,n=i.extend,s=Object.create(null);n(s,G),t.options.validators=s;var r=t.config.optionMergeStrategies;r&&(r.validators=function(t,e){if(!e)return t;if(!t)return e;var i=Object.create(null);n(i,t);var s;for(s in e)i[s]=e[s];return i}),t.validator=e},W=function(t){var e=t.util,i=e.extend;return{data:function(){return{valid:!0,dirty:!1,touched:!1,modified:!1,results:{}}},computed:{invalid:function(){return!this.valid},pristine:function(){return!this.dirty},untouched:function(){return!this.touched},result:function(){var t={valid:this.valid,invalid:this.invalid,dirty:this.dirty,pristine:this.pristine,touched:this.touched,untouched:this.untouched,modified:this.modified},e=this.results;return this._validityKeys.forEach(function(i){if(t[i]=e[i],t[i].errors){var n=t.errors||[];t[i].errors.forEach(function(t){n.push(t)}),t.errors=n}}),t}},watch:{results:function t(e,i){var n=this._validityKeys,t=this.results;this.valid=this.checkResults(n,t,"valid",!0),this.dirty=this.checkResults(n,t,"dirty",!1),this.touched=this.checkResults(n,t,"touched",!1),this.modified=this.checkResults(n,t,"modified",!1)}},created:function(){this._validities=Object.create(null),this._validityWatchers=Object.create(null),this._validityKeys=[],this._committing=!1},destroyed:function(){var t=this;this._validityKeys.forEach(function(e){t._validityWatchers[e](),delete t._validityWatchers[e],delete t._validities[e]}),delete this._validityWatchers,delete this._validities,delete this._validityKeys},methods:{register:function(t,e){var i=this;this._validities[t]=e,this._validityKeys=Object.keys(this._validities),this.setResults(t,{}),this.withCommit(function(){i._validityWatchers[t]=e.$watch("result",function(e,n){i.setResults(t,e)},{deep:!0,immediate:!0})})},unregister:function(t){var e=this;this._validityWatchers[t](),delete this._validityWatchers[t],delete this._validities[t],this._validityKeys=Object.keys(this._validities),this.withCommit(function(){e.resetResults(t)})},isRegistered:function(t){return t in this._validities},getValidityKeys:function(){return this._validityKeys},checkResults:function(t,e,i,n){for(var s=n,r=0;r<t.length;r++){var a=e[t[r]];if(a[i]!==n){s=!n;break}}return s},setResults:function(t,e){var n=this,s={};this._validityKeys.forEach(function(t){s[t]=i({},n.results[t])}),s[t]=i({},e),this.results=s},resetResults:function(t){var e=this,n={};this._validityKeys.forEach(function(s){t&&t!==s&&(n[s]=i({},e.results[s]))}),this.results=n},withCommit:function(t){var e=this._committing;this._committing=!0,t(),this._committing=e}}}},q=function(t){var e=W(t),i=function(e){void 0===e&&(e={}),this._result={},this._host=e.host,this._named=Object.create(null),this._group=Object.create(null),this._validities=Object.create(null),this._beginDestroy=!1,t.util.defineReactive(this._host,"$validation",this._result)};return i.prototype.register=function(i,n,s){if(void 0===s&&(s={}),this._validityManager||(this._validityManager=new t(e),this._watchValidityResult()),!this._validities[i]){this._validities[i]=n;var r=s.named,a=s.group,o=a?this._getValidityGroup("group",a)||this._registerValidityGroup("group",a):null,l=r?this._getValidityGroup("named",r)||this._registerValidityGroup("named",r):null;r&&a&&l&&o?(o.register(i,n),!l.isRegistered(a)&&l.register(a,o),!this._validityManager.isRegistered(r)&&this._validityManager.register(r,l)):l?(l.register(i,n),!this._validityManager.isRegistered(r)&&this._validityManager.register(r,l)):o?(o.register(i,n),!this._validityManager.isRegistered(a)&&this._validityManager.register(a,o)):this._validityManager.register(i,n)}},i.prototype.unregister=function(t,e){if(void 0===e&&(e={}),this._validityManager&&this._validities[t]){delete this._validities[t];var i=e.named,n=e.group,s=n?this._getValidityGroup("group",n):null,r=i?this._getValidityGroup("named",i):null;i&&n&&r&&s?(s.unregister(t),r.isRegistered(n)&&r.unregister(n),this._validityManager.isRegistered(i)&&this._validityManager.unregister(i)):r?(r.unregister(t),this._validityManager.isRegistered(i)&&this._validityManager.unregister(i)):s?(s.unregister(t),this._validityManager.isRegistered(n)&&this._validityManager.unregister(n)):this._validityManager.unregister(t),n&&this._unregisterValidityGroup("group",n),i&&this._unregisterValidityGroup("named",i)}},i.prototype.destroy=function(){var t=this,e=Object.keys(this._validities),i=Object.keys(this._named),n=Object.keys(this._group);e.forEach(function(e){n.forEach(function(i){var n=t._getValidityGroup("group",i);n&&n.isRegistered(i)&&n.unregister(e)}),i.forEach(function(i){var n=t._getValidityGroup("named",i);n&&n.isRegistered(e)&&n.unregister(e)}),t._validityManager.isRegistered(e)&&t._validityManager.unregister(e),delete t._validities[e]}),n.forEach(function(e){i.forEach(function(i){var n=t._getValidityGroup("named",i);n&&n.isRegistered(e)&&n.unregister(e)}),t._validityManager.isRegistered(e)&&t._validityManager.unregister(e),t._unregisterValidityGroup("group",e)}),i.forEach(function(e){t._validityManager.isRegistered(e)&&t._validityManager.unregister(e),t._unregisterValidityGroup("named",e)}),this._beginDestroy=!0},i.prototype._getValidityGroup=function(t,e){return"named"===t?this._named[e]:this._group[e]},i.prototype._registerValidityGroup=function(i,n){var s="named"===i?this._named:this._group;return s[n]=new t(e),s[n]},i.prototype._unregisterValidityGroup=function(t,e){var i="named"===t?this._named:this._group;i[e]&&(i[e].$destroy(),delete i[e])},i.prototype._watchValidityResult=function(){var e=this;this._watcher=this._validityManager.$watch("results",function(i,n){t.set(e._host,"$validation",i),e._beginDestroy&&e._destroyValidityMananger()},{deep:!0})},i.prototype._unwatchValidityResult=function(){this._watcher(),delete this._watcher},i.prototype._destroyValidityMananger=function(){this._unwatchValidityResult(),this._validityManager.$destroy(),this._validityManager=null},i},B=function(t){var e=q(t);return{beforeCreate:function(){this._validation=new e({host:this})}}},P={field:{type:String,required:!0},validators:{type:[String,Array,Object],required:!0},group:{type:String},multiple:{type:Boolean},classes:{type:Object,default:function(){return{}}}},H={valid:"valid",invalid:"invalid",touched:"touched",untouched:"untouched",pristine:"pristine",dirty:"dirty",modified:"modified"},J=function(t){function e(){var t=g(this.validators);return{results:m(t),valid:!0,dirty:!1,touched:!1,modified:!1,progresses:b(t)}}var i=t.util,n=i.extend,s=n({child:{type:Object,required:!0}},P);return{props:s,data:e}},z=function(t){function e(){return!this.valid}function i(){return!this.dirty}function n(){return!this.touched}function s(){var t=this,e={valid:this.valid,invalid:this.invalid,dirty:this.dirty,pristine:this.pristine,touched:this.touched,untouched:this.untouched,modified:this.modified},i=this._keysCached(this._uid.toString(),this.results);return i.forEach(function(i){var n=E(i,t.results[i]);if(n===!1)e[i]=!1;else{var s={field:t.field,validator:i};"string"==typeof n&&(s.message=n),e.errors||(e.errors=[]),Array.isArray(e.errors)&&e.errors.push(s),e[i]=n}}),e}return{invalid:e,pristine:i,untouched:n,result:s}},F=function(t){return{render:function(t){return this._interceptEvents(this.child,this.multiple),this.child}}},Y=function(t,e){this._vm=t,this._vnode=e,this.initValue=this.getValue(),this.attachValidity()},Q={_isBuiltIn:{},_isComponent:{}};Q._isBuiltIn.get=function(){var t=this._vnode;return!t.child&&!t.componentOptions&&t.tag},Q._isComponent.get=function(){var t=this._vnode;return t.child&&t.componentOptions&&t.tag.match(/vue-component/)},Y.prototype.attachValidity=function(){this._vm.$el.$validity=this._vm},Y.prototype.getValue=function(){if(this._isBuiltIn){var t=this._vm.$el;return"SELECT"===t.tagName?M(t):"checkbox"===t.type?t.checked:t.value}return this._isComponent?this._vnode.child.value:""},Y.prototype.checkModified=function(){if(this._isBuiltIn){var t=this._vm.$el;return"SELECT"===t.tagName?!e(this.initValue,M(t)):"checkbox"===t.type?!e(this.initValue,t.checked):!e(this.initValue,t.value)}return!!this._isComponent&&!e(this.initValue,this._vnode.child.value)},Y.prototype.listenToucheableEvent=function(){this._vm.$el.addEventListener("focusout",this._vm.willUpdateTouched)},Y.prototype.unlistenToucheableEvent=function(){this._vm.$el.removeEventListener("focusout",this._vm.willUpdateTouched)},Y.prototype.listenInputableEvent=function(){var t=this._vm;if(this._isBuiltIn){var e=t.$el;"SELECT"===e.tagName?e.addEventListener("change",t.handleInputable):"checkbox"===e.type?e.addEventListener("change",t.handleInputable):e.addEventListener("input",t.handleInputable)}else this._isComponent&&(this._unwatchInputable=this._vnode.child.$watch("value",t.watchInputable))},Y.prototype.unlistenInputableEvent=function(){var t=this._vm;if(this._isBuiltIn){var e=t.$el;"SELECT"===e.tagName?e.removeEventListener("change",t.handleInputable):"checkbox"===e.type?e.removeEventListener("change",t.handleInputable):e.removeEventListener("input",t.handleInputable)}else this._isComponent&&this._unwatchInputable&&(this._unwatchInputable(),this._unwatchInputable=void 0,delete this._unwatchInputable)},Y.prototype.fireInputableEvent=function(){if(this._isBuiltIn){var t=this._vm.$el;"SELECT"===t.tagName?o(t,"change",w):"checkbox"===t.type?o(t,"change",w):o(t,"input",w)}else if(this._isComponent){var e={value:this.getValue()};e[S]="COMPONENT",this._vnode.child.$emit("input",e)}},Y.prototype.modelValueEqual=function(t){return V(t)},Object.defineProperties(Y.prototype,Q);var X=function(t){this._vm=t,this.initValue=this.getValue(),this.attachValidity()};X.prototype.attachValidity=function(){var t=this;this._vm.$el.$validity=this._vm,this._eachItems(function(e){e.$validity=t._vm})},X.prototype.getValue=function(){return this._getCheckedValue()},X.prototype.checkModified=function(){return!e(this.initValue,this._getCheckedValue())},X.prototype.listenToucheableEvent=function(){var t=this;this._eachItems(function(e){e.addEventListener("focusout",t._vm.willUpdateTouched)})},X.prototype.unlistenToucheableEvent=function(){var t=this;this._eachItems(function(e){e.removeEventListener("focusout",t._vm.willUpdateTouched)})},X.prototype.listenInputableEvent=function(){var t=this;this._eachItems(function(e){e.addEventListener("change",t._vm.handleInputable)})},X.prototype.unlistenInputableEvent=function(){var t=this;this._eachItems(function(e){e.removeEventListener("change",t._vm.handleInputable)})},X.prototype.fireInputableEvent=function(){this._eachItems(function(t){o(t,"change",w)})},X.prototype.modelValueEqual=function(t){for(var e=null,i=this._vm.child&&this._vm.child.children||[],n=0;n<i.length;n++){var s=V(i[n]);if(!s){e=s;break}}return e},X.prototype._getCheckedValue=function(){var t=[];return this._eachItems(function(e){!e.disabled&&e.checked&&t.push(e.value)}),t},X.prototype._getItems=function(){return this._vm.$el.querySelectorAll('input[type="checkbox"], input[type="radio"]')},X.prototype._eachItems=function(t){for(var e=this._getItems(),i=0;i<e.length;i++)t(e[i])};var Z=function(t){function e(){this._elementable=null,this._keysCached=O(function(t){return Object.keys(t)}),this._modified=!1,this._modelIntegrationMode="NONE",this._watchValidationRawResults();var t=this.$options.propsData?this.$options.propsData.validation:null;if(t){var e=t.instance,i=t.name,n=this.group;e.register(this.field,this,{named:i,group:n})}}function i(){var t=this.$options.propsData?this.$options.propsData.validation:null;if(t){var e=t.instance,i=t.name,n=this.group;e.unregister(this.field,this,{named:i,group:n})}this._unwatchValidationRawResults(),this._elementable.unlistenInputableEvent(),this._elementable.unlistenToucheableEvent(),this._elementable=null}function n(){this._elementable=I(this),this._elementable.listenToucheableEvent(),this._elementable.listenInputableEvent(),a(this.$el,this.classes.untouched,s),a(this.$el,this.classes.pristine,s)}function r(){if("MODEL_AND_USER"===this._modelIntegrationMode){var t=this._elementable.modelValueEqual(this._vnode);this._applyWithUserHandler||null===t||t||this._elementable.fireInputableEvent(),delete this._applyWithUserHandler}else if("MODEL"===this._modelIntegrationMode){var e=this._elementable.modelValueEqual(this._vnode);null===e||e||this._elementable.fireInputableEvent()}}return{created:e,destroyed:i,mounted:n,updated:r}},tt=function(t){function e(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];(n=this).$emit.apply(n,[t].concat(e));var n}function i(t,e){var i=this;(e?t.children||[]:[t]).forEach(function(t){i._wrapEvent(t)})}function n(t){var e=this,i={};if(!t.tag||!t.data)return i;var n=k(t);if(!n)return i;var s=$(t),r=s.type,o=s.orgListeners,l=s.listeners,u=Array.isArray(o)?o[0]:o,d=Array.isArray(o)?o[1]:null,h=this._modelIntegrationMode;u&&d?h=this._modelIntegrationMode="MODEL_AND_USER":u&&!d&&(h=this._modelIntegrationMode="MODEL");var c=function(i){return function(n){d&&(e._applyWithUserHandler=!0),void 0!==n&&n!==!0||u.apply(t.context,i)}},v=(n.modifiers||{}).validity,f=this;return l[r]=function(){var e=a(arguments,0);if("MODEL_AND_USER"===h){var i=e[0];if("DOM"===i[S])return delete i[S],void(d&&d.apply(t.context,e));if("COMPONENT"===i[S]){var n=i.value;return e[0]=n,void(d&&d.apply(t.context,e))}if(v){var s=f._applyer=c(e);e.push(s),d&&d.apply(t.context,e)}else d&&d.apply(t.context,e),u.apply(t.context,e)}else"MODEL"===h&&(v?f._applyer=c(e):u.apply(t.context,e))},i.dir=n,i}function s(t){"NONE"!==this._modelIntegrationMode&&this._applyer&&this._applyer(t)}var r=t.util,a=r.toArray;return{_fireEvent:e,_interceptEvents:i,_wrapEvent:n,pass:s}},et=function(t){function e(t){return this._elementable.getValue()}function i(){return this._elementable.checkModified()}function n(t){this.touched||(this.touched=!0,a(this.$el,this.classes.touched,s),a(this.$el,this.classes.untouched,r),this._fireEvent("touched"))}function o(){!this.dirty&&this.checkModified()&&(this.dirty=!0,a(this.$el,this.classes.dirty,s),a(this.$el,this.classes.pristine,r),this._fireEvent("dirty"))}function l(){var t=this.modified=this.checkModified();this._modified!==t&&(this._modified=t,a(this.$el,this.classes.modified,t?s:r),this._fireEvent("modified",t))}function u(t){this.willUpdateDirty(),this.willUpdateModified()}function d(t){this.willUpdateDirty(),this.willUpdateModified()}function h(){var t=this;this._unwatchValidationRawResults();for(var e=this._keysCached(this._uid.toString(),this.results),i=0;i<e.length;i++)t.results[e[i]]=void 0,t.progresses[e[i]]="";a(this.$el,this.classes.valid,r),a(this.$el,this.classes.invalid,r),a(this.$el,this.classes.touched,r),a(this.$el,this.classes.untouched,s),a(this.$el,this.classes.dirty,r),a(this.$el,this.classes.pristine,s),a(this.$el,this.classes.modified,r),this.valid=!0,this.dirty=!1,this.touched=!1,this.modified=!1,this._modified=!1,this._watchValidationRawResults()}function c(){var t=this;this._unwatch=this.$watch("results",function(e){for(var i=!0,n=t._keysCached(t._uid.toString(),t.results),o=0;o<n.length;o++){var l=t.results[n[o]];if("boolean"==typeof l&&!l){i=!1;break}if("string"==typeof l&&l){i=!1;break}}t.valid=i,i?(a(t.$el,t.classes.valid,s),a(t.$el,t.classes.invalid,r)):(a(t.$el,t.classes.valid,r),a(t.$el,t.classes.invalid,s)),t._fireEvent(i?"valid":"invalid")},{deep:!0})}function v(){this._unwatch(),this._unwatch=void 0,delete this._unwatch}return{getValue:e,checkModified:i,willUpdateTouched:n,willUpdateDirty:o,willUpdateModified:l,handleInputable:u,watchInputable:d,reset:h,_watchValidationRawResults:c,_unwatchValidationRawResults:v}},it=function(t){function e(t){var e=this.child&&this.child.context?this.child.context.$options:this.$options;return u(e,"validators",t)}function i(t,e,i){var n=this._resolveValidator(t);if(!n)return null;var s=null,r=null,a=null;if(l(n))n.check&&"function"==typeof n.check&&(s=n.check),n.message&&(a=n.message);else{if("function"!=typeof n)return null;s=n}if(!s)return null;l(this.validators)&&(l(this.validators[t])?(this.validators[t].rule&&(r=this.validators[t].rule),this.validators[t].message&&(a=this.validators[t].message)):r=this.validators[t]);var o={fn:s,value:i,field:e};return r&&(o.rule=r),a&&(o.msg=a),o}function n(t,e,i){return i?i:e?"function"==typeof e?e(t):e:void 0}function s(t,e){var i=this,n=t.fn,s=t.value,r=t.field,a=t.rule,o=t.msg,l=n.call(this.child.context,s,a);"function"==typeof l?l(function(){e(!0)},function(t){e(!1,i._resolveMessage(r,o,t))}):R(l)?l.then(function(){e(!0)},function(t){e(!1,i._resolveMessage(r,o,t))}).catch(function(t){e(!1,i._resolveMessage(r,o,t.message))}):e(l,l===!1?this._resolveMessage(r,o):void 0)}function r(t,e,i){var n=this,s=this._getValidateDescriptor(t,this.field,e);if(s){if(this.progresses[t])return!1;this.progresses[t]="running",this.$nextTick(function(){n._invokeValidator(s,function(e,s){if(n.progresses[t]="",n.results[t]=s||e,i)n.$nextTick(function(){i.call(n,null,e,s)});else{var r={result:e};s&&(r.msg=s),n._fireEvent("validate",t,r)}})})}else{var r=new Error;i?i.call(this,r):this._fireEvent("validate",t,r)}return!0}function a(){for(var t=this,e=[],i=arguments.length;i--;)e[i]=arguments[i];var n,s,r,a=!0;return 3===e.length?(n=[e[0]],s=e[1],r=e[2]):2===e.length?l(e[0])?(n=[e[0].validator],s=e[0].value||this.getValue(),r=e[1]):(n=this._keysCached(this._uid.toString(),this.results),s=e[0],r=e[1]):1===e.length?(n=this._keysCached(this._uid.toString(),this.results),s=this.getValue(),r=e[0]):(n=this._keysCached(this._uid.toString(),this.results),s=this.getValue(),r=null),3===e.length||2===e.length&&l(e[0])?a=this._validate(n[0],s,r):n.forEach(function(e){a=t._validate(e,s,r)}),a}var o=t.util,l=o.isPlainObject,u=o.resolveAsset;return{_resolveValidator:e,_getValidateDescriptor:i,_resolveMessage:n,_invokeValidator:s,_validate:r,validate:a}},nt=function(t){var e=t.util,i=e.extend,n={};return i(n,tt(t)),i(n,et(t)),i(n,it(t)),n},st=function(t){var e=t.util,i=e.extend,n=J(t),s=n.props,r=n.data,a=z(t),o=Z(t),l=F(t),u=l.render,d=nt(t),h={props:s,data:r,render:u,computed:a,methods:d};return i(h,o),h},rt=function(t){var e=t.util,i=e.extend;return{functional:!0,props:P,render:function(e,n){var s=n.props,r=n.data,a=n.children;return a.map(function(n){if(!n.tag)return n;var a=i({},r);return a.props=i({},s),a.props.classes=i(i(i({},H),t.config.validator.classes),a.props.classes),a.props.child=n,e("validity-control",a)})}}},at=function(t){var e=t.util,i=e.extend,n=i({tag:{type:String,default:"fieldset"}},P);return{functional:!0,props:n,render:function(e,n){var s=n.props,r=n.data,a=n.children,o=e(s.tag,a),l=i({},r);return l.props=i({},s),l.props.classes=i(i(i({},H),t.config.validator.classes),l.props.classes),l.props.child=o,l.props.multiple=!0,e("validity-control",l)}}},ot=function(t){var e=t.util,i=e.extend;return{functional:!0,props:{name:{type:String},tag:{type:String,default:"form"}},render:function(t,e){var n=e.props,s=e.data,r=e.parent,a=e.children;e.slots;if(!r._validation)return a;var o=n.tag||"form";x(r._validation,n.name,a);var l=i({attrs:{}},s);return"form"===o&&(l.attrs.novalidate=!0),t(o,l,a)}}},lt=function(t){return{"validity-control":st(t),validity:rt(t),"validity-group":at(t),validation:ot(t)}},ut=!1;L.mapValidation=l,L.version="3.0.0-alpha.1","undefined"!=typeof window&&window.Vue&&window.Vue.use(L);var dt={install:L,mapValidation:l};return dt});
\ No newline at end of file diff --git a/nz-admin/src/main/resources/statics/libs/vue.js b/nz-admin/src/main/resources/statics/libs/vue.js deleted file mode 100644 index 4ef7ff1b..00000000 --- a/nz-admin/src/main/resources/statics/libs/vue.js +++ /dev/null @@ -1,11944 +0,0 @@ -/*! - * Vue.js v2.6.10 - * (c) 2014-2019 Evan You - * Released under the MIT License. - */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = global || self, global.Vue = factory()); -}(this, function () { 'use strict'; - - /* */ - - var emptyObject = Object.freeze({}); - - // These helpers produce better VM code in JS engines due to their - // explicitness and function inlining. - function isUndef (v) { - return v === undefined || v === null - } - - function isDef (v) { - return v !== undefined && v !== null - } - - function isTrue (v) { - return v === true - } - - function isFalse (v) { - return v === false - } - - /** - * Check if value is primitive. - */ - function isPrimitive (value) { - return ( - typeof value === 'string' || - typeof value === 'number' || - // $flow-disable-line - typeof value === 'symbol' || - typeof value === 'boolean' - ) - } - - /** - * Quick object check - this is primarily used to tell - * Objects from primitive values when we know the value - * is a JSON-compliant type. - */ - function isObject (obj) { - return obj !== null && typeof obj === 'object' - } - - /** - * Get the raw type string of a value, e.g., [object Object]. - */ - var _toString = Object.prototype.toString; - - function toRawType (value) { - return _toString.call(value).slice(8, -1) - } - - /** - * Strict object type check. Only returns true - * for plain JavaScript objects. - */ - function isPlainObject (obj) { - return _toString.call(obj) === '[object Object]' - } - - function isRegExp (v) { - return _toString.call(v) === '[object RegExp]' - } - - /** - * Check if val is a valid array index. - */ - function isValidArrayIndex (val) { - var n = parseFloat(String(val)); - return n >= 0 && Math.floor(n) === n && isFinite(val) - } - - function isPromise (val) { - return ( - isDef(val) && - typeof val.then === 'function' && - typeof val.catch === 'function' - ) - } - - /** - * Convert a value to a string that is actually rendered. - */ - function toString (val) { - return val == null - ? '' - : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString) - ? JSON.stringify(val, null, 2) - : String(val) - } - - /** - * Convert an input value to a number for persistence. - * If the conversion fails, return original string. - */ - function toNumber (val) { - var n = parseFloat(val); - return isNaN(n) ? val : n - } - - /** - * Make a map and return a function for checking if a key - * is in that map. - */ - function makeMap ( - str, - expectsLowerCase - ) { - var map = Object.create(null); - var list = str.split(','); - for (var i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase - ? function (val) { return map[val.toLowerCase()]; } - : function (val) { return map[val]; } - } - - /** - * Check if a tag is a built-in tag. - */ - var isBuiltInTag = makeMap('slot,component', true); - - /** - * Check if an attribute is a reserved attribute. - */ - var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is'); - - /** - * Remove an item from an array. - */ - function remove (arr, item) { - if (arr.length) { - var index = arr.indexOf(item); - if (index > -1) { - return arr.splice(index, 1) - } - } - } - - /** - * Check whether an object has the property. - */ - var hasOwnProperty = Object.prototype.hasOwnProperty; - function hasOwn (obj, key) { - return hasOwnProperty.call(obj, key) - } - - /** - * Create a cached version of a pure function. - */ - function cached (fn) { - var cache = Object.create(null); - return (function cachedFn (str) { - var hit = cache[str]; - return hit || (cache[str] = fn(str)) - }) - } - - /** - * Camelize a hyphen-delimited string. - */ - var camelizeRE = /-(\w)/g; - var camelize = cached(function (str) { - return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; }) - }); - - /** - * Capitalize a string. - */ - var capitalize = cached(function (str) { - return str.charAt(0).toUpperCase() + str.slice(1) - }); - - /** - * Hyphenate a camelCase string. - */ - var hyphenateRE = /\B([A-Z])/g; - var hyphenate = cached(function (str) { - return str.replace(hyphenateRE, '-$1').toLowerCase() - }); - - /** - * Simple bind polyfill for environments that do not support it, - * e.g., PhantomJS 1.x. Technically, we don't need this anymore - * since native bind is now performant enough in most browsers. - * But removing it would mean breaking code that was able to run in - * PhantomJS 1.x, so this must be kept for backward compatibility. - */ - - /* istanbul ignore next */ - function polyfillBind (fn, ctx) { - function boundFn (a) { - var l = arguments.length; - return l - ? l > 1 - ? fn.apply(ctx, arguments) - : fn.call(ctx, a) - : fn.call(ctx) - } - - boundFn._length = fn.length; - return boundFn - } - - function nativeBind (fn, ctx) { - return fn.bind(ctx) - } - - var bind = Function.prototype.bind - ? nativeBind - : polyfillBind; - - /** - * Convert an Array-like object to a real Array. - */ - function toArray (list, start) { - start = start || 0; - var i = list.length - start; - var ret = new Array(i); - while (i--) { - ret[i] = list[i + start]; - } - return ret - } - - /** - * Mix properties into target object. - */ - function extend (to, _from) { - for (var key in _from) { - to[key] = _from[key]; - } - return to - } - - /** - * Merge an Array of Objects into a single Object. - */ - function toObject (arr) { - var res = {}; - for (var i = 0; i < arr.length; i++) { - if (arr[i]) { - extend(res, arr[i]); - } - } - return res - } - - /* eslint-disable no-unused-vars */ - - /** - * Perform no operation. - * Stubbing args to make Flow happy without leaving useless transpiled code - * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/). - */ - function noop (a, b, c) {} - - /** - * Always return false. - */ - var no = function (a, b, c) { return false; }; - - /* eslint-enable no-unused-vars */ - - /** - * Return the same value. - */ - var identity = function (_) { return _; }; - - /** - * Generate a string containing static keys from compiler modules. - */ - function genStaticKeys (modules) { - return modules.reduce(function (keys, m) { - return keys.concat(m.staticKeys || []) - }, []).join(',') - } - - /** - * Check if two values are loosely equal - that is, - * if they are plain objects, do they have the same shape? - */ - function looseEqual (a, b) { - if (a === b) { return true } - var isObjectA = isObject(a); - var isObjectB = isObject(b); - if (isObjectA && isObjectB) { - try { - var isArrayA = Array.isArray(a); - var isArrayB = Array.isArray(b); - if (isArrayA && isArrayB) { - return a.length === b.length && a.every(function (e, i) { - return looseEqual(e, b[i]) - }) - } else if (a instanceof Date && b instanceof Date) { - return a.getTime() === b.getTime() - } else if (!isArrayA && !isArrayB) { - var keysA = Object.keys(a); - var keysB = Object.keys(b); - return keysA.length === keysB.length && keysA.every(function (key) { - return looseEqual(a[key], b[key]) - }) - } else { - /* istanbul ignore next */ - return false - } - } catch (e) { - /* istanbul ignore next */ - return false - } - } else if (!isObjectA && !isObjectB) { - return String(a) === String(b) - } else { - return false - } - } - - /** - * Return the first index at which a loosely equal value can be - * found in the array (if value is a plain object, the array must - * contain an object of the same shape), or -1 if it is not present. - */ - function looseIndexOf (arr, val) { - for (var i = 0; i < arr.length; i++) { - if (looseEqual(arr[i], val)) { return i } - } - return -1 - } - - /** - * Ensure a function is called only once. - */ - function once (fn) { - var called = false; - return function () { - if (!called) { - called = true; - fn.apply(this, arguments); - } - } - } - - var SSR_ATTR = 'data-server-rendered'; - - var ASSET_TYPES = [ - 'component', - 'directive', - 'filter' - ]; - - var LIFECYCLE_HOOKS = [ - 'beforeCreate', - 'created', - 'beforeMount', - 'mounted', - 'beforeUpdate', - 'updated', - 'beforeDestroy', - 'destroyed', - 'activated', - 'deactivated', - 'errorCaptured', - 'serverPrefetch' - ]; - - /* */ - - - - var config = ({ - /** - * Option merge strategies (used in core/util/options) - */ - // $flow-disable-line - optionMergeStrategies: Object.create(null), - - /** - * Whether to suppress warnings. - */ - silent: false, - - /** - * Show production mode tip message on boot? - */ - productionTip: "development" !== 'production', - - /** - * Whether to enable devtools - */ - devtools: "development" !== 'production', - - /** - * Whether to record perf - */ - performance: false, - - /** - * Error handler for watcher errors - */ - errorHandler: null, - - /** - * Warn handler for watcher warns - */ - warnHandler: null, - - /** - * Ignore certain custom elements - */ - ignoredElements: [], - - /** - * Custom user key aliases for v-on - */ - // $flow-disable-line - keyCodes: Object.create(null), - - /** - * Check if a tag is reserved so that it cannot be registered as a - * component. This is platform-dependent and may be overwritten. - */ - isReservedTag: no, - - /** - * Check if an attribute is reserved so that it cannot be used as a component - * prop. This is platform-dependent and may be overwritten. - */ - isReservedAttr: no, - - /** - * Check if a tag is an unknown element. - * Platform-dependent. - */ - isUnknownElement: no, - - /** - * Get the namespace of an element - */ - getTagNamespace: noop, - - /** - * Parse the real tag name for the specific platform. - */ - parsePlatformTagName: identity, - - /** - * Check if an attribute must be bound using property, e.g. value - * Platform-dependent. - */ - mustUseProp: no, - - /** - * Perform updates asynchronously. Intended to be used by Vue Test Utils - * This will significantly reduce performance if set to false. - */ - async: true, - - /** - * Exposed for legacy reasons - */ - _lifecycleHooks: LIFECYCLE_HOOKS - }); - - /* */ - - /** - * unicode letters used for parsing html tags, component names and property paths. - * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname - * skipping \u10000-\uEFFFF due to it freezing up PhantomJS - */ - var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/; - - /** - * Check if a string starts with $ or _ - */ - function isReserved (str) { - var c = (str + '').charCodeAt(0); - return c === 0x24 || c === 0x5F - } - - /** - * Define a property. - */ - function def (obj, key, val, enumerable) { - Object.defineProperty(obj, key, { - value: val, - enumerable: !!enumerable, - writable: true, - configurable: true - }); - } - - /** - * Parse simple path. - */ - var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]")); - function parsePath (path) { - if (bailRE.test(path)) { - return - } - var segments = path.split('.'); - return function (obj) { - for (var i = 0; i < segments.length; i++) { - if (!obj) { return } - obj = obj[segments[i]]; - } - return obj - } - } - - /* */ - - // can we use __proto__? - var hasProto = '__proto__' in {}; - - // Browser environment sniffing - var inBrowser = typeof window !== 'undefined'; - var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform; - var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase(); - var UA = inBrowser && window.navigator.userAgent.toLowerCase(); - var isIE = UA && /msie|trident/.test(UA); - var isIE9 = UA && UA.indexOf('msie 9.0') > 0; - var isEdge = UA && UA.indexOf('edge/') > 0; - var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android'); - var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios'); - var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge; - var isPhantomJS = UA && /phantomjs/.test(UA); - var isFF = UA && UA.match(/firefox\/(\d+)/); - - // Firefox has a "watch" function on Object.prototype... - var nativeWatch = ({}).watch; - - var supportsPassive = false; - if (inBrowser) { - try { - var opts = {}; - Object.defineProperty(opts, 'passive', ({ - get: function get () { - /* istanbul ignore next */ - supportsPassive = true; - } - })); // https://github.com/facebook/flow/issues/285 - window.addEventListener('test-passive', null, opts); - } catch (e) {} - } - - // this needs to be lazy-evaled because vue may be required before - // vue-server-renderer can set VUE_ENV - var _isServer; - var isServerRendering = function () { - if (_isServer === undefined) { - /* istanbul ignore if */ - if (!inBrowser && !inWeex && typeof global !== 'undefined') { - // detect presence of vue-server-renderer and avoid - // Webpack shimming the process - _isServer = global['process'] && global['process'].env.VUE_ENV === 'server'; - } else { - _isServer = false; - } - } - return _isServer - }; - - // detect devtools - var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__; - - /* istanbul ignore next */ - function isNative (Ctor) { - return typeof Ctor === 'function' && /native code/.test(Ctor.toString()) - } - - var hasSymbol = - typeof Symbol !== 'undefined' && isNative(Symbol) && - typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys); - - var _Set; - /* istanbul ignore if */ // $flow-disable-line - if (typeof Set !== 'undefined' && isNative(Set)) { - // use native Set when available. - _Set = Set; - } else { - // a non-standard Set polyfill that only works with primitive keys. - _Set = /*@__PURE__*/(function () { - function Set () { - this.set = Object.create(null); - } - Set.prototype.has = function has (key) { - return this.set[key] === true - }; - Set.prototype.add = function add (key) { - this.set[key] = true; - }; - Set.prototype.clear = function clear () { - this.set = Object.create(null); - }; - - return Set; - }()); - } - - /* */ - - var warn = noop; - var tip = noop; - var generateComponentTrace = (noop); // work around flow check - var formatComponentName = (noop); - - { - var hasConsole = typeof console !== 'undefined'; - var classifyRE = /(?:^|[-_])(\w)/g; - var classify = function (str) { return str - .replace(classifyRE, function (c) { return c.toUpperCase(); }) - .replace(/[-_]/g, ''); }; - - warn = function (msg, vm) { - var trace = vm ? generateComponentTrace(vm) : ''; - - if (config.warnHandler) { - config.warnHandler.call(null, msg, vm, trace); - } else if (hasConsole && (!config.silent)) { - console.error(("[Vue warn]: " + msg + trace)); - } - }; - - tip = function (msg, vm) { - if (hasConsole && (!config.silent)) { - console.warn("[Vue tip]: " + msg + ( - vm ? generateComponentTrace(vm) : '' - )); - } - }; - - formatComponentName = function (vm, includeFile) { - if (vm.$root === vm) { - return '<Root>' - } - var options = typeof vm === 'function' && vm.cid != null - ? vm.options - : vm._isVue - ? vm.$options || vm.constructor.options - : vm; - var name = options.name || options._componentTag; - var file = options.__file; - if (!name && file) { - var match = file.match(/([^/\\]+)\.vue$/); - name = match && match[1]; - } - - return ( - (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") + - (file && includeFile !== false ? (" at " + file) : '') - ) - }; - - var repeat = function (str, n) { - var res = ''; - while (n) { - if (n % 2 === 1) { res += str; } - if (n > 1) { str += str; } - n >>= 1; - } - return res - }; - - generateComponentTrace = function (vm) { - if (vm._isVue && vm.$parent) { - var tree = []; - var currentRecursiveSequence = 0; - while (vm) { - if (tree.length > 0) { - var last = tree[tree.length - 1]; - if (last.constructor === vm.constructor) { - currentRecursiveSequence++; - vm = vm.$parent; - continue - } else if (currentRecursiveSequence > 0) { - tree[tree.length - 1] = [last, currentRecursiveSequence]; - currentRecursiveSequence = 0; - } - } - tree.push(vm); - vm = vm.$parent; - } - return '\n\nfound in\n\n' + tree - .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm) - ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)") - : formatComponentName(vm))); }) - .join('\n') - } else { - return ("\n\n(found in " + (formatComponentName(vm)) + ")") - } - }; - } - - /* */ - - var uid = 0; - - /** - * A dep is an observable that can have multiple - * directives subscribing to it. - */ - var Dep = function Dep () { - this.id = uid++; - this.subs = []; - }; - - Dep.prototype.addSub = function addSub (sub) { - this.subs.push(sub); - }; - - Dep.prototype.removeSub = function removeSub (sub) { - remove(this.subs, sub); - }; - - Dep.prototype.depend = function depend () { - if (Dep.target) { - Dep.target.addDep(this); - } - }; - - Dep.prototype.notify = function notify () { - // stabilize the subscriber list first - var subs = this.subs.slice(); - if (!config.async) { - // subs aren't sorted in scheduler if not running async - // we need to sort them now to make sure they fire in correct - // order - subs.sort(function (a, b) { return a.id - b.id; }); - } - for (var i = 0, l = subs.length; i < l; i++) { - subs[i].update(); - } - }; - - // The current target watcher being evaluated. - // This is globally unique because only one watcher - // can be evaluated at a time. - Dep.target = null; - var targetStack = []; - - function pushTarget (target) { - targetStack.push(target); - Dep.target = target; - } - - function popTarget () { - targetStack.pop(); - Dep.target = targetStack[targetStack.length - 1]; - } - - /* */ - - var VNode = function VNode ( - tag, - data, - children, - text, - elm, - context, - componentOptions, - asyncFactory - ) { - this.tag = tag; - this.data = data; - this.children = children; - this.text = text; - this.elm = elm; - this.ns = undefined; - this.context = context; - this.fnContext = undefined; - this.fnOptions = undefined; - this.fnScopeId = undefined; - this.key = data && data.key; - this.componentOptions = componentOptions; - this.componentInstance = undefined; - this.parent = undefined; - this.raw = false; - this.isStatic = false; - this.isRootInsert = true; - this.isComment = false; - this.isCloned = false; - this.isOnce = false; - this.asyncFactory = asyncFactory; - this.asyncMeta = undefined; - this.isAsyncPlaceholder = false; - }; - - var prototypeAccessors = { child: { configurable: true } }; - - // DEPRECATED: alias for componentInstance for backwards compat. - /* istanbul ignore next */ - prototypeAccessors.child.get = function () { - return this.componentInstance - }; - - Object.defineProperties( VNode.prototype, prototypeAccessors ); - - var createEmptyVNode = function (text) { - if ( text === void 0 ) text = ''; - - var node = new VNode(); - node.text = text; - node.isComment = true; - return node - }; - - function createTextVNode (val) { - return new VNode(undefined, undefined, undefined, String(val)) - } - - // optimized shallow clone - // used for static nodes and slot nodes because they may be reused across - // multiple renders, cloning them avoids errors when DOM manipulations rely - // on their elm reference. - function cloneVNode (vnode) { - var cloned = new VNode( - vnode.tag, - vnode.data, - // #7975 - // clone children array to avoid mutating original in case of cloning - // a child. - vnode.children && vnode.children.slice(), - vnode.text, - vnode.elm, - vnode.context, - vnode.componentOptions, - vnode.asyncFactory - ); - cloned.ns = vnode.ns; - cloned.isStatic = vnode.isStatic; - cloned.key = vnode.key; - cloned.isComment = vnode.isComment; - cloned.fnContext = vnode.fnContext; - cloned.fnOptions = vnode.fnOptions; - cloned.fnScopeId = vnode.fnScopeId; - cloned.asyncMeta = vnode.asyncMeta; - cloned.isCloned = true; - return cloned - } - - /* - * not type checking this file because flow doesn't play well with - * dynamically accessing methods on Array prototype - */ - - var arrayProto = Array.prototype; - var arrayMethods = Object.create(arrayProto); - - var methodsToPatch = [ - 'push', - 'pop', - 'shift', - 'unshift', - 'splice', - 'sort', - 'reverse' - ]; - - /** - * Intercept mutating methods and emit events - */ - methodsToPatch.forEach(function (method) { - // cache original method - var original = arrayProto[method]; - def(arrayMethods, method, function mutator () { - var args = [], len = arguments.length; - while ( len-- ) args[ len ] = arguments[ len ]; - - var result = original.apply(this, args); - var ob = this.__ob__; - var inserted; - switch (method) { - case 'push': - case 'unshift': - inserted = args; - break - case 'splice': - inserted = args.slice(2); - break - } - if (inserted) { ob.observeArray(inserted); } - // notify change - ob.dep.notify(); - return result - }); - }); - - /* */ - - var arrayKeys = Object.getOwnPropertyNames(arrayMethods); - - /** - * In some cases we may want to disable observation inside a component's - * update computation. - */ - var shouldObserve = true; - - function toggleObserving (value) { - shouldObserve = value; - } - - /** - * Observer class that is attached to each observed - * object. Once attached, the observer converts the target - * object's property keys into getter/setters that - * collect dependencies and dispatch updates. - */ - var Observer = function Observer (value) { - this.value = value; - this.dep = new Dep(); - this.vmCount = 0; - def(value, '__ob__', this); - if (Array.isArray(value)) { - if (hasProto) { - protoAugment(value, arrayMethods); - } else { - copyAugment(value, arrayMethods, arrayKeys); - } - this.observeArray(value); - } else { - this.walk(value); - } - }; - - /** - * Walk through all properties and convert them into - * getter/setters. This method should only be called when - * value type is Object. - */ - Observer.prototype.walk = function walk (obj) { - var keys = Object.keys(obj); - for (var i = 0; i < keys.length; i++) { - defineReactive$$1(obj, keys[i]); - } - }; - - /** - * Observe a list of Array items. - */ - Observer.prototype.observeArray = function observeArray (items) { - for (var i = 0, l = items.length; i < l; i++) { - observe(items[i]); - } - }; - - // helpers - - /** - * Augment a target Object or Array by intercepting - * the prototype chain using __proto__ - */ - function protoAugment (target, src) { - /* eslint-disable no-proto */ - target.__proto__ = src; - /* eslint-enable no-proto */ - } - - /** - * Augment a target Object or Array by defining - * hidden properties. - */ - /* istanbul ignore next */ - function copyAugment (target, src, keys) { - for (var i = 0, l = keys.length; i < l; i++) { - var key = keys[i]; - def(target, key, src[key]); - } - } - - /** - * Attempt to create an observer instance for a value, - * returns the new observer if successfully observed, - * or the existing observer if the value already has one. - */ - function observe (value, asRootData) { - if (!isObject(value) || value instanceof VNode) { - return - } - var ob; - if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) { - ob = value.__ob__; - } else if ( - shouldObserve && - !isServerRendering() && - (Array.isArray(value) || isPlainObject(value)) && - Object.isExtensible(value) && - !value._isVue - ) { - ob = new Observer(value); - } - if (asRootData && ob) { - ob.vmCount++; - } - return ob - } - - /** - * Define a reactive property on an Object. - */ - function defineReactive$$1 ( - obj, - key, - val, - customSetter, - shallow - ) { - var dep = new Dep(); - - var property = Object.getOwnPropertyDescriptor(obj, key); - if (property && property.configurable === false) { - return - } - - // cater for pre-defined getter/setters - var getter = property && property.get; - var setter = property && property.set; - if ((!getter || setter) && arguments.length === 2) { - val = obj[key]; - } - - var childOb = !shallow && observe(val); - Object.defineProperty(obj, key, { - enumerable: true, - configurable: true, - get: function reactiveGetter () { - var value = getter ? getter.call(obj) : val; - if (Dep.target) { - dep.depend(); - if (childOb) { - childOb.dep.depend(); - if (Array.isArray(value)) { - dependArray(value); - } - } - } - return value - }, - set: function reactiveSetter (newVal) { - var value = getter ? getter.call(obj) : val; - /* eslint-disable no-self-compare */ - if (newVal === value || (newVal !== newVal && value !== value)) { - return - } - /* eslint-enable no-self-compare */ - if (customSetter) { - customSetter(); - } - // #7981: for accessor properties without setter - if (getter && !setter) { return } - if (setter) { - setter.call(obj, newVal); - } else { - val = newVal; - } - childOb = !shallow && observe(newVal); - dep.notify(); - } - }); - } - - /** - * Set a property on an object. Adds the new property and - * triggers change notification if the property doesn't - * already exist. - */ - function set (target, key, val) { - if (isUndef(target) || isPrimitive(target) - ) { - warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target)))); - } - if (Array.isArray(target) && isValidArrayIndex(key)) { - target.length = Math.max(target.length, key); - target.splice(key, 1, val); - return val - } - if (key in target && !(key in Object.prototype)) { - target[key] = val; - return val - } - var ob = (target).__ob__; - if (target._isVue || (ob && ob.vmCount)) { - warn( - 'Avoid adding reactive properties to a Vue instance or its root $data ' + - 'at runtime - declare it upfront in the data option.' - ); - return val - } - if (!ob) { - target[key] = val; - return val - } - defineReactive$$1(ob.value, key, val); - ob.dep.notify(); - return val - } - - /** - * Delete a property and trigger change if necessary. - */ - function del (target, key) { - if (isUndef(target) || isPrimitive(target) - ) { - warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target)))); - } - if (Array.isArray(target) && isValidArrayIndex(key)) { - target.splice(key, 1); - return - } - var ob = (target).__ob__; - if (target._isVue || (ob && ob.vmCount)) { - warn( - 'Avoid deleting properties on a Vue instance or its root $data ' + - '- just set it to null.' - ); - return - } - if (!hasOwn(target, key)) { - return - } - delete target[key]; - if (!ob) { - return - } - ob.dep.notify(); - } - - /** - * Collect dependencies on array elements when the array is touched, since - * we cannot intercept array element access like property getters. - */ - function dependArray (value) { - for (var e = (void 0), i = 0, l = value.length; i < l; i++) { - e = value[i]; - e && e.__ob__ && e.__ob__.dep.depend(); - if (Array.isArray(e)) { - dependArray(e); - } - } - } - - /* */ - - /** - * Option overwriting strategies are functions that handle - * how to merge a parent option value and a child option - * value into the final value. - */ - var strats = config.optionMergeStrategies; - - /** - * Options with restrictions - */ - { - strats.el = strats.propsData = function (parent, child, vm, key) { - if (!vm) { - warn( - "option \"" + key + "\" can only be used during instance " + - 'creation with the `new` keyword.' - ); - } - return defaultStrat(parent, child) - }; - } - - /** - * Helper that recursively merges two data objects together. - */ - function mergeData (to, from) { - if (!from) { return to } - var key, toVal, fromVal; - - var keys = hasSymbol - ? Reflect.ownKeys(from) - : Object.keys(from); - - for (var i = 0; i < keys.length; i++) { - key = keys[i]; - // in case the object is already observed... - if (key === '__ob__') { continue } - toVal = to[key]; - fromVal = from[key]; - if (!hasOwn(to, key)) { - set(to, key, fromVal); - } else if ( - toVal !== fromVal && - isPlainObject(toVal) && - isPlainObject(fromVal) - ) { - mergeData(toVal, fromVal); - } - } - return to - } - - /** - * Data - */ - function mergeDataOrFn ( - parentVal, - childVal, - vm - ) { - if (!vm) { - // in a Vue.extend merge, both should be functions - if (!childVal) { - return parentVal - } - if (!parentVal) { - return childVal - } - // when parentVal & childVal are both present, - // we need to return a function that returns the - // merged result of both functions... no need to - // check if parentVal is a function here because - // it has to be a function to pass previous merges. - return function mergedDataFn () { - return mergeData( - typeof childVal === 'function' ? childVal.call(this, this) : childVal, - typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal - ) - } - } else { - return function mergedInstanceDataFn () { - // instance merge - var instanceData = typeof childVal === 'function' - ? childVal.call(vm, vm) - : childVal; - var defaultData = typeof parentVal === 'function' - ? parentVal.call(vm, vm) - : parentVal; - if (instanceData) { - return mergeData(instanceData, defaultData) - } else { - return defaultData - } - } - } - } - - strats.data = function ( - parentVal, - childVal, - vm - ) { - if (!vm) { - if (childVal && typeof childVal !== 'function') { - warn( - 'The "data" option should be a function ' + - 'that returns a per-instance value in component ' + - 'definitions.', - vm - ); - - return parentVal - } - return mergeDataOrFn(parentVal, childVal) - } - - return mergeDataOrFn(parentVal, childVal, vm) - }; - - /** - * Hooks and props are merged as arrays. - */ - function mergeHook ( - parentVal, - childVal - ) { - var res = childVal - ? parentVal - ? parentVal.concat(childVal) - : Array.isArray(childVal) - ? childVal - : [childVal] - : parentVal; - return res - ? dedupeHooks(res) - : res - } - - function dedupeHooks (hooks) { - var res = []; - for (var i = 0; i < hooks.length; i++) { - if (res.indexOf(hooks[i]) === -1) { - res.push(hooks[i]); - } - } - return res - } - - LIFECYCLE_HOOKS.forEach(function (hook) { - strats[hook] = mergeHook; - }); - - /** - * Assets - * - * When a vm is present (instance creation), we need to do - * a three-way merge between constructor options, instance - * options and parent options. - */ - function mergeAssets ( - parentVal, - childVal, - vm, - key - ) { - var res = Object.create(parentVal || null); - if (childVal) { - assertObjectType(key, childVal, vm); - return extend(res, childVal) - } else { - return res - } - } - - ASSET_TYPES.forEach(function (type) { - strats[type + 's'] = mergeAssets; - }); - - /** - * Watchers. - * - * Watchers hashes should not overwrite one - * another, so we merge them as arrays. - */ - strats.watch = function ( - parentVal, - childVal, - vm, - key - ) { - // work around Firefox's Object.prototype.watch... - if (parentVal === nativeWatch) { parentVal = undefined; } - if (childVal === nativeWatch) { childVal = undefined; } - /* istanbul ignore if */ - if (!childVal) { return Object.create(parentVal || null) } - { - assertObjectType(key, childVal, vm); - } - if (!parentVal) { return childVal } - var ret = {}; - extend(ret, parentVal); - for (var key$1 in childVal) { - var parent = ret[key$1]; - var child = childVal[key$1]; - if (parent && !Array.isArray(parent)) { - parent = [parent]; - } - ret[key$1] = parent - ? parent.concat(child) - : Array.isArray(child) ? child : [child]; - } - return ret - }; - - /** - * Other object hashes. - */ - strats.props = - strats.methods = - strats.inject = - strats.computed = function ( - parentVal, - childVal, - vm, - key - ) { - if (childVal && "development" !== 'production') { - assertObjectType(key, childVal, vm); - } - if (!parentVal) { return childVal } - var ret = Object.create(null); - extend(ret, parentVal); - if (childVal) { extend(ret, childVal); } - return ret - }; - strats.provide = mergeDataOrFn; - - /** - * Default strategy. - */ - var defaultStrat = function (parentVal, childVal) { - return childVal === undefined - ? parentVal - : childVal - }; - - /** - * Validate component names - */ - function checkComponents (options) { - for (var key in options.components) { - validateComponentName(key); - } - } - - function validateComponentName (name) { - if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) { - warn( - 'Invalid component name: "' + name + '". Component names ' + - 'should conform to valid custom element name in html5 specification.' - ); - } - if (isBuiltInTag(name) || config.isReservedTag(name)) { - warn( - 'Do not use built-in or reserved HTML elements as component ' + - 'id: ' + name - ); - } - } - - /** - * Ensure all props option syntax are normalized into the - * Object-based format. - */ - function normalizeProps (options, vm) { - var props = options.props; - if (!props) { return } - var res = {}; - var i, val, name; - if (Array.isArray(props)) { - i = props.length; - while (i--) { - val = props[i]; - if (typeof val === 'string') { - name = camelize(val); - res[name] = { type: null }; - } else { - warn('props must be strings when using array syntax.'); - } - } - } else if (isPlainObject(props)) { - for (var key in props) { - val = props[key]; - name = camelize(key); - res[name] = isPlainObject(val) - ? val - : { type: val }; - } - } else { - warn( - "Invalid value for option \"props\": expected an Array or an Object, " + - "but got " + (toRawType(props)) + ".", - vm - ); - } - options.props = res; - } - - /** - * Normalize all injections into Object-based format - */ - function normalizeInject (options, vm) { - var inject = options.inject; - if (!inject) { return } - var normalized = options.inject = {}; - if (Array.isArray(inject)) { - for (var i = 0; i < inject.length; i++) { - normalized[inject[i]] = { from: inject[i] }; - } - } else if (isPlainObject(inject)) { - for (var key in inject) { - var val = inject[key]; - normalized[key] = isPlainObject(val) - ? extend({ from: key }, val) - : { from: val }; - } - } else { - warn( - "Invalid value for option \"inject\": expected an Array or an Object, " + - "but got " + (toRawType(inject)) + ".", - vm - ); - } - } - - /** - * Normalize raw function directives into object format. - */ - function normalizeDirectives (options) { - var dirs = options.directives; - if (dirs) { - for (var key in dirs) { - var def$$1 = dirs[key]; - if (typeof def$$1 === 'function') { - dirs[key] = { bind: def$$1, update: def$$1 }; - } - } - } - } - - function assertObjectType (name, value, vm) { - if (!isPlainObject(value)) { - warn( - "Invalid value for option \"" + name + "\": expected an Object, " + - "but got " + (toRawType(value)) + ".", - vm - ); - } - } - - /** - * Merge two option objects into a new one. - * Core utility used in both instantiation and inheritance. - */ - function mergeOptions ( - parent, - child, - vm - ) { - { - checkComponents(child); - } - - if (typeof child === 'function') { - child = child.options; - } - - normalizeProps(child, vm); - normalizeInject(child, vm); - normalizeDirectives(child); - - // Apply extends and mixins on the child options, - // but only if it is a raw options object that isn't - // the result of another mergeOptions call. - // Only merged options has the _base property. - if (!child._base) { - if (child.extends) { - parent = mergeOptions(parent, child.extends, vm); - } - if (child.mixins) { - for (var i = 0, l = child.mixins.length; i < l; i++) { - parent = mergeOptions(parent, child.mixins[i], vm); - } - } - } - - var options = {}; - var key; - for (key in parent) { - mergeField(key); - } - for (key in child) { - if (!hasOwn(parent, key)) { - mergeField(key); - } - } - function mergeField (key) { - var strat = strats[key] || defaultStrat; - options[key] = strat(parent[key], child[key], vm, key); - } - return options - } - - /** - * Resolve an asset. - * This function is used because child instances need access - * to assets defined in its ancestor chain. - */ - function resolveAsset ( - options, - type, - id, - warnMissing - ) { - /* istanbul ignore if */ - if (typeof id !== 'string') { - return - } - var assets = options[type]; - // check local registration variations first - if (hasOwn(assets, id)) { return assets[id] } - var camelizedId = camelize(id); - if (hasOwn(assets, camelizedId)) { return assets[camelizedId] } - var PascalCaseId = capitalize(camelizedId); - if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] } - // fallback to prototype chain - var res = assets[id] || assets[camelizedId] || assets[PascalCaseId]; - if (warnMissing && !res) { - warn( - 'Failed to resolve ' + type.slice(0, -1) + ': ' + id, - options - ); - } - return res - } - - /* */ - - - - function validateProp ( - key, - propOptions, - propsData, - vm - ) { - var prop = propOptions[key]; - var absent = !hasOwn(propsData, key); - var value = propsData[key]; - // boolean casting - var booleanIndex = getTypeIndex(Boolean, prop.type); - if (booleanIndex > -1) { - if (absent && !hasOwn(prop, 'default')) { - value = false; - } else if (value === '' || value === hyphenate(key)) { - // only cast empty string / same name to boolean if - // boolean has higher priority - var stringIndex = getTypeIndex(String, prop.type); - if (stringIndex < 0 || booleanIndex < stringIndex) { - value = true; - } - } - } - // check default value - if (value === undefined) { - value = getPropDefaultValue(vm, prop, key); - // since the default value is a fresh copy, - // make sure to observe it. - var prevShouldObserve = shouldObserve; - toggleObserving(true); - observe(value); - toggleObserving(prevShouldObserve); - } - { - assertProp(prop, key, value, vm, absent); - } - return value - } - - /** - * Get the default value of a prop. - */ - function getPropDefaultValue (vm, prop, key) { - // no default, return undefined - if (!hasOwn(prop, 'default')) { - return undefined - } - var def = prop.default; - // warn against non-factory defaults for Object & Array - if (isObject(def)) { - warn( - 'Invalid default value for prop "' + key + '": ' + - 'Props with type Object/Array must use a factory function ' + - 'to return the default value.', - vm - ); - } - // the raw prop value was also undefined from previous render, - // return previous default value to avoid unnecessary watcher trigger - if (vm && vm.$options.propsData && - vm.$options.propsData[key] === undefined && - vm._props[key] !== undefined - ) { - return vm._props[key] - } - // call factory function for non-Function types - // a value is Function if its prototype is function even across different execution context - return typeof def === 'function' && getType(prop.type) !== 'Function' - ? def.call(vm) - : def - } - - /** - * Assert whether a prop is valid. - */ - function assertProp ( - prop, - name, - value, - vm, - absent - ) { - if (prop.required && absent) { - warn( - 'Missing required prop: "' + name + '"', - vm - ); - return - } - if (value == null && !prop.required) { - return - } - var type = prop.type; - var valid = !type || type === true; - var expectedTypes = []; - if (type) { - if (!Array.isArray(type)) { - type = [type]; - } - for (var i = 0; i < type.length && !valid; i++) { - var assertedType = assertType(value, type[i]); - expectedTypes.push(assertedType.expectedType || ''); - valid = assertedType.valid; - } - } - - if (!valid) { - warn( - getInvalidTypeMessage(name, value, expectedTypes), - vm - ); - return - } - var validator = prop.validator; - if (validator) { - if (!validator(value)) { - warn( - 'Invalid prop: custom validator check failed for prop "' + name + '".', - vm - ); - } - } - } - - var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/; - - function assertType (value, type) { - var valid; - var expectedType = getType(type); - if (simpleCheckRE.test(expectedType)) { - var t = typeof value; - valid = t === expectedType.toLowerCase(); - // for primitive wrapper objects - if (!valid && t === 'object') { - valid = value instanceof type; - } - } else if (expectedType === 'Object') { - valid = isPlainObject(value); - } else if (expectedType === 'Array') { - valid = Array.isArray(value); - } else { - valid = value instanceof type; - } - return { - valid: valid, - expectedType: expectedType - } - } - - /** - * Use function string name to check built-in types, - * because a simple equality check will fail when running - * across different vms / iframes. - */ - function getType (fn) { - var match = fn && fn.toString().match(/^\s*function (\w+)/); - return match ? match[1] : '' - } - - function isSameType (a, b) { - return getType(a) === getType(b) - } - - function getTypeIndex (type, expectedTypes) { - if (!Array.isArray(expectedTypes)) { - return isSameType(expectedTypes, type) ? 0 : -1 - } - for (var i = 0, len = expectedTypes.length; i < len; i++) { - if (isSameType(expectedTypes[i], type)) { - return i - } - } - return -1 - } - - function getInvalidTypeMessage (name, value, expectedTypes) { - var message = "Invalid prop: type check failed for prop \"" + name + "\"." + - " Expected " + (expectedTypes.map(capitalize).join(', ')); - var expectedType = expectedTypes[0]; - var receivedType = toRawType(value); - var expectedValue = styleValue(value, expectedType); - var receivedValue = styleValue(value, receivedType); - // check if we need to specify expected value - if (expectedTypes.length === 1 && - isExplicable(expectedType) && - !isBoolean(expectedType, receivedType)) { - message += " with value " + expectedValue; - } - message += ", got " + receivedType + " "; - // check if we need to specify received value - if (isExplicable(receivedType)) { - message += "with value " + receivedValue + "."; - } - return message - } - - function styleValue (value, type) { - if (type === 'String') { - return ("\"" + value + "\"") - } else if (type === 'Number') { - return ("" + (Number(value))) - } else { - return ("" + value) - } - } - - function isExplicable (value) { - var explicitTypes = ['string', 'number', 'boolean']; - return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; }) - } - - function isBoolean () { - var args = [], len = arguments.length; - while ( len-- ) args[ len ] = arguments[ len ]; - - return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; }) - } - - /* */ - - function handleError (err, vm, info) { - // Deactivate deps tracking while processing error handler to avoid possible infinite rendering. - // See: https://github.com/vuejs/vuex/issues/1505 - pushTarget(); - try { - if (vm) { - var cur = vm; - while ((cur = cur.$parent)) { - var hooks = cur.$options.errorCaptured; - if (hooks) { - for (var i = 0; i < hooks.length; i++) { - try { - var capture = hooks[i].call(cur, err, vm, info) === false; - if (capture) { return } - } catch (e) { - globalHandleError(e, cur, 'errorCaptured hook'); - } - } - } - } - } - globalHandleError(err, vm, info); - } finally { - popTarget(); - } - } - - function invokeWithErrorHandling ( - handler, - context, - args, - vm, - info - ) { - var res; - try { - res = args ? handler.apply(context, args) : handler.call(context); - if (res && !res._isVue && isPromise(res) && !res._handled) { - res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); }); - // issue #9511 - // avoid catch triggering multiple times when nested calls - res._handled = true; - } - } catch (e) { - handleError(e, vm, info); - } - return res - } - - function globalHandleError (err, vm, info) { - if (config.errorHandler) { - try { - return config.errorHandler.call(null, err, vm, info) - } catch (e) { - // if the user intentionally throws the original error in the handler, - // do not log it twice - if (e !== err) { - logError(e, null, 'config.errorHandler'); - } - } - } - logError(err, vm, info); - } - - function logError (err, vm, info) { - { - warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm); - } - /* istanbul ignore else */ - if ((inBrowser || inWeex) && typeof console !== 'undefined') { - console.error(err); - } else { - throw err - } - } - - /* */ - - var isUsingMicroTask = false; - - var callbacks = []; - var pending = false; - - function flushCallbacks () { - pending = false; - var copies = callbacks.slice(0); - callbacks.length = 0; - for (var i = 0; i < copies.length; i++) { - copies[i](); - } - } - - // Here we have async deferring wrappers using microtasks. - // In 2.5 we used (macro) tasks (in combination with microtasks). - // However, it has subtle problems when state is changed right before repaint - // (e.g. #6813, out-in transitions). - // Also, using (macro) tasks in event handler would cause some weird behaviors - // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109). - // So we now use microtasks everywhere, again. - // A major drawback of this tradeoff is that there are some scenarios - // where microtasks have too high a priority and fire in between supposedly - // sequential events (e.g. #4521, #6690, which have workarounds) - // or even between bubbling of the same event (#6566). - var timerFunc; - - // The nextTick behavior leverages the microtask queue, which can be accessed - // via either native Promise.then or MutationObserver. - // MutationObserver has wider support, however it is seriously bugged in - // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It - // completely stops working after triggering a few times... so, if native - // Promise is available, we will use it: - /* istanbul ignore next, $flow-disable-line */ - if (typeof Promise !== 'undefined' && isNative(Promise)) { - var p = Promise.resolve(); - timerFunc = function () { - p.then(flushCallbacks); - // In problematic UIWebViews, Promise.then doesn't completely break, but - // it can get stuck in a weird state where callbacks are pushed into the - // microtask queue but the queue isn't being flushed, until the browser - // needs to do some other work, e.g. handle a timer. Therefore we can - // "force" the microtask queue to be flushed by adding an empty timer. - if (isIOS) { setTimeout(noop); } - }; - isUsingMicroTask = true; - } else if (!isIE && typeof MutationObserver !== 'undefined' && ( - isNative(MutationObserver) || - // PhantomJS and iOS 7.x - MutationObserver.toString() === '[object MutationObserverConstructor]' - )) { - // Use MutationObserver where native Promise is not available, - // e.g. PhantomJS, iOS7, Android 4.4 - // (#6466 MutationObserver is unreliable in IE11) - var counter = 1; - var observer = new MutationObserver(flushCallbacks); - var textNode = document.createTextNode(String(counter)); - observer.observe(textNode, { - characterData: true - }); - timerFunc = function () { - counter = (counter + 1) % 2; - textNode.data = String(counter); - }; - isUsingMicroTask = true; - } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) { - // Fallback to setImmediate. - // Techinically it leverages the (macro) task queue, - // but it is still a better choice than setTimeout. - timerFunc = function () { - setImmediate(flushCallbacks); - }; - } else { - // Fallback to setTimeout. - timerFunc = function () { - setTimeout(flushCallbacks, 0); - }; - } - - function nextTick (cb, ctx) { - var _resolve; - callbacks.push(function () { - if (cb) { - try { - cb.call(ctx); - } catch (e) { - handleError(e, ctx, 'nextTick'); - } - } else if (_resolve) { - _resolve(ctx); - } - }); - if (!pending) { - pending = true; - timerFunc(); - } - // $flow-disable-line - if (!cb && typeof Promise !== 'undefined') { - return new Promise(function (resolve) { - _resolve = resolve; - }) - } - } - - /* */ - - var mark; - var measure; - - { - var perf = inBrowser && window.performance; - /* istanbul ignore if */ - if ( - perf && - perf.mark && - perf.measure && - perf.clearMarks && - perf.clearMeasures - ) { - mark = function (tag) { return perf.mark(tag); }; - measure = function (name, startTag, endTag) { - perf.measure(name, startTag, endTag); - perf.clearMarks(startTag); - perf.clearMarks(endTag); - // perf.clearMeasures(name) - }; - } - } - - /* not type checking this file because flow doesn't play well with Proxy */ - - var initProxy; - - { - var allowedGlobals = makeMap( - 'Infinity,undefined,NaN,isFinite,isNaN,' + - 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' + - 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' + - 'require' // for Webpack/Browserify - ); - - var warnNonPresent = function (target, key) { - warn( - "Property or method \"" + key + "\" is not defined on the instance but " + - 'referenced during render. Make sure that this property is reactive, ' + - 'either in the data option, or for class-based components, by ' + - 'initializing the property. ' + - 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', - target - ); - }; - - var warnReservedPrefix = function (target, key) { - warn( - "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " + - 'properties starting with "$" or "_" are not proxied in the Vue instance to ' + - 'prevent conflicts with Vue internals' + - 'See: https://vuejs.org/v2/api/#data', - target - ); - }; - - var hasProxy = - typeof Proxy !== 'undefined' && isNative(Proxy); - - if (hasProxy) { - var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact'); - config.keyCodes = new Proxy(config.keyCodes, { - set: function set (target, key, value) { - if (isBuiltInModifier(key)) { - warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key)); - return false - } else { - target[key] = value; - return true - } - } - }); - } - - var hasHandler = { - has: function has (target, key) { - var has = key in target; - var isAllowed = allowedGlobals(key) || - (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data)); - if (!has && !isAllowed) { - if (key in target.$data) { warnReservedPrefix(target, key); } - else { warnNonPresent(target, key); } - } - return has || !isAllowed - } - }; - - var getHandler = { - get: function get (target, key) { - if (typeof key === 'string' && !(key in target)) { - if (key in target.$data) { warnReservedPrefix(target, key); } - else { warnNonPresent(target, key); } - } - return target[key] - } - }; - - initProxy = function initProxy (vm) { - if (hasProxy) { - // determine which proxy handler to use - var options = vm.$options; - var handlers = options.render && options.render._withStripped - ? getHandler - : hasHandler; - vm._renderProxy = new Proxy(vm, handlers); - } else { - vm._renderProxy = vm; - } - }; - } - - /* */ - - var seenObjects = new _Set(); - - /** - * Recursively traverse an object to evoke all converted - * getters, so that every nested property inside the object - * is collected as a "deep" dependency. - */ - function traverse (val) { - _traverse(val, seenObjects); - seenObjects.clear(); - } - - function _traverse (val, seen) { - var i, keys; - var isA = Array.isArray(val); - if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) { - return - } - if (val.__ob__) { - var depId = val.__ob__.dep.id; - if (seen.has(depId)) { - return - } - seen.add(depId); - } - if (isA) { - i = val.length; - while (i--) { _traverse(val[i], seen); } - } else { - keys = Object.keys(val); - i = keys.length; - while (i--) { _traverse(val[keys[i]], seen); } - } - } - - /* */ - - var normalizeEvent = cached(function (name) { - var passive = name.charAt(0) === '&'; - name = passive ? name.slice(1) : name; - var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first - name = once$$1 ? name.slice(1) : name; - var capture = name.charAt(0) === '!'; - name = capture ? name.slice(1) : name; - return { - name: name, - once: once$$1, - capture: capture, - passive: passive - } - }); - - function createFnInvoker (fns, vm) { - function invoker () { - var arguments$1 = arguments; - - var fns = invoker.fns; - if (Array.isArray(fns)) { - var cloned = fns.slice(); - for (var i = 0; i < cloned.length; i++) { - invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler"); - } - } else { - // return handler return value for single handlers - return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler") - } - } - invoker.fns = fns; - return invoker - } - - function updateListeners ( - on, - oldOn, - add, - remove$$1, - createOnceHandler, - vm - ) { - var name, def$$1, cur, old, event; - for (name in on) { - def$$1 = cur = on[name]; - old = oldOn[name]; - event = normalizeEvent(name); - if (isUndef(cur)) { - warn( - "Invalid handler for event \"" + (event.name) + "\": got " + String(cur), - vm - ); - } else if (isUndef(old)) { - if (isUndef(cur.fns)) { - cur = on[name] = createFnInvoker(cur, vm); - } - if (isTrue(event.once)) { - cur = on[name] = createOnceHandler(event.name, cur, event.capture); - } - add(event.name, cur, event.capture, event.passive, event.params); - } else if (cur !== old) { - old.fns = cur; - on[name] = old; - } - } - for (name in oldOn) { - if (isUndef(on[name])) { - event = normalizeEvent(name); - remove$$1(event.name, oldOn[name], event.capture); - } - } - } - - /* */ - - function mergeVNodeHook (def, hookKey, hook) { - if (def instanceof VNode) { - def = def.data.hook || (def.data.hook = {}); - } - var invoker; - var oldHook = def[hookKey]; - - function wrappedHook () { - hook.apply(this, arguments); - // important: remove merged hook to ensure it's called only once - // and prevent memory leak - remove(invoker.fns, wrappedHook); - } - - if (isUndef(oldHook)) { - // no existing hook - invoker = createFnInvoker([wrappedHook]); - } else { - /* istanbul ignore if */ - if (isDef(oldHook.fns) && isTrue(oldHook.merged)) { - // already a merged invoker - invoker = oldHook; - invoker.fns.push(wrappedHook); - } else { - // existing plain hook - invoker = createFnInvoker([oldHook, wrappedHook]); - } - } - - invoker.merged = true; - def[hookKey] = invoker; - } - - /* */ - - function extractPropsFromVNodeData ( - data, - Ctor, - tag - ) { - // we are only extracting raw values here. - // validation and default values are handled in the child - // component itself. - var propOptions = Ctor.options.props; - if (isUndef(propOptions)) { - return - } - var res = {}; - var attrs = data.attrs; - var props = data.props; - if (isDef(attrs) || isDef(props)) { - for (var key in propOptions) { - var altKey = hyphenate(key); - { - var keyInLowerCase = key.toLowerCase(); - if ( - key !== keyInLowerCase && - attrs && hasOwn(attrs, keyInLowerCase) - ) { - tip( - "Prop \"" + keyInLowerCase + "\" is passed to component " + - (formatComponentName(tag || Ctor)) + ", but the declared prop name is" + - " \"" + key + "\". " + - "Note that HTML attributes are case-insensitive and camelCased " + - "props need to use their kebab-case equivalents when using in-DOM " + - "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"." - ); - } - } - checkProp(res, props, key, altKey, true) || - checkProp(res, attrs, key, altKey, false); - } - } - return res - } - - function checkProp ( - res, - hash, - key, - altKey, - preserve - ) { - if (isDef(hash)) { - if (hasOwn(hash, key)) { - res[key] = hash[key]; - if (!preserve) { - delete hash[key]; - } - return true - } else if (hasOwn(hash, altKey)) { - res[key] = hash[altKey]; - if (!preserve) { - delete hash[altKey]; - } - return true - } - } - return false - } - - /* */ - - // The template compiler attempts to minimize the need for normalization by - // statically analyzing the template at compile time. - // - // For plain HTML markup, normalization can be completely skipped because the - // generated render function is guaranteed to return Array<VNode>. There are - // two cases where extra normalization is needed: - - // 1. When the children contains components - because a functional component - // may return an Array instead of a single root. In this case, just a simple - // normalization is needed - if any child is an Array, we flatten the whole - // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep - // because functional components already normalize their own children. - function simpleNormalizeChildren (children) { - for (var i = 0; i < children.length; i++) { - if (Array.isArray(children[i])) { - return Array.prototype.concat.apply([], children) - } - } - return children - } - - // 2. When the children contains constructs that always generated nested Arrays, - // e.g. <template>, <slot>, v-for, or when the children is provided by user - // with hand-written render functions / JSX. In such cases a full normalization - // is needed to cater to all possible types of children values. - function normalizeChildren (children) { - return isPrimitive(children) - ? [createTextVNode(children)] - : Array.isArray(children) - ? normalizeArrayChildren(children) - : undefined - } - - function isTextNode (node) { - return isDef(node) && isDef(node.text) && isFalse(node.isComment) - } - - function normalizeArrayChildren (children, nestedIndex) { - var res = []; - var i, c, lastIndex, last; - for (i = 0; i < children.length; i++) { - c = children[i]; - if (isUndef(c) || typeof c === 'boolean') { continue } - lastIndex = res.length - 1; - last = res[lastIndex]; - // nested - if (Array.isArray(c)) { - if (c.length > 0) { - c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i)); - // merge adjacent text nodes - if (isTextNode(c[0]) && isTextNode(last)) { - res[lastIndex] = createTextVNode(last.text + (c[0]).text); - c.shift(); - } - res.push.apply(res, c); - } - } else if (isPrimitive(c)) { - if (isTextNode(last)) { - // merge adjacent text nodes - // this is necessary for SSR hydration because text nodes are - // essentially merged when rendered to HTML strings - res[lastIndex] = createTextVNode(last.text + c); - } else if (c !== '') { - // convert primitive to vnode - res.push(createTextVNode(c)); - } - } else { - if (isTextNode(c) && isTextNode(last)) { - // merge adjacent text nodes - res[lastIndex] = createTextVNode(last.text + c.text); - } else { - // default key for nested array children (likely generated by v-for) - if (isTrue(children._isVList) && - isDef(c.tag) && - isUndef(c.key) && - isDef(nestedIndex)) { - c.key = "__vlist" + nestedIndex + "_" + i + "__"; - } - res.push(c); - } - } - } - return res - } - - /* */ - - function initProvide (vm) { - var provide = vm.$options.provide; - if (provide) { - vm._provided = typeof provide === 'function' - ? provide.call(vm) - : provide; - } - } - - function initInjections (vm) { - var result = resolveInject(vm.$options.inject, vm); - if (result) { - toggleObserving(false); - Object.keys(result).forEach(function (key) { - /* istanbul ignore else */ - { - defineReactive$$1(vm, key, result[key], function () { - warn( - "Avoid mutating an injected value directly since the changes will be " + - "overwritten whenever the provided component re-renders. " + - "injection being mutated: \"" + key + "\"", - vm - ); - }); - } - }); - toggleObserving(true); - } - } - - function resolveInject (inject, vm) { - if (inject) { - // inject is :any because flow is not smart enough to figure out cached - var result = Object.create(null); - var keys = hasSymbol - ? Reflect.ownKeys(inject) - : Object.keys(inject); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - // #6574 in case the inject object is observed... - if (key === '__ob__') { continue } - var provideKey = inject[key].from; - var source = vm; - while (source) { - if (source._provided && hasOwn(source._provided, provideKey)) { - result[key] = source._provided[provideKey]; - break - } - source = source.$parent; - } - if (!source) { - if ('default' in inject[key]) { - var provideDefault = inject[key].default; - result[key] = typeof provideDefault === 'function' - ? provideDefault.call(vm) - : provideDefault; - } else { - warn(("Injection \"" + key + "\" not found"), vm); - } - } - } - return result - } - } - - /* */ - - - - /** - * Runtime helper for resolving raw children VNodes into a slot object. - */ - function resolveSlots ( - children, - context - ) { - if (!children || !children.length) { - return {} - } - var slots = {}; - for (var i = 0, l = children.length; i < l; i++) { - var child = children[i]; - var data = child.data; - // remove slot attribute if the node is resolved as a Vue slot node - if (data && data.attrs && data.attrs.slot) { - delete data.attrs.slot; - } - // named slots should only be respected if the vnode was rendered in the - // same context. - if ((child.context === context || child.fnContext === context) && - data && data.slot != null - ) { - var name = data.slot; - var slot = (slots[name] || (slots[name] = [])); - if (child.tag === 'template') { - slot.push.apply(slot, child.children || []); - } else { - slot.push(child); - } - } else { - (slots.default || (slots.default = [])).push(child); - } - } - // ignore slots that contains only whitespace - for (var name$1 in slots) { - if (slots[name$1].every(isWhitespace)) { - delete slots[name$1]; - } - } - return slots - } - - function isWhitespace (node) { - return (node.isComment && !node.asyncFactory) || node.text === ' ' - } - - /* */ - - function normalizeScopedSlots ( - slots, - normalSlots, - prevSlots - ) { - var res; - var hasNormalSlots = Object.keys(normalSlots).length > 0; - var isStable = slots ? !!slots.$stable : !hasNormalSlots; - var key = slots && slots.$key; - if (!slots) { - res = {}; - } else if (slots._normalized) { - // fast path 1: child component re-render only, parent did not change - return slots._normalized - } else if ( - isStable && - prevSlots && - prevSlots !== emptyObject && - key === prevSlots.$key && - !hasNormalSlots && - !prevSlots.$hasNormal - ) { - // fast path 2: stable scoped slots w/ no normal slots to proxy, - // only need to normalize once - return prevSlots - } else { - res = {}; - for (var key$1 in slots) { - if (slots[key$1] && key$1[0] !== '$') { - res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]); - } - } - } - // expose normal slots on scopedSlots - for (var key$2 in normalSlots) { - if (!(key$2 in res)) { - res[key$2] = proxyNormalSlot(normalSlots, key$2); - } - } - // avoriaz seems to mock a non-extensible $scopedSlots object - // and when that is passed down this would cause an error - if (slots && Object.isExtensible(slots)) { - (slots)._normalized = res; - } - def(res, '$stable', isStable); - def(res, '$key', key); - def(res, '$hasNormal', hasNormalSlots); - return res - } - - function normalizeScopedSlot(normalSlots, key, fn) { - var normalized = function () { - var res = arguments.length ? fn.apply(null, arguments) : fn({}); - res = res && typeof res === 'object' && !Array.isArray(res) - ? [res] // single vnode - : normalizeChildren(res); - return res && ( - res.length === 0 || - (res.length === 1 && res[0].isComment) // #9658 - ) ? undefined - : res - }; - // this is a slot using the new v-slot syntax without scope. although it is - // compiled as a scoped slot, render fn users would expect it to be present - // on this.$slots because the usage is semantically a normal slot. - if (fn.proxy) { - Object.defineProperty(normalSlots, key, { - get: normalized, - enumerable: true, - configurable: true - }); - } - return normalized - } - - function proxyNormalSlot(slots, key) { - return function () { return slots[key]; } - } - - /* */ - - /** - * Runtime helper for rendering v-for lists. - */ - function renderList ( - val, - render - ) { - var ret, i, l, keys, key; - if (Array.isArray(val) || typeof val === 'string') { - ret = new Array(val.length); - for (i = 0, l = val.length; i < l; i++) { - ret[i] = render(val[i], i); - } - } else if (typeof val === 'number') { - ret = new Array(val); - for (i = 0; i < val; i++) { - ret[i] = render(i + 1, i); - } - } else if (isObject(val)) { - if (hasSymbol && val[Symbol.iterator]) { - ret = []; - var iterator = val[Symbol.iterator](); - var result = iterator.next(); - while (!result.done) { - ret.push(render(result.value, ret.length)); - result = iterator.next(); - } - } else { - keys = Object.keys(val); - ret = new Array(keys.length); - for (i = 0, l = keys.length; i < l; i++) { - key = keys[i]; - ret[i] = render(val[key], key, i); - } - } - } - if (!isDef(ret)) { - ret = []; - } - (ret)._isVList = true; - return ret - } - - /* */ - - /** - * Runtime helper for rendering <slot> - */ - function renderSlot ( - name, - fallback, - props, - bindObject - ) { - var scopedSlotFn = this.$scopedSlots[name]; - var nodes; - if (scopedSlotFn) { // scoped slot - props = props || {}; - if (bindObject) { - if (!isObject(bindObject)) { - warn( - 'slot v-bind without argument expects an Object', - this - ); - } - props = extend(extend({}, bindObject), props); - } - nodes = scopedSlotFn(props) || fallback; - } else { - nodes = this.$slots[name] || fallback; - } - - var target = props && props.slot; - if (target) { - return this.$createElement('template', { slot: target }, nodes) - } else { - return nodes - } - } - - /* */ - - /** - * Runtime helper for resolving filters - */ - function resolveFilter (id) { - return resolveAsset(this.$options, 'filters', id, true) || identity - } - - /* */ - - function isKeyNotMatch (expect, actual) { - if (Array.isArray(expect)) { - return expect.indexOf(actual) === -1 - } else { - return expect !== actual - } - } - - /** - * Runtime helper for checking keyCodes from config. - * exposed as Vue.prototype._k - * passing in eventKeyName as last argument separately for backwards compat - */ - function checkKeyCodes ( - eventKeyCode, - key, - builtInKeyCode, - eventKeyName, - builtInKeyName - ) { - var mappedKeyCode = config.keyCodes[key] || builtInKeyCode; - if (builtInKeyName && eventKeyName && !config.keyCodes[key]) { - return isKeyNotMatch(builtInKeyName, eventKeyName) - } else if (mappedKeyCode) { - return isKeyNotMatch(mappedKeyCode, eventKeyCode) - } else if (eventKeyName) { - return hyphenate(eventKeyName) !== key - } - } - - /* */ - - /** - * Runtime helper for merging v-bind="object" into a VNode's data. - */ - function bindObjectProps ( - data, - tag, - value, - asProp, - isSync - ) { - if (value) { - if (!isObject(value)) { - warn( - 'v-bind without argument expects an Object or Array value', - this - ); - } else { - if (Array.isArray(value)) { - value = toObject(value); - } - var hash; - var loop = function ( key ) { - if ( - key === 'class' || - key === 'style' || - isReservedAttribute(key) - ) { - hash = data; - } else { - var type = data.attrs && data.attrs.type; - hash = asProp || config.mustUseProp(tag, type, key) - ? data.domProps || (data.domProps = {}) - : data.attrs || (data.attrs = {}); - } - var camelizedKey = camelize(key); - var hyphenatedKey = hyphenate(key); - if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) { - hash[key] = value[key]; - - if (isSync) { - var on = data.on || (data.on = {}); - on[("update:" + key)] = function ($event) { - value[key] = $event; - }; - } - } - }; - - for (var key in value) loop( key ); - } - } - return data - } - - /* */ - - /** - * Runtime helper for rendering static trees. - */ - function renderStatic ( - index, - isInFor - ) { - var cached = this._staticTrees || (this._staticTrees = []); - var tree = cached[index]; - // if has already-rendered static tree and not inside v-for, - // we can reuse the same tree. - if (tree && !isInFor) { - return tree - } - // otherwise, render a fresh tree. - tree = cached[index] = this.$options.staticRenderFns[index].call( - this._renderProxy, - null, - this // for render fns generated for functional component templates - ); - markStatic(tree, ("__static__" + index), false); - return tree - } - - /** - * Runtime helper for v-once. - * Effectively it means marking the node as static with a unique key. - */ - function markOnce ( - tree, - index, - key - ) { - markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true); - return tree - } - - function markStatic ( - tree, - key, - isOnce - ) { - if (Array.isArray(tree)) { - for (var i = 0; i < tree.length; i++) { - if (tree[i] && typeof tree[i] !== 'string') { - markStaticNode(tree[i], (key + "_" + i), isOnce); - } - } - } else { - markStaticNode(tree, key, isOnce); - } - } - - function markStaticNode (node, key, isOnce) { - node.isStatic = true; - node.key = key; - node.isOnce = isOnce; - } - - /* */ - - function bindObjectListeners (data, value) { - if (value) { - if (!isPlainObject(value)) { - warn( - 'v-on without argument expects an Object value', - this - ); - } else { - var on = data.on = data.on ? extend({}, data.on) : {}; - for (var key in value) { - var existing = on[key]; - var ours = value[key]; - on[key] = existing ? [].concat(existing, ours) : ours; - } - } - } - return data - } - - /* */ - - function resolveScopedSlots ( - fns, // see flow/vnode - res, - // the following are added in 2.6 - hasDynamicKeys, - contentHashKey - ) { - res = res || { $stable: !hasDynamicKeys }; - for (var i = 0; i < fns.length; i++) { - var slot = fns[i]; - if (Array.isArray(slot)) { - resolveScopedSlots(slot, res, hasDynamicKeys); - } else if (slot) { - // marker for reverse proxying v-slot without scope on this.$slots - if (slot.proxy) { - slot.fn.proxy = true; - } - res[slot.key] = slot.fn; - } - } - if (contentHashKey) { - (res).$key = contentHashKey; - } - return res - } - - /* */ - - function bindDynamicKeys (baseObj, values) { - for (var i = 0; i < values.length; i += 2) { - var key = values[i]; - if (typeof key === 'string' && key) { - baseObj[values[i]] = values[i + 1]; - } else if (key !== '' && key !== null) { - // null is a speical value for explicitly removing a binding - warn( - ("Invalid value for dynamic directive argument (expected string or null): " + key), - this - ); - } - } - return baseObj - } - - // helper to dynamically append modifier runtime markers to event names. - // ensure only append when value is already string, otherwise it will be cast - // to string and cause the type check to miss. - function prependModifier (value, symbol) { - return typeof value === 'string' ? symbol + value : value - } - - /* */ - - function installRenderHelpers (target) { - target._o = markOnce; - target._n = toNumber; - target._s = toString; - target._l = renderList; - target._t = renderSlot; - target._q = looseEqual; - target._i = looseIndexOf; - target._m = renderStatic; - target._f = resolveFilter; - target._k = checkKeyCodes; - target._b = bindObjectProps; - target._v = createTextVNode; - target._e = createEmptyVNode; - target._u = resolveScopedSlots; - target._g = bindObjectListeners; - target._d = bindDynamicKeys; - target._p = prependModifier; - } - - /* */ - - function FunctionalRenderContext ( - data, - props, - children, - parent, - Ctor - ) { - var this$1 = this; - - var options = Ctor.options; - // ensure the createElement function in functional components - // gets a unique context - this is necessary for correct named slot check - var contextVm; - if (hasOwn(parent, '_uid')) { - contextVm = Object.create(parent); - // $flow-disable-line - contextVm._original = parent; - } else { - // the context vm passed in is a functional context as well. - // in this case we want to make sure we are able to get a hold to the - // real context instance. - contextVm = parent; - // $flow-disable-line - parent = parent._original; - } - var isCompiled = isTrue(options._compiled); - var needNormalization = !isCompiled; - - this.data = data; - this.props = props; - this.children = children; - this.parent = parent; - this.listeners = data.on || emptyObject; - this.injections = resolveInject(options.inject, parent); - this.slots = function () { - if (!this$1.$slots) { - normalizeScopedSlots( - data.scopedSlots, - this$1.$slots = resolveSlots(children, parent) - ); - } - return this$1.$slots - }; - - Object.defineProperty(this, 'scopedSlots', ({ - enumerable: true, - get: function get () { - return normalizeScopedSlots(data.scopedSlots, this.slots()) - } - })); - - // support for compiled functional template - if (isCompiled) { - // exposing $options for renderStatic() - this.$options = options; - // pre-resolve slots for renderSlot() - this.$slots = this.slots(); - this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots); - } - - if (options._scopeId) { - this._c = function (a, b, c, d) { - var vnode = createElement(contextVm, a, b, c, d, needNormalization); - if (vnode && !Array.isArray(vnode)) { - vnode.fnScopeId = options._scopeId; - vnode.fnContext = parent; - } - return vnode - }; - } else { - this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); }; - } - } - - installRenderHelpers(FunctionalRenderContext.prototype); - - function createFunctionalComponent ( - Ctor, - propsData, - data, - contextVm, - children - ) { - var options = Ctor.options; - var props = {}; - var propOptions = options.props; - if (isDef(propOptions)) { - for (var key in propOptions) { - props[key] = validateProp(key, propOptions, propsData || emptyObject); - } - } else { - if (isDef(data.attrs)) { mergeProps(props, data.attrs); } - if (isDef(data.props)) { mergeProps(props, data.props); } - } - - var renderContext = new FunctionalRenderContext( - data, - props, - children, - contextVm, - Ctor - ); - - var vnode = options.render.call(null, renderContext._c, renderContext); - - if (vnode instanceof VNode) { - return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext) - } else if (Array.isArray(vnode)) { - var vnodes = normalizeChildren(vnode) || []; - var res = new Array(vnodes.length); - for (var i = 0; i < vnodes.length; i++) { - res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext); - } - return res - } - } - - function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) { - // #7817 clone node before setting fnContext, otherwise if the node is reused - // (e.g. it was from a cached normal slot) the fnContext causes named slots - // that should not be matched to match. - var clone = cloneVNode(vnode); - clone.fnContext = contextVm; - clone.fnOptions = options; - { - (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext; - } - if (data.slot) { - (clone.data || (clone.data = {})).slot = data.slot; - } - return clone - } - - function mergeProps (to, from) { - for (var key in from) { - to[camelize(key)] = from[key]; - } - } - - /* */ - - /* */ - - /* */ - - /* */ - - // inline hooks to be invoked on component VNodes during patch - var componentVNodeHooks = { - init: function init (vnode, hydrating) { - if ( - vnode.componentInstance && - !vnode.componentInstance._isDestroyed && - vnode.data.keepAlive - ) { - // kept-alive components, treat as a patch - var mountedNode = vnode; // work around flow - componentVNodeHooks.prepatch(mountedNode, mountedNode); - } else { - var child = vnode.componentInstance = createComponentInstanceForVnode( - vnode, - activeInstance - ); - child.$mount(hydrating ? vnode.elm : undefined, hydrating); - } - }, - - prepatch: function prepatch (oldVnode, vnode) { - var options = vnode.componentOptions; - var child = vnode.componentInstance = oldVnode.componentInstance; - updateChildComponent( - child, - options.propsData, // updated props - options.listeners, // updated listeners - vnode, // new parent vnode - options.children // new children - ); - }, - - insert: function insert (vnode) { - var context = vnode.context; - var componentInstance = vnode.componentInstance; - if (!componentInstance._isMounted) { - componentInstance._isMounted = true; - callHook(componentInstance, 'mounted'); - } - if (vnode.data.keepAlive) { - if (context._isMounted) { - // vue-router#1212 - // During updates, a kept-alive component's child components may - // change, so directly walking the tree here may call activated hooks - // on incorrect children. Instead we push them into a queue which will - // be processed after the whole patch process ended. - queueActivatedComponent(componentInstance); - } else { - activateChildComponent(componentInstance, true /* direct */); - } - } - }, - - destroy: function destroy (vnode) { - var componentInstance = vnode.componentInstance; - if (!componentInstance._isDestroyed) { - if (!vnode.data.keepAlive) { - componentInstance.$destroy(); - } else { - deactivateChildComponent(componentInstance, true /* direct */); - } - } - } - }; - - var hooksToMerge = Object.keys(componentVNodeHooks); - - function createComponent ( - Ctor, - data, - context, - children, - tag - ) { - if (isUndef(Ctor)) { - return - } - - var baseCtor = context.$options._base; - - // plain options object: turn it into a constructor - if (isObject(Ctor)) { - Ctor = baseCtor.extend(Ctor); - } - - // if at this stage it's not a constructor or an async component factory, - // reject. - if (typeof Ctor !== 'function') { - { - warn(("Invalid Component definition: " + (String(Ctor))), context); - } - return - } - - // async component - var asyncFactory; - if (isUndef(Ctor.cid)) { - asyncFactory = Ctor; - Ctor = resolveAsyncComponent(asyncFactory, baseCtor); - if (Ctor === undefined) { - // return a placeholder node for async component, which is rendered - // as a comment node but preserves all the raw information for the node. - // the information will be used for async server-rendering and hydration. - return createAsyncPlaceholder( - asyncFactory, - data, - context, - children, - tag - ) - } - } - - data = data || {}; - - // resolve constructor options in case global mixins are applied after - // component constructor creation - resolveConstructorOptions(Ctor); - - // transform component v-model data into props & events - if (isDef(data.model)) { - transformModel(Ctor.options, data); - } - - // extract props - var propsData = extractPropsFromVNodeData(data, Ctor, tag); - - // functional component - if (isTrue(Ctor.options.functional)) { - return createFunctionalComponent(Ctor, propsData, data, context, children) - } - - // extract listeners, since these needs to be treated as - // child component listeners instead of DOM listeners - var listeners = data.on; - // replace with listeners with .native modifier - // so it gets processed during parent component patch. - data.on = data.nativeOn; - - if (isTrue(Ctor.options.abstract)) { - // abstract components do not keep anything - // other than props & listeners & slot - - // work around flow - var slot = data.slot; - data = {}; - if (slot) { - data.slot = slot; - } - } - - // install component management hooks onto the placeholder node - installComponentHooks(data); - - // return a placeholder vnode - var name = Ctor.options.name || tag; - var vnode = new VNode( - ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')), - data, undefined, undefined, undefined, context, - { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }, - asyncFactory - ); - - return vnode - } - - function createComponentInstanceForVnode ( - vnode, // we know it's MountedComponentVNode but flow doesn't - parent // activeInstance in lifecycle state - ) { - var options = { - _isComponent: true, - _parentVnode: vnode, - parent: parent - }; - // check inline-template render functions - var inlineTemplate = vnode.data.inlineTemplate; - if (isDef(inlineTemplate)) { - options.render = inlineTemplate.render; - options.staticRenderFns = inlineTemplate.staticRenderFns; - } - return new vnode.componentOptions.Ctor(options) - } - - function installComponentHooks (data) { - var hooks = data.hook || (data.hook = {}); - for (var i = 0; i < hooksToMerge.length; i++) { - var key = hooksToMerge[i]; - var existing = hooks[key]; - var toMerge = componentVNodeHooks[key]; - if (existing !== toMerge && !(existing && existing._merged)) { - hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge; - } - } - } - - function mergeHook$1 (f1, f2) { - var merged = function (a, b) { - // flow complains about extra args which is why we use any - f1(a, b); - f2(a, b); - }; - merged._merged = true; - return merged - } - - // transform component v-model info (value and callback) into - // prop and event handler respectively. - function transformModel (options, data) { - var prop = (options.model && options.model.prop) || 'value'; - var event = (options.model && options.model.event) || 'input' - ;(data.attrs || (data.attrs = {}))[prop] = data.model.value; - var on = data.on || (data.on = {}); - var existing = on[event]; - var callback = data.model.callback; - if (isDef(existing)) { - if ( - Array.isArray(existing) - ? existing.indexOf(callback) === -1 - : existing !== callback - ) { - on[event] = [callback].concat(existing); - } - } else { - on[event] = callback; - } - } - - /* */ - - var SIMPLE_NORMALIZE = 1; - var ALWAYS_NORMALIZE = 2; - - // wrapper function for providing a more flexible interface - // without getting yelled at by flow - function createElement ( - context, - tag, - data, - children, - normalizationType, - alwaysNormalize - ) { - if (Array.isArray(data) || isPrimitive(data)) { - normalizationType = children; - children = data; - data = undefined; - } - if (isTrue(alwaysNormalize)) { - normalizationType = ALWAYS_NORMALIZE; - } - return _createElement(context, tag, data, children, normalizationType) - } - - function _createElement ( - context, - tag, - data, - children, - normalizationType - ) { - if (isDef(data) && isDef((data).__ob__)) { - warn( - "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" + - 'Always create fresh vnode data objects in each render!', - context - ); - return createEmptyVNode() - } - // object syntax in v-bind - if (isDef(data) && isDef(data.is)) { - tag = data.is; - } - if (!tag) { - // in case of component :is set to falsy value - return createEmptyVNode() - } - // warn against non-primitive key - if (isDef(data) && isDef(data.key) && !isPrimitive(data.key) - ) { - { - warn( - 'Avoid using non-primitive value as key, ' + - 'use string/number value instead.', - context - ); - } - } - // support single function children as default scoped slot - if (Array.isArray(children) && - typeof children[0] === 'function' - ) { - data = data || {}; - data.scopedSlots = { default: children[0] }; - children.length = 0; - } - if (normalizationType === ALWAYS_NORMALIZE) { - children = normalizeChildren(children); - } else if (normalizationType === SIMPLE_NORMALIZE) { - children = simpleNormalizeChildren(children); - } - var vnode, ns; - if (typeof tag === 'string') { - var Ctor; - ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag); - if (config.isReservedTag(tag)) { - // platform built-in elements - vnode = new VNode( - config.parsePlatformTagName(tag), data, children, - undefined, undefined, context - ); - } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) { - // component - vnode = createComponent(Ctor, data, context, children, tag); - } else { - // unknown or unlisted namespaced elements - // check at runtime because it may get assigned a namespace when its - // parent normalizes children - vnode = new VNode( - tag, data, children, - undefined, undefined, context - ); - } - } else { - // direct component options / constructor - vnode = createComponent(tag, data, context, children); - } - if (Array.isArray(vnode)) { - return vnode - } else if (isDef(vnode)) { - if (isDef(ns)) { applyNS(vnode, ns); } - if (isDef(data)) { registerDeepBindings(data); } - return vnode - } else { - return createEmptyVNode() - } - } - - function applyNS (vnode, ns, force) { - vnode.ns = ns; - if (vnode.tag === 'foreignObject') { - // use default namespace inside foreignObject - ns = undefined; - force = true; - } - if (isDef(vnode.children)) { - for (var i = 0, l = vnode.children.length; i < l; i++) { - var child = vnode.children[i]; - if (isDef(child.tag) && ( - isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) { - applyNS(child, ns, force); - } - } - } - } - - // ref #5318 - // necessary to ensure parent re-render when deep bindings like :style and - // :class are used on slot nodes - function registerDeepBindings (data) { - if (isObject(data.style)) { - traverse(data.style); - } - if (isObject(data.class)) { - traverse(data.class); - } - } - - /* */ - - function initRender (vm) { - vm._vnode = null; // the root of the child tree - vm._staticTrees = null; // v-once cached trees - var options = vm.$options; - var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree - var renderContext = parentVnode && parentVnode.context; - vm.$slots = resolveSlots(options._renderChildren, renderContext); - vm.$scopedSlots = emptyObject; - // bind the createElement fn to this instance - // so that we get proper render context inside it. - // args order: tag, data, children, normalizationType, alwaysNormalize - // internal version is used by render functions compiled from templates - vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); }; - // normalization is always applied for the public version, used in - // user-written render functions. - vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); }; - - // $attrs & $listeners are exposed for easier HOC creation. - // they need to be reactive so that HOCs using them are always updated - var parentData = parentVnode && parentVnode.data; - - /* istanbul ignore else */ - { - defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () { - !isUpdatingChildComponent && warn("$attrs is readonly.", vm); - }, true); - defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () { - !isUpdatingChildComponent && warn("$listeners is readonly.", vm); - }, true); - } - } - - var currentRenderingInstance = null; - - function renderMixin (Vue) { - // install runtime convenience helpers - installRenderHelpers(Vue.prototype); - - Vue.prototype.$nextTick = function (fn) { - return nextTick(fn, this) - }; - - Vue.prototype._render = function () { - var vm = this; - var ref = vm.$options; - var render = ref.render; - var _parentVnode = ref._parentVnode; - - if (_parentVnode) { - vm.$scopedSlots = normalizeScopedSlots( - _parentVnode.data.scopedSlots, - vm.$slots, - vm.$scopedSlots - ); - } - - // set parent vnode. this allows render functions to have access - // to the data on the placeholder node. - vm.$vnode = _parentVnode; - // render self - var vnode; - try { - // There's no need to maintain a stack becaues all render fns are called - // separately from one another. Nested component's render fns are called - // when parent component is patched. - currentRenderingInstance = vm; - vnode = render.call(vm._renderProxy, vm.$createElement); - } catch (e) { - handleError(e, vm, "render"); - // return error render result, - // or previous vnode to prevent render error causing blank component - /* istanbul ignore else */ - if (vm.$options.renderError) { - try { - vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e); - } catch (e) { - handleError(e, vm, "renderError"); - vnode = vm._vnode; - } - } else { - vnode = vm._vnode; - } - } finally { - currentRenderingInstance = null; - } - // if the returned array contains only a single node, allow it - if (Array.isArray(vnode) && vnode.length === 1) { - vnode = vnode[0]; - } - // return empty vnode in case the render function errored out - if (!(vnode instanceof VNode)) { - if (Array.isArray(vnode)) { - warn( - 'Multiple root nodes returned from render function. Render function ' + - 'should return a single root node.', - vm - ); - } - vnode = createEmptyVNode(); - } - // set parent - vnode.parent = _parentVnode; - return vnode - }; - } - - /* */ - - function ensureCtor (comp, base) { - if ( - comp.__esModule || - (hasSymbol && comp[Symbol.toStringTag] === 'Module') - ) { - comp = comp.default; - } - return isObject(comp) - ? base.extend(comp) - : comp - } - - function createAsyncPlaceholder ( - factory, - data, - context, - children, - tag - ) { - var node = createEmptyVNode(); - node.asyncFactory = factory; - node.asyncMeta = { data: data, context: context, children: children, tag: tag }; - return node - } - - function resolveAsyncComponent ( - factory, - baseCtor - ) { - if (isTrue(factory.error) && isDef(factory.errorComp)) { - return factory.errorComp - } - - if (isDef(factory.resolved)) { - return factory.resolved - } - - var owner = currentRenderingInstance; - if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) { - // already pending - factory.owners.push(owner); - } - - if (isTrue(factory.loading) && isDef(factory.loadingComp)) { - return factory.loadingComp - } - - if (owner && !isDef(factory.owners)) { - var owners = factory.owners = [owner]; - var sync = true; - var timerLoading = null; - var timerTimeout = null - - ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); }); - - var forceRender = function (renderCompleted) { - for (var i = 0, l = owners.length; i < l; i++) { - (owners[i]).$forceUpdate(); - } - - if (renderCompleted) { - owners.length = 0; - if (timerLoading !== null) { - clearTimeout(timerLoading); - timerLoading = null; - } - if (timerTimeout !== null) { - clearTimeout(timerTimeout); - timerTimeout = null; - } - } - }; - - var resolve = once(function (res) { - // cache resolved - factory.resolved = ensureCtor(res, baseCtor); - // invoke callbacks only if this is not a synchronous resolve - // (async resolves are shimmed as synchronous during SSR) - if (!sync) { - forceRender(true); - } else { - owners.length = 0; - } - }); - - var reject = once(function (reason) { - warn( - "Failed to resolve async component: " + (String(factory)) + - (reason ? ("\nReason: " + reason) : '') - ); - if (isDef(factory.errorComp)) { - factory.error = true; - forceRender(true); - } - }); - - var res = factory(resolve, reject); - - if (isObject(res)) { - if (isPromise(res)) { - // () => Promise - if (isUndef(factory.resolved)) { - res.then(resolve, reject); - } - } else if (isPromise(res.component)) { - res.component.then(resolve, reject); - - if (isDef(res.error)) { - factory.errorComp = ensureCtor(res.error, baseCtor); - } - - if (isDef(res.loading)) { - factory.loadingComp = ensureCtor(res.loading, baseCtor); - if (res.delay === 0) { - factory.loading = true; - } else { - timerLoading = setTimeout(function () { - timerLoading = null; - if (isUndef(factory.resolved) && isUndef(factory.error)) { - factory.loading = true; - forceRender(false); - } - }, res.delay || 200); - } - } - - if (isDef(res.timeout)) { - timerTimeout = setTimeout(function () { - timerTimeout = null; - if (isUndef(factory.resolved)) { - reject( - "timeout (" + (res.timeout) + "ms)" - ); - } - }, res.timeout); - } - } - } - - sync = false; - // return in case resolved synchronously - return factory.loading - ? factory.loadingComp - : factory.resolved - } - } - - /* */ - - function isAsyncPlaceholder (node) { - return node.isComment && node.asyncFactory - } - - /* */ - - function getFirstComponentChild (children) { - if (Array.isArray(children)) { - for (var i = 0; i < children.length; i++) { - var c = children[i]; - if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) { - return c - } - } - } - } - - /* */ - - /* */ - - function initEvents (vm) { - vm._events = Object.create(null); - vm._hasHookEvent = false; - // init parent attached events - var listeners = vm.$options._parentListeners; - if (listeners) { - updateComponentListeners(vm, listeners); - } - } - - var target; - - function add (event, fn) { - target.$on(event, fn); - } - - function remove$1 (event, fn) { - target.$off(event, fn); - } - - function createOnceHandler (event, fn) { - var _target = target; - return function onceHandler () { - var res = fn.apply(null, arguments); - if (res !== null) { - _target.$off(event, onceHandler); - } - } - } - - function updateComponentListeners ( - vm, - listeners, - oldListeners - ) { - target = vm; - updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm); - target = undefined; - } - - function eventsMixin (Vue) { - var hookRE = /^hook:/; - Vue.prototype.$on = function (event, fn) { - var vm = this; - if (Array.isArray(event)) { - for (var i = 0, l = event.length; i < l; i++) { - vm.$on(event[i], fn); - } - } else { - (vm._events[event] || (vm._events[event] = [])).push(fn); - // optimize hook:event cost by using a boolean flag marked at registration - // instead of a hash lookup - if (hookRE.test(event)) { - vm._hasHookEvent = true; - } - } - return vm - }; - - Vue.prototype.$once = function (event, fn) { - var vm = this; - function on () { - vm.$off(event, on); - fn.apply(vm, arguments); - } - on.fn = fn; - vm.$on(event, on); - return vm - }; - - Vue.prototype.$off = function (event, fn) { - var vm = this; - // all - if (!arguments.length) { - vm._events = Object.create(null); - return vm - } - // array of events - if (Array.isArray(event)) { - for (var i$1 = 0, l = event.length; i$1 < l; i$1++) { - vm.$off(event[i$1], fn); - } - return vm - } - // specific event - var cbs = vm._events[event]; - if (!cbs) { - return vm - } - if (!fn) { - vm._events[event] = null; - return vm - } - // specific handler - var cb; - var i = cbs.length; - while (i--) { - cb = cbs[i]; - if (cb === fn || cb.fn === fn) { - cbs.splice(i, 1); - break - } - } - return vm - }; - - Vue.prototype.$emit = function (event) { - var vm = this; - { - var lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) { - tip( - "Event \"" + lowerCaseEvent + "\" is emitted in component " + - (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " + - "Note that HTML attributes are case-insensitive and you cannot use " + - "v-on to listen to camelCase events when using in-DOM templates. " + - "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"." - ); - } - } - var cbs = vm._events[event]; - if (cbs) { - cbs = cbs.length > 1 ? toArray(cbs) : cbs; - var args = toArray(arguments, 1); - var info = "event handler for \"" + event + "\""; - for (var i = 0, l = cbs.length; i < l; i++) { - invokeWithErrorHandling(cbs[i], vm, args, vm, info); - } - } - return vm - }; - } - - /* */ - - var activeInstance = null; - var isUpdatingChildComponent = false; - - function setActiveInstance(vm) { - var prevActiveInstance = activeInstance; - activeInstance = vm; - return function () { - activeInstance = prevActiveInstance; - } - } - - function initLifecycle (vm) { - var options = vm.$options; - - // locate first non-abstract parent - var parent = options.parent; - if (parent && !options.abstract) { - while (parent.$options.abstract && parent.$parent) { - parent = parent.$parent; - } - parent.$children.push(vm); - } - - vm.$parent = parent; - vm.$root = parent ? parent.$root : vm; - - vm.$children = []; - vm.$refs = {}; - - vm._watcher = null; - vm._inactive = null; - vm._directInactive = false; - vm._isMounted = false; - vm._isDestroyed = false; - vm._isBeingDestroyed = false; - } - - function lifecycleMixin (Vue) { - Vue.prototype._update = function (vnode, hydrating) { - var vm = this; - var prevEl = vm.$el; - var prevVnode = vm._vnode; - var restoreActiveInstance = setActiveInstance(vm); - vm._vnode = vnode; - // Vue.prototype.__patch__ is injected in entry points - // based on the rendering backend used. - if (!prevVnode) { - // initial render - vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */); - } else { - // updates - vm.$el = vm.__patch__(prevVnode, vnode); - } - restoreActiveInstance(); - // update __vue__ reference - if (prevEl) { - prevEl.__vue__ = null; - } - if (vm.$el) { - vm.$el.__vue__ = vm; - } - // if parent is an HOC, update its $el as well - if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) { - vm.$parent.$el = vm.$el; - } - // updated hook is called by the scheduler to ensure that children are - // updated in a parent's updated hook. - }; - - Vue.prototype.$forceUpdate = function () { - var vm = this; - if (vm._watcher) { - vm._watcher.update(); - } - }; - - Vue.prototype.$destroy = function () { - var vm = this; - if (vm._isBeingDestroyed) { - return - } - callHook(vm, 'beforeDestroy'); - vm._isBeingDestroyed = true; - // remove self from parent - var parent = vm.$parent; - if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) { - remove(parent.$children, vm); - } - // teardown watchers - if (vm._watcher) { - vm._watcher.teardown(); - } - var i = vm._watchers.length; - while (i--) { - vm._watchers[i].teardown(); - } - // remove reference from data ob - // frozen object may not have observer. - if (vm._data.__ob__) { - vm._data.__ob__.vmCount--; - } - // call the last hook... - vm._isDestroyed = true; - // invoke destroy hooks on current rendered tree - vm.__patch__(vm._vnode, null); - // fire destroyed hook - callHook(vm, 'destroyed'); - // turn off all instance listeners. - vm.$off(); - // remove __vue__ reference - if (vm.$el) { - vm.$el.__vue__ = null; - } - // release circular reference (#6759) - if (vm.$vnode) { - vm.$vnode.parent = null; - } - }; - } - - function mountComponent ( - vm, - el, - hydrating - ) { - vm.$el = el; - if (!vm.$options.render) { - vm.$options.render = createEmptyVNode; - { - /* istanbul ignore if */ - if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') || - vm.$options.el || el) { - warn( - 'You are using the runtime-only build of Vue where the template ' + - 'compiler is not available. Either pre-compile the templates into ' + - 'render functions, or use the compiler-included build.', - vm - ); - } else { - warn( - 'Failed to mount component: template or render function not defined.', - vm - ); - } - } - } - callHook(vm, 'beforeMount'); - - var updateComponent; - /* istanbul ignore if */ - if (config.performance && mark) { - updateComponent = function () { - var name = vm._name; - var id = vm._uid; - var startTag = "vue-perf-start:" + id; - var endTag = "vue-perf-end:" + id; - - mark(startTag); - var vnode = vm._render(); - mark(endTag); - measure(("vue " + name + " render"), startTag, endTag); - - mark(startTag); - vm._update(vnode, hydrating); - mark(endTag); - measure(("vue " + name + " patch"), startTag, endTag); - }; - } else { - updateComponent = function () { - vm._update(vm._render(), hydrating); - }; - } - - // we set this to vm._watcher inside the watcher's constructor - // since the watcher's initial patch may call $forceUpdate (e.g. inside child - // component's mounted hook), which relies on vm._watcher being already defined - new Watcher(vm, updateComponent, noop, { - before: function before () { - if (vm._isMounted && !vm._isDestroyed) { - callHook(vm, 'beforeUpdate'); - } - } - }, true /* isRenderWatcher */); - hydrating = false; - - // manually mounted instance, call mounted on self - // mounted is called for render-created child components in its inserted hook - if (vm.$vnode == null) { - vm._isMounted = true; - callHook(vm, 'mounted'); - } - return vm - } - - function updateChildComponent ( - vm, - propsData, - listeners, - parentVnode, - renderChildren - ) { - { - isUpdatingChildComponent = true; - } - - // determine whether component has slot children - // we need to do this before overwriting $options._renderChildren. - - // check if there are dynamic scopedSlots (hand-written or compiled but with - // dynamic slot names). Static scoped slots compiled from template has the - // "$stable" marker. - var newScopedSlots = parentVnode.data.scopedSlots; - var oldScopedSlots = vm.$scopedSlots; - var hasDynamicScopedSlot = !!( - (newScopedSlots && !newScopedSlots.$stable) || - (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) || - (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) - ); - - // Any static slot children from the parent may have changed during parent's - // update. Dynamic scoped slots may also have changed. In such cases, a forced - // update is necessary to ensure correctness. - var needsForceUpdate = !!( - renderChildren || // has new static slots - vm.$options._renderChildren || // has old static slots - hasDynamicScopedSlot - ); - - vm.$options._parentVnode = parentVnode; - vm.$vnode = parentVnode; // update vm's placeholder node without re-render - - if (vm._vnode) { // update child tree's parent - vm._vnode.parent = parentVnode; - } - vm.$options._renderChildren = renderChildren; - - // update $attrs and $listeners hash - // these are also reactive so they may trigger child update if the child - // used them during render - vm.$attrs = parentVnode.data.attrs || emptyObject; - vm.$listeners = listeners || emptyObject; - - // update props - if (propsData && vm.$options.props) { - toggleObserving(false); - var props = vm._props; - var propKeys = vm.$options._propKeys || []; - for (var i = 0; i < propKeys.length; i++) { - var key = propKeys[i]; - var propOptions = vm.$options.props; // wtf flow? - props[key] = validateProp(key, propOptions, propsData, vm); - } - toggleObserving(true); - // keep a copy of raw propsData - vm.$options.propsData = propsData; - } - - // update listeners - listeners = listeners || emptyObject; - var oldListeners = vm.$options._parentListeners; - vm.$options._parentListeners = listeners; - updateComponentListeners(vm, listeners, oldListeners); - - // resolve slots + force update if has children - if (needsForceUpdate) { - vm.$slots = resolveSlots(renderChildren, parentVnode.context); - vm.$forceUpdate(); - } - - { - isUpdatingChildComponent = false; - } - } - - function isInInactiveTree (vm) { - while (vm && (vm = vm.$parent)) { - if (vm._inactive) { return true } - } - return false - } - - function activateChildComponent (vm, direct) { - if (direct) { - vm._directInactive = false; - if (isInInactiveTree(vm)) { - return - } - } else if (vm._directInactive) { - return - } - if (vm._inactive || vm._inactive === null) { - vm._inactive = false; - for (var i = 0; i < vm.$children.length; i++) { - activateChildComponent(vm.$children[i]); - } - callHook(vm, 'activated'); - } - } - - function deactivateChildComponent (vm, direct) { - if (direct) { - vm._directInactive = true; - if (isInInactiveTree(vm)) { - return - } - } - if (!vm._inactive) { - vm._inactive = true; - for (var i = 0; i < vm.$children.length; i++) { - deactivateChildComponent(vm.$children[i]); - } - callHook(vm, 'deactivated'); - } - } - - function callHook (vm, hook) { - // #7573 disable dep collection when invoking lifecycle hooks - pushTarget(); - var handlers = vm.$options[hook]; - var info = hook + " hook"; - if (handlers) { - for (var i = 0, j = handlers.length; i < j; i++) { - invokeWithErrorHandling(handlers[i], vm, null, vm, info); - } - } - if (vm._hasHookEvent) { - vm.$emit('hook:' + hook); - } - popTarget(); - } - - /* */ - - var MAX_UPDATE_COUNT = 100; - - var queue = []; - var activatedChildren = []; - var has = {}; - var circular = {}; - var waiting = false; - var flushing = false; - var index = 0; - - /** - * Reset the scheduler's state. - */ - function resetSchedulerState () { - index = queue.length = activatedChildren.length = 0; - has = {}; - { - circular = {}; - } - waiting = flushing = false; - } - - // Async edge case #6566 requires saving the timestamp when event listeners are - // attached. However, calling performance.now() has a perf overhead especially - // if the page has thousands of event listeners. Instead, we take a timestamp - // every time the scheduler flushes and use that for all event listeners - // attached during that flush. - var currentFlushTimestamp = 0; - - // Async edge case fix requires storing an event listener's attach timestamp. - var getNow = Date.now; - - // Determine what event timestamp the browser is using. Annoyingly, the - // timestamp can either be hi-res (relative to page load) or low-res - // (relative to UNIX epoch), so in order to compare time we have to use the - // same timestamp type when saving the flush timestamp. - // All IE versions use low-res event timestamps, and have problematic clock - // implementations (#9632) - if (inBrowser && !isIE) { - var performance = window.performance; - if ( - performance && - typeof performance.now === 'function' && - getNow() > document.createEvent('Event').timeStamp - ) { - // if the event timestamp, although evaluated AFTER the Date.now(), is - // smaller than it, it means the event is using a hi-res timestamp, - // and we need to use the hi-res version for event listener timestamps as - // well. - getNow = function () { return performance.now(); }; - } - } - - /** - * Flush both queues and run the watchers. - */ - function flushSchedulerQueue () { - currentFlushTimestamp = getNow(); - flushing = true; - var watcher, id; - - // Sort queue before flush. - // This ensures that: - // 1. Components are updated from parent to child. (because parent is always - // created before the child) - // 2. A component's user watchers are run before its render watcher (because - // user watchers are created before the render watcher) - // 3. If a component is destroyed during a parent component's watcher run, - // its watchers can be skipped. - queue.sort(function (a, b) { return a.id - b.id; }); - - // do not cache length because more watchers might be pushed - // as we run existing watchers - for (index = 0; index < queue.length; index++) { - watcher = queue[index]; - if (watcher.before) { - watcher.before(); - } - id = watcher.id; - has[id] = null; - watcher.run(); - // in dev build, check and stop circular updates. - if (has[id] != null) { - circular[id] = (circular[id] || 0) + 1; - if (circular[id] > MAX_UPDATE_COUNT) { - warn( - 'You may have an infinite update loop ' + ( - watcher.user - ? ("in watcher with expression \"" + (watcher.expression) + "\"") - : "in a component render function." - ), - watcher.vm - ); - break - } - } - } - - // keep copies of post queues before resetting state - var activatedQueue = activatedChildren.slice(); - var updatedQueue = queue.slice(); - - resetSchedulerState(); - - // call component updated and activated hooks - callActivatedHooks(activatedQueue); - callUpdatedHooks(updatedQueue); - - // devtool hook - /* istanbul ignore if */ - if (devtools && config.devtools) { - devtools.emit('flush'); - } - } - - function callUpdatedHooks (queue) { - var i = queue.length; - while (i--) { - var watcher = queue[i]; - var vm = watcher.vm; - if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) { - callHook(vm, 'updated'); - } - } - } - - /** - * Queue a kept-alive component that was activated during patch. - * The queue will be processed after the entire tree has been patched. - */ - function queueActivatedComponent (vm) { - // setting _inactive to false here so that a render function can - // rely on checking whether it's in an inactive tree (e.g. router-view) - vm._inactive = false; - activatedChildren.push(vm); - } - - function callActivatedHooks (queue) { - for (var i = 0; i < queue.length; i++) { - queue[i]._inactive = true; - activateChildComponent(queue[i], true /* true */); - } - } - - /** - * Push a watcher into the watcher queue. - * Jobs with duplicate IDs will be skipped unless it's - * pushed when the queue is being flushed. - */ - function queueWatcher (watcher) { - var id = watcher.id; - if (has[id] == null) { - has[id] = true; - if (!flushing) { - queue.push(watcher); - } else { - // if already flushing, splice the watcher based on its id - // if already past its id, it will be run next immediately. - var i = queue.length - 1; - while (i > index && queue[i].id > watcher.id) { - i--; - } - queue.splice(i + 1, 0, watcher); - } - // queue the flush - if (!waiting) { - waiting = true; - - if (!config.async) { - flushSchedulerQueue(); - return - } - nextTick(flushSchedulerQueue); - } - } - } - - /* */ - - - - var uid$2 = 0; - - /** - * A watcher parses an expression, collects dependencies, - * and fires callback when the expression value changes. - * This is used for both the $watch() api and directives. - */ - var Watcher = function Watcher ( - vm, - expOrFn, - cb, - options, - isRenderWatcher - ) { - this.vm = vm; - if (isRenderWatcher) { - vm._watcher = this; - } - vm._watchers.push(this); - // options - if (options) { - this.deep = !!options.deep; - this.user = !!options.user; - this.lazy = !!options.lazy; - this.sync = !!options.sync; - this.before = options.before; - } else { - this.deep = this.user = this.lazy = this.sync = false; - } - this.cb = cb; - this.id = ++uid$2; // uid for batching - this.active = true; - this.dirty = this.lazy; // for lazy watchers - this.deps = []; - this.newDeps = []; - this.depIds = new _Set(); - this.newDepIds = new _Set(); - this.expression = expOrFn.toString(); - // parse expression for getter - if (typeof expOrFn === 'function') { - this.getter = expOrFn; - } else { - this.getter = parsePath(expOrFn); - if (!this.getter) { - this.getter = noop; - warn( - "Failed watching path: \"" + expOrFn + "\" " + - 'Watcher only accepts simple dot-delimited paths. ' + - 'For full control, use a function instead.', - vm - ); - } - } - this.value = this.lazy - ? undefined - : this.get(); - }; - - /** - * Evaluate the getter, and re-collect dependencies. - */ - Watcher.prototype.get = function get () { - pushTarget(this); - var value; - var vm = this.vm; - try { - value = this.getter.call(vm, vm); - } catch (e) { - if (this.user) { - handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\"")); - } else { - throw e - } - } finally { - // "touch" every property so they are all tracked as - // dependencies for deep watching - if (this.deep) { - traverse(value); - } - popTarget(); - this.cleanupDeps(); - } - return value - }; - - /** - * Add a dependency to this directive. - */ - Watcher.prototype.addDep = function addDep (dep) { - var id = dep.id; - if (!this.newDepIds.has(id)) { - this.newDepIds.add(id); - this.newDeps.push(dep); - if (!this.depIds.has(id)) { - dep.addSub(this); - } - } - }; - - /** - * Clean up for dependency collection. - */ - Watcher.prototype.cleanupDeps = function cleanupDeps () { - var i = this.deps.length; - while (i--) { - var dep = this.deps[i]; - if (!this.newDepIds.has(dep.id)) { - dep.removeSub(this); - } - } - var tmp = this.depIds; - this.depIds = this.newDepIds; - this.newDepIds = tmp; - this.newDepIds.clear(); - tmp = this.deps; - this.deps = this.newDeps; - this.newDeps = tmp; - this.newDeps.length = 0; - }; - - /** - * Subscriber interface. - * Will be called when a dependency changes. - */ - Watcher.prototype.update = function update () { - /* istanbul ignore else */ - if (this.lazy) { - this.dirty = true; - } else if (this.sync) { - this.run(); - } else { - queueWatcher(this); - } - }; - - /** - * Scheduler job interface. - * Will be called by the scheduler. - */ - Watcher.prototype.run = function run () { - if (this.active) { - var value = this.get(); - if ( - value !== this.value || - // Deep watchers and watchers on Object/Arrays should fire even - // when the value is the same, because the value may - // have mutated. - isObject(value) || - this.deep - ) { - // set new value - var oldValue = this.value; - this.value = value; - if (this.user) { - try { - this.cb.call(this.vm, value, oldValue); - } catch (e) { - handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\"")); - } - } else { - this.cb.call(this.vm, value, oldValue); - } - } - } - }; - - /** - * Evaluate the value of the watcher. - * This only gets called for lazy watchers. - */ - Watcher.prototype.evaluate = function evaluate () { - this.value = this.get(); - this.dirty = false; - }; - - /** - * Depend on all deps collected by this watcher. - */ - Watcher.prototype.depend = function depend () { - var i = this.deps.length; - while (i--) { - this.deps[i].depend(); - } - }; - - /** - * Remove self from all dependencies' subscriber list. - */ - Watcher.prototype.teardown = function teardown () { - if (this.active) { - // remove self from vm's watcher list - // this is a somewhat expensive operation so we skip it - // if the vm is being destroyed. - if (!this.vm._isBeingDestroyed) { - remove(this.vm._watchers, this); - } - var i = this.deps.length; - while (i--) { - this.deps[i].removeSub(this); - } - this.active = false; - } - }; - - /* */ - - var sharedPropertyDefinition = { - enumerable: true, - configurable: true, - get: noop, - set: noop - }; - - function proxy (target, sourceKey, key) { - sharedPropertyDefinition.get = function proxyGetter () { - return this[sourceKey][key] - }; - sharedPropertyDefinition.set = function proxySetter (val) { - this[sourceKey][key] = val; - }; - Object.defineProperty(target, key, sharedPropertyDefinition); - } - - function initState (vm) { - vm._watchers = []; - var opts = vm.$options; - if (opts.props) { initProps(vm, opts.props); } - if (opts.methods) { initMethods(vm, opts.methods); } - if (opts.data) { - initData(vm); - } else { - observe(vm._data = {}, true /* asRootData */); - } - if (opts.computed) { initComputed(vm, opts.computed); } - if (opts.watch && opts.watch !== nativeWatch) { - initWatch(vm, opts.watch); - } - } - - function initProps (vm, propsOptions) { - var propsData = vm.$options.propsData || {}; - var props = vm._props = {}; - // cache prop keys so that future props updates can iterate using Array - // instead of dynamic object key enumeration. - var keys = vm.$options._propKeys = []; - var isRoot = !vm.$parent; - // root instance props should be converted - if (!isRoot) { - toggleObserving(false); - } - var loop = function ( key ) { - keys.push(key); - var value = validateProp(key, propsOptions, propsData, vm); - /* istanbul ignore else */ - { - var hyphenatedKey = hyphenate(key); - if (isReservedAttribute(hyphenatedKey) || - config.isReservedAttr(hyphenatedKey)) { - warn( - ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."), - vm - ); - } - defineReactive$$1(props, key, value, function () { - if (!isRoot && !isUpdatingChildComponent) { - warn( - "Avoid mutating a prop directly since the value will be " + - "overwritten whenever the parent component re-renders. " + - "Instead, use a data or computed property based on the prop's " + - "value. Prop being mutated: \"" + key + "\"", - vm - ); - } - }); - } - // static props are already proxied on the component's prototype - // during Vue.extend(). We only need to proxy props defined at - // instantiation here. - if (!(key in vm)) { - proxy(vm, "_props", key); - } - }; - - for (var key in propsOptions) loop( key ); - toggleObserving(true); - } - - function initData (vm) { - var data = vm.$options.data; - data = vm._data = typeof data === 'function' - ? getData(data, vm) - : data || {}; - if (!isPlainObject(data)) { - data = {}; - warn( - 'data functions should return an object:\n' + - 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', - vm - ); - } - // proxy data on instance - var keys = Object.keys(data); - var props = vm.$options.props; - var methods = vm.$options.methods; - var i = keys.length; - while (i--) { - var key = keys[i]; - { - if (methods && hasOwn(methods, key)) { - warn( - ("Method \"" + key + "\" has already been defined as a data property."), - vm - ); - } - } - if (props && hasOwn(props, key)) { - warn( - "The data property \"" + key + "\" is already declared as a prop. " + - "Use prop default value instead.", - vm - ); - } else if (!isReserved(key)) { - proxy(vm, "_data", key); - } - } - // observe data - observe(data, true /* asRootData */); - } - - function getData (data, vm) { - // #7573 disable dep collection when invoking data getters - pushTarget(); - try { - return data.call(vm, vm) - } catch (e) { - handleError(e, vm, "data()"); - return {} - } finally { - popTarget(); - } - } - - var computedWatcherOptions = { lazy: true }; - - function initComputed (vm, computed) { - // $flow-disable-line - var watchers = vm._computedWatchers = Object.create(null); - // computed properties are just getters during SSR - var isSSR = isServerRendering(); - - for (var key in computed) { - var userDef = computed[key]; - var getter = typeof userDef === 'function' ? userDef : userDef.get; - if (getter == null) { - warn( - ("Getter is missing for computed property \"" + key + "\"."), - vm - ); - } - - if (!isSSR) { - // create internal watcher for the computed property. - watchers[key] = new Watcher( - vm, - getter || noop, - noop, - computedWatcherOptions - ); - } - - // component-defined computed properties are already defined on the - // component prototype. We only need to define computed properties defined - // at instantiation here. - if (!(key in vm)) { - defineComputed(vm, key, userDef); - } else { - if (key in vm.$data) { - warn(("The computed property \"" + key + "\" is already defined in data."), vm); - } else if (vm.$options.props && key in vm.$options.props) { - warn(("The computed property \"" + key + "\" is already defined as a prop."), vm); - } - } - } - } - - function defineComputed ( - target, - key, - userDef - ) { - var shouldCache = !isServerRendering(); - if (typeof userDef === 'function') { - sharedPropertyDefinition.get = shouldCache - ? createComputedGetter(key) - : createGetterInvoker(userDef); - sharedPropertyDefinition.set = noop; - } else { - sharedPropertyDefinition.get = userDef.get - ? shouldCache && userDef.cache !== false - ? createComputedGetter(key) - : createGetterInvoker(userDef.get) - : noop; - sharedPropertyDefinition.set = userDef.set || noop; - } - if (sharedPropertyDefinition.set === noop) { - sharedPropertyDefinition.set = function () { - warn( - ("Computed property \"" + key + "\" was assigned to but it has no setter."), - this - ); - }; - } - Object.defineProperty(target, key, sharedPropertyDefinition); - } - - function createComputedGetter (key) { - return function computedGetter () { - var watcher = this._computedWatchers && this._computedWatchers[key]; - if (watcher) { - if (watcher.dirty) { - watcher.evaluate(); - } - if (Dep.target) { - watcher.depend(); - } - return watcher.value - } - } - } - - function createGetterInvoker(fn) { - return function computedGetter () { - return fn.call(this, this) - } - } - - function initMethods (vm, methods) { - var props = vm.$options.props; - for (var key in methods) { - { - if (typeof methods[key] !== 'function') { - warn( - "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " + - "Did you reference the function correctly?", - vm - ); - } - if (props && hasOwn(props, key)) { - warn( - ("Method \"" + key + "\" has already been defined as a prop."), - vm - ); - } - if ((key in vm) && isReserved(key)) { - warn( - "Method \"" + key + "\" conflicts with an existing Vue instance method. " + - "Avoid defining component methods that start with _ or $." - ); - } - } - vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm); - } - } - - function initWatch (vm, watch) { - for (var key in watch) { - var handler = watch[key]; - if (Array.isArray(handler)) { - for (var i = 0; i < handler.length; i++) { - createWatcher(vm, key, handler[i]); - } - } else { - createWatcher(vm, key, handler); - } - } - } - - function createWatcher ( - vm, - expOrFn, - handler, - options - ) { - if (isPlainObject(handler)) { - options = handler; - handler = handler.handler; - } - if (typeof handler === 'string') { - handler = vm[handler]; - } - return vm.$watch(expOrFn, handler, options) - } - - function stateMixin (Vue) { - // flow somehow has problems with directly declared definition object - // when using Object.defineProperty, so we have to procedurally build up - // the object here. - var dataDef = {}; - dataDef.get = function () { return this._data }; - var propsDef = {}; - propsDef.get = function () { return this._props }; - { - dataDef.set = function () { - warn( - 'Avoid replacing instance root $data. ' + - 'Use nested data properties instead.', - this - ); - }; - propsDef.set = function () { - warn("$props is readonly.", this); - }; - } - Object.defineProperty(Vue.prototype, '$data', dataDef); - Object.defineProperty(Vue.prototype, '$props', propsDef); - - Vue.prototype.$set = set; - Vue.prototype.$delete = del; - - Vue.prototype.$watch = function ( - expOrFn, - cb, - options - ) { - var vm = this; - if (isPlainObject(cb)) { - return createWatcher(vm, expOrFn, cb, options) - } - options = options || {}; - options.user = true; - var watcher = new Watcher(vm, expOrFn, cb, options); - if (options.immediate) { - try { - cb.call(vm, watcher.value); - } catch (error) { - handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\"")); - } - } - return function unwatchFn () { - watcher.teardown(); - } - }; - } - - /* */ - - var uid$3 = 0; - - function initMixin (Vue) { - Vue.prototype._init = function (options) { - var vm = this; - // a uid - vm._uid = uid$3++; - - var startTag, endTag; - /* istanbul ignore if */ - if (config.performance && mark) { - startTag = "vue-perf-start:" + (vm._uid); - endTag = "vue-perf-end:" + (vm._uid); - mark(startTag); - } - - // a flag to avoid this being observed - vm._isVue = true; - // merge options - if (options && options._isComponent) { - // optimize internal component instantiation - // since dynamic options merging is pretty slow, and none of the - // internal component options needs special treatment. - initInternalComponent(vm, options); - } else { - vm.$options = mergeOptions( - resolveConstructorOptions(vm.constructor), - options || {}, - vm - ); - } - /* istanbul ignore else */ - { - initProxy(vm); - } - // expose real self - vm._self = vm; - initLifecycle(vm); - initEvents(vm); - initRender(vm); - callHook(vm, 'beforeCreate'); - initInjections(vm); // resolve injections before data/props - initState(vm); - initProvide(vm); // resolve provide after data/props - callHook(vm, 'created'); - - /* istanbul ignore if */ - if (config.performance && mark) { - vm._name = formatComponentName(vm, false); - mark(endTag); - measure(("vue " + (vm._name) + " init"), startTag, endTag); - } - - if (vm.$options.el) { - vm.$mount(vm.$options.el); - } - }; - } - - function initInternalComponent (vm, options) { - var opts = vm.$options = Object.create(vm.constructor.options); - // doing this because it's faster than dynamic enumeration. - var parentVnode = options._parentVnode; - opts.parent = options.parent; - opts._parentVnode = parentVnode; - - var vnodeComponentOptions = parentVnode.componentOptions; - opts.propsData = vnodeComponentOptions.propsData; - opts._parentListeners = vnodeComponentOptions.listeners; - opts._renderChildren = vnodeComponentOptions.children; - opts._componentTag = vnodeComponentOptions.tag; - - if (options.render) { - opts.render = options.render; - opts.staticRenderFns = options.staticRenderFns; - } - } - - function resolveConstructorOptions (Ctor) { - var options = Ctor.options; - if (Ctor.super) { - var superOptions = resolveConstructorOptions(Ctor.super); - var cachedSuperOptions = Ctor.superOptions; - if (superOptions !== cachedSuperOptions) { - // super option changed, - // need to resolve new options. - Ctor.superOptions = superOptions; - // check if there are any late-modified/attached options (#4976) - var modifiedOptions = resolveModifiedOptions(Ctor); - // update base extend options - if (modifiedOptions) { - extend(Ctor.extendOptions, modifiedOptions); - } - options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions); - if (options.name) { - options.components[options.name] = Ctor; - } - } - } - return options - } - - function resolveModifiedOptions (Ctor) { - var modified; - var latest = Ctor.options; - var sealed = Ctor.sealedOptions; - for (var key in latest) { - if (latest[key] !== sealed[key]) { - if (!modified) { modified = {}; } - modified[key] = latest[key]; - } - } - return modified - } - - function Vue (options) { - if (!(this instanceof Vue) - ) { - warn('Vue is a constructor and should be called with the `new` keyword'); - } - this._init(options); - } - - initMixin(Vue); - stateMixin(Vue); - eventsMixin(Vue); - lifecycleMixin(Vue); - renderMixin(Vue); - - /* */ - - function initUse (Vue) { - Vue.use = function (plugin) { - var installedPlugins = (this._installedPlugins || (this._installedPlugins = [])); - if (installedPlugins.indexOf(plugin) > -1) { - return this - } - - // additional parameters - var args = toArray(arguments, 1); - args.unshift(this); - if (typeof plugin.install === 'function') { - plugin.install.apply(plugin, args); - } else if (typeof plugin === 'function') { - plugin.apply(null, args); - } - installedPlugins.push(plugin); - return this - }; - } - - /* */ - - function initMixin$1 (Vue) { - Vue.mixin = function (mixin) { - this.options = mergeOptions(this.options, mixin); - return this - }; - } - - /* */ - - function initExtend (Vue) { - /** - * Each instance constructor, including Vue, has a unique - * cid. This enables us to create wrapped "child - * constructors" for prototypal inheritance and cache them. - */ - Vue.cid = 0; - var cid = 1; - - /** - * Class inheritance - */ - Vue.extend = function (extendOptions) { - extendOptions = extendOptions || {}; - var Super = this; - var SuperId = Super.cid; - var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {}); - if (cachedCtors[SuperId]) { - return cachedCtors[SuperId] - } - - var name = extendOptions.name || Super.options.name; - if (name) { - validateComponentName(name); - } - - var Sub = function VueComponent (options) { - this._init(options); - }; - Sub.prototype = Object.create(Super.prototype); - Sub.prototype.constructor = Sub; - Sub.cid = cid++; - Sub.options = mergeOptions( - Super.options, - extendOptions - ); - Sub['super'] = Super; - - // For props and computed properties, we define the proxy getters on - // the Vue instances at extension time, on the extended prototype. This - // avoids Object.defineProperty calls for each instance created. - if (Sub.options.props) { - initProps$1(Sub); - } - if (Sub.options.computed) { - initComputed$1(Sub); - } - - // allow further extension/mixin/plugin usage - Sub.extend = Super.extend; - Sub.mixin = Super.mixin; - Sub.use = Super.use; - - // create asset registers, so extended classes - // can have their private assets too. - ASSET_TYPES.forEach(function (type) { - Sub[type] = Super[type]; - }); - // enable recursive self-lookup - if (name) { - Sub.options.components[name] = Sub; - } - - // keep a reference to the super options at extension time. - // later at instantiation we can check if Super's options have - // been updated. - Sub.superOptions = Super.options; - Sub.extendOptions = extendOptions; - Sub.sealedOptions = extend({}, Sub.options); - - // cache constructor - cachedCtors[SuperId] = Sub; - return Sub - }; - } - - function initProps$1 (Comp) { - var props = Comp.options.props; - for (var key in props) { - proxy(Comp.prototype, "_props", key); - } - } - - function initComputed$1 (Comp) { - var computed = Comp.options.computed; - for (var key in computed) { - defineComputed(Comp.prototype, key, computed[key]); - } - } - - /* */ - - function initAssetRegisters (Vue) { - /** - * Create asset registration methods. - */ - ASSET_TYPES.forEach(function (type) { - Vue[type] = function ( - id, - definition - ) { - if (!definition) { - return this.options[type + 's'][id] - } else { - /* istanbul ignore if */ - if (type === 'component') { - validateComponentName(id); - } - if (type === 'component' && isPlainObject(definition)) { - definition.name = definition.name || id; - definition = this.options._base.extend(definition); - } - if (type === 'directive' && typeof definition === 'function') { - definition = { bind: definition, update: definition }; - } - this.options[type + 's'][id] = definition; - return definition - } - }; - }); - } - - /* */ - - - - function getComponentName (opts) { - return opts && (opts.Ctor.options.name || opts.tag) - } - - function matches (pattern, name) { - if (Array.isArray(pattern)) { - return pattern.indexOf(name) > -1 - } else if (typeof pattern === 'string') { - return pattern.split(',').indexOf(name) > -1 - } else if (isRegExp(pattern)) { - return pattern.test(name) - } - /* istanbul ignore next */ - return false - } - - function pruneCache (keepAliveInstance, filter) { - var cache = keepAliveInstance.cache; - var keys = keepAliveInstance.keys; - var _vnode = keepAliveInstance._vnode; - for (var key in cache) { - var cachedNode = cache[key]; - if (cachedNode) { - var name = getComponentName(cachedNode.componentOptions); - if (name && !filter(name)) { - pruneCacheEntry(cache, key, keys, _vnode); - } - } - } - } - - function pruneCacheEntry ( - cache, - key, - keys, - current - ) { - var cached$$1 = cache[key]; - if (cached$$1 && (!current || cached$$1.tag !== current.tag)) { - cached$$1.componentInstance.$destroy(); - } - cache[key] = null; - remove(keys, key); - } - - var patternTypes = [String, RegExp, Array]; - - var KeepAlive = { - name: 'keep-alive', - abstract: true, - - props: { - include: patternTypes, - exclude: patternTypes, - max: [String, Number] - }, - - created: function created () { - this.cache = Object.create(null); - this.keys = []; - }, - - destroyed: function destroyed () { - for (var key in this.cache) { - pruneCacheEntry(this.cache, key, this.keys); - } - }, - - mounted: function mounted () { - var this$1 = this; - - this.$watch('include', function (val) { - pruneCache(this$1, function (name) { return matches(val, name); }); - }); - this.$watch('exclude', function (val) { - pruneCache(this$1, function (name) { return !matches(val, name); }); - }); - }, - - render: function render () { - var slot = this.$slots.default; - var vnode = getFirstComponentChild(slot); - var componentOptions = vnode && vnode.componentOptions; - if (componentOptions) { - // check pattern - var name = getComponentName(componentOptions); - var ref = this; - var include = ref.include; - var exclude = ref.exclude; - if ( - // not included - (include && (!name || !matches(include, name))) || - // excluded - (exclude && name && matches(exclude, name)) - ) { - return vnode - } - - var ref$1 = this; - var cache = ref$1.cache; - var keys = ref$1.keys; - var key = vnode.key == null - // same constructor may get registered as different local components - // so cid alone is not enough (#3269) - ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '') - : vnode.key; - if (cache[key]) { - vnode.componentInstance = cache[key].componentInstance; - // make current key freshest - remove(keys, key); - keys.push(key); - } else { - cache[key] = vnode; - keys.push(key); - // prune oldest entry - if (this.max && keys.length > parseInt(this.max)) { - pruneCacheEntry(cache, keys[0], keys, this._vnode); - } - } - - vnode.data.keepAlive = true; - } - return vnode || (slot && slot[0]) - } - }; - - var builtInComponents = { - KeepAlive: KeepAlive - }; - - /* */ - - function initGlobalAPI (Vue) { - // config - var configDef = {}; - configDef.get = function () { return config; }; - { - configDef.set = function () { - warn( - 'Do not replace the Vue.config object, set individual fields instead.' - ); - }; - } - Object.defineProperty(Vue, 'config', configDef); - - // exposed util methods. - // NOTE: these are not considered part of the public API - avoid relying on - // them unless you are aware of the risk. - Vue.util = { - warn: warn, - extend: extend, - mergeOptions: mergeOptions, - defineReactive: defineReactive$$1 - }; - - Vue.set = set; - Vue.delete = del; - Vue.nextTick = nextTick; - - // 2.6 explicit observable API - Vue.observable = function (obj) { - observe(obj); - return obj - }; - - Vue.options = Object.create(null); - ASSET_TYPES.forEach(function (type) { - Vue.options[type + 's'] = Object.create(null); - }); - - // this is used to identify the "base" constructor to extend all plain-object - // components with in Weex's multi-instance scenarios. - Vue.options._base = Vue; - - extend(Vue.options.components, builtInComponents); - - initUse(Vue); - initMixin$1(Vue); - initExtend(Vue); - initAssetRegisters(Vue); - } - - initGlobalAPI(Vue); - - Object.defineProperty(Vue.prototype, '$isServer', { - get: isServerRendering - }); - - Object.defineProperty(Vue.prototype, '$ssrContext', { - get: function get () { - /* istanbul ignore next */ - return this.$vnode && this.$vnode.ssrContext - } - }); - - // expose FunctionalRenderContext for ssr runtime helper installation - Object.defineProperty(Vue, 'FunctionalRenderContext', { - value: FunctionalRenderContext - }); - - Vue.version = '2.6.10'; - - /* */ - - // these are reserved for web because they are directly compiled away - // during template compilation - var isReservedAttr = makeMap('style,class'); - - // attributes that should be using props for binding - var acceptValue = makeMap('input,textarea,option,select,progress'); - var mustUseProp = function (tag, type, attr) { - return ( - (attr === 'value' && acceptValue(tag)) && type !== 'button' || - (attr === 'selected' && tag === 'option') || - (attr === 'checked' && tag === 'input') || - (attr === 'muted' && tag === 'video') - ) - }; - - var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck'); - - var isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only'); - - var convertEnumeratedValue = function (key, value) { - return isFalsyAttrValue(value) || value === 'false' - ? 'false' - // allow arbitrary string value for contenteditable - : key === 'contenteditable' && isValidContentEditableValue(value) - ? value - : 'true' - }; - - var isBooleanAttr = makeMap( - 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' + - 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' + - 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' + - 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' + - 'required,reversed,scoped,seamless,selected,sortable,translate,' + - 'truespeed,typemustmatch,visible' - ); - - var xlinkNS = 'http://www.w3.org/1999/xlink'; - - var isXlink = function (name) { - return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink' - }; - - var getXlinkProp = function (name) { - return isXlink(name) ? name.slice(6, name.length) : '' - }; - - var isFalsyAttrValue = function (val) { - return val == null || val === false - }; - - /* */ - - function genClassForVnode (vnode) { - var data = vnode.data; - var parentNode = vnode; - var childNode = vnode; - while (isDef(childNode.componentInstance)) { - childNode = childNode.componentInstance._vnode; - if (childNode && childNode.data) { - data = mergeClassData(childNode.data, data); - } - } - while (isDef(parentNode = parentNode.parent)) { - if (parentNode && parentNode.data) { - data = mergeClassData(data, parentNode.data); - } - } - return renderClass(data.staticClass, data.class) - } - - function mergeClassData (child, parent) { - return { - staticClass: concat(child.staticClass, parent.staticClass), - class: isDef(child.class) - ? [child.class, parent.class] - : parent.class - } - } - - function renderClass ( - staticClass, - dynamicClass - ) { - if (isDef(staticClass) || isDef(dynamicClass)) { - return concat(staticClass, stringifyClass(dynamicClass)) - } - /* istanbul ignore next */ - return '' - } - - function concat (a, b) { - return a ? b ? (a + ' ' + b) : a : (b || '') - } - - function stringifyClass (value) { - if (Array.isArray(value)) { - return stringifyArray(value) - } - if (isObject(value)) { - return stringifyObject(value) - } - if (typeof value === 'string') { - return value - } - /* istanbul ignore next */ - return '' - } - - function stringifyArray (value) { - var res = ''; - var stringified; - for (var i = 0, l = value.length; i < l; i++) { - if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') { - if (res) { res += ' '; } - res += stringified; - } - } - return res - } - - function stringifyObject (value) { - var res = ''; - for (var key in value) { - if (value[key]) { - if (res) { res += ' '; } - res += key; - } - } - return res - } - - /* */ - - var namespaceMap = { - svg: 'http://www.w3.org/2000/svg', - math: 'http://www.w3.org/1998/Math/MathML' - }; - - var isHTMLTag = makeMap( - 'html,body,base,head,link,meta,style,title,' + - 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' + - 'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' + - 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' + - 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' + - 'embed,object,param,source,canvas,script,noscript,del,ins,' + - 'caption,col,colgroup,table,thead,tbody,td,th,tr,' + - 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' + - 'output,progress,select,textarea,' + - 'details,dialog,menu,menuitem,summary,' + - 'content,element,shadow,template,blockquote,iframe,tfoot' - ); - - // this map is intentionally selective, only covering SVG elements that may - // contain child elements. - var isSVG = makeMap( - 'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' + - 'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' + - 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', - true - ); - - var isPreTag = function (tag) { return tag === 'pre'; }; - - var isReservedTag = function (tag) { - return isHTMLTag(tag) || isSVG(tag) - }; - - function getTagNamespace (tag) { - if (isSVG(tag)) { - return 'svg' - } - // basic support for MathML - // note it doesn't support other MathML elements being component roots - if (tag === 'math') { - return 'math' - } - } - - var unknownElementCache = Object.create(null); - function isUnknownElement (tag) { - /* istanbul ignore if */ - if (!inBrowser) { - return true - } - if (isReservedTag(tag)) { - return false - } - tag = tag.toLowerCase(); - /* istanbul ignore if */ - if (unknownElementCache[tag] != null) { - return unknownElementCache[tag] - } - var el = document.createElement(tag); - if (tag.indexOf('-') > -1) { - // http://stackoverflow.com/a/28210364/1070244 - return (unknownElementCache[tag] = ( - el.constructor === window.HTMLUnknownElement || - el.constructor === window.HTMLElement - )) - } else { - return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString())) - } - } - - var isTextInputType = makeMap('text,number,password,search,email,tel,url'); - - /* */ - - /** - * Query an element selector if it's not an element already. - */ - function query (el) { - if (typeof el === 'string') { - var selected = document.querySelector(el); - if (!selected) { - warn( - 'Cannot find element: ' + el - ); - return document.createElement('div') - } - return selected - } else { - return el - } - } - - /* */ - - function createElement$1 (tagName, vnode) { - var elm = document.createElement(tagName); - if (tagName !== 'select') { - return elm - } - // false or null will remove the attribute but undefined will not - if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) { - elm.setAttribute('multiple', 'multiple'); - } - return elm - } - - function createElementNS (namespace, tagName) { - return document.createElementNS(namespaceMap[namespace], tagName) - } - - function createTextNode (text) { - return document.createTextNode(text) - } - - function createComment (text) { - return document.createComment(text) - } - - function insertBefore (parentNode, newNode, referenceNode) { - parentNode.insertBefore(newNode, referenceNode); - } - - function removeChild (node, child) { - node.removeChild(child); - } - - function appendChild (node, child) { - node.appendChild(child); - } - - function parentNode (node) { - return node.parentNode - } - - function nextSibling (node) { - return node.nextSibling - } - - function tagName (node) { - return node.tagName - } - - function setTextContent (node, text) { - node.textContent = text; - } - - function setStyleScope (node, scopeId) { - node.setAttribute(scopeId, ''); - } - - var nodeOps = /*#__PURE__*/Object.freeze({ - createElement: createElement$1, - createElementNS: createElementNS, - createTextNode: createTextNode, - createComment: createComment, - insertBefore: insertBefore, - removeChild: removeChild, - appendChild: appendChild, - parentNode: parentNode, - nextSibling: nextSibling, - tagName: tagName, - setTextContent: setTextContent, - setStyleScope: setStyleScope - }); - - /* */ - - var ref = { - create: function create (_, vnode) { - registerRef(vnode); - }, - update: function update (oldVnode, vnode) { - if (oldVnode.data.ref !== vnode.data.ref) { - registerRef(oldVnode, true); - registerRef(vnode); - } - }, - destroy: function destroy (vnode) { - registerRef(vnode, true); - } - }; - - function registerRef (vnode, isRemoval) { - var key = vnode.data.ref; - if (!isDef(key)) { return } - - var vm = vnode.context; - var ref = vnode.componentInstance || vnode.elm; - var refs = vm.$refs; - if (isRemoval) { - if (Array.isArray(refs[key])) { - remove(refs[key], ref); - } else if (refs[key] === ref) { - refs[key] = undefined; - } - } else { - if (vnode.data.refInFor) { - if (!Array.isArray(refs[key])) { - refs[key] = [ref]; - } else if (refs[key].indexOf(ref) < 0) { - // $flow-disable-line - refs[key].push(ref); - } - } else { - refs[key] = ref; - } - } - } - - /** - * Virtual DOM patching algorithm based on Snabbdom by - * Simon Friis Vindum (@paldepind) - * Licensed under the MIT License - * https://github.com/paldepind/snabbdom/blob/master/LICENSE - * - * modified by Evan You (@yyx990803) - * - * Not type-checking this because this file is perf-critical and the cost - * of making flow understand it is not worth it. - */ - - var emptyNode = new VNode('', {}, []); - - var hooks = ['create', 'activate', 'update', 'remove', 'destroy']; - - function sameVnode (a, b) { - return ( - a.key === b.key && ( - ( - a.tag === b.tag && - a.isComment === b.isComment && - isDef(a.data) === isDef(b.data) && - sameInputType(a, b) - ) || ( - isTrue(a.isAsyncPlaceholder) && - a.asyncFactory === b.asyncFactory && - isUndef(b.asyncFactory.error) - ) - ) - ) - } - - function sameInputType (a, b) { - if (a.tag !== 'input') { return true } - var i; - var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type; - var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type; - return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB) - } - - function createKeyToOldIdx (children, beginIdx, endIdx) { - var i, key; - var map = {}; - for (i = beginIdx; i <= endIdx; ++i) { - key = children[i].key; - if (isDef(key)) { map[key] = i; } - } - return map - } - - function createPatchFunction (backend) { - var i, j; - var cbs = {}; - - var modules = backend.modules; - var nodeOps = backend.nodeOps; - - for (i = 0; i < hooks.length; ++i) { - cbs[hooks[i]] = []; - for (j = 0; j < modules.length; ++j) { - if (isDef(modules[j][hooks[i]])) { - cbs[hooks[i]].push(modules[j][hooks[i]]); - } - } - } - - function emptyNodeAt (elm) { - return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm) - } - - function createRmCb (childElm, listeners) { - function remove$$1 () { - if (--remove$$1.listeners === 0) { - removeNode(childElm); - } - } - remove$$1.listeners = listeners; - return remove$$1 - } - - function removeNode (el) { - var parent = nodeOps.parentNode(el); - // element may have already been removed due to v-html / v-text - if (isDef(parent)) { - nodeOps.removeChild(parent, el); - } - } - - function isUnknownElement$$1 (vnode, inVPre) { - return ( - !inVPre && - !vnode.ns && - !( - config.ignoredElements.length && - config.ignoredElements.some(function (ignore) { - return isRegExp(ignore) - ? ignore.test(vnode.tag) - : ignore === vnode.tag - }) - ) && - config.isUnknownElement(vnode.tag) - ) - } - - var creatingElmInVPre = 0; - - function createElm ( - vnode, - insertedVnodeQueue, - parentElm, - refElm, - nested, - ownerArray, - index - ) { - if (isDef(vnode.elm) && isDef(ownerArray)) { - // This vnode was used in a previous render! - // now it's used as a new node, overwriting its elm would cause - // potential patch errors down the road when it's used as an insertion - // reference node. Instead, we clone the node on-demand before creating - // associated DOM element for it. - vnode = ownerArray[index] = cloneVNode(vnode); - } - - vnode.isRootInsert = !nested; // for transition enter check - if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) { - return - } - - var data = vnode.data; - var children = vnode.children; - var tag = vnode.tag; - if (isDef(tag)) { - { - if (data && data.pre) { - creatingElmInVPre++; - } - if (isUnknownElement$$1(vnode, creatingElmInVPre)) { - warn( - 'Unknown custom element: <' + tag + '> - did you ' + - 'register the component correctly? For recursive components, ' + - 'make sure to provide the "name" option.', - vnode.context - ); - } - } - - vnode.elm = vnode.ns - ? nodeOps.createElementNS(vnode.ns, tag) - : nodeOps.createElement(tag, vnode); - setScope(vnode); - - /* istanbul ignore if */ - { - createChildren(vnode, children, insertedVnodeQueue); - if (isDef(data)) { - invokeCreateHooks(vnode, insertedVnodeQueue); - } - insert(parentElm, vnode.elm, refElm); - } - - if (data && data.pre) { - creatingElmInVPre--; - } - } else if (isTrue(vnode.isComment)) { - vnode.elm = nodeOps.createComment(vnode.text); - insert(parentElm, vnode.elm, refElm); - } else { - vnode.elm = nodeOps.createTextNode(vnode.text); - insert(parentElm, vnode.elm, refElm); - } - } - - function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) { - var i = vnode.data; - if (isDef(i)) { - var isReactivated = isDef(vnode.componentInstance) && i.keepAlive; - if (isDef(i = i.hook) && isDef(i = i.init)) { - i(vnode, false /* hydrating */); - } - // after calling the init hook, if the vnode is a child component - // it should've created a child instance and mounted it. the child - // component also has set the placeholder vnode's elm. - // in that case we can just return the element and be done. - if (isDef(vnode.componentInstance)) { - initComponent(vnode, insertedVnodeQueue); - insert(parentElm, vnode.elm, refElm); - if (isTrue(isReactivated)) { - reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm); - } - return true - } - } - } - - function initComponent (vnode, insertedVnodeQueue) { - if (isDef(vnode.data.pendingInsert)) { - insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert); - vnode.data.pendingInsert = null; - } - vnode.elm = vnode.componentInstance.$el; - if (isPatchable(vnode)) { - invokeCreateHooks(vnode, insertedVnodeQueue); - setScope(vnode); - } else { - // empty component root. - // skip all element-related modules except for ref (#3455) - registerRef(vnode); - // make sure to invoke the insert hook - insertedVnodeQueue.push(vnode); - } - } - - function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) { - var i; - // hack for #4339: a reactivated component with inner transition - // does not trigger because the inner node's created hooks are not called - // again. It's not ideal to involve module-specific logic in here but - // there doesn't seem to be a better way to do it. - var innerNode = vnode; - while (innerNode.componentInstance) { - innerNode = innerNode.componentInstance._vnode; - if (isDef(i = innerNode.data) && isDef(i = i.transition)) { - for (i = 0; i < cbs.activate.length; ++i) { - cbs.activate[i](emptyNode, innerNode); - } - insertedVnodeQueue.push(innerNode); - break - } - } - // unlike a newly created component, - // a reactivated keep-alive component doesn't insert itself - insert(parentElm, vnode.elm, refElm); - } - - function insert (parent, elm, ref$$1) { - if (isDef(parent)) { - if (isDef(ref$$1)) { - if (nodeOps.parentNode(ref$$1) === parent) { - nodeOps.insertBefore(parent, elm, ref$$1); - } - } else { - nodeOps.appendChild(parent, elm); - } - } - } - - function createChildren (vnode, children, insertedVnodeQueue) { - if (Array.isArray(children)) { - { - checkDuplicateKeys(children); - } - for (var i = 0; i < children.length; ++i) { - createElm(children[i], insertedVnodeQueue, vnode.elm, null, true, children, i); - } - } else if (isPrimitive(vnode.text)) { - nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text))); - } - } - - function isPatchable (vnode) { - while (vnode.componentInstance) { - vnode = vnode.componentInstance._vnode; - } - return isDef(vnode.tag) - } - - function invokeCreateHooks (vnode, insertedVnodeQueue) { - for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) { - cbs.create[i$1](emptyNode, vnode); - } - i = vnode.data.hook; // Reuse variable - if (isDef(i)) { - if (isDef(i.create)) { i.create(emptyNode, vnode); } - if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); } - } - } - - // set scope id attribute for scoped CSS. - // this is implemented as a special case to avoid the overhead - // of going through the normal attribute patching process. - function setScope (vnode) { - var i; - if (isDef(i = vnode.fnScopeId)) { - nodeOps.setStyleScope(vnode.elm, i); - } else { - var ancestor = vnode; - while (ancestor) { - if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) { - nodeOps.setStyleScope(vnode.elm, i); - } - ancestor = ancestor.parent; - } - } - // for slot content they should also get the scopeId from the host instance. - if (isDef(i = activeInstance) && - i !== vnode.context && - i !== vnode.fnContext && - isDef(i = i.$options._scopeId) - ) { - nodeOps.setStyleScope(vnode.elm, i); - } - } - - function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) { - for (; startIdx <= endIdx; ++startIdx) { - createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx); - } - } - - function invokeDestroyHook (vnode) { - var i, j; - var data = vnode.data; - if (isDef(data)) { - if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); } - for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); } - } - if (isDef(i = vnode.children)) { - for (j = 0; j < vnode.children.length; ++j) { - invokeDestroyHook(vnode.children[j]); - } - } - } - - function removeVnodes (parentElm, vnodes, startIdx, endIdx) { - for (; startIdx <= endIdx; ++startIdx) { - var ch = vnodes[startIdx]; - if (isDef(ch)) { - if (isDef(ch.tag)) { - removeAndInvokeRemoveHook(ch); - invokeDestroyHook(ch); - } else { // Text node - removeNode(ch.elm); - } - } - } - } - - function removeAndInvokeRemoveHook (vnode, rm) { - if (isDef(rm) || isDef(vnode.data)) { - var i; - var listeners = cbs.remove.length + 1; - if (isDef(rm)) { - // we have a recursively passed down rm callback - // increase the listeners count - rm.listeners += listeners; - } else { - // directly removing - rm = createRmCb(vnode.elm, listeners); - } - // recursively invoke hooks on child component root node - if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) { - removeAndInvokeRemoveHook(i, rm); - } - for (i = 0; i < cbs.remove.length; ++i) { - cbs.remove[i](vnode, rm); - } - if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) { - i(vnode, rm); - } else { - rm(); - } - } else { - removeNode(vnode.elm); - } - } - - function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) { - var oldStartIdx = 0; - var newStartIdx = 0; - var oldEndIdx = oldCh.length - 1; - var oldStartVnode = oldCh[0]; - var oldEndVnode = oldCh[oldEndIdx]; - var newEndIdx = newCh.length - 1; - var newStartVnode = newCh[0]; - var newEndVnode = newCh[newEndIdx]; - var oldKeyToIdx, idxInOld, vnodeToMove, refElm; - - // removeOnly is a special flag used only by <transition-group> - // to ensure removed elements stay in correct relative positions - // during leaving transitions - var canMove = !removeOnly; - - { - checkDuplicateKeys(newCh); - } - - while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) { - if (isUndef(oldStartVnode)) { - oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left - } else if (isUndef(oldEndVnode)) { - oldEndVnode = oldCh[--oldEndIdx]; - } else if (sameVnode(oldStartVnode, newStartVnode)) { - patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx); - oldStartVnode = oldCh[++oldStartIdx]; - newStartVnode = newCh[++newStartIdx]; - } else if (sameVnode(oldEndVnode, newEndVnode)) { - patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx); - oldEndVnode = oldCh[--oldEndIdx]; - newEndVnode = newCh[--newEndIdx]; - } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right - patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx); - canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm)); - oldStartVnode = oldCh[++oldStartIdx]; - newEndVnode = newCh[--newEndIdx]; - } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left - patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx); - canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm); - oldEndVnode = oldCh[--oldEndIdx]; - newStartVnode = newCh[++newStartIdx]; - } else { - if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); } - idxInOld = isDef(newStartVnode.key) - ? oldKeyToIdx[newStartVnode.key] - : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx); - if (isUndef(idxInOld)) { // New element - createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx); - } else { - vnodeToMove = oldCh[idxInOld]; - if (sameVnode(vnodeToMove, newStartVnode)) { - patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx); - oldCh[idxInOld] = undefined; - canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm); - } else { - // same key but different element. treat as new element - createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx); - } - } - newStartVnode = newCh[++newStartIdx]; - } - } - if (oldStartIdx > oldEndIdx) { - refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm; - addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue); - } else if (newStartIdx > newEndIdx) { - removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx); - } - } - - function checkDuplicateKeys (children) { - var seenKeys = {}; - for (var i = 0; i < children.length; i++) { - var vnode = children[i]; - var key = vnode.key; - if (isDef(key)) { - if (seenKeys[key]) { - warn( - ("Duplicate keys detected: '" + key + "'. This may cause an update error."), - vnode.context - ); - } else { - seenKeys[key] = true; - } - } - } - } - - function findIdxInOld (node, oldCh, start, end) { - for (var i = start; i < end; i++) { - var c = oldCh[i]; - if (isDef(c) && sameVnode(node, c)) { return i } - } - } - - function patchVnode ( - oldVnode, - vnode, - insertedVnodeQueue, - ownerArray, - index, - removeOnly - ) { - if (oldVnode === vnode) { - return - } - - if (isDef(vnode.elm) && isDef(ownerArray)) { - // clone reused vnode - vnode = ownerArray[index] = cloneVNode(vnode); - } - - var elm = vnode.elm = oldVnode.elm; - - if (isTrue(oldVnode.isAsyncPlaceholder)) { - if (isDef(vnode.asyncFactory.resolved)) { - hydrate(oldVnode.elm, vnode, insertedVnodeQueue); - } else { - vnode.isAsyncPlaceholder = true; - } - return - } - - // reuse element for static trees. - // note we only do this if the vnode is cloned - - // if the new node is not cloned it means the render functions have been - // reset by the hot-reload-api and we need to do a proper re-render. - if (isTrue(vnode.isStatic) && - isTrue(oldVnode.isStatic) && - vnode.key === oldVnode.key && - (isTrue(vnode.isCloned) || isTrue(vnode.isOnce)) - ) { - vnode.componentInstance = oldVnode.componentInstance; - return - } - - var i; - var data = vnode.data; - if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) { - i(oldVnode, vnode); - } - - var oldCh = oldVnode.children; - var ch = vnode.children; - if (isDef(data) && isPatchable(vnode)) { - for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); } - if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); } - } - if (isUndef(vnode.text)) { - if (isDef(oldCh) && isDef(ch)) { - if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); } - } else if (isDef(ch)) { - { - checkDuplicateKeys(ch); - } - if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); } - addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue); - } else if (isDef(oldCh)) { - removeVnodes(elm, oldCh, 0, oldCh.length - 1); - } else if (isDef(oldVnode.text)) { - nodeOps.setTextContent(elm, ''); - } - } else if (oldVnode.text !== vnode.text) { - nodeOps.setTextContent(elm, vnode.text); - } - if (isDef(data)) { - if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); } - } - } - - function invokeInsertHook (vnode, queue, initial) { - // delay insert hooks for component root nodes, invoke them after the - // element is really inserted - if (isTrue(initial) && isDef(vnode.parent)) { - vnode.parent.data.pendingInsert = queue; - } else { - for (var i = 0; i < queue.length; ++i) { - queue[i].data.hook.insert(queue[i]); - } - } - } - - var hydrationBailed = false; - // list of modules that can skip create hook during hydration because they - // are already rendered on the client or has no need for initialization - // Note: style is excluded because it relies on initial clone for future - // deep updates (#7063). - var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key'); - - // Note: this is a browser-only function so we can assume elms are DOM nodes. - function hydrate (elm, vnode, insertedVnodeQueue, inVPre) { - var i; - var tag = vnode.tag; - var data = vnode.data; - var children = vnode.children; - inVPre = inVPre || (data && data.pre); - vnode.elm = elm; - - if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) { - vnode.isAsyncPlaceholder = true; - return true - } - // assert node match - { - if (!assertNodeMatch(elm, vnode, inVPre)) { - return false - } - } - if (isDef(data)) { - if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); } - if (isDef(i = vnode.componentInstance)) { - // child component. it should have hydrated its own tree. - initComponent(vnode, insertedVnodeQueue); - return true - } - } - if (isDef(tag)) { - if (isDef(children)) { - // empty element, allow client to pick up and populate children - if (!elm.hasChildNodes()) { - createChildren(vnode, children, insertedVnodeQueue); - } else { - // v-html and domProps: innerHTML - if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) { - if (i !== elm.innerHTML) { - /* istanbul ignore if */ - if (typeof console !== 'undefined' && - !hydrationBailed - ) { - hydrationBailed = true; - console.warn('Parent: ', elm); - console.warn('server innerHTML: ', i); - console.warn('client innerHTML: ', elm.innerHTML); - } - return false - } - } else { - // iterate and compare children lists - var childrenMatch = true; - var childNode = elm.firstChild; - for (var i$1 = 0; i$1 < children.length; i$1++) { - if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) { - childrenMatch = false; - break - } - childNode = childNode.nextSibling; - } - // if childNode is not null, it means the actual childNodes list is - // longer than the virtual children list. - if (!childrenMatch || childNode) { - /* istanbul ignore if */ - if (typeof console !== 'undefined' && - !hydrationBailed - ) { - hydrationBailed = true; - console.warn('Parent: ', elm); - console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children); - } - return false - } - } - } - } - if (isDef(data)) { - var fullInvoke = false; - for (var key in data) { - if (!isRenderedModule(key)) { - fullInvoke = true; - invokeCreateHooks(vnode, insertedVnodeQueue); - break - } - } - if (!fullInvoke && data['class']) { - // ensure collecting deps for deep class bindings for future updates - traverse(data['class']); - } - } - } else if (elm.data !== vnode.text) { - elm.data = vnode.text; - } - return true - } - - function assertNodeMatch (node, vnode, inVPre) { - if (isDef(vnode.tag)) { - return vnode.tag.indexOf('vue-component') === 0 || ( - !isUnknownElement$$1(vnode, inVPre) && - vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase()) - ) - } else { - return node.nodeType === (vnode.isComment ? 8 : 3) - } - } - - return function patch (oldVnode, vnode, hydrating, removeOnly) { - if (isUndef(vnode)) { - if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); } - return - } - - var isInitialPatch = false; - var insertedVnodeQueue = []; - - if (isUndef(oldVnode)) { - // empty mount (likely as component), create new root element - isInitialPatch = true; - createElm(vnode, insertedVnodeQueue); - } else { - var isRealElement = isDef(oldVnode.nodeType); - if (!isRealElement && sameVnode(oldVnode, vnode)) { - // patch existing root node - patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly); - } else { - if (isRealElement) { - // mounting to a real element - // check if this is server-rendered content and if we can perform - // a successful hydration. - if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) { - oldVnode.removeAttribute(SSR_ATTR); - hydrating = true; - } - if (isTrue(hydrating)) { - if (hydrate(oldVnode, vnode, insertedVnodeQueue)) { - invokeInsertHook(vnode, insertedVnodeQueue, true); - return oldVnode - } else { - warn( - 'The client-side rendered virtual DOM tree is not matching ' + - 'server-rendered content. This is likely caused by incorrect ' + - 'HTML markup, for example nesting block-level elements inside ' + - '<p>, or missing <tbody>. Bailing hydration and performing ' + - 'full client-side render.' - ); - } - } - // either not server-rendered, or hydration failed. - // create an empty node and replace it - oldVnode = emptyNodeAt(oldVnode); - } - - // replacing existing element - var oldElm = oldVnode.elm; - var parentElm = nodeOps.parentNode(oldElm); - - // create new node - createElm( - vnode, - insertedVnodeQueue, - // extremely rare edge case: do not insert if old element is in a - // leaving transition. Only happens when combining transition + - // keep-alive + HOCs. (#4590) - oldElm._leaveCb ? null : parentElm, - nodeOps.nextSibling(oldElm) - ); - - // update parent placeholder node element, recursively - if (isDef(vnode.parent)) { - var ancestor = vnode.parent; - var patchable = isPatchable(vnode); - while (ancestor) { - for (var i = 0; i < cbs.destroy.length; ++i) { - cbs.destroy[i](ancestor); - } - ancestor.elm = vnode.elm; - if (patchable) { - for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) { - cbs.create[i$1](emptyNode, ancestor); - } - // #6513 - // invoke insert hooks that may have been merged by create hooks. - // e.g. for directives that uses the "inserted" hook. - var insert = ancestor.data.hook.insert; - if (insert.merged) { - // start at index 1 to avoid re-invoking component mounted hook - for (var i$2 = 1; i$2 < insert.fns.length; i$2++) { - insert.fns[i$2](); - } - } - } else { - registerRef(ancestor); - } - ancestor = ancestor.parent; - } - } - - // destroy old node - if (isDef(parentElm)) { - removeVnodes(parentElm, [oldVnode], 0, 0); - } else if (isDef(oldVnode.tag)) { - invokeDestroyHook(oldVnode); - } - } - } - - invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch); - return vnode.elm - } - } - - /* */ - - var directives = { - create: updateDirectives, - update: updateDirectives, - destroy: function unbindDirectives (vnode) { - updateDirectives(vnode, emptyNode); - } - }; - - function updateDirectives (oldVnode, vnode) { - if (oldVnode.data.directives || vnode.data.directives) { - _update(oldVnode, vnode); - } - } - - function _update (oldVnode, vnode) { - var isCreate = oldVnode === emptyNode; - var isDestroy = vnode === emptyNode; - var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context); - var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context); - - var dirsWithInsert = []; - var dirsWithPostpatch = []; - - var key, oldDir, dir; - for (key in newDirs) { - oldDir = oldDirs[key]; - dir = newDirs[key]; - if (!oldDir) { - // new directive, bind - callHook$1(dir, 'bind', vnode, oldVnode); - if (dir.def && dir.def.inserted) { - dirsWithInsert.push(dir); - } - } else { - // existing directive, update - dir.oldValue = oldDir.value; - dir.oldArg = oldDir.arg; - callHook$1(dir, 'update', vnode, oldVnode); - if (dir.def && dir.def.componentUpdated) { - dirsWithPostpatch.push(dir); - } - } - } - - if (dirsWithInsert.length) { - var callInsert = function () { - for (var i = 0; i < dirsWithInsert.length; i++) { - callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode); - } - }; - if (isCreate) { - mergeVNodeHook(vnode, 'insert', callInsert); - } else { - callInsert(); - } - } - - if (dirsWithPostpatch.length) { - mergeVNodeHook(vnode, 'postpatch', function () { - for (var i = 0; i < dirsWithPostpatch.length; i++) { - callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode); - } - }); - } - - if (!isCreate) { - for (key in oldDirs) { - if (!newDirs[key]) { - // no longer present, unbind - callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy); - } - } - } - } - - var emptyModifiers = Object.create(null); - - function normalizeDirectives$1 ( - dirs, - vm - ) { - var res = Object.create(null); - if (!dirs) { - // $flow-disable-line - return res - } - var i, dir; - for (i = 0; i < dirs.length; i++) { - dir = dirs[i]; - if (!dir.modifiers) { - // $flow-disable-line - dir.modifiers = emptyModifiers; - } - res[getRawDirName(dir)] = dir; - dir.def = resolveAsset(vm.$options, 'directives', dir.name, true); - } - // $flow-disable-line - return res - } - - function getRawDirName (dir) { - return dir.rawName || ((dir.name) + "." + (Object.keys(dir.modifiers || {}).join('.'))) - } - - function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) { - var fn = dir.def && dir.def[hook]; - if (fn) { - try { - fn(vnode.elm, dir, vnode, oldVnode, isDestroy); - } catch (e) { - handleError(e, vnode.context, ("directive " + (dir.name) + " " + hook + " hook")); - } - } - } - - var baseModules = [ - ref, - directives - ]; - - /* */ - - function updateAttrs (oldVnode, vnode) { - var opts = vnode.componentOptions; - if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) { - return - } - if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) { - return - } - var key, cur, old; - var elm = vnode.elm; - var oldAttrs = oldVnode.data.attrs || {}; - var attrs = vnode.data.attrs || {}; - // clone observed objects, as the user probably wants to mutate it - if (isDef(attrs.__ob__)) { - attrs = vnode.data.attrs = extend({}, attrs); - } - - for (key in attrs) { - cur = attrs[key]; - old = oldAttrs[key]; - if (old !== cur) { - setAttr(elm, key, cur); - } - } - // #4391: in IE9, setting type can reset value for input[type=radio] - // #6666: IE/Edge forces progress value down to 1 before setting a max - /* istanbul ignore if */ - if ((isIE || isEdge) && attrs.value !== oldAttrs.value) { - setAttr(elm, 'value', attrs.value); - } - for (key in oldAttrs) { - if (isUndef(attrs[key])) { - if (isXlink(key)) { - elm.removeAttributeNS(xlinkNS, getXlinkProp(key)); - } else if (!isEnumeratedAttr(key)) { - elm.removeAttribute(key); - } - } - } - } - - function setAttr (el, key, value) { - if (el.tagName.indexOf('-') > -1) { - baseSetAttr(el, key, value); - } else if (isBooleanAttr(key)) { - // set attribute for blank value - // e.g. <option disabled>Select one</option> - if (isFalsyAttrValue(value)) { - el.removeAttribute(key); - } else { - // technically allowfullscreen is a boolean attribute for <iframe>, - // but Flash expects a value of "true" when used on <embed> tag - value = key === 'allowfullscreen' && el.tagName === 'EMBED' - ? 'true' - : key; - el.setAttribute(key, value); - } - } else if (isEnumeratedAttr(key)) { - el.setAttribute(key, convertEnumeratedValue(key, value)); - } else if (isXlink(key)) { - if (isFalsyAttrValue(value)) { - el.removeAttributeNS(xlinkNS, getXlinkProp(key)); - } else { - el.setAttributeNS(xlinkNS, key, value); - } - } else { - baseSetAttr(el, key, value); - } - } - - function baseSetAttr (el, key, value) { - if (isFalsyAttrValue(value)) { - el.removeAttribute(key); - } else { - // #7138: IE10 & 11 fires input event when setting placeholder on - // <textarea>... block the first input event and remove the blocker - // immediately. - /* istanbul ignore if */ - if ( - isIE && !isIE9 && - el.tagName === 'TEXTAREA' && - key === 'placeholder' && value !== '' && !el.__ieph - ) { - var blocker = function (e) { - e.stopImmediatePropagation(); - el.removeEventListener('input', blocker); - }; - el.addEventListener('input', blocker); - // $flow-disable-line - el.__ieph = true; /* IE placeholder patched */ - } - el.setAttribute(key, value); - } - } - - var attrs = { - create: updateAttrs, - update: updateAttrs - }; - - /* */ - - function updateClass (oldVnode, vnode) { - var el = vnode.elm; - var data = vnode.data; - var oldData = oldVnode.data; - if ( - isUndef(data.staticClass) && - isUndef(data.class) && ( - isUndef(oldData) || ( - isUndef(oldData.staticClass) && - isUndef(oldData.class) - ) - ) - ) { - return - } - - var cls = genClassForVnode(vnode); - - // handle transition classes - var transitionClass = el._transitionClasses; - if (isDef(transitionClass)) { - cls = concat(cls, stringifyClass(transitionClass)); - } - - // set the class - if (cls !== el._prevClass) { - el.setAttribute('class', cls); - el._prevClass = cls; - } - } - - var klass = { - create: updateClass, - update: updateClass - }; - - /* */ - - var validDivisionCharRE = /[\w).+\-_$\]]/; - - function parseFilters (exp) { - var inSingle = false; - var inDouble = false; - var inTemplateString = false; - var inRegex = false; - var curly = 0; - var square = 0; - var paren = 0; - var lastFilterIndex = 0; - var c, prev, i, expression, filters; - - for (i = 0; i < exp.length; i++) { - prev = c; - c = exp.charCodeAt(i); - if (inSingle) { - if (c === 0x27 && prev !== 0x5C) { inSingle = false; } - } else if (inDouble) { - if (c === 0x22 && prev !== 0x5C) { inDouble = false; } - } else if (inTemplateString) { - if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; } - } else if (inRegex) { - if (c === 0x2f && prev !== 0x5C) { inRegex = false; } - } else if ( - c === 0x7C && // pipe - exp.charCodeAt(i + 1) !== 0x7C && - exp.charCodeAt(i - 1) !== 0x7C && - !curly && !square && !paren - ) { - if (expression === undefined) { - // first filter, end of expression - lastFilterIndex = i + 1; - expression = exp.slice(0, i).trim(); - } else { - pushFilter(); - } - } else { - switch (c) { - case 0x22: inDouble = true; break // " - case 0x27: inSingle = true; break // ' - case 0x60: inTemplateString = true; break // ` - case 0x28: paren++; break // ( - case 0x29: paren--; break // ) - case 0x5B: square++; break // [ - case 0x5D: square--; break // ] - case 0x7B: curly++; break // { - case 0x7D: curly--; break // } - } - if (c === 0x2f) { // / - var j = i - 1; - var p = (void 0); - // find first non-whitespace prev char - for (; j >= 0; j--) { - p = exp.charAt(j); - if (p !== ' ') { break } - } - if (!p || !validDivisionCharRE.test(p)) { - inRegex = true; - } - } - } - } - - if (expression === undefined) { - expression = exp.slice(0, i).trim(); - } else if (lastFilterIndex !== 0) { - pushFilter(); - } - - function pushFilter () { - (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim()); - lastFilterIndex = i + 1; - } - - if (filters) { - for (i = 0; i < filters.length; i++) { - expression = wrapFilter(expression, filters[i]); - } - } - - return expression - } - - function wrapFilter (exp, filter) { - var i = filter.indexOf('('); - if (i < 0) { - // _f: resolveFilter - return ("_f(\"" + filter + "\")(" + exp + ")") - } else { - var name = filter.slice(0, i); - var args = filter.slice(i + 1); - return ("_f(\"" + name + "\")(" + exp + (args !== ')' ? ',' + args : args)) - } - } - - /* */ - - - - /* eslint-disable no-unused-vars */ - function baseWarn (msg, range) { - console.error(("[Vue compiler]: " + msg)); - } - /* eslint-enable no-unused-vars */ - - function pluckModuleFunction ( - modules, - key - ) { - return modules - ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; }) - : [] - } - - function addProp (el, name, value, range, dynamic) { - (el.props || (el.props = [])).push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range)); - el.plain = false; - } - - function addAttr (el, name, value, range, dynamic) { - var attrs = dynamic - ? (el.dynamicAttrs || (el.dynamicAttrs = [])) - : (el.attrs || (el.attrs = [])); - attrs.push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range)); - el.plain = false; - } - - // add a raw attr (use this in preTransforms) - function addRawAttr (el, name, value, range) { - el.attrsMap[name] = value; - el.attrsList.push(rangeSetItem({ name: name, value: value }, range)); - } - - function addDirective ( - el, - name, - rawName, - value, - arg, - isDynamicArg, - modifiers, - range - ) { - (el.directives || (el.directives = [])).push(rangeSetItem({ - name: name, - rawName: rawName, - value: value, - arg: arg, - isDynamicArg: isDynamicArg, - modifiers: modifiers - }, range)); - el.plain = false; - } - - function prependModifierMarker (symbol, name, dynamic) { - return dynamic - ? ("_p(" + name + ",\"" + symbol + "\")") - : symbol + name // mark the event as captured - } - - function addHandler ( - el, - name, - value, - modifiers, - important, - warn, - range, - dynamic - ) { - modifiers = modifiers || emptyObject; - // warn prevent and passive modifier - /* istanbul ignore if */ - if ( - warn && - modifiers.prevent && modifiers.passive - ) { - warn( - 'passive and prevent can\'t be used together. ' + - 'Passive handler can\'t prevent default event.', - range - ); - } - - // normalize click.right and click.middle since they don't actually fire - // this is technically browser-specific, but at least for now browsers are - // the only target envs that have right/middle clicks. - if (modifiers.right) { - if (dynamic) { - name = "(" + name + ")==='click'?'contextmenu':(" + name + ")"; - } else if (name === 'click') { - name = 'contextmenu'; - delete modifiers.right; - } - } else if (modifiers.middle) { - if (dynamic) { - name = "(" + name + ")==='click'?'mouseup':(" + name + ")"; - } else if (name === 'click') { - name = 'mouseup'; - } - } - - // check capture modifier - if (modifiers.capture) { - delete modifiers.capture; - name = prependModifierMarker('!', name, dynamic); - } - if (modifiers.once) { - delete modifiers.once; - name = prependModifierMarker('~', name, dynamic); - } - /* istanbul ignore if */ - if (modifiers.passive) { - delete modifiers.passive; - name = prependModifierMarker('&', name, dynamic); - } - - var events; - if (modifiers.native) { - delete modifiers.native; - events = el.nativeEvents || (el.nativeEvents = {}); - } else { - events = el.events || (el.events = {}); - } - - var newHandler = rangeSetItem({ value: value.trim(), dynamic: dynamic }, range); - if (modifiers !== emptyObject) { - newHandler.modifiers = modifiers; - } - - var handlers = events[name]; - /* istanbul ignore if */ - if (Array.isArray(handlers)) { - important ? handlers.unshift(newHandler) : handlers.push(newHandler); - } else if (handlers) { - events[name] = important ? [newHandler, handlers] : [handlers, newHandler]; - } else { - events[name] = newHandler; - } - - el.plain = false; - } - - function getRawBindingAttr ( - el, - name - ) { - return el.rawAttrsMap[':' + name] || - el.rawAttrsMap['v-bind:' + name] || - el.rawAttrsMap[name] - } - - function getBindingAttr ( - el, - name, - getStatic - ) { - var dynamicValue = - getAndRemoveAttr(el, ':' + name) || - getAndRemoveAttr(el, 'v-bind:' + name); - if (dynamicValue != null) { - return parseFilters(dynamicValue) - } else if (getStatic !== false) { - var staticValue = getAndRemoveAttr(el, name); - if (staticValue != null) { - return JSON.stringify(staticValue) - } - } - } - - // note: this only removes the attr from the Array (attrsList) so that it - // doesn't get processed by processAttrs. - // By default it does NOT remove it from the map (attrsMap) because the map is - // needed during codegen. - function getAndRemoveAttr ( - el, - name, - removeFromMap - ) { - var val; - if ((val = el.attrsMap[name]) != null) { - var list = el.attrsList; - for (var i = 0, l = list.length; i < l; i++) { - if (list[i].name === name) { - list.splice(i, 1); - break - } - } - } - if (removeFromMap) { - delete el.attrsMap[name]; - } - return val - } - - function getAndRemoveAttrByRegex ( - el, - name - ) { - var list = el.attrsList; - for (var i = 0, l = list.length; i < l; i++) { - var attr = list[i]; - if (name.test(attr.name)) { - list.splice(i, 1); - return attr - } - } - } - - function rangeSetItem ( - item, - range - ) { - if (range) { - if (range.start != null) { - item.start = range.start; - } - if (range.end != null) { - item.end = range.end; - } - } - return item - } - - /* */ - - /** - * Cross-platform code generation for component v-model - */ - function genComponentModel ( - el, - value, - modifiers - ) { - var ref = modifiers || {}; - var number = ref.number; - var trim = ref.trim; - - var baseValueExpression = '$$v'; - var valueExpression = baseValueExpression; - if (trim) { - valueExpression = - "(typeof " + baseValueExpression + " === 'string'" + - "? " + baseValueExpression + ".trim()" + - ": " + baseValueExpression + ")"; - } - if (number) { - valueExpression = "_n(" + valueExpression + ")"; - } - var assignment = genAssignmentCode(value, valueExpression); - - el.model = { - value: ("(" + value + ")"), - expression: JSON.stringify(value), - callback: ("function (" + baseValueExpression + ") {" + assignment + "}") - }; - } - - /** - * Cross-platform codegen helper for generating v-model value assignment code. - */ - function genAssignmentCode ( - value, - assignment - ) { - var res = parseModel(value); - if (res.key === null) { - return (value + "=" + assignment) - } else { - return ("$set(" + (res.exp) + ", " + (res.key) + ", " + assignment + ")") - } - } - - /** - * Parse a v-model expression into a base path and a final key segment. - * Handles both dot-path and possible square brackets. - * - * Possible cases: - * - * - test - * - test[key] - * - test[test1[key]] - * - test["a"][key] - * - xxx.test[a[a].test1[key]] - * - test.xxx.a["asa"][test1[key]] - * - */ - - var len, str, chr, index$1, expressionPos, expressionEndPos; - - - - function parseModel (val) { - // Fix https://github.com/vuejs/vue/pull/7730 - // allow v-model="obj.val " (trailing whitespace) - val = val.trim(); - len = val.length; - - if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) { - index$1 = val.lastIndexOf('.'); - if (index$1 > -1) { - return { - exp: val.slice(0, index$1), - key: '"' + val.slice(index$1 + 1) + '"' - } - } else { - return { - exp: val, - key: null - } - } - } - - str = val; - index$1 = expressionPos = expressionEndPos = 0; - - while (!eof()) { - chr = next(); - /* istanbul ignore if */ - if (isStringStart(chr)) { - parseString(chr); - } else if (chr === 0x5B) { - parseBracket(chr); - } - } - - return { - exp: val.slice(0, expressionPos), - key: val.slice(expressionPos + 1, expressionEndPos) - } - } - - function next () { - return str.charCodeAt(++index$1) - } - - function eof () { - return index$1 >= len - } - - function isStringStart (chr) { - return chr === 0x22 || chr === 0x27 - } - - function parseBracket (chr) { - var inBracket = 1; - expressionPos = index$1; - while (!eof()) { - chr = next(); - if (isStringStart(chr)) { - parseString(chr); - continue - } - if (chr === 0x5B) { inBracket++; } - if (chr === 0x5D) { inBracket--; } - if (inBracket === 0) { - expressionEndPos = index$1; - break - } - } - } - - function parseString (chr) { - var stringQuote = chr; - while (!eof()) { - chr = next(); - if (chr === stringQuote) { - break - } - } - } - - /* */ - - var warn$1; - - // in some cases, the event used has to be determined at runtime - // so we used some reserved tokens during compile. - var RANGE_TOKEN = '__r'; - var CHECKBOX_RADIO_TOKEN = '__c'; - - function model ( - el, - dir, - _warn - ) { - warn$1 = _warn; - var value = dir.value; - var modifiers = dir.modifiers; - var tag = el.tag; - var type = el.attrsMap.type; - - { - // inputs with type="file" are read only and setting the input's - // value will throw an error. - if (tag === 'input' && type === 'file') { - warn$1( - "<" + (el.tag) + " v-model=\"" + value + "\" type=\"file\">:\n" + - "File inputs are read only. Use a v-on:change listener instead.", - el.rawAttrsMap['v-model'] - ); - } - } - - if (el.component) { - genComponentModel(el, value, modifiers); - // component v-model doesn't need extra runtime - return false - } else if (tag === 'select') { - genSelect(el, value, modifiers); - } else if (tag === 'input' && type === 'checkbox') { - genCheckboxModel(el, value, modifiers); - } else if (tag === 'input' && type === 'radio') { - genRadioModel(el, value, modifiers); - } else if (tag === 'input' || tag === 'textarea') { - genDefaultModel(el, value, modifiers); - } else if (!config.isReservedTag(tag)) { - genComponentModel(el, value, modifiers); - // component v-model doesn't need extra runtime - return false - } else { - warn$1( - "<" + (el.tag) + " v-model=\"" + value + "\">: " + - "v-model is not supported on this element type. " + - 'If you are working with contenteditable, it\'s recommended to ' + - 'wrap a library dedicated for that purpose inside a custom component.', - el.rawAttrsMap['v-model'] - ); - } - - // ensure runtime directive metadata - return true - } - - function genCheckboxModel ( - el, - value, - modifiers - ) { - var number = modifiers && modifiers.number; - var valueBinding = getBindingAttr(el, 'value') || 'null'; - var trueValueBinding = getBindingAttr(el, 'true-value') || 'true'; - var falseValueBinding = getBindingAttr(el, 'false-value') || 'false'; - addProp(el, 'checked', - "Array.isArray(" + value + ")" + - "?_i(" + value + "," + valueBinding + ")>-1" + ( - trueValueBinding === 'true' - ? (":(" + value + ")") - : (":_q(" + value + "," + trueValueBinding + ")") - ) - ); - addHandler(el, 'change', - "var $$a=" + value + "," + - '$$el=$event.target,' + - "$$c=$$el.checked?(" + trueValueBinding + "):(" + falseValueBinding + ");" + - 'if(Array.isArray($$a)){' + - "var $$v=" + (number ? '_n(' + valueBinding + ')' : valueBinding) + "," + - '$$i=_i($$a,$$v);' + - "if($$el.checked){$$i<0&&(" + (genAssignmentCode(value, '$$a.concat([$$v])')) + ")}" + - "else{$$i>-1&&(" + (genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))')) + ")}" + - "}else{" + (genAssignmentCode(value, '$$c')) + "}", - null, true - ); - } - - function genRadioModel ( - el, - value, - modifiers - ) { - var number = modifiers && modifiers.number; - var valueBinding = getBindingAttr(el, 'value') || 'null'; - valueBinding = number ? ("_n(" + valueBinding + ")") : valueBinding; - addProp(el, 'checked', ("_q(" + value + "," + valueBinding + ")")); - addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true); - } - - function genSelect ( - el, - value, - modifiers - ) { - var number = modifiers && modifiers.number; - var selectedVal = "Array.prototype.filter" + - ".call($event.target.options,function(o){return o.selected})" + - ".map(function(o){var val = \"_value\" in o ? o._value : o.value;" + - "return " + (number ? '_n(val)' : 'val') + "})"; - - var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]'; - var code = "var $$selectedVal = " + selectedVal + ";"; - code = code + " " + (genAssignmentCode(value, assignment)); - addHandler(el, 'change', code, null, true); - } - - function genDefaultModel ( - el, - value, - modifiers - ) { - var type = el.attrsMap.type; - - // warn if v-bind:value conflicts with v-model - // except for inputs with v-bind:type - { - var value$1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value']; - var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type']; - if (value$1 && !typeBinding) { - var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value'; - warn$1( - binding + "=\"" + value$1 + "\" conflicts with v-model on the same element " + - 'because the latter already expands to a value binding internally', - el.rawAttrsMap[binding] - ); - } - } - - var ref = modifiers || {}; - var lazy = ref.lazy; - var number = ref.number; - var trim = ref.trim; - var needCompositionGuard = !lazy && type !== 'range'; - var event = lazy - ? 'change' - : type === 'range' - ? RANGE_TOKEN - : 'input'; - - var valueExpression = '$event.target.value'; - if (trim) { - valueExpression = "$event.target.value.trim()"; - } - if (number) { - valueExpression = "_n(" + valueExpression + ")"; - } - - var code = genAssignmentCode(value, valueExpression); - if (needCompositionGuard) { - code = "if($event.target.composing)return;" + code; - } - - addProp(el, 'value', ("(" + value + ")")); - addHandler(el, event, code, null, true); - if (trim || number) { - addHandler(el, 'blur', '$forceUpdate()'); - } - } - - /* */ - - // normalize v-model event tokens that can only be determined at runtime. - // it's important to place the event as the first in the array because - // the whole point is ensuring the v-model callback gets called before - // user-attached handlers. - function normalizeEvents (on) { - /* istanbul ignore if */ - if (isDef(on[RANGE_TOKEN])) { - // IE input[type=range] only supports `change` event - var event = isIE ? 'change' : 'input'; - on[event] = [].concat(on[RANGE_TOKEN], on[event] || []); - delete on[RANGE_TOKEN]; - } - // This was originally intended to fix #4521 but no longer necessary - // after 2.5. Keeping it for backwards compat with generated code from < 2.4 - /* istanbul ignore if */ - if (isDef(on[CHECKBOX_RADIO_TOKEN])) { - on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []); - delete on[CHECKBOX_RADIO_TOKEN]; - } - } - - var target$1; - - function createOnceHandler$1 (event, handler, capture) { - var _target = target$1; // save current target element in closure - return function onceHandler () { - var res = handler.apply(null, arguments); - if (res !== null) { - remove$2(event, onceHandler, capture, _target); - } - } - } - - // #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp - // implementation and does not fire microtasks in between event propagation, so - // safe to exclude. - var useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53); - - function add$1 ( - name, - handler, - capture, - passive - ) { - // async edge case #6566: inner click event triggers patch, event handler - // attached to outer element during patch, and triggered again. This - // happens because browsers fire microtask ticks between event propagation. - // the solution is simple: we save the timestamp when a handler is attached, - // and the handler would only fire if the event passed to it was fired - // AFTER it was attached. - if (useMicrotaskFix) { - var attachedTimestamp = currentFlushTimestamp; - var original = handler; - handler = original._wrapper = function (e) { - if ( - // no bubbling, should always fire. - // this is just a safety net in case event.timeStamp is unreliable in - // certain weird environments... - e.target === e.currentTarget || - // event is fired after handler attachment - e.timeStamp >= attachedTimestamp || - // bail for environments that have buggy event.timeStamp implementations - // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState - // #9681 QtWebEngine event.timeStamp is negative value - e.timeStamp <= 0 || - // #9448 bail if event is fired in another document in a multi-page - // electron/nw.js app, since event.timeStamp will be using a different - // starting reference - e.target.ownerDocument !== document - ) { - return original.apply(this, arguments) - } - }; - } - target$1.addEventListener( - name, - handler, - supportsPassive - ? { capture: capture, passive: passive } - : capture - ); - } - - function remove$2 ( - name, - handler, - capture, - _target - ) { - (_target || target$1).removeEventListener( - name, - handler._wrapper || handler, - capture - ); - } - - function updateDOMListeners (oldVnode, vnode) { - if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) { - return - } - var on = vnode.data.on || {}; - var oldOn = oldVnode.data.on || {}; - target$1 = vnode.elm; - normalizeEvents(on); - updateListeners(on, oldOn, add$1, remove$2, createOnceHandler$1, vnode.context); - target$1 = undefined; - } - - var events = { - create: updateDOMListeners, - update: updateDOMListeners - }; - - /* */ - - var svgContainer; - - function updateDOMProps (oldVnode, vnode) { - if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) { - return - } - var key, cur; - var elm = vnode.elm; - var oldProps = oldVnode.data.domProps || {}; - var props = vnode.data.domProps || {}; - // clone observed objects, as the user probably wants to mutate it - if (isDef(props.__ob__)) { - props = vnode.data.domProps = extend({}, props); - } - - for (key in oldProps) { - if (!(key in props)) { - elm[key] = ''; - } - } - - for (key in props) { - cur = props[key]; - // ignore children if the node has textContent or innerHTML, - // as these will throw away existing DOM nodes and cause removal errors - // on subsequent patches (#3360) - if (key === 'textContent' || key === 'innerHTML') { - if (vnode.children) { vnode.children.length = 0; } - if (cur === oldProps[key]) { continue } - // #6601 work around Chrome version <= 55 bug where single textNode - // replaced by innerHTML/textContent retains its parentNode property - if (elm.childNodes.length === 1) { - elm.removeChild(elm.childNodes[0]); - } - } - - if (key === 'value' && elm.tagName !== 'PROGRESS') { - // store value as _value as well since - // non-string values will be stringified - elm._value = cur; - // avoid resetting cursor position when value is the same - var strCur = isUndef(cur) ? '' : String(cur); - if (shouldUpdateValue(elm, strCur)) { - elm.value = strCur; - } - } else if (key === 'innerHTML' && isSVG(elm.tagName) && isUndef(elm.innerHTML)) { - // IE doesn't support innerHTML for SVG elements - svgContainer = svgContainer || document.createElement('div'); - svgContainer.innerHTML = "<svg>" + cur + "</svg>"; - var svg = svgContainer.firstChild; - while (elm.firstChild) { - elm.removeChild(elm.firstChild); - } - while (svg.firstChild) { - elm.appendChild(svg.firstChild); - } - } else if ( - // skip the update if old and new VDOM state is the same. - // `value` is handled separately because the DOM value may be temporarily - // out of sync with VDOM state due to focus, composition and modifiers. - // This #4521 by skipping the unnecesarry `checked` update. - cur !== oldProps[key] - ) { - // some property updates can throw - // e.g. `value` on <progress> w/ non-finite value - try { - elm[key] = cur; - } catch (e) {} - } - } - } - - // check platforms/web/util/attrs.js acceptValue - - - function shouldUpdateValue (elm, checkVal) { - return (!elm.composing && ( - elm.tagName === 'OPTION' || - isNotInFocusAndDirty(elm, checkVal) || - isDirtyWithModifiers(elm, checkVal) - )) - } - - function isNotInFocusAndDirty (elm, checkVal) { - // return true when textbox (.number and .trim) loses focus and its value is - // not equal to the updated value - var notInFocus = true; - // #6157 - // work around IE bug when accessing document.activeElement in an iframe - try { notInFocus = document.activeElement !== elm; } catch (e) {} - return notInFocus && elm.value !== checkVal - } - - function isDirtyWithModifiers (elm, newVal) { - var value = elm.value; - var modifiers = elm._vModifiers; // injected by v-model runtime - if (isDef(modifiers)) { - if (modifiers.number) { - return toNumber(value) !== toNumber(newVal) - } - if (modifiers.trim) { - return value.trim() !== newVal.trim() - } - } - return value !== newVal - } - - var domProps = { - create: updateDOMProps, - update: updateDOMProps - }; - - /* */ - - var parseStyleText = cached(function (cssText) { - var res = {}; - var listDelimiter = /;(?![^(]*\))/g; - var propertyDelimiter = /:(.+)/; - cssText.split(listDelimiter).forEach(function (item) { - if (item) { - var tmp = item.split(propertyDelimiter); - tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim()); - } - }); - return res - }); - - // merge static and dynamic style data on the same vnode - function normalizeStyleData (data) { - var style = normalizeStyleBinding(data.style); - // static style is pre-processed into an object during compilation - // and is always a fresh object, so it's safe to merge into it - return data.staticStyle - ? extend(data.staticStyle, style) - : style - } - - // normalize possible array / string values into Object - function normalizeStyleBinding (bindingStyle) { - if (Array.isArray(bindingStyle)) { - return toObject(bindingStyle) - } - if (typeof bindingStyle === 'string') { - return parseStyleText(bindingStyle) - } - return bindingStyle - } - - /** - * parent component style should be after child's - * so that parent component's style could override it - */ - function getStyle (vnode, checkChild) { - var res = {}; - var styleData; - - if (checkChild) { - var childNode = vnode; - while (childNode.componentInstance) { - childNode = childNode.componentInstance._vnode; - if ( - childNode && childNode.data && - (styleData = normalizeStyleData(childNode.data)) - ) { - extend(res, styleData); - } - } - } - - if ((styleData = normalizeStyleData(vnode.data))) { - extend(res, styleData); - } - - var parentNode = vnode; - while ((parentNode = parentNode.parent)) { - if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) { - extend(res, styleData); - } - } - return res - } - - /* */ - - var cssVarRE = /^--/; - var importantRE = /\s*!important$/; - var setProp = function (el, name, val) { - /* istanbul ignore if */ - if (cssVarRE.test(name)) { - el.style.setProperty(name, val); - } else if (importantRE.test(val)) { - el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important'); - } else { - var normalizedName = normalize(name); - if (Array.isArray(val)) { - // Support values array created by autoprefixer, e.g. - // {display: ["-webkit-box", "-ms-flexbox", "flex"]} - // Set them one by one, and the browser will only set those it can recognize - for (var i = 0, len = val.length; i < len; i++) { - el.style[normalizedName] = val[i]; - } - } else { - el.style[normalizedName] = val; - } - } - }; - - var vendorNames = ['Webkit', 'Moz', 'ms']; - - var emptyStyle; - var normalize = cached(function (prop) { - emptyStyle = emptyStyle || document.createElement('div').style; - prop = camelize(prop); - if (prop !== 'filter' && (prop in emptyStyle)) { - return prop - } - var capName = prop.charAt(0).toUpperCase() + prop.slice(1); - for (var i = 0; i < vendorNames.length; i++) { - var name = vendorNames[i] + capName; - if (name in emptyStyle) { - return name - } - } - }); - - function updateStyle (oldVnode, vnode) { - var data = vnode.data; - var oldData = oldVnode.data; - - if (isUndef(data.staticStyle) && isUndef(data.style) && - isUndef(oldData.staticStyle) && isUndef(oldData.style) - ) { - return - } - - var cur, name; - var el = vnode.elm; - var oldStaticStyle = oldData.staticStyle; - var oldStyleBinding = oldData.normalizedStyle || oldData.style || {}; - - // if static style exists, stylebinding already merged into it when doing normalizeStyleData - var oldStyle = oldStaticStyle || oldStyleBinding; - - var style = normalizeStyleBinding(vnode.data.style) || {}; - - // store normalized style under a different key for next diff - // make sure to clone it if it's reactive, since the user likely wants - // to mutate it. - vnode.data.normalizedStyle = isDef(style.__ob__) - ? extend({}, style) - : style; - - var newStyle = getStyle(vnode, true); - - for (name in oldStyle) { - if (isUndef(newStyle[name])) { - setProp(el, name, ''); - } - } - for (name in newStyle) { - cur = newStyle[name]; - if (cur !== oldStyle[name]) { - // ie9 setting to null has no effect, must use empty string - setProp(el, name, cur == null ? '' : cur); - } - } - } - - var style = { - create: updateStyle, - update: updateStyle - }; - - /* */ - - var whitespaceRE = /\s+/; - - /** - * Add class with compatibility for SVG since classList is not supported on - * SVG elements in IE - */ - function addClass (el, cls) { - /* istanbul ignore if */ - if (!cls || !(cls = cls.trim())) { - return - } - - /* istanbul ignore else */ - if (el.classList) { - if (cls.indexOf(' ') > -1) { - cls.split(whitespaceRE).forEach(function (c) { return el.classList.add(c); }); - } else { - el.classList.add(cls); - } - } else { - var cur = " " + (el.getAttribute('class') || '') + " "; - if (cur.indexOf(' ' + cls + ' ') < 0) { - el.setAttribute('class', (cur + cls).trim()); - } - } - } - - /** - * Remove class with compatibility for SVG since classList is not supported on - * SVG elements in IE - */ - function removeClass (el, cls) { - /* istanbul ignore if */ - if (!cls || !(cls = cls.trim())) { - return - } - - /* istanbul ignore else */ - if (el.classList) { - if (cls.indexOf(' ') > -1) { - cls.split(whitespaceRE).forEach(function (c) { return el.classList.remove(c); }); - } else { - el.classList.remove(cls); - } - if (!el.classList.length) { - el.removeAttribute('class'); - } - } else { - var cur = " " + (el.getAttribute('class') || '') + " "; - var tar = ' ' + cls + ' '; - while (cur.indexOf(tar) >= 0) { - cur = cur.replace(tar, ' '); - } - cur = cur.trim(); - if (cur) { - el.setAttribute('class', cur); - } else { - el.removeAttribute('class'); - } - } - } - - /* */ - - function resolveTransition (def$$1) { - if (!def$$1) { - return - } - /* istanbul ignore else */ - if (typeof def$$1 === 'object') { - var res = {}; - if (def$$1.css !== false) { - extend(res, autoCssTransition(def$$1.name || 'v')); - } - extend(res, def$$1); - return res - } else if (typeof def$$1 === 'string') { - return autoCssTransition(def$$1) - } - } - - var autoCssTransition = cached(function (name) { - return { - enterClass: (name + "-enter"), - enterToClass: (name + "-enter-to"), - enterActiveClass: (name + "-enter-active"), - leaveClass: (name + "-leave"), - leaveToClass: (name + "-leave-to"), - leaveActiveClass: (name + "-leave-active") - } - }); - - var hasTransition = inBrowser && !isIE9; - var TRANSITION = 'transition'; - var ANIMATION = 'animation'; - - // Transition property/event sniffing - var transitionProp = 'transition'; - var transitionEndEvent = 'transitionend'; - var animationProp = 'animation'; - var animationEndEvent = 'animationend'; - if (hasTransition) { - /* istanbul ignore if */ - if (window.ontransitionend === undefined && - window.onwebkittransitionend !== undefined - ) { - transitionProp = 'WebkitTransition'; - transitionEndEvent = 'webkitTransitionEnd'; - } - if (window.onanimationend === undefined && - window.onwebkitanimationend !== undefined - ) { - animationProp = 'WebkitAnimation'; - animationEndEvent = 'webkitAnimationEnd'; - } - } - - // binding to window is necessary to make hot reload work in IE in strict mode - var raf = inBrowser - ? window.requestAnimationFrame - ? window.requestAnimationFrame.bind(window) - : setTimeout - : /* istanbul ignore next */ function (fn) { return fn(); }; - - function nextFrame (fn) { - raf(function () { - raf(fn); - }); - } - - function addTransitionClass (el, cls) { - var transitionClasses = el._transitionClasses || (el._transitionClasses = []); - if (transitionClasses.indexOf(cls) < 0) { - transitionClasses.push(cls); - addClass(el, cls); - } - } - - function removeTransitionClass (el, cls) { - if (el._transitionClasses) { - remove(el._transitionClasses, cls); - } - removeClass(el, cls); - } - - function whenTransitionEnds ( - el, - expectedType, - cb - ) { - var ref = getTransitionInfo(el, expectedType); - var type = ref.type; - var timeout = ref.timeout; - var propCount = ref.propCount; - if (!type) { return cb() } - var event = type === TRANSITION ? transitionEndEvent : animationEndEvent; - var ended = 0; - var end = function () { - el.removeEventListener(event, onEnd); - cb(); - }; - var onEnd = function (e) { - if (e.target === el) { - if (++ended >= propCount) { - end(); - } - } - }; - setTimeout(function () { - if (ended < propCount) { - end(); - } - }, timeout + 1); - el.addEventListener(event, onEnd); - } - - var transformRE = /\b(transform|all)(,|$)/; - - function getTransitionInfo (el, expectedType) { - var styles = window.getComputedStyle(el); - // JSDOM may return undefined for transition properties - var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', '); - var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', '); - var transitionTimeout = getTimeout(transitionDelays, transitionDurations); - var animationDelays = (styles[animationProp + 'Delay'] || '').split(', '); - var animationDurations = (styles[animationProp + 'Duration'] || '').split(', '); - var animationTimeout = getTimeout(animationDelays, animationDurations); - - var type; - var timeout = 0; - var propCount = 0; - /* istanbul ignore if */ - if (expectedType === TRANSITION) { - if (transitionTimeout > 0) { - type = TRANSITION; - timeout = transitionTimeout; - propCount = transitionDurations.length; - } - } else if (expectedType === ANIMATION) { - if (animationTimeout > 0) { - type = ANIMATION; - timeout = animationTimeout; - propCount = animationDurations.length; - } - } else { - timeout = Math.max(transitionTimeout, animationTimeout); - type = timeout > 0 - ? transitionTimeout > animationTimeout - ? TRANSITION - : ANIMATION - : null; - propCount = type - ? type === TRANSITION - ? transitionDurations.length - : animationDurations.length - : 0; - } - var hasTransform = - type === TRANSITION && - transformRE.test(styles[transitionProp + 'Property']); - return { - type: type, - timeout: timeout, - propCount: propCount, - hasTransform: hasTransform - } - } - - function getTimeout (delays, durations) { - /* istanbul ignore next */ - while (delays.length < durations.length) { - delays = delays.concat(delays); - } - - return Math.max.apply(null, durations.map(function (d, i) { - return toMs(d) + toMs(delays[i]) - })) - } - - // Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers - // in a locale-dependent way, using a comma instead of a dot. - // If comma is not replaced with a dot, the input will be rounded down (i.e. acting - // as a floor function) causing unexpected behaviors - function toMs (s) { - return Number(s.slice(0, -1).replace(',', '.')) * 1000 - } - - /* */ - - function enter (vnode, toggleDisplay) { - var el = vnode.elm; - - // call leave callback now - if (isDef(el._leaveCb)) { - el._leaveCb.cancelled = true; - el._leaveCb(); - } - - var data = resolveTransition(vnode.data.transition); - if (isUndef(data)) { - return - } - - /* istanbul ignore if */ - if (isDef(el._enterCb) || el.nodeType !== 1) { - return - } - - var css = data.css; - var type = data.type; - var enterClass = data.enterClass; - var enterToClass = data.enterToClass; - var enterActiveClass = data.enterActiveClass; - var appearClass = data.appearClass; - var appearToClass = data.appearToClass; - var appearActiveClass = data.appearActiveClass; - var beforeEnter = data.beforeEnter; - var enter = data.enter; - var afterEnter = data.afterEnter; - var enterCancelled = data.enterCancelled; - var beforeAppear = data.beforeAppear; - var appear = data.appear; - var afterAppear = data.afterAppear; - var appearCancelled = data.appearCancelled; - var duration = data.duration; - - // activeInstance will always be the <transition> component managing this - // transition. One edge case to check is when the <transition> is placed - // as the root node of a child component. In that case we need to check - // <transition>'s parent for appear check. - var context = activeInstance; - var transitionNode = activeInstance.$vnode; - while (transitionNode && transitionNode.parent) { - context = transitionNode.context; - transitionNode = transitionNode.parent; - } - - var isAppear = !context._isMounted || !vnode.isRootInsert; - - if (isAppear && !appear && appear !== '') { - return - } - - var startClass = isAppear && appearClass - ? appearClass - : enterClass; - var activeClass = isAppear && appearActiveClass - ? appearActiveClass - : enterActiveClass; - var toClass = isAppear && appearToClass - ? appearToClass - : enterToClass; - - var beforeEnterHook = isAppear - ? (beforeAppear || beforeEnter) - : beforeEnter; - var enterHook = isAppear - ? (typeof appear === 'function' ? appear : enter) - : enter; - var afterEnterHook = isAppear - ? (afterAppear || afterEnter) - : afterEnter; - var enterCancelledHook = isAppear - ? (appearCancelled || enterCancelled) - : enterCancelled; - - var explicitEnterDuration = toNumber( - isObject(duration) - ? duration.enter - : duration - ); - - if (explicitEnterDuration != null) { - checkDuration(explicitEnterDuration, 'enter', vnode); - } - - var expectsCSS = css !== false && !isIE9; - var userWantsControl = getHookArgumentsLength(enterHook); - - var cb = el._enterCb = once(function () { - if (expectsCSS) { - removeTransitionClass(el, toClass); - removeTransitionClass(el, activeClass); - } - if (cb.cancelled) { - if (expectsCSS) { - removeTransitionClass(el, startClass); - } - enterCancelledHook && enterCancelledHook(el); - } else { - afterEnterHook && afterEnterHook(el); - } - el._enterCb = null; - }); - - if (!vnode.data.show) { - // remove pending leave element on enter by injecting an insert hook - mergeVNodeHook(vnode, 'insert', function () { - var parent = el.parentNode; - var pendingNode = parent && parent._pending && parent._pending[vnode.key]; - if (pendingNode && - pendingNode.tag === vnode.tag && - pendingNode.elm._leaveCb - ) { - pendingNode.elm._leaveCb(); - } - enterHook && enterHook(el, cb); - }); - } - - // start enter transition - beforeEnterHook && beforeEnterHook(el); - if (expectsCSS) { - addTransitionClass(el, startClass); - addTransitionClass(el, activeClass); - nextFrame(function () { - removeTransitionClass(el, startClass); - if (!cb.cancelled) { - addTransitionClass(el, toClass); - if (!userWantsControl) { - if (isValidDuration(explicitEnterDuration)) { - setTimeout(cb, explicitEnterDuration); - } else { - whenTransitionEnds(el, type, cb); - } - } - } - }); - } - - if (vnode.data.show) { - toggleDisplay && toggleDisplay(); - enterHook && enterHook(el, cb); - } - - if (!expectsCSS && !userWantsControl) { - cb(); - } - } - - function leave (vnode, rm) { - var el = vnode.elm; - - // call enter callback now - if (isDef(el._enterCb)) { - el._enterCb.cancelled = true; - el._enterCb(); - } - - var data = resolveTransition(vnode.data.transition); - if (isUndef(data) || el.nodeType !== 1) { - return rm() - } - - /* istanbul ignore if */ - if (isDef(el._leaveCb)) { - return - } - - var css = data.css; - var type = data.type; - var leaveClass = data.leaveClass; - var leaveToClass = data.leaveToClass; - var leaveActiveClass = data.leaveActiveClass; - var beforeLeave = data.beforeLeave; - var leave = data.leave; - var afterLeave = data.afterLeave; - var leaveCancelled = data.leaveCancelled; - var delayLeave = data.delayLeave; - var duration = data.duration; - - var expectsCSS = css !== false && !isIE9; - var userWantsControl = getHookArgumentsLength(leave); - - var explicitLeaveDuration = toNumber( - isObject(duration) - ? duration.leave - : duration - ); - - if (isDef(explicitLeaveDuration)) { - checkDuration(explicitLeaveDuration, 'leave', vnode); - } - - var cb = el._leaveCb = once(function () { - if (el.parentNode && el.parentNode._pending) { - el.parentNode._pending[vnode.key] = null; - } - if (expectsCSS) { - removeTransitionClass(el, leaveToClass); - removeTransitionClass(el, leaveActiveClass); - } - if (cb.cancelled) { - if (expectsCSS) { - removeTransitionClass(el, leaveClass); - } - leaveCancelled && leaveCancelled(el); - } else { - rm(); - afterLeave && afterLeave(el); - } - el._leaveCb = null; - }); - - if (delayLeave) { - delayLeave(performLeave); - } else { - performLeave(); - } - - function performLeave () { - // the delayed leave may have already been cancelled - if (cb.cancelled) { - return - } - // record leaving element - if (!vnode.data.show && el.parentNode) { - (el.parentNode._pending || (el.parentNode._pending = {}))[(vnode.key)] = vnode; - } - beforeLeave && beforeLeave(el); - if (expectsCSS) { - addTransitionClass(el, leaveClass); - addTransitionClass(el, leaveActiveClass); - nextFrame(function () { - removeTransitionClass(el, leaveClass); - if (!cb.cancelled) { - addTransitionClass(el, leaveToClass); - if (!userWantsControl) { - if (isValidDuration(explicitLeaveDuration)) { - setTimeout(cb, explicitLeaveDuration); - } else { - whenTransitionEnds(el, type, cb); - } - } - } - }); - } - leave && leave(el, cb); - if (!expectsCSS && !userWantsControl) { - cb(); - } - } - } - - // only used in dev mode - function checkDuration (val, name, vnode) { - if (typeof val !== 'number') { - warn( - "<transition> explicit " + name + " duration is not a valid number - " + - "got " + (JSON.stringify(val)) + ".", - vnode.context - ); - } else if (isNaN(val)) { - warn( - "<transition> explicit " + name + " duration is NaN - " + - 'the duration expression might be incorrect.', - vnode.context - ); - } - } - - function isValidDuration (val) { - return typeof val === 'number' && !isNaN(val) - } - - /** - * Normalize a transition hook's argument length. The hook may be: - * - a merged hook (invoker) with the original in .fns - * - a wrapped component method (check ._length) - * - a plain function (.length) - */ - function getHookArgumentsLength (fn) { - if (isUndef(fn)) { - return false - } - var invokerFns = fn.fns; - if (isDef(invokerFns)) { - // invoker - return getHookArgumentsLength( - Array.isArray(invokerFns) - ? invokerFns[0] - : invokerFns - ) - } else { - return (fn._length || fn.length) > 1 - } - } - - function _enter (_, vnode) { - if (vnode.data.show !== true) { - enter(vnode); - } - } - - var transition = inBrowser ? { - create: _enter, - activate: _enter, - remove: function remove$$1 (vnode, rm) { - /* istanbul ignore else */ - if (vnode.data.show !== true) { - leave(vnode, rm); - } else { - rm(); - } - } - } : {}; - - var platformModules = [ - attrs, - klass, - events, - domProps, - style, - transition - ]; - - /* */ - - // the directive module should be applied last, after all - // built-in modules have been applied. - var modules = platformModules.concat(baseModules); - - var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules }); - - /** - * Not type checking this file because flow doesn't like attaching - * properties to Elements. - */ - - /* istanbul ignore if */ - if (isIE9) { - // http://www.matts411.com/post/internet-explorer-9-oninput/ - document.addEventListener('selectionchange', function () { - var el = document.activeElement; - if (el && el.vmodel) { - trigger(el, 'input'); - } - }); - } - - var directive = { - inserted: function inserted (el, binding, vnode, oldVnode) { - if (vnode.tag === 'select') { - // #6903 - if (oldVnode.elm && !oldVnode.elm._vOptions) { - mergeVNodeHook(vnode, 'postpatch', function () { - directive.componentUpdated(el, binding, vnode); - }); - } else { - setSelected(el, binding, vnode.context); - } - el._vOptions = [].map.call(el.options, getValue); - } else if (vnode.tag === 'textarea' || isTextInputType(el.type)) { - el._vModifiers = binding.modifiers; - if (!binding.modifiers.lazy) { - el.addEventListener('compositionstart', onCompositionStart); - el.addEventListener('compositionend', onCompositionEnd); - // Safari < 10.2 & UIWebView doesn't fire compositionend when - // switching focus before confirming composition choice - // this also fixes the issue where some browsers e.g. iOS Chrome - // fires "change" instead of "input" on autocomplete. - el.addEventListener('change', onCompositionEnd); - /* istanbul ignore if */ - if (isIE9) { - el.vmodel = true; - } - } - } - }, - - componentUpdated: function componentUpdated (el, binding, vnode) { - if (vnode.tag === 'select') { - setSelected(el, binding, vnode.context); - // in case the options rendered by v-for have changed, - // it's possible that the value is out-of-sync with the rendered options. - // detect such cases and filter out values that no longer has a matching - // option in the DOM. - var prevOptions = el._vOptions; - var curOptions = el._vOptions = [].map.call(el.options, getValue); - if (curOptions.some(function (o, i) { return !looseEqual(o, prevOptions[i]); })) { - // trigger change event if - // no matching option found for at least one value - var needReset = el.multiple - ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions); }) - : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, curOptions); - if (needReset) { - trigger(el, 'change'); - } - } - } - } - }; - - function setSelected (el, binding, vm) { - actuallySetSelected(el, binding, vm); - /* istanbul ignore if */ - if (isIE || isEdge) { - setTimeout(function () { - actuallySetSelected(el, binding, vm); - }, 0); - } - } - - function actuallySetSelected (el, binding, vm) { - var value = binding.value; - var isMultiple = el.multiple; - if (isMultiple && !Array.isArray(value)) { - warn( - "<select multiple v-model=\"" + (binding.expression) + "\"> " + - "expects an Array value for its binding, but got " + (Object.prototype.toString.call(value).slice(8, -1)), - vm - ); - return - } - var selected, option; - for (var i = 0, l = el.options.length; i < l; i++) { - option = el.options[i]; - if (isMultiple) { - selected = looseIndexOf(value, getValue(option)) > -1; - if (option.selected !== selected) { - option.selected = selected; - } - } else { - if (looseEqual(getValue(option), value)) { - if (el.selectedIndex !== i) { - el.selectedIndex = i; - } - return - } - } - } - if (!isMultiple) { - el.selectedIndex = -1; - } - } - - function hasNoMatchingOption (value, options) { - return options.every(function (o) { return !looseEqual(o, value); }) - } - - function getValue (option) { - return '_value' in option - ? option._value - : option.value - } - - function onCompositionStart (e) { - e.target.composing = true; - } - - function onCompositionEnd (e) { - // prevent triggering an input event for no reason - if (!e.target.composing) { return } - e.target.composing = false; - trigger(e.target, 'input'); - } - - function trigger (el, type) { - var e = document.createEvent('HTMLEvents'); - e.initEvent(type, true, true); - el.dispatchEvent(e); - } - - /* */ - - // recursively search for possible transition defined inside the component root - function locateNode (vnode) { - return vnode.componentInstance && (!vnode.data || !vnode.data.transition) - ? locateNode(vnode.componentInstance._vnode) - : vnode - } - - var show = { - bind: function bind (el, ref, vnode) { - var value = ref.value; - - vnode = locateNode(vnode); - var transition$$1 = vnode.data && vnode.data.transition; - var originalDisplay = el.__vOriginalDisplay = - el.style.display === 'none' ? '' : el.style.display; - if (value && transition$$1) { - vnode.data.show = true; - enter(vnode, function () { - el.style.display = originalDisplay; - }); - } else { - el.style.display = value ? originalDisplay : 'none'; - } - }, - - update: function update (el, ref, vnode) { - var value = ref.value; - var oldValue = ref.oldValue; - - /* istanbul ignore if */ - if (!value === !oldValue) { return } - vnode = locateNode(vnode); - var transition$$1 = vnode.data && vnode.data.transition; - if (transition$$1) { - vnode.data.show = true; - if (value) { - enter(vnode, function () { - el.style.display = el.__vOriginalDisplay; - }); - } else { - leave(vnode, function () { - el.style.display = 'none'; - }); - } - } else { - el.style.display = value ? el.__vOriginalDisplay : 'none'; - } - }, - - unbind: function unbind ( - el, - binding, - vnode, - oldVnode, - isDestroy - ) { - if (!isDestroy) { - el.style.display = el.__vOriginalDisplay; - } - } - }; - - var platformDirectives = { - model: directive, - show: show - }; - - /* */ - - var transitionProps = { - name: String, - appear: Boolean, - css: Boolean, - mode: String, - type: String, - enterClass: String, - leaveClass: String, - enterToClass: String, - leaveToClass: String, - enterActiveClass: String, - leaveActiveClass: String, - appearClass: String, - appearActiveClass: String, - appearToClass: String, - duration: [Number, String, Object] - }; - - // in case the child is also an abstract component, e.g. <keep-alive> - // we want to recursively retrieve the real component to be rendered - function getRealChild (vnode) { - var compOptions = vnode && vnode.componentOptions; - if (compOptions && compOptions.Ctor.options.abstract) { - return getRealChild(getFirstComponentChild(compOptions.children)) - } else { - return vnode - } - } - - function extractTransitionData (comp) { - var data = {}; - var options = comp.$options; - // props - for (var key in options.propsData) { - data[key] = comp[key]; - } - // events. - // extract listeners and pass them directly to the transition methods - var listeners = options._parentListeners; - for (var key$1 in listeners) { - data[camelize(key$1)] = listeners[key$1]; - } - return data - } - - function placeholder (h, rawChild) { - if (/\d-keep-alive$/.test(rawChild.tag)) { - return h('keep-alive', { - props: rawChild.componentOptions.propsData - }) - } - } - - function hasParentTransition (vnode) { - while ((vnode = vnode.parent)) { - if (vnode.data.transition) { - return true - } - } - } - - function isSameChild (child, oldChild) { - return oldChild.key === child.key && oldChild.tag === child.tag - } - - var isNotTextNode = function (c) { return c.tag || isAsyncPlaceholder(c); }; - - var isVShowDirective = function (d) { return d.name === 'show'; }; - - var Transition = { - name: 'transition', - props: transitionProps, - abstract: true, - - render: function render (h) { - var this$1 = this; - - var children = this.$slots.default; - if (!children) { - return - } - - // filter out text nodes (possible whitespaces) - children = children.filter(isNotTextNode); - /* istanbul ignore if */ - if (!children.length) { - return - } - - // warn multiple elements - if (children.length > 1) { - warn( - '<transition> can only be used on a single element. Use ' + - '<transition-group> for lists.', - this.$parent - ); - } - - var mode = this.mode; - - // warn invalid mode - if (mode && mode !== 'in-out' && mode !== 'out-in' - ) { - warn( - 'invalid <transition> mode: ' + mode, - this.$parent - ); - } - - var rawChild = children[0]; - - // if this is a component root node and the component's - // parent container node also has transition, skip. - if (hasParentTransition(this.$vnode)) { - return rawChild - } - - // apply transition data to child - // use getRealChild() to ignore abstract components e.g. keep-alive - var child = getRealChild(rawChild); - /* istanbul ignore if */ - if (!child) { - return rawChild - } - - if (this._leaving) { - return placeholder(h, rawChild) - } - - // ensure a key that is unique to the vnode type and to this transition - // component instance. This key will be used to remove pending leaving nodes - // during entering. - var id = "__transition-" + (this._uid) + "-"; - child.key = child.key == null - ? child.isComment - ? id + 'comment' - : id + child.tag - : isPrimitive(child.key) - ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key) - : child.key; - - var data = (child.data || (child.data = {})).transition = extractTransitionData(this); - var oldRawChild = this._vnode; - var oldChild = getRealChild(oldRawChild); - - // mark v-show - // so that the transition module can hand over the control to the directive - if (child.data.directives && child.data.directives.some(isVShowDirective)) { - child.data.show = true; - } - - if ( - oldChild && - oldChild.data && - !isSameChild(child, oldChild) && - !isAsyncPlaceholder(oldChild) && - // #6687 component root is a comment node - !(oldChild.componentInstance && oldChild.componentInstance._vnode.isComment) - ) { - // replace old child transition data with fresh one - // important for dynamic transitions! - var oldData = oldChild.data.transition = extend({}, data); - // handle transition mode - if (mode === 'out-in') { - // return placeholder node and queue update when leave finishes - this._leaving = true; - mergeVNodeHook(oldData, 'afterLeave', function () { - this$1._leaving = false; - this$1.$forceUpdate(); - }); - return placeholder(h, rawChild) - } else if (mode === 'in-out') { - if (isAsyncPlaceholder(child)) { - return oldRawChild - } - var delayedLeave; - var performLeave = function () { delayedLeave(); }; - mergeVNodeHook(data, 'afterEnter', performLeave); - mergeVNodeHook(data, 'enterCancelled', performLeave); - mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; }); - } - } - - return rawChild - } - }; - - /* */ - - var props = extend({ - tag: String, - moveClass: String - }, transitionProps); - - delete props.mode; - - var TransitionGroup = { - props: props, - - beforeMount: function beforeMount () { - var this$1 = this; - - var update = this._update; - this._update = function (vnode, hydrating) { - var restoreActiveInstance = setActiveInstance(this$1); - // force removing pass - this$1.__patch__( - this$1._vnode, - this$1.kept, - false, // hydrating - true // removeOnly (!important, avoids unnecessary moves) - ); - this$1._vnode = this$1.kept; - restoreActiveInstance(); - update.call(this$1, vnode, hydrating); - }; - }, - - render: function render (h) { - var tag = this.tag || this.$vnode.data.tag || 'span'; - var map = Object.create(null); - var prevChildren = this.prevChildren = this.children; - var rawChildren = this.$slots.default || []; - var children = this.children = []; - var transitionData = extractTransitionData(this); - - for (var i = 0; i < rawChildren.length; i++) { - var c = rawChildren[i]; - if (c.tag) { - if (c.key != null && String(c.key).indexOf('__vlist') !== 0) { - children.push(c); - map[c.key] = c - ;(c.data || (c.data = {})).transition = transitionData; - } else { - var opts = c.componentOptions; - var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag; - warn(("<transition-group> children must be keyed: <" + name + ">")); - } - } - } - - if (prevChildren) { - var kept = []; - var removed = []; - for (var i$1 = 0; i$1 < prevChildren.length; i$1++) { - var c$1 = prevChildren[i$1]; - c$1.data.transition = transitionData; - c$1.data.pos = c$1.elm.getBoundingClientRect(); - if (map[c$1.key]) { - kept.push(c$1); - } else { - removed.push(c$1); - } - } - this.kept = h(tag, null, kept); - this.removed = removed; - } - - return h(tag, null, children) - }, - - updated: function updated () { - var children = this.prevChildren; - var moveClass = this.moveClass || ((this.name || 'v') + '-move'); - if (!children.length || !this.hasMove(children[0].elm, moveClass)) { - return - } - - // we divide the work into three loops to avoid mixing DOM reads and writes - // in each iteration - which helps prevent layout thrashing. - children.forEach(callPendingCbs); - children.forEach(recordPosition); - children.forEach(applyTranslation); - - // force reflow to put everything in position - // assign to this to avoid being removed in tree-shaking - // $flow-disable-line - this._reflow = document.body.offsetHeight; - - children.forEach(function (c) { - if (c.data.moved) { - var el = c.elm; - var s = el.style; - addTransitionClass(el, moveClass); - s.transform = s.WebkitTransform = s.transitionDuration = ''; - el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) { - if (e && e.target !== el) { - return - } - if (!e || /transform$/.test(e.propertyName)) { - el.removeEventListener(transitionEndEvent, cb); - el._moveCb = null; - removeTransitionClass(el, moveClass); - } - }); - } - }); - }, - - methods: { - hasMove: function hasMove (el, moveClass) { - /* istanbul ignore if */ - if (!hasTransition) { - return false - } - /* istanbul ignore if */ - if (this._hasMove) { - return this._hasMove - } - // Detect whether an element with the move class applied has - // CSS transitions. Since the element may be inside an entering - // transition at this very moment, we make a clone of it and remove - // all other transition classes applied to ensure only the move class - // is applied. - var clone = el.cloneNode(); - if (el._transitionClasses) { - el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); }); - } - addClass(clone, moveClass); - clone.style.display = 'none'; - this.$el.appendChild(clone); - var info = getTransitionInfo(clone); - this.$el.removeChild(clone); - return (this._hasMove = info.hasTransform) - } - } - }; - - function callPendingCbs (c) { - /* istanbul ignore if */ - if (c.elm._moveCb) { - c.elm._moveCb(); - } - /* istanbul ignore if */ - if (c.elm._enterCb) { - c.elm._enterCb(); - } - } - - function recordPosition (c) { - c.data.newPos = c.elm.getBoundingClientRect(); - } - - function applyTranslation (c) { - var oldPos = c.data.pos; - var newPos = c.data.newPos; - var dx = oldPos.left - newPos.left; - var dy = oldPos.top - newPos.top; - if (dx || dy) { - c.data.moved = true; - var s = c.elm.style; - s.transform = s.WebkitTransform = "translate(" + dx + "px," + dy + "px)"; - s.transitionDuration = '0s'; - } - } - - var platformComponents = { - Transition: Transition, - TransitionGroup: TransitionGroup - }; - - /* */ - - // install platform specific utils - Vue.config.mustUseProp = mustUseProp; - Vue.config.isReservedTag = isReservedTag; - Vue.config.isReservedAttr = isReservedAttr; - Vue.config.getTagNamespace = getTagNamespace; - Vue.config.isUnknownElement = isUnknownElement; - - // install platform runtime directives & components - extend(Vue.options.directives, platformDirectives); - extend(Vue.options.components, platformComponents); - - // install platform patch function - Vue.prototype.__patch__ = inBrowser ? patch : noop; - - // public mount method - Vue.prototype.$mount = function ( - el, - hydrating - ) { - el = el && inBrowser ? query(el) : undefined; - return mountComponent(this, el, hydrating) - }; - - // devtools global hook - /* istanbul ignore next */ - if (inBrowser) { - setTimeout(function () { - if (config.devtools) { - if (devtools) { - devtools.emit('init', Vue); - } else { - console[console.info ? 'info' : 'log']( - 'Download the Vue Devtools extension for a better development experience:\n' + - 'https://github.com/vuejs/vue-devtools' - ); - } - } - if (config.productionTip !== false && - typeof console !== 'undefined' - ) { - console[console.info ? 'info' : 'log']( - "You are running Vue in development mode.\n" + - "Make sure to turn on production mode when deploying for production.\n" + - "See more tips at https://vuejs.org/guide/deployment.html" - ); - } - }, 0); - } - - /* */ - - var defaultTagRE = /\{\{((?:.|\r?\n)+?)\}\}/g; - var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g; - - var buildRegex = cached(function (delimiters) { - var open = delimiters[0].replace(regexEscapeRE, '\\$&'); - var close = delimiters[1].replace(regexEscapeRE, '\\$&'); - return new RegExp(open + '((?:.|\\n)+?)' + close, 'g') - }); - - - - function parseText ( - text, - delimiters - ) { - var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE; - if (!tagRE.test(text)) { - return - } - var tokens = []; - var rawTokens = []; - var lastIndex = tagRE.lastIndex = 0; - var match, index, tokenValue; - while ((match = tagRE.exec(text))) { - index = match.index; - // push text token - if (index > lastIndex) { - rawTokens.push(tokenValue = text.slice(lastIndex, index)); - tokens.push(JSON.stringify(tokenValue)); - } - // tag token - var exp = parseFilters(match[1].trim()); - tokens.push(("_s(" + exp + ")")); - rawTokens.push({ '@binding': exp }); - lastIndex = index + match[0].length; - } - if (lastIndex < text.length) { - rawTokens.push(tokenValue = text.slice(lastIndex)); - tokens.push(JSON.stringify(tokenValue)); - } - return { - expression: tokens.join('+'), - tokens: rawTokens - } - } - - /* */ - - function transformNode (el, options) { - var warn = options.warn || baseWarn; - var staticClass = getAndRemoveAttr(el, 'class'); - if (staticClass) { - var res = parseText(staticClass, options.delimiters); - if (res) { - warn( - "class=\"" + staticClass + "\": " + - 'Interpolation inside attributes has been removed. ' + - 'Use v-bind or the colon shorthand instead. For example, ' + - 'instead of <div class="{{ val }}">, use <div :class="val">.', - el.rawAttrsMap['class'] - ); - } - } - if (staticClass) { - el.staticClass = JSON.stringify(staticClass); - } - var classBinding = getBindingAttr(el, 'class', false /* getStatic */); - if (classBinding) { - el.classBinding = classBinding; - } - } - - function genData (el) { - var data = ''; - if (el.staticClass) { - data += "staticClass:" + (el.staticClass) + ","; - } - if (el.classBinding) { - data += "class:" + (el.classBinding) + ","; - } - return data - } - - var klass$1 = { - staticKeys: ['staticClass'], - transformNode: transformNode, - genData: genData - }; - - /* */ - - function transformNode$1 (el, options) { - var warn = options.warn || baseWarn; - var staticStyle = getAndRemoveAttr(el, 'style'); - if (staticStyle) { - /* istanbul ignore if */ - { - var res = parseText(staticStyle, options.delimiters); - if (res) { - warn( - "style=\"" + staticStyle + "\": " + - 'Interpolation inside attributes has been removed. ' + - 'Use v-bind or the colon shorthand instead. For example, ' + - 'instead of <div style="{{ val }}">, use <div :style="val">.', - el.rawAttrsMap['style'] - ); - } - } - el.staticStyle = JSON.stringify(parseStyleText(staticStyle)); - } - - var styleBinding = getBindingAttr(el, 'style', false /* getStatic */); - if (styleBinding) { - el.styleBinding = styleBinding; - } - } - - function genData$1 (el) { - var data = ''; - if (el.staticStyle) { - data += "staticStyle:" + (el.staticStyle) + ","; - } - if (el.styleBinding) { - data += "style:(" + (el.styleBinding) + "),"; - } - return data - } - - var style$1 = { - staticKeys: ['staticStyle'], - transformNode: transformNode$1, - genData: genData$1 - }; - - /* */ - - var decoder; - - var he = { - decode: function decode (html) { - decoder = decoder || document.createElement('div'); - decoder.innerHTML = html; - return decoder.textContent - } - }; - - /* */ - - var isUnaryTag = makeMap( - 'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' + - 'link,meta,param,source,track,wbr' - ); - - // Elements that you can, intentionally, leave open - // (and which close themselves) - var canBeLeftOpenTag = makeMap( - 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source' - ); - - // HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3 - // Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content - var isNonPhrasingTag = makeMap( - 'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' + - 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' + - 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' + - 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' + - 'title,tr,track' - ); - - /** - * Not type-checking this file because it's mostly vendor code. - */ - - // Regular Expressions for parsing tags and attributes - var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; - var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; - var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + (unicodeRegExp.source) + "]*"; - var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")"; - var startTagOpen = new RegExp(("^<" + qnameCapture)); - var startTagClose = /^\s*(\/?)>/; - var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>")); - var doctype = /^<!DOCTYPE [^>]+>/i; - // #7298: escape - to avoid being pased as HTML comment when inlined in page - var comment = /^<!\--/; - var conditionalComment = /^<!\[/; - - // Special Elements (can contain anything) - var isPlainTextElement = makeMap('script,style,textarea', true); - var reCache = {}; - - var decodingMap = { - '<': '<', - '>': '>', - '"': '"', - '&': '&', - ' ': '\n', - '	': '\t', - ''': "'" - }; - var encodedAttr = /&(?:lt|gt|quot|amp|#39);/g; - var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g; - - // #5992 - var isIgnoreNewlineTag = makeMap('pre,textarea', true); - var shouldIgnoreFirstNewline = function (tag, html) { return tag && isIgnoreNewlineTag(tag) && html[0] === '\n'; }; - - function decodeAttr (value, shouldDecodeNewlines) { - var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr; - return value.replace(re, function (match) { return decodingMap[match]; }) - } - - function parseHTML (html, options) { - var stack = []; - var expectHTML = options.expectHTML; - var isUnaryTag$$1 = options.isUnaryTag || no; - var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no; - var index = 0; - var last, lastTag; - while (html) { - last = html; - // Make sure we're not in a plaintext content element like script/style - if (!lastTag || !isPlainTextElement(lastTag)) { - var textEnd = html.indexOf('<'); - if (textEnd === 0) { - // Comment: - if (comment.test(html)) { - var commentEnd = html.indexOf('-->'); - - if (commentEnd >= 0) { - if (options.shouldKeepComment) { - options.comment(html.substring(4, commentEnd), index, index + commentEnd + 3); - } - advance(commentEnd + 3); - continue - } - } - - // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment - if (conditionalComment.test(html)) { - var conditionalEnd = html.indexOf(']>'); - - if (conditionalEnd >= 0) { - advance(conditionalEnd + 2); - continue - } - } - - // Doctype: - var doctypeMatch = html.match(doctype); - if (doctypeMatch) { - advance(doctypeMatch[0].length); - continue - } - - // End tag: - var endTagMatch = html.match(endTag); - if (endTagMatch) { - var curIndex = index; - advance(endTagMatch[0].length); - parseEndTag(endTagMatch[1], curIndex, index); - continue - } - - // Start tag: - var startTagMatch = parseStartTag(); - if (startTagMatch) { - handleStartTag(startTagMatch); - if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) { - advance(1); - } - continue - } - } - - var text = (void 0), rest = (void 0), next = (void 0); - if (textEnd >= 0) { - rest = html.slice(textEnd); - while ( - !endTag.test(rest) && - !startTagOpen.test(rest) && - !comment.test(rest) && - !conditionalComment.test(rest) - ) { - // < in plain text, be forgiving and treat it as text - next = rest.indexOf('<', 1); - if (next < 0) { break } - textEnd += next; - rest = html.slice(textEnd); - } - text = html.substring(0, textEnd); - } - - if (textEnd < 0) { - text = html; - } - - if (text) { - advance(text.length); - } - - if (options.chars && text) { - options.chars(text, index - text.length, index); - } - } else { - var endTagLength = 0; - var stackedTag = lastTag.toLowerCase(); - var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\s\\S]*?)(</' + stackedTag + '[^>]*>)', 'i')); - var rest$1 = html.replace(reStackedTag, function (all, text, endTag) { - endTagLength = endTag.length; - if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') { - text = text - .replace(/<!\--([\s\S]*?)-->/g, '$1') // #7298 - .replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1'); - } - if (shouldIgnoreFirstNewline(stackedTag, text)) { - text = text.slice(1); - } - if (options.chars) { - options.chars(text); - } - return '' - }); - index += html.length - rest$1.length; - html = rest$1; - parseEndTag(stackedTag, index - endTagLength, index); - } - - if (html === last) { - options.chars && options.chars(html); - if (!stack.length && options.warn) { - options.warn(("Mal-formatted tag at end of template: \"" + html + "\""), { start: index + html.length }); - } - break - } - } - - // Clean up any remaining tags - parseEndTag(); - - function advance (n) { - index += n; - html = html.substring(n); - } - - function parseStartTag () { - var start = html.match(startTagOpen); - if (start) { - var match = { - tagName: start[1], - attrs: [], - start: index - }; - advance(start[0].length); - var end, attr; - while (!(end = html.match(startTagClose)) && (attr = html.match(dynamicArgAttribute) || html.match(attribute))) { - attr.start = index; - advance(attr[0].length); - attr.end = index; - match.attrs.push(attr); - } - if (end) { - match.unarySlash = end[1]; - advance(end[0].length); - match.end = index; - return match - } - } - } - - function handleStartTag (match) { - var tagName = match.tagName; - var unarySlash = match.unarySlash; - - if (expectHTML) { - if (lastTag === 'p' && isNonPhrasingTag(tagName)) { - parseEndTag(lastTag); - } - if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) { - parseEndTag(tagName); - } - } - - var unary = isUnaryTag$$1(tagName) || !!unarySlash; - - var l = match.attrs.length; - var attrs = new Array(l); - for (var i = 0; i < l; i++) { - var args = match.attrs[i]; - var value = args[3] || args[4] || args[5] || ''; - var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href' - ? options.shouldDecodeNewlinesForHref - : options.shouldDecodeNewlines; - attrs[i] = { - name: args[1], - value: decodeAttr(value, shouldDecodeNewlines) - }; - if (options.outputSourceRange) { - attrs[i].start = args.start + args[0].match(/^\s*/).length; - attrs[i].end = args.end; - } - } - - if (!unary) { - stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs, start: match.start, end: match.end }); - lastTag = tagName; - } - - if (options.start) { - options.start(tagName, attrs, unary, match.start, match.end); - } - } - - function parseEndTag (tagName, start, end) { - var pos, lowerCasedTagName; - if (start == null) { start = index; } - if (end == null) { end = index; } - - // Find the closest opened tag of the same type - if (tagName) { - lowerCasedTagName = tagName.toLowerCase(); - for (pos = stack.length - 1; pos >= 0; pos--) { - if (stack[pos].lowerCasedTag === lowerCasedTagName) { - break - } - } - } else { - // If no tag name is provided, clean shop - pos = 0; - } - - if (pos >= 0) { - // Close all the open elements, up the stack - for (var i = stack.length - 1; i >= pos; i--) { - if (i > pos || !tagName && - options.warn - ) { - options.warn( - ("tag <" + (stack[i].tag) + "> has no matching end tag."), - { start: stack[i].start, end: stack[i].end } - ); - } - if (options.end) { - options.end(stack[i].tag, start, end); - } - } - - // Remove the open elements from the stack - stack.length = pos; - lastTag = pos && stack[pos - 1].tag; - } else if (lowerCasedTagName === 'br') { - if (options.start) { - options.start(tagName, [], true, start, end); - } - } else if (lowerCasedTagName === 'p') { - if (options.start) { - options.start(tagName, [], false, start, end); - } - if (options.end) { - options.end(tagName, start, end); - } - } - } - } - - /* */ - - var onRE = /^@|^v-on:/; - var dirRE = /^v-|^@|^:/; - var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; - var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; - var stripParensRE = /^\(|\)$/g; - var dynamicArgRE = /^\[.*\]$/; - - var argRE = /:(.*)$/; - var bindRE = /^:|^\.|^v-bind:/; - var modifierRE = /\.[^.\]]+(?=[^\]]*$)/g; - - var slotRE = /^v-slot(:|$)|^#/; - - var lineBreakRE = /[\r\n]/; - var whitespaceRE$1 = /\s+/g; - - var invalidAttributeRE = /[\s"'<>\/=]/; - - var decodeHTMLCached = cached(he.decode); - - var emptySlotScopeToken = "_empty_"; - - // configurable state - var warn$2; - var delimiters; - var transforms; - var preTransforms; - var postTransforms; - var platformIsPreTag; - var platformMustUseProp; - var platformGetTagNamespace; - var maybeComponent; - - function createASTElement ( - tag, - attrs, - parent - ) { - return { - type: 1, - tag: tag, - attrsList: attrs, - attrsMap: makeAttrsMap(attrs), - rawAttrsMap: {}, - parent: parent, - children: [] - } - } - - /** - * Convert HTML string to AST. - */ - function parse ( - template, - options - ) { - warn$2 = options.warn || baseWarn; - - platformIsPreTag = options.isPreTag || no; - platformMustUseProp = options.mustUseProp || no; - platformGetTagNamespace = options.getTagNamespace || no; - var isReservedTag = options.isReservedTag || no; - maybeComponent = function (el) { return !!el.component || !isReservedTag(el.tag); }; - - transforms = pluckModuleFunction(options.modules, 'transformNode'); - preTransforms = pluckModuleFunction(options.modules, 'preTransformNode'); - postTransforms = pluckModuleFunction(options.modules, 'postTransformNode'); - - delimiters = options.delimiters; - - var stack = []; - var preserveWhitespace = options.preserveWhitespace !== false; - var whitespaceOption = options.whitespace; - var root; - var currentParent; - var inVPre = false; - var inPre = false; - var warned = false; - - function warnOnce (msg, range) { - if (!warned) { - warned = true; - warn$2(msg, range); - } - } - - function closeElement (element) { - trimEndingWhitespace(element); - if (!inVPre && !element.processed) { - element = processElement(element, options); - } - // tree management - if (!stack.length && element !== root) { - // allow root elements with v-if, v-else-if and v-else - if (root.if && (element.elseif || element.else)) { - { - checkRootConstraints(element); - } - addIfCondition(root, { - exp: element.elseif, - block: element - }); - } else { - warnOnce( - "Component template should contain exactly one root element. " + - "If you are using v-if on multiple elements, " + - "use v-else-if to chain them instead.", - { start: element.start } - ); - } - } - if (currentParent && !element.forbidden) { - if (element.elseif || element.else) { - processIfConditions(element, currentParent); - } else { - if (element.slotScope) { - // scoped slot - // keep it in the children list so that v-else(-if) conditions can - // find it as the prev node. - var name = element.slotTarget || '"default"' - ;(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element; - } - currentParent.children.push(element); - element.parent = currentParent; - } - } - - // final children cleanup - // filter out scoped slots - element.children = element.children.filter(function (c) { return !(c).slotScope; }); - // remove trailing whitespace node again - trimEndingWhitespace(element); - - // check pre state - if (element.pre) { - inVPre = false; - } - if (platformIsPreTag(element.tag)) { - inPre = false; - } - // apply post-transforms - for (var i = 0; i < postTransforms.length; i++) { - postTransforms[i](element, options); - } - } - - function trimEndingWhitespace (el) { - // remove trailing whitespace node - if (!inPre) { - var lastNode; - while ( - (lastNode = el.children[el.children.length - 1]) && - lastNode.type === 3 && - lastNode.text === ' ' - ) { - el.children.pop(); - } - } - } - - function checkRootConstraints (el) { - if (el.tag === 'slot' || el.tag === 'template') { - warnOnce( - "Cannot use <" + (el.tag) + "> as component root element because it may " + - 'contain multiple nodes.', - { start: el.start } - ); - } - if (el.attrsMap.hasOwnProperty('v-for')) { - warnOnce( - 'Cannot use v-for on stateful component root element because ' + - 'it renders multiple elements.', - el.rawAttrsMap['v-for'] - ); - } - } - - parseHTML(template, { - warn: warn$2, - expectHTML: options.expectHTML, - isUnaryTag: options.isUnaryTag, - canBeLeftOpenTag: options.canBeLeftOpenTag, - shouldDecodeNewlines: options.shouldDecodeNewlines, - shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref, - shouldKeepComment: options.comments, - outputSourceRange: options.outputSourceRange, - start: function start (tag, attrs, unary, start$1, end) { - // check namespace. - // inherit parent ns if there is one - var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag); - - // handle IE svg bug - /* istanbul ignore if */ - if (isIE && ns === 'svg') { - attrs = guardIESVGBug(attrs); - } - - var element = createASTElement(tag, attrs, currentParent); - if (ns) { - element.ns = ns; - } - - { - if (options.outputSourceRange) { - element.start = start$1; - element.end = end; - element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) { - cumulated[attr.name] = attr; - return cumulated - }, {}); - } - attrs.forEach(function (attr) { - if (invalidAttributeRE.test(attr.name)) { - warn$2( - "Invalid dynamic argument expression: attribute names cannot contain " + - "spaces, quotes, <, >, / or =.", - { - start: attr.start + attr.name.indexOf("["), - end: attr.start + attr.name.length - } - ); - } - }); - } - - if (isForbiddenTag(element) && !isServerRendering()) { - element.forbidden = true; - warn$2( - 'Templates should only be responsible for mapping the state to the ' + - 'UI. Avoid placing tags with side-effects in your templates, such as ' + - "<" + tag + ">" + ', as they will not be parsed.', - { start: element.start } - ); - } - - // apply pre-transforms - for (var i = 0; i < preTransforms.length; i++) { - element = preTransforms[i](element, options) || element; - } - - if (!inVPre) { - processPre(element); - if (element.pre) { - inVPre = true; - } - } - if (platformIsPreTag(element.tag)) { - inPre = true; - } - if (inVPre) { - processRawAttrs(element); - } else if (!element.processed) { - // structural directives - processFor(element); - processIf(element); - processOnce(element); - } - - if (!root) { - root = element; - { - checkRootConstraints(root); - } - } - - if (!unary) { - currentParent = element; - stack.push(element); - } else { - closeElement(element); - } - }, - - end: function end (tag, start, end$1) { - var element = stack[stack.length - 1]; - // pop stack - stack.length -= 1; - currentParent = stack[stack.length - 1]; - if (options.outputSourceRange) { - element.end = end$1; - } - closeElement(element); - }, - - chars: function chars (text, start, end) { - if (!currentParent) { - { - if (text === template) { - warnOnce( - 'Component template requires a root element, rather than just text.', - { start: start } - ); - } else if ((text = text.trim())) { - warnOnce( - ("text \"" + text + "\" outside root element will be ignored."), - { start: start } - ); - } - } - return - } - // IE textarea placeholder bug - /* istanbul ignore if */ - if (isIE && - currentParent.tag === 'textarea' && - currentParent.attrsMap.placeholder === text - ) { - return - } - var children = currentParent.children; - if (inPre || text.trim()) { - text = isTextTag(currentParent) ? text : decodeHTMLCached(text); - } else if (!children.length) { - // remove the whitespace-only node right after an opening tag - text = ''; - } else if (whitespaceOption) { - if (whitespaceOption === 'condense') { - // in condense mode, remove the whitespace node if it contains - // line break, otherwise condense to a single space - text = lineBreakRE.test(text) ? '' : ' '; - } else { - text = ' '; - } - } else { - text = preserveWhitespace ? ' ' : ''; - } - if (text) { - if (!inPre && whitespaceOption === 'condense') { - // condense consecutive whitespaces into single space - text = text.replace(whitespaceRE$1, ' '); - } - var res; - var child; - if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) { - child = { - type: 2, - expression: res.expression, - tokens: res.tokens, - text: text - }; - } else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') { - child = { - type: 3, - text: text - }; - } - if (child) { - if (options.outputSourceRange) { - child.start = start; - child.end = end; - } - children.push(child); - } - } - }, - comment: function comment (text, start, end) { - // adding anyting as a sibling to the root node is forbidden - // comments should still be allowed, but ignored - if (currentParent) { - var child = { - type: 3, - text: text, - isComment: true - }; - if (options.outputSourceRange) { - child.start = start; - child.end = end; - } - currentParent.children.push(child); - } - } - }); - return root - } - - function processPre (el) { - if (getAndRemoveAttr(el, 'v-pre') != null) { - el.pre = true; - } - } - - function processRawAttrs (el) { - var list = el.attrsList; - var len = list.length; - if (len) { - var attrs = el.attrs = new Array(len); - for (var i = 0; i < len; i++) { - attrs[i] = { - name: list[i].name, - value: JSON.stringify(list[i].value) - }; - if (list[i].start != null) { - attrs[i].start = list[i].start; - attrs[i].end = list[i].end; - } - } - } else if (!el.pre) { - // non root node in pre blocks with no attributes - el.plain = true; - } - } - - function processElement ( - element, - options - ) { - processKey(element); - - // determine whether this is a plain element after - // removing structural attributes - element.plain = ( - !element.key && - !element.scopedSlots && - !element.attrsList.length - ); - - processRef(element); - processSlotContent(element); - processSlotOutlet(element); - processComponent(element); - for (var i = 0; i < transforms.length; i++) { - element = transforms[i](element, options) || element; - } - processAttrs(element); - return element - } - - function processKey (el) { - var exp = getBindingAttr(el, 'key'); - if (exp) { - { - if (el.tag === 'template') { - warn$2( - "<template> cannot be keyed. Place the key on real elements instead.", - getRawBindingAttr(el, 'key') - ); - } - if (el.for) { - var iterator = el.iterator2 || el.iterator1; - var parent = el.parent; - if (iterator && iterator === exp && parent && parent.tag === 'transition-group') { - warn$2( - "Do not use v-for index as key on <transition-group> children, " + - "this is the same as not using keys.", - getRawBindingAttr(el, 'key'), - true /* tip */ - ); - } - } - } - el.key = exp; - } - } - - function processRef (el) { - var ref = getBindingAttr(el, 'ref'); - if (ref) { - el.ref = ref; - el.refInFor = checkInFor(el); - } - } - - function processFor (el) { - var exp; - if ((exp = getAndRemoveAttr(el, 'v-for'))) { - var res = parseFor(exp); - if (res) { - extend(el, res); - } else { - warn$2( - ("Invalid v-for expression: " + exp), - el.rawAttrsMap['v-for'] - ); - } - } - } - - - - function parseFor (exp) { - var inMatch = exp.match(forAliasRE); - if (!inMatch) { return } - var res = {}; - res.for = inMatch[2].trim(); - var alias = inMatch[1].trim().replace(stripParensRE, ''); - var iteratorMatch = alias.match(forIteratorRE); - if (iteratorMatch) { - res.alias = alias.replace(forIteratorRE, '').trim(); - res.iterator1 = iteratorMatch[1].trim(); - if (iteratorMatch[2]) { - res.iterator2 = iteratorMatch[2].trim(); - } - } else { - res.alias = alias; - } - return res - } - - function processIf (el) { - var exp = getAndRemoveAttr(el, 'v-if'); - if (exp) { - el.if = exp; - addIfCondition(el, { - exp: exp, - block: el - }); - } else { - if (getAndRemoveAttr(el, 'v-else') != null) { - el.else = true; - } - var elseif = getAndRemoveAttr(el, 'v-else-if'); - if (elseif) { - el.elseif = elseif; - } - } - } - - function processIfConditions (el, parent) { - var prev = findPrevElement(parent.children); - if (prev && prev.if) { - addIfCondition(prev, { - exp: el.elseif, - block: el - }); - } else { - warn$2( - "v-" + (el.elseif ? ('else-if="' + el.elseif + '"') : 'else') + " " + - "used on element <" + (el.tag) + "> without corresponding v-if.", - el.rawAttrsMap[el.elseif ? 'v-else-if' : 'v-else'] - ); - } - } - - function findPrevElement (children) { - var i = children.length; - while (i--) { - if (children[i].type === 1) { - return children[i] - } else { - if (children[i].text !== ' ') { - warn$2( - "text \"" + (children[i].text.trim()) + "\" between v-if and v-else(-if) " + - "will be ignored.", - children[i] - ); - } - children.pop(); - } - } - } - - function addIfCondition (el, condition) { - if (!el.ifConditions) { - el.ifConditions = []; - } - el.ifConditions.push(condition); - } - - function processOnce (el) { - var once$$1 = getAndRemoveAttr(el, 'v-once'); - if (once$$1 != null) { - el.once = true; - } - } - - // handle content being passed to a component as slot, - // e.g. <template slot="xxx">, <div slot-scope="xxx"> - function processSlotContent (el) { - var slotScope; - if (el.tag === 'template') { - slotScope = getAndRemoveAttr(el, 'scope'); - /* istanbul ignore if */ - if (slotScope) { - warn$2( - "the \"scope\" attribute for scoped slots have been deprecated and " + - "replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " + - "can also be used on plain elements in addition to <template> to " + - "denote scoped slots.", - el.rawAttrsMap['scope'], - true - ); - } - el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope'); - } else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) { - /* istanbul ignore if */ - if (el.attrsMap['v-for']) { - warn$2( - "Ambiguous combined usage of slot-scope and v-for on <" + (el.tag) + "> " + - "(v-for takes higher priority). Use a wrapper <template> for the " + - "scoped slot to make it clearer.", - el.rawAttrsMap['slot-scope'], - true - ); - } - el.slotScope = slotScope; - } - - // slot="xxx" - var slotTarget = getBindingAttr(el, 'slot'); - if (slotTarget) { - el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget; - el.slotTargetDynamic = !!(el.attrsMap[':slot'] || el.attrsMap['v-bind:slot']); - // preserve slot as an attribute for native shadow DOM compat - // only for non-scoped slots. - if (el.tag !== 'template' && !el.slotScope) { - addAttr(el, 'slot', slotTarget, getRawBindingAttr(el, 'slot')); - } - } - - // 2.6 v-slot syntax - { - if (el.tag === 'template') { - // v-slot on <template> - var slotBinding = getAndRemoveAttrByRegex(el, slotRE); - if (slotBinding) { - { - if (el.slotTarget || el.slotScope) { - warn$2( - "Unexpected mixed usage of different slot syntaxes.", - el - ); - } - if (el.parent && !maybeComponent(el.parent)) { - warn$2( - "<template v-slot> can only appear at the root level inside " + - "the receiving the component", - el - ); - } - } - var ref = getSlotName(slotBinding); - var name = ref.name; - var dynamic = ref.dynamic; - el.slotTarget = name; - el.slotTargetDynamic = dynamic; - el.slotScope = slotBinding.value || emptySlotScopeToken; // force it into a scoped slot for perf - } - } else { - // v-slot on component, denotes default slot - var slotBinding$1 = getAndRemoveAttrByRegex(el, slotRE); - if (slotBinding$1) { - { - if (!maybeComponent(el)) { - warn$2( - "v-slot can only be used on components or <template>.", - slotBinding$1 - ); - } - if (el.slotScope || el.slotTarget) { - warn$2( - "Unexpected mixed usage of different slot syntaxes.", - el - ); - } - if (el.scopedSlots) { - warn$2( - "To avoid scope ambiguity, the default slot should also use " + - "<template> syntax when there are other named slots.", - slotBinding$1 - ); - } - } - // add the component's children to its default slot - var slots = el.scopedSlots || (el.scopedSlots = {}); - var ref$1 = getSlotName(slotBinding$1); - var name$1 = ref$1.name; - var dynamic$1 = ref$1.dynamic; - var slotContainer = slots[name$1] = createASTElement('template', [], el); - slotContainer.slotTarget = name$1; - slotContainer.slotTargetDynamic = dynamic$1; - slotContainer.children = el.children.filter(function (c) { - if (!c.slotScope) { - c.parent = slotContainer; - return true - } - }); - slotContainer.slotScope = slotBinding$1.value || emptySlotScopeToken; - // remove children as they are returned from scopedSlots now - el.children = []; - // mark el non-plain so data gets generated - el.plain = false; - } - } - } - } - - function getSlotName (binding) { - var name = binding.name.replace(slotRE, ''); - if (!name) { - if (binding.name[0] !== '#') { - name = 'default'; - } else { - warn$2( - "v-slot shorthand syntax requires a slot name.", - binding - ); - } - } - return dynamicArgRE.test(name) - // dynamic [name] - ? { name: name.slice(1, -1), dynamic: true } - // static name - : { name: ("\"" + name + "\""), dynamic: false } - } - - // handle <slot/> outlets - function processSlotOutlet (el) { - if (el.tag === 'slot') { - el.slotName = getBindingAttr(el, 'name'); - if (el.key) { - warn$2( - "`key` does not work on <slot> because slots are abstract outlets " + - "and can possibly expand into multiple elements. " + - "Use the key on a wrapping element instead.", - getRawBindingAttr(el, 'key') - ); - } - } - } - - function processComponent (el) { - var binding; - if ((binding = getBindingAttr(el, 'is'))) { - el.component = binding; - } - if (getAndRemoveAttr(el, 'inline-template') != null) { - el.inlineTemplate = true; - } - } - - function processAttrs (el) { - var list = el.attrsList; - var i, l, name, rawName, value, modifiers, syncGen, isDynamic; - for (i = 0, l = list.length; i < l; i++) { - name = rawName = list[i].name; - value = list[i].value; - if (dirRE.test(name)) { - // mark element as dynamic - el.hasBindings = true; - // modifiers - modifiers = parseModifiers(name.replace(dirRE, '')); - // support .foo shorthand syntax for the .prop modifier - if (modifiers) { - name = name.replace(modifierRE, ''); - } - if (bindRE.test(name)) { // v-bind - name = name.replace(bindRE, ''); - value = parseFilters(value); - isDynamic = dynamicArgRE.test(name); - if (isDynamic) { - name = name.slice(1, -1); - } - if ( - value.trim().length === 0 - ) { - warn$2( - ("The value for a v-bind expression cannot be empty. Found in \"v-bind:" + name + "\"") - ); - } - if (modifiers) { - if (modifiers.prop && !isDynamic) { - name = camelize(name); - if (name === 'innerHtml') { name = 'innerHTML'; } - } - if (modifiers.camel && !isDynamic) { - name = camelize(name); - } - if (modifiers.sync) { - syncGen = genAssignmentCode(value, "$event"); - if (!isDynamic) { - addHandler( - el, - ("update:" + (camelize(name))), - syncGen, - null, - false, - warn$2, - list[i] - ); - if (hyphenate(name) !== camelize(name)) { - addHandler( - el, - ("update:" + (hyphenate(name))), - syncGen, - null, - false, - warn$2, - list[i] - ); - } - } else { - // handler w/ dynamic event name - addHandler( - el, - ("\"update:\"+(" + name + ")"), - syncGen, - null, - false, - warn$2, - list[i], - true // dynamic - ); - } - } - } - if ((modifiers && modifiers.prop) || ( - !el.component && platformMustUseProp(el.tag, el.attrsMap.type, name) - )) { - addProp(el, name, value, list[i], isDynamic); - } else { - addAttr(el, name, value, list[i], isDynamic); - } - } else if (onRE.test(name)) { // v-on - name = name.replace(onRE, ''); - isDynamic = dynamicArgRE.test(name); - if (isDynamic) { - name = name.slice(1, -1); - } - addHandler(el, name, value, modifiers, false, warn$2, list[i], isDynamic); - } else { // normal directives - name = name.replace(dirRE, ''); - // parse arg - var argMatch = name.match(argRE); - var arg = argMatch && argMatch[1]; - isDynamic = false; - if (arg) { - name = name.slice(0, -(arg.length + 1)); - if (dynamicArgRE.test(arg)) { - arg = arg.slice(1, -1); - isDynamic = true; - } - } - addDirective(el, name, rawName, value, arg, isDynamic, modifiers, list[i]); - if (name === 'model') { - checkForAliasModel(el, value); - } - } - } else { - // literal attribute - { - var res = parseText(value, delimiters); - if (res) { - warn$2( - name + "=\"" + value + "\": " + - 'Interpolation inside attributes has been removed. ' + - 'Use v-bind or the colon shorthand instead. For example, ' + - 'instead of <div id="{{ val }}">, use <div :id="val">.', - list[i] - ); - } - } - addAttr(el, name, JSON.stringify(value), list[i]); - // #6887 firefox doesn't update muted state if set via attribute - // even immediately after element creation - if (!el.component && - name === 'muted' && - platformMustUseProp(el.tag, el.attrsMap.type, name)) { - addProp(el, name, 'true', list[i]); - } - } - } - } - - function checkInFor (el) { - var parent = el; - while (parent) { - if (parent.for !== undefined) { - return true - } - parent = parent.parent; - } - return false - } - - function parseModifiers (name) { - var match = name.match(modifierRE); - if (match) { - var ret = {}; - match.forEach(function (m) { ret[m.slice(1)] = true; }); - return ret - } - } - - function makeAttrsMap (attrs) { - var map = {}; - for (var i = 0, l = attrs.length; i < l; i++) { - if ( - map[attrs[i].name] && !isIE && !isEdge - ) { - warn$2('duplicate attribute: ' + attrs[i].name, attrs[i]); - } - map[attrs[i].name] = attrs[i].value; - } - return map - } - - // for script (e.g. type="x/template") or style, do not decode content - function isTextTag (el) { - return el.tag === 'script' || el.tag === 'style' - } - - function isForbiddenTag (el) { - return ( - el.tag === 'style' || - (el.tag === 'script' && ( - !el.attrsMap.type || - el.attrsMap.type === 'text/javascript' - )) - ) - } - - var ieNSBug = /^xmlns:NS\d+/; - var ieNSPrefix = /^NS\d+:/; - - /* istanbul ignore next */ - function guardIESVGBug (attrs) { - var res = []; - for (var i = 0; i < attrs.length; i++) { - var attr = attrs[i]; - if (!ieNSBug.test(attr.name)) { - attr.name = attr.name.replace(ieNSPrefix, ''); - res.push(attr); - } - } - return res - } - - function checkForAliasModel (el, value) { - var _el = el; - while (_el) { - if (_el.for && _el.alias === value) { - warn$2( - "<" + (el.tag) + " v-model=\"" + value + "\">: " + - "You are binding v-model directly to a v-for iteration alias. " + - "This will not be able to modify the v-for source array because " + - "writing to the alias is like modifying a function local variable. " + - "Consider using an array of objects and use v-model on an object property instead.", - el.rawAttrsMap['v-model'] - ); - } - _el = _el.parent; - } - } - - /* */ - - function preTransformNode (el, options) { - if (el.tag === 'input') { - var map = el.attrsMap; - if (!map['v-model']) { - return - } - - var typeBinding; - if (map[':type'] || map['v-bind:type']) { - typeBinding = getBindingAttr(el, 'type'); - } - if (!map.type && !typeBinding && map['v-bind']) { - typeBinding = "(" + (map['v-bind']) + ").type"; - } - - if (typeBinding) { - var ifCondition = getAndRemoveAttr(el, 'v-if', true); - var ifConditionExtra = ifCondition ? ("&&(" + ifCondition + ")") : ""; - var hasElse = getAndRemoveAttr(el, 'v-else', true) != null; - var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true); - // 1. checkbox - var branch0 = cloneASTElement(el); - // process for on the main node - processFor(branch0); - addRawAttr(branch0, 'type', 'checkbox'); - processElement(branch0, options); - branch0.processed = true; // prevent it from double-processed - branch0.if = "(" + typeBinding + ")==='checkbox'" + ifConditionExtra; - addIfCondition(branch0, { - exp: branch0.if, - block: branch0 - }); - // 2. add radio else-if condition - var branch1 = cloneASTElement(el); - getAndRemoveAttr(branch1, 'v-for', true); - addRawAttr(branch1, 'type', 'radio'); - processElement(branch1, options); - addIfCondition(branch0, { - exp: "(" + typeBinding + ")==='radio'" + ifConditionExtra, - block: branch1 - }); - // 3. other - var branch2 = cloneASTElement(el); - getAndRemoveAttr(branch2, 'v-for', true); - addRawAttr(branch2, ':type', typeBinding); - processElement(branch2, options); - addIfCondition(branch0, { - exp: ifCondition, - block: branch2 - }); - - if (hasElse) { - branch0.else = true; - } else if (elseIfCondition) { - branch0.elseif = elseIfCondition; - } - - return branch0 - } - } - } - - function cloneASTElement (el) { - return createASTElement(el.tag, el.attrsList.slice(), el.parent) - } - - var model$1 = { - preTransformNode: preTransformNode - }; - - var modules$1 = [ - klass$1, - style$1, - model$1 - ]; - - /* */ - - function text (el, dir) { - if (dir.value) { - addProp(el, 'textContent', ("_s(" + (dir.value) + ")"), dir); - } - } - - /* */ - - function html (el, dir) { - if (dir.value) { - addProp(el, 'innerHTML', ("_s(" + (dir.value) + ")"), dir); - } - } - - var directives$1 = { - model: model, - text: text, - html: html - }; - - /* */ - - var baseOptions = { - expectHTML: true, - modules: modules$1, - directives: directives$1, - isPreTag: isPreTag, - isUnaryTag: isUnaryTag, - mustUseProp: mustUseProp, - canBeLeftOpenTag: canBeLeftOpenTag, - isReservedTag: isReservedTag, - getTagNamespace: getTagNamespace, - staticKeys: genStaticKeys(modules$1) - }; - - /* */ - - var isStaticKey; - var isPlatformReservedTag; - - var genStaticKeysCached = cached(genStaticKeys$1); - - /** - * Goal of the optimizer: walk the generated template AST tree - * and detect sub-trees that are purely static, i.e. parts of - * the DOM that never needs to change. - * - * Once we detect these sub-trees, we can: - * - * 1. Hoist them into constants, so that we no longer need to - * create fresh nodes for them on each re-render; - * 2. Completely skip them in the patching process. - */ - function optimize (root, options) { - if (!root) { return } - isStaticKey = genStaticKeysCached(options.staticKeys || ''); - isPlatformReservedTag = options.isReservedTag || no; - // first pass: mark all non-static nodes. - markStatic$1(root); - // second pass: mark static roots. - markStaticRoots(root, false); - } - - function genStaticKeys$1 (keys) { - return makeMap( - 'type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap' + - (keys ? ',' + keys : '') - ) - } - - function markStatic$1 (node) { - node.static = isStatic(node); - if (node.type === 1) { - // do not make component slot content static. this avoids - // 1. components not able to mutate slot nodes - // 2. static slot content fails for hot-reloading - if ( - !isPlatformReservedTag(node.tag) && - node.tag !== 'slot' && - node.attrsMap['inline-template'] == null - ) { - return - } - for (var i = 0, l = node.children.length; i < l; i++) { - var child = node.children[i]; - markStatic$1(child); - if (!child.static) { - node.static = false; - } - } - if (node.ifConditions) { - for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) { - var block = node.ifConditions[i$1].block; - markStatic$1(block); - if (!block.static) { - node.static = false; - } - } - } - } - } - - function markStaticRoots (node, isInFor) { - if (node.type === 1) { - if (node.static || node.once) { - node.staticInFor = isInFor; - } - // For a node to qualify as a static root, it should have children that - // are not just static text. Otherwise the cost of hoisting out will - // outweigh the benefits and it's better off to just always render it fresh. - if (node.static && node.children.length && !( - node.children.length === 1 && - node.children[0].type === 3 - )) { - node.staticRoot = true; - return - } else { - node.staticRoot = false; - } - if (node.children) { - for (var i = 0, l = node.children.length; i < l; i++) { - markStaticRoots(node.children[i], isInFor || !!node.for); - } - } - if (node.ifConditions) { - for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) { - markStaticRoots(node.ifConditions[i$1].block, isInFor); - } - } - } - } - - function isStatic (node) { - if (node.type === 2) { // expression - return false - } - if (node.type === 3) { // text - return true - } - return !!(node.pre || ( - !node.hasBindings && // no dynamic bindings - !node.if && !node.for && // not v-if or v-for or v-else - !isBuiltInTag(node.tag) && // not a built-in - isPlatformReservedTag(node.tag) && // not a component - !isDirectChildOfTemplateFor(node) && - Object.keys(node).every(isStaticKey) - )) - } - - function isDirectChildOfTemplateFor (node) { - while (node.parent) { - node = node.parent; - if (node.tag !== 'template') { - return false - } - if (node.for) { - return true - } - } - return false - } - - /* */ - - var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*(?:[\w$]+)?\s*\(/; - var fnInvokeRE = /\([^)]*?\);*$/; - var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/; - - // KeyboardEvent.keyCode aliases - var keyCodes = { - esc: 27, - tab: 9, - enter: 13, - space: 32, - up: 38, - left: 37, - right: 39, - down: 40, - 'delete': [8, 46] - }; - - // KeyboardEvent.key aliases - var keyNames = { - // #7880: IE11 and Edge use `Esc` for Escape key name. - esc: ['Esc', 'Escape'], - tab: 'Tab', - enter: 'Enter', - // #9112: IE11 uses `Spacebar` for Space key name. - space: [' ', 'Spacebar'], - // #7806: IE11 uses key names without `Arrow` prefix for arrow keys. - up: ['Up', 'ArrowUp'], - left: ['Left', 'ArrowLeft'], - right: ['Right', 'ArrowRight'], - down: ['Down', 'ArrowDown'], - // #9112: IE11 uses `Del` for Delete key name. - 'delete': ['Backspace', 'Delete', 'Del'] - }; - - // #4868: modifiers that prevent the execution of the listener - // need to explicitly return null so that we can determine whether to remove - // the listener for .once - var genGuard = function (condition) { return ("if(" + condition + ")return null;"); }; - - var modifierCode = { - stop: '$event.stopPropagation();', - prevent: '$event.preventDefault();', - self: genGuard("$event.target !== $event.currentTarget"), - ctrl: genGuard("!$event.ctrlKey"), - shift: genGuard("!$event.shiftKey"), - alt: genGuard("!$event.altKey"), - meta: genGuard("!$event.metaKey"), - left: genGuard("'button' in $event && $event.button !== 0"), - middle: genGuard("'button' in $event && $event.button !== 1"), - right: genGuard("'button' in $event && $event.button !== 2") - }; - - function genHandlers ( - events, - isNative - ) { - var prefix = isNative ? 'nativeOn:' : 'on:'; - var staticHandlers = ""; - var dynamicHandlers = ""; - for (var name in events) { - var handlerCode = genHandler(events[name]); - if (events[name] && events[name].dynamic) { - dynamicHandlers += name + "," + handlerCode + ","; - } else { - staticHandlers += "\"" + name + "\":" + handlerCode + ","; - } - } - staticHandlers = "{" + (staticHandlers.slice(0, -1)) + "}"; - if (dynamicHandlers) { - return prefix + "_d(" + staticHandlers + ",[" + (dynamicHandlers.slice(0, -1)) + "])" - } else { - return prefix + staticHandlers - } - } - - function genHandler (handler) { - if (!handler) { - return 'function(){}' - } - - if (Array.isArray(handler)) { - return ("[" + (handler.map(function (handler) { return genHandler(handler); }).join(',')) + "]") - } - - var isMethodPath = simplePathRE.test(handler.value); - var isFunctionExpression = fnExpRE.test(handler.value); - var isFunctionInvocation = simplePathRE.test(handler.value.replace(fnInvokeRE, '')); - - if (!handler.modifiers) { - if (isMethodPath || isFunctionExpression) { - return handler.value - } - return ("function($event){" + (isFunctionInvocation ? ("return " + (handler.value)) : handler.value) + "}") // inline statement - } else { - var code = ''; - var genModifierCode = ''; - var keys = []; - for (var key in handler.modifiers) { - if (modifierCode[key]) { - genModifierCode += modifierCode[key]; - // left/right - if (keyCodes[key]) { - keys.push(key); - } - } else if (key === 'exact') { - var modifiers = (handler.modifiers); - genModifierCode += genGuard( - ['ctrl', 'shift', 'alt', 'meta'] - .filter(function (keyModifier) { return !modifiers[keyModifier]; }) - .map(function (keyModifier) { return ("$event." + keyModifier + "Key"); }) - .join('||') - ); - } else { - keys.push(key); - } - } - if (keys.length) { - code += genKeyFilter(keys); - } - // Make sure modifiers like prevent and stop get executed after key filtering - if (genModifierCode) { - code += genModifierCode; - } - var handlerCode = isMethodPath - ? ("return " + (handler.value) + "($event)") - : isFunctionExpression - ? ("return (" + (handler.value) + ")($event)") - : isFunctionInvocation - ? ("return " + (handler.value)) - : handler.value; - return ("function($event){" + code + handlerCode + "}") - } - } - - function genKeyFilter (keys) { - return ( - // make sure the key filters only apply to KeyboardEvents - // #9441: can't use 'keyCode' in $event because Chrome autofill fires fake - // key events that do not have keyCode property... - "if(!$event.type.indexOf('key')&&" + - (keys.map(genFilterCode).join('&&')) + ")return null;" - ) - } - - function genFilterCode (key) { - var keyVal = parseInt(key, 10); - if (keyVal) { - return ("$event.keyCode!==" + keyVal) - } - var keyCode = keyCodes[key]; - var keyName = keyNames[key]; - return ( - "_k($event.keyCode," + - (JSON.stringify(key)) + "," + - (JSON.stringify(keyCode)) + "," + - "$event.key," + - "" + (JSON.stringify(keyName)) + - ")" - ) - } - - /* */ - - function on (el, dir) { - if (dir.modifiers) { - warn("v-on without argument does not support modifiers."); - } - el.wrapListeners = function (code) { return ("_g(" + code + "," + (dir.value) + ")"); }; - } - - /* */ - - function bind$1 (el, dir) { - el.wrapData = function (code) { - return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + "," + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + ")") - }; - } - - /* */ - - var baseDirectives = { - on: on, - bind: bind$1, - cloak: noop - }; - - /* */ - - - - - - var CodegenState = function CodegenState (options) { - this.options = options; - this.warn = options.warn || baseWarn; - this.transforms = pluckModuleFunction(options.modules, 'transformCode'); - this.dataGenFns = pluckModuleFunction(options.modules, 'genData'); - this.directives = extend(extend({}, baseDirectives), options.directives); - var isReservedTag = options.isReservedTag || no; - this.maybeComponent = function (el) { return !!el.component || !isReservedTag(el.tag); }; - this.onceId = 0; - this.staticRenderFns = []; - this.pre = false; - }; - - - - function generate ( - ast, - options - ) { - var state = new CodegenState(options); - var code = ast ? genElement(ast, state) : '_c("div")'; - return { - render: ("with(this){return " + code + "}"), - staticRenderFns: state.staticRenderFns - } - } - - function genElement (el, state) { - if (el.parent) { - el.pre = el.pre || el.parent.pre; - } - - if (el.staticRoot && !el.staticProcessed) { - return genStatic(el, state) - } else if (el.once && !el.onceProcessed) { - return genOnce(el, state) - } else if (el.for && !el.forProcessed) { - return genFor(el, state) - } else if (el.if && !el.ifProcessed) { - return genIf(el, state) - } else if (el.tag === 'template' && !el.slotTarget && !state.pre) { - return genChildren(el, state) || 'void 0' - } else if (el.tag === 'slot') { - return genSlot(el, state) - } else { - // component or element - var code; - if (el.component) { - code = genComponent(el.component, el, state); - } else { - var data; - if (!el.plain || (el.pre && state.maybeComponent(el))) { - data = genData$2(el, state); - } - - var children = el.inlineTemplate ? null : genChildren(el, state, true); - code = "_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")"; - } - // module transforms - for (var i = 0; i < state.transforms.length; i++) { - code = state.transforms[i](el, code); - } - return code - } - } - - // hoist static sub-trees out - function genStatic (el, state) { - el.staticProcessed = true; - // Some elements (templates) need to behave differently inside of a v-pre - // node. All pre nodes are static roots, so we can use this as a location to - // wrap a state change and reset it upon exiting the pre node. - var originalPreState = state.pre; - if (el.pre) { - state.pre = el.pre; - } - state.staticRenderFns.push(("with(this){return " + (genElement(el, state)) + "}")); - state.pre = originalPreState; - return ("_m(" + (state.staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + ")") - } - - // v-once - function genOnce (el, state) { - el.onceProcessed = true; - if (el.if && !el.ifProcessed) { - return genIf(el, state) - } else if (el.staticInFor) { - var key = ''; - var parent = el.parent; - while (parent) { - if (parent.for) { - key = parent.key; - break - } - parent = parent.parent; - } - if (!key) { - state.warn( - "v-once can only be used inside v-for that is keyed. ", - el.rawAttrsMap['v-once'] - ); - return genElement(el, state) - } - return ("_o(" + (genElement(el, state)) + "," + (state.onceId++) + "," + key + ")") - } else { - return genStatic(el, state) - } - } - - function genIf ( - el, - state, - altGen, - altEmpty - ) { - el.ifProcessed = true; // avoid recursion - return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty) - } - - function genIfConditions ( - conditions, - state, - altGen, - altEmpty - ) { - if (!conditions.length) { - return altEmpty || '_e()' - } - - var condition = conditions.shift(); - if (condition.exp) { - return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions, state, altGen, altEmpty))) - } else { - return ("" + (genTernaryExp(condition.block))) - } - - // v-if with v-once should generate code like (a)?_m(0):_m(1) - function genTernaryExp (el) { - return altGen - ? altGen(el, state) - : el.once - ? genOnce(el, state) - : genElement(el, state) - } - } - - function genFor ( - el, - state, - altGen, - altHelper - ) { - var exp = el.for; - var alias = el.alias; - var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : ''; - var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : ''; - - if (state.maybeComponent(el) && - el.tag !== 'slot' && - el.tag !== 'template' && - !el.key - ) { - state.warn( - "<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " + - "v-for should have explicit keys. " + - "See https://vuejs.org/guide/list.html#key for more info.", - el.rawAttrsMap['v-for'], - true /* tip */ - ); - } - - el.forProcessed = true; // avoid recursion - return (altHelper || '_l') + "((" + exp + ")," + - "function(" + alias + iterator1 + iterator2 + "){" + - "return " + ((altGen || genElement)(el, state)) + - '})' - } - - function genData$2 (el, state) { - var data = '{'; - - // directives first. - // directives may mutate the el's other properties before they are generated. - var dirs = genDirectives(el, state); - if (dirs) { data += dirs + ','; } - - // key - if (el.key) { - data += "key:" + (el.key) + ","; - } - // ref - if (el.ref) { - data += "ref:" + (el.ref) + ","; - } - if (el.refInFor) { - data += "refInFor:true,"; - } - // pre - if (el.pre) { - data += "pre:true,"; - } - // record original tag name for components using "is" attribute - if (el.component) { - data += "tag:\"" + (el.tag) + "\","; - } - // module data generation functions - for (var i = 0; i < state.dataGenFns.length; i++) { - data += state.dataGenFns[i](el); - } - // attributes - if (el.attrs) { - data += "attrs:" + (genProps(el.attrs)) + ","; - } - // DOM props - if (el.props) { - data += "domProps:" + (genProps(el.props)) + ","; - } - // event handlers - if (el.events) { - data += (genHandlers(el.events, false)) + ","; - } - if (el.nativeEvents) { - data += (genHandlers(el.nativeEvents, true)) + ","; - } - // slot target - // only for non-scoped slots - if (el.slotTarget && !el.slotScope) { - data += "slot:" + (el.slotTarget) + ","; - } - // scoped slots - if (el.scopedSlots) { - data += (genScopedSlots(el, el.scopedSlots, state)) + ","; - } - // component v-model - if (el.model) { - data += "model:{value:" + (el.model.value) + ",callback:" + (el.model.callback) + ",expression:" + (el.model.expression) + "},"; - } - // inline-template - if (el.inlineTemplate) { - var inlineTemplate = genInlineTemplate(el, state); - if (inlineTemplate) { - data += inlineTemplate + ","; - } - } - data = data.replace(/,$/, '') + '}'; - // v-bind dynamic argument wrap - // v-bind with dynamic arguments must be applied using the same v-bind object - // merge helper so that class/style/mustUseProp attrs are handled correctly. - if (el.dynamicAttrs) { - data = "_b(" + data + ",\"" + (el.tag) + "\"," + (genProps(el.dynamicAttrs)) + ")"; - } - // v-bind data wrap - if (el.wrapData) { - data = el.wrapData(data); - } - // v-on data wrap - if (el.wrapListeners) { - data = el.wrapListeners(data); - } - return data - } - - function genDirectives (el, state) { - var dirs = el.directives; - if (!dirs) { return } - var res = 'directives:['; - var hasRuntime = false; - var i, l, dir, needRuntime; - for (i = 0, l = dirs.length; i < l; i++) { - dir = dirs[i]; - needRuntime = true; - var gen = state.directives[dir.name]; - if (gen) { - // compile-time directive that manipulates AST. - // returns true if it also needs a runtime counterpart. - needRuntime = !!gen(el, dir, state.warn); - } - if (needRuntime) { - hasRuntime = true; - res += "{name:\"" + (dir.name) + "\",rawName:\"" + (dir.rawName) + "\"" + (dir.value ? (",value:(" + (dir.value) + "),expression:" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (",arg:" + (dir.isDynamicArg ? dir.arg : ("\"" + (dir.arg) + "\""))) : '') + (dir.modifiers ? (",modifiers:" + (JSON.stringify(dir.modifiers))) : '') + "},"; - } - } - if (hasRuntime) { - return res.slice(0, -1) + ']' - } - } - - function genInlineTemplate (el, state) { - var ast = el.children[0]; - if (el.children.length !== 1 || ast.type !== 1) { - state.warn( - 'Inline-template components must have exactly one child element.', - { start: el.start } - ); - } - if (ast && ast.type === 1) { - var inlineRenderFns = generate(ast, state.options); - return ("inlineTemplate:{render:function(){" + (inlineRenderFns.render) + "},staticRenderFns:[" + (inlineRenderFns.staticRenderFns.map(function (code) { return ("function(){" + code + "}"); }).join(',')) + "]}") - } - } - - function genScopedSlots ( - el, - slots, - state - ) { - // by default scoped slots are considered "stable", this allows child - // components with only scoped slots to skip forced updates from parent. - // but in some cases we have to bail-out of this optimization - // for example if the slot contains dynamic names, has v-if or v-for on them... - var needsForceUpdate = el.for || Object.keys(slots).some(function (key) { - var slot = slots[key]; - return ( - slot.slotTargetDynamic || - slot.if || - slot.for || - containsSlotChild(slot) // is passing down slot from parent which may be dynamic - ) - }); - - // #9534: if a component with scoped slots is inside a conditional branch, - // it's possible for the same component to be reused but with different - // compiled slot content. To avoid that, we generate a unique key based on - // the generated code of all the slot contents. - var needsKey = !!el.if; - - // OR when it is inside another scoped slot or v-for (the reactivity may be - // disconnected due to the intermediate scope variable) - // #9438, #9506 - // TODO: this can be further optimized by properly analyzing in-scope bindings - // and skip force updating ones that do not actually use scope variables. - if (!needsForceUpdate) { - var parent = el.parent; - while (parent) { - if ( - (parent.slotScope && parent.slotScope !== emptySlotScopeToken) || - parent.for - ) { - needsForceUpdate = true; - break - } - if (parent.if) { - needsKey = true; - } - parent = parent.parent; - } - } - - var generatedSlots = Object.keys(slots) - .map(function (key) { return genScopedSlot(slots[key], state); }) - .join(','); - - return ("scopedSlots:_u([" + generatedSlots + "]" + (needsForceUpdate ? ",null,true" : "") + (!needsForceUpdate && needsKey ? (",null,false," + (hash(generatedSlots))) : "") + ")") - } - - function hash(str) { - var hash = 5381; - var i = str.length; - while(i) { - hash = (hash * 33) ^ str.charCodeAt(--i); - } - return hash >>> 0 - } - - function containsSlotChild (el) { - if (el.type === 1) { - if (el.tag === 'slot') { - return true - } - return el.children.some(containsSlotChild) - } - return false - } - - function genScopedSlot ( - el, - state - ) { - var isLegacySyntax = el.attrsMap['slot-scope']; - if (el.if && !el.ifProcessed && !isLegacySyntax) { - return genIf(el, state, genScopedSlot, "null") - } - if (el.for && !el.forProcessed) { - return genFor(el, state, genScopedSlot) - } - var slotScope = el.slotScope === emptySlotScopeToken - ? "" - : String(el.slotScope); - var fn = "function(" + slotScope + "){" + - "return " + (el.tag === 'template' - ? el.if && isLegacySyntax - ? ("(" + (el.if) + ")?" + (genChildren(el, state) || 'undefined') + ":undefined") - : genChildren(el, state) || 'undefined' - : genElement(el, state)) + "}"; - // reverse proxy v-slot without scope on this.$slots - var reverseProxy = slotScope ? "" : ",proxy:true"; - return ("{key:" + (el.slotTarget || "\"default\"") + ",fn:" + fn + reverseProxy + "}") - } - - function genChildren ( - el, - state, - checkSkip, - altGenElement, - altGenNode - ) { - var children = el.children; - if (children.length) { - var el$1 = children[0]; - // optimize single v-for - if (children.length === 1 && - el$1.for && - el$1.tag !== 'template' && - el$1.tag !== 'slot' - ) { - var normalizationType = checkSkip - ? state.maybeComponent(el$1) ? ",1" : ",0" - : ""; - return ("" + ((altGenElement || genElement)(el$1, state)) + normalizationType) - } - var normalizationType$1 = checkSkip - ? getNormalizationType(children, state.maybeComponent) - : 0; - var gen = altGenNode || genNode; - return ("[" + (children.map(function (c) { return gen(c, state); }).join(',')) + "]" + (normalizationType$1 ? ("," + normalizationType$1) : '')) - } - } - - // determine the normalization needed for the children array. - // 0: no normalization needed - // 1: simple normalization needed (possible 1-level deep nested array) - // 2: full normalization needed - function getNormalizationType ( - children, - maybeComponent - ) { - var res = 0; - for (var i = 0; i < children.length; i++) { - var el = children[i]; - if (el.type !== 1) { - continue - } - if (needsNormalization(el) || - (el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) { - res = 2; - break - } - if (maybeComponent(el) || - (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) { - res = 1; - } - } - return res - } - - function needsNormalization (el) { - return el.for !== undefined || el.tag === 'template' || el.tag === 'slot' - } - - function genNode (node, state) { - if (node.type === 1) { - return genElement(node, state) - } else if (node.type === 3 && node.isComment) { - return genComment(node) - } else { - return genText(node) - } - } - - function genText (text) { - return ("_v(" + (text.type === 2 - ? text.expression // no need for () because already wrapped in _s() - : transformSpecialNewlines(JSON.stringify(text.text))) + ")") - } - - function genComment (comment) { - return ("_e(" + (JSON.stringify(comment.text)) + ")") - } - - function genSlot (el, state) { - var slotName = el.slotName || '"default"'; - var children = genChildren(el, state); - var res = "_t(" + slotName + (children ? ("," + children) : ''); - var attrs = el.attrs || el.dynamicAttrs - ? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(function (attr) { return ({ - // slot props are camelized - name: camelize(attr.name), - value: attr.value, - dynamic: attr.dynamic - }); })) - : null; - var bind$$1 = el.attrsMap['v-bind']; - if ((attrs || bind$$1) && !children) { - res += ",null"; - } - if (attrs) { - res += "," + attrs; - } - if (bind$$1) { - res += (attrs ? '' : ',null') + "," + bind$$1; - } - return res + ')' - } - - // componentName is el.component, take it as argument to shun flow's pessimistic refinement - function genComponent ( - componentName, - el, - state - ) { - var children = el.inlineTemplate ? null : genChildren(el, state, true); - return ("_c(" + componentName + "," + (genData$2(el, state)) + (children ? ("," + children) : '') + ")") - } - - function genProps (props) { - var staticProps = ""; - var dynamicProps = ""; - for (var i = 0; i < props.length; i++) { - var prop = props[i]; - var value = transformSpecialNewlines(prop.value); - if (prop.dynamic) { - dynamicProps += (prop.name) + "," + value + ","; - } else { - staticProps += "\"" + (prop.name) + "\":" + value + ","; - } - } - staticProps = "{" + (staticProps.slice(0, -1)) + "}"; - if (dynamicProps) { - return ("_d(" + staticProps + ",[" + (dynamicProps.slice(0, -1)) + "])") - } else { - return staticProps - } - } - - // #3895, #4268 - function transformSpecialNewlines (text) { - return text - .replace(/\u2028/g, '\\u2028') - .replace(/\u2029/g, '\\u2029') - } - - /* */ - - - - // these keywords should not appear inside expressions, but operators like - // typeof, instanceof and in are allowed - var prohibitedKeywordRE = new RegExp('\\b' + ( - 'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' + - 'super,throw,while,yield,delete,export,import,return,switch,default,' + - 'extends,finally,continue,debugger,function,arguments' - ).split(',').join('\\b|\\b') + '\\b'); - - // these unary operators should not be used as property/method names - var unaryOperatorsRE = new RegExp('\\b' + ( - 'delete,typeof,void' - ).split(',').join('\\s*\\([^\\)]*\\)|\\b') + '\\s*\\([^\\)]*\\)'); - - // strip strings in expressions - var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g; - - // detect problematic expressions in a template - function detectErrors (ast, warn) { - if (ast) { - checkNode(ast, warn); - } - } - - function checkNode (node, warn) { - if (node.type === 1) { - for (var name in node.attrsMap) { - if (dirRE.test(name)) { - var value = node.attrsMap[name]; - if (value) { - var range = node.rawAttrsMap[name]; - if (name === 'v-for') { - checkFor(node, ("v-for=\"" + value + "\""), warn, range); - } else if (onRE.test(name)) { - checkEvent(value, (name + "=\"" + value + "\""), warn, range); - } else { - checkExpression(value, (name + "=\"" + value + "\""), warn, range); - } - } - } - } - if (node.children) { - for (var i = 0; i < node.children.length; i++) { - checkNode(node.children[i], warn); - } - } - } else if (node.type === 2) { - checkExpression(node.expression, node.text, warn, node); - } - } - - function checkEvent (exp, text, warn, range) { - var stipped = exp.replace(stripStringRE, ''); - var keywordMatch = stipped.match(unaryOperatorsRE); - if (keywordMatch && stipped.charAt(keywordMatch.index - 1) !== '$') { - warn( - "avoid using JavaScript unary operator as property name: " + - "\"" + (keywordMatch[0]) + "\" in expression " + (text.trim()), - range - ); - } - checkExpression(exp, text, warn, range); - } - - function checkFor (node, text, warn, range) { - checkExpression(node.for || '', text, warn, range); - checkIdentifier(node.alias, 'v-for alias', text, warn, range); - checkIdentifier(node.iterator1, 'v-for iterator', text, warn, range); - checkIdentifier(node.iterator2, 'v-for iterator', text, warn, range); - } - - function checkIdentifier ( - ident, - type, - text, - warn, - range - ) { - if (typeof ident === 'string') { - try { - new Function(("var " + ident + "=_")); - } catch (e) { - warn(("invalid " + type + " \"" + ident + "\" in expression: " + (text.trim())), range); - } - } - } - - function checkExpression (exp, text, warn, range) { - try { - new Function(("return " + exp)); - } catch (e) { - var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE); - if (keywordMatch) { - warn( - "avoid using JavaScript keyword as property name: " + - "\"" + (keywordMatch[0]) + "\"\n Raw expression: " + (text.trim()), - range - ); - } else { - warn( - "invalid expression: " + (e.message) + " in\n\n" + - " " + exp + "\n\n" + - " Raw expression: " + (text.trim()) + "\n", - range - ); - } - } - } - - /* */ - - var range = 2; - - function generateCodeFrame ( - source, - start, - end - ) { - if ( start === void 0 ) start = 0; - if ( end === void 0 ) end = source.length; - - var lines = source.split(/\r?\n/); - var count = 0; - var res = []; - for (var i = 0; i < lines.length; i++) { - count += lines[i].length + 1; - if (count >= start) { - for (var j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) { continue } - res.push(("" + (j + 1) + (repeat$1(" ", 3 - String(j + 1).length)) + "| " + (lines[j]))); - var lineLength = lines[j].length; - if (j === i) { - // push underline - var pad = start - (count - lineLength) + 1; - var length = end > count ? lineLength - pad : end - start; - res.push(" | " + repeat$1(" ", pad) + repeat$1("^", length)); - } else if (j > i) { - if (end > count) { - var length$1 = Math.min(end - count, lineLength); - res.push(" | " + repeat$1("^", length$1)); - } - count += lineLength + 1; - } - } - break - } - } - return res.join('\n') - } - - function repeat$1 (str, n) { - var result = ''; - if (n > 0) { - while (true) { // eslint-disable-line - if (n & 1) { result += str; } - n >>>= 1; - if (n <= 0) { break } - str += str; - } - } - return result - } - - /* */ - - - - function createFunction (code, errors) { - try { - return new Function(code) - } catch (err) { - errors.push({ err: err, code: code }); - return noop - } - } - - function createCompileToFunctionFn (compile) { - var cache = Object.create(null); - - return function compileToFunctions ( - template, - options, - vm - ) { - options = extend({}, options); - var warn$$1 = options.warn || warn; - delete options.warn; - - /* istanbul ignore if */ - { - // detect possible CSP restriction - try { - new Function('return 1'); - } catch (e) { - if (e.toString().match(/unsafe-eval|CSP/)) { - warn$$1( - 'It seems you are using the standalone build of Vue.js in an ' + - 'environment with Content Security Policy that prohibits unsafe-eval. ' + - 'The template compiler cannot work in this environment. Consider ' + - 'relaxing the policy to allow unsafe-eval or pre-compiling your ' + - 'templates into render functions.' - ); - } - } - } - - // check cache - var key = options.delimiters - ? String(options.delimiters) + template - : template; - if (cache[key]) { - return cache[key] - } - - // compile - var compiled = compile(template, options); - - // check compilation errors/tips - { - if (compiled.errors && compiled.errors.length) { - if (options.outputSourceRange) { - compiled.errors.forEach(function (e) { - warn$$1( - "Error compiling template:\n\n" + (e.msg) + "\n\n" + - generateCodeFrame(template, e.start, e.end), - vm - ); - }); - } else { - warn$$1( - "Error compiling template:\n\n" + template + "\n\n" + - compiled.errors.map(function (e) { return ("- " + e); }).join('\n') + '\n', - vm - ); - } - } - if (compiled.tips && compiled.tips.length) { - if (options.outputSourceRange) { - compiled.tips.forEach(function (e) { return tip(e.msg, vm); }); - } else { - compiled.tips.forEach(function (msg) { return tip(msg, vm); }); - } - } - } - - // turn code into functions - var res = {}; - var fnGenErrors = []; - res.render = createFunction(compiled.render, fnGenErrors); - res.staticRenderFns = compiled.staticRenderFns.map(function (code) { - return createFunction(code, fnGenErrors) - }); - - // check function generation errors. - // this should only happen if there is a bug in the compiler itself. - // mostly for codegen development use - /* istanbul ignore if */ - { - if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) { - warn$$1( - "Failed to generate render function:\n\n" + - fnGenErrors.map(function (ref) { - var err = ref.err; - var code = ref.code; - - return ((err.toString()) + " in\n\n" + code + "\n"); - }).join('\n'), - vm - ); - } - } - - return (cache[key] = res) - } - } - - /* */ - - function createCompilerCreator (baseCompile) { - return function createCompiler (baseOptions) { - function compile ( - template, - options - ) { - var finalOptions = Object.create(baseOptions); - var errors = []; - var tips = []; - - var warn = function (msg, range, tip) { - (tip ? tips : errors).push(msg); - }; - - if (options) { - if (options.outputSourceRange) { - // $flow-disable-line - var leadingSpaceLength = template.match(/^\s*/)[0].length; - - warn = function (msg, range, tip) { - var data = { msg: msg }; - if (range) { - if (range.start != null) { - data.start = range.start + leadingSpaceLength; - } - if (range.end != null) { - data.end = range.end + leadingSpaceLength; - } - } - (tip ? tips : errors).push(data); - }; - } - // merge custom modules - if (options.modules) { - finalOptions.modules = - (baseOptions.modules || []).concat(options.modules); - } - // merge custom directives - if (options.directives) { - finalOptions.directives = extend( - Object.create(baseOptions.directives || null), - options.directives - ); - } - // copy other options - for (var key in options) { - if (key !== 'modules' && key !== 'directives') { - finalOptions[key] = options[key]; - } - } - } - - finalOptions.warn = warn; - - var compiled = baseCompile(template.trim(), finalOptions); - { - detectErrors(compiled.ast, warn); - } - compiled.errors = errors; - compiled.tips = tips; - return compiled - } - - return { - compile: compile, - compileToFunctions: createCompileToFunctionFn(compile) - } - } - } - - /* */ - - // `createCompilerCreator` allows creating compilers that use alternative - // parser/optimizer/codegen, e.g the SSR optimizing compiler. - // Here we just export a default compiler using the default parts. - var createCompiler = createCompilerCreator(function baseCompile ( - template, - options - ) { - var ast = parse(template.trim(), options); - if (options.optimize !== false) { - optimize(ast, options); - } - var code = generate(ast, options); - return { - ast: ast, - render: code.render, - staticRenderFns: code.staticRenderFns - } - }); - - /* */ - - var ref$1 = createCompiler(baseOptions); - var compile = ref$1.compile; - var compileToFunctions = ref$1.compileToFunctions; - - /* */ - - // check whether current browser encodes a char inside attribute values - var div; - function getShouldDecode (href) { - div = div || document.createElement('div'); - div.innerHTML = href ? "<a href=\"\n\"/>" : "<div a=\"\n\"/>"; - return div.innerHTML.indexOf(' ') > 0 - } - - // #3663: IE encodes newlines inside attribute values while other browsers don't - var shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false; - // #6828: chrome encodes content in a[href] - var shouldDecodeNewlinesForHref = inBrowser ? getShouldDecode(true) : false; - - /* */ - - var idToTemplate = cached(function (id) { - var el = query(id); - return el && el.innerHTML - }); - - var mount = Vue.prototype.$mount; - Vue.prototype.$mount = function ( - el, - hydrating - ) { - el = el && query(el); - - /* istanbul ignore if */ - if (el === document.body || el === document.documentElement) { - warn( - "Do not mount Vue to <html> or <body> - mount to normal elements instead." - ); - return this - } - - var options = this.$options; - // resolve template/el and convert to render function - if (!options.render) { - var template = options.template; - if (template) { - if (typeof template === 'string') { - if (template.charAt(0) === '#') { - template = idToTemplate(template); - /* istanbul ignore if */ - if (!template) { - warn( - ("Template element not found or is empty: " + (options.template)), - this - ); - } - } - } else if (template.nodeType) { - template = template.innerHTML; - } else { - { - warn('invalid template option:' + template, this); - } - return this - } - } else if (el) { - template = getOuterHTML(el); - } - if (template) { - /* istanbul ignore if */ - if (config.performance && mark) { - mark('compile'); - } - - var ref = compileToFunctions(template, { - outputSourceRange: "development" !== 'production', - shouldDecodeNewlines: shouldDecodeNewlines, - shouldDecodeNewlinesForHref: shouldDecodeNewlinesForHref, - delimiters: options.delimiters, - comments: options.comments - }, this); - var render = ref.render; - var staticRenderFns = ref.staticRenderFns; - options.render = render; - options.staticRenderFns = staticRenderFns; - - /* istanbul ignore if */ - if (config.performance && mark) { - mark('compile end'); - measure(("vue " + (this._name) + " compile"), 'compile', 'compile end'); - } - } - } - return mount.call(this, el, hydrating) - }; - - /** - * Get outerHTML of elements, taking care - * of SVG elements in IE as well. - */ - function getOuterHTML (el) { - if (el.outerHTML) { - return el.outerHTML - } else { - var container = document.createElement('div'); - container.appendChild(el.cloneNode(true)); - return container.innerHTML - } - } - - Vue.compile = compileToFunctions; - - return Vue; - -})); diff --git a/nz-admin/src/main/resources/statics/libs/vue.min.js b/nz-admin/src/main/resources/statics/libs/vue.min.js deleted file mode 100644 index d079a741..00000000 --- a/nz-admin/src/main/resources/statics/libs/vue.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/*! - * Vue.js v2.2.6 - * (c) 2014-2017 Evan You - * Released under the MIT License. - */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Vue=t()}(this,function(){"use strict";function e(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function t(e){var t=parseFloat(e);return isNaN(t)?e:t}function n(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}function r(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}function i(e,t){return $i.call(e,t)}function o(e){return"string"==typeof e||"number"==typeof e}function a(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}function s(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function c(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function u(e,t){for(var n in t)e[n]=t[n];return e}function l(e){return null!==e&&"object"==typeof e}function f(e){return ki.call(e)===Ai}function p(e){for(var t={},n=0;n<e.length;n++)e[n]&&u(t,e[n]);return t}function d(){}function v(e,t){var n=l(e),r=l(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{return JSON.stringify(e)===JSON.stringify(t)}catch(n){return e===t}}function h(e,t){for(var n=0;n<e.length;n++)if(v(e[n],t))return n;return-1}function m(e){var t=!1;return function(){t||(t=!0,e())}}function g(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function y(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function _(e){if(!ji.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}function b(e){return/native code/.test(e.toString())}function $(e){qi.target&&Wi.push(qi.target),qi.target=e}function w(){qi.target=Wi.pop()}function x(e,t){e.__proto__=t}function C(e,t,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];y(e,o,t[o])}}function k(e,t){if(l(e)){var n;return i(e,"__ob__")&&e.__ob__ instanceof Xi?n=e.__ob__:Qi.shouldConvert&&!Ui()&&(Array.isArray(e)||f(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new Xi(e)),t&&n&&n.vmCount++,n}}function A(e,t,n,r){var i=new qi,o=Object.getOwnPropertyDescriptor(e,t);if(!o||o.configurable!==!1){var a=o&&o.get,s=o&&o.set,c=k(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=a?a.call(e):n;return qi.target&&(i.depend(),c&&c.dep.depend(),Array.isArray(t)&&S(t)),t},set:function(t){var r=a?a.call(e):n;t===r||t!==t&&r!==r||(s?s.call(e,t):n=t,c=k(t),i.notify())}})}}function O(e,t,n){if(Array.isArray(e)&&"number"==typeof t)return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(i(e,t))return e[t]=n,n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?(A(r.value,t,n),r.dep.notify(),n):(e[t]=n,n)}function T(e,t){if(Array.isArray(e)&&"number"==typeof t)return void e.splice(t,1);var n=e.__ob__;e._isVue||n&&n.vmCount||i(e,t)&&(delete e[t],n&&n.dep.notify())}function S(e){for(var t=void 0,n=0,r=e.length;n<r;n++)t=e[n],t&&t.__ob__&&t.__ob__.dep.depend(),Array.isArray(t)&&S(t)}function E(e,t){if(!t)return e;for(var n,r,o,a=Object.keys(t),s=0;s<a.length;s++)n=a[s],r=e[n],o=t[n],i(e,n)?f(r)&&f(o)&&E(r,o):O(e,n,o);return e}function j(e,t){return t?e?e.concat(t):Array.isArray(t)?t:[t]:e}function N(e,t){var n=Object.create(e||null);return t?u(n,t):n}function I(e){var t=e.props;if(t){var n,r,i,o={};if(Array.isArray(t))for(n=t.length;n--;)"string"==typeof(r=t[n])&&(i=wi(r),o[i]={type:null});else if(f(t))for(var a in t)r=t[a],i=wi(a),o[i]=f(r)?r:{type:r};e.props=o}}function L(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}function D(e,t,n){function r(r){var i=eo[r]||to;l[r]=i(e[r],t[r],n,r)}I(t),L(t);var o=t.extends;if(o&&(e="function"==typeof o?D(e,o.options,n):D(e,o,n)),t.mixins)for(var a=0,s=t.mixins.length;a<s;a++){var c=t.mixins[a];c.prototype instanceof nt&&(c=c.options),e=D(e,c,n)}var u,l={};for(u in e)r(u);for(u in t)i(e,u)||r(u);return l}function M(e,t,n,r){if("string"==typeof n){var o=e[t];if(i(o,n))return o[n];var a=wi(n);if(i(o,a))return o[a];var s=xi(a);if(i(o,s))return o[s];var c=o[n]||o[a]||o[s];return c}}function P(e,t,n,r){var o=t[e],a=!i(n,e),s=n[e];if(H(Boolean,o.type)&&(a&&!i(o,"default")?s=!1:H(String,o.type)||""!==s&&s!==Ci(e)||(s=!0)),void 0===s){s=R(r,o,e);var c=Qi.shouldConvert;Qi.shouldConvert=!0,k(s),Qi.shouldConvert=c}return s}function R(e,t,n){if(i(t,"default")){var r=t.default;return e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n]?e._props[n]:"function"==typeof r&&"Function"!==F(t.type)?r.call(e):r}}function F(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t&&t[1]}function H(e,t){if(!Array.isArray(t))return F(t)===F(e);for(var n=0,r=t.length;n<r;n++)if(F(t[n])===F(e))return!0;return!1}function U(e,t,n){if(Si.errorHandler)Si.errorHandler.call(null,e,t,n);else{if(!Ii||"undefined"==typeof console)throw e;console.error(e)}}function B(e){return new no(void 0,void 0,void 0,String(e))}function V(e){var t=new no(e.tag,e.data,e.children,e.text,e.elm,e.context,e.componentOptions);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isCloned=!0,t}function z(e){for(var t=e.length,n=new Array(t),r=0;r<t;r++)n[r]=V(e[r]);return n}function J(e){function t(){var e=arguments,n=t.fns;if(!Array.isArray(n))return n.apply(null,arguments);for(var r=0;r<n.length;r++)n[r].apply(null,e)}return t.fns=e,t}function K(e,t,n,r,i){var o,a,s,c;for(o in e)a=e[o],s=t[o],c=ao(o),a&&(s?a!==s&&(s.fns=a,e[o]=s):(a.fns||(a=e[o]=J(a)),n(c.name,a,c.once,c.capture)));for(o in t)e[o]||(c=ao(o),r(c.name,t[o],c.capture))}function q(e,t,n){function i(){n.apply(this,arguments),r(o.fns,i)}var o,a=e[t];a?a.fns&&a.merged?(o=a,o.fns.push(i)):o=J([a,i]):o=J([i]),o.merged=!0,e[t]=o}function W(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}function Z(e){return o(e)?[B(e)]:Array.isArray(e)?G(e):void 0}function G(e,t){var n,r,i,a=[];for(n=0;n<e.length;n++)null!=(r=e[n])&&"boolean"!=typeof r&&(i=a[a.length-1],Array.isArray(r)?a.push.apply(a,G(r,(t||"")+"_"+n)):o(r)?i&&i.text?i.text+=String(r):""!==r&&a.push(B(r)):r.text&&i&&i.text?a[a.length-1]=B(i.text+r.text):(r.tag&&null==r.key&&null!=t&&(r.key="__vlist"+t+"_"+n+"__"),a.push(r)));return a}function Y(e){return e&&e.filter(function(e){return e&&e.componentOptions})[0]}function Q(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&te(e,t)}function X(e,t,n){n?io.$once(e,t):io.$on(e,t)}function ee(e,t){io.$off(e,t)}function te(e,t,n){io=e,K(t,n||{},X,ee,e)}function ne(e,t){var n={};if(!e)return n;for(var r,i,o=[],a=0,s=e.length;a<s;a++)if(i=e[a],(i.context===t||i.functionalContext===t)&&i.data&&(r=i.data.slot)){var c=n[r]||(n[r]=[]);"template"===i.tag?c.push.apply(c,i.children):c.push(i)}else o.push(i);return o.every(re)||(n.default=o),n}function re(e){return e.isComment||" "===e.text}function ie(e){for(var t={},n=0;n<e.length;n++)t[e[n][0]]=e[n][1];return t}function oe(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}function ae(e,t,n){e.$el=t,e.$options.render||(e.$options.render=oo),fe(e,"beforeMount");var r;return r=function(){e._update(e._render(),n)},e._watcher=new ho(e,r,d),n=!1,null==e.$vnode&&(e._isMounted=!0,fe(e,"mounted")),e}function se(e,t,n,r,i){var o=!!(i||e.$options._renderChildren||r.data.scopedSlots||e.$scopedSlots!==Ei);if(e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r),e.$options._renderChildren=i,t&&e.$options.props){Qi.shouldConvert=!1;for(var a=e._props,s=e.$options._propKeys||[],c=0;c<s.length;c++){var u=s[c];a[u]=P(u,e.$options.props,t,e)}Qi.shouldConvert=!0,e.$options.propsData=t}if(n){var l=e.$options._parentListeners;e.$options._parentListeners=n,te(e,n,l)}o&&(e.$slots=ne(i,r.context),e.$forceUpdate())}function ce(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function ue(e,t){if(t){if(e._directInactive=!1,ce(e))return}else if(e._directInactive)return;if(e._inactive||null==e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)ue(e.$children[n]);fe(e,"activated")}}function le(e,t){if(!(t&&(e._directInactive=!0,ce(e))||e._inactive)){e._inactive=!0;for(var n=0;n<e.$children.length;n++)le(e.$children[n]);fe(e,"deactivated")}}function fe(e,t){var n=e.$options[t];if(n)for(var r=0,i=n.length;r<i;r++)try{n[r].call(e)}catch(n){U(n,e,t+" hook")}e._hasHookEvent&&e.$emit("hook:"+t)}function pe(){co.length=0,uo={},lo=fo=!1}function de(){fo=!0;var e,t,n;for(co.sort(function(e,t){return e.id-t.id}),po=0;po<co.length;po++)e=co[po],t=e.id,uo[t]=null,e.run();var r=co.slice();for(pe(),po=r.length;po--;)e=r[po],n=e.vm,n._watcher===e&&n._isMounted&&fe(n,"updated");Bi&&Si.devtools&&Bi.emit("flush")}function ve(e){var t=e.id;if(null==uo[t]){if(uo[t]=!0,fo){for(var n=co.length-1;n>=0&&co[n].id>e.id;)n--;co.splice(Math.max(n,po)+1,0,e)}else co.push(e);lo||(lo=!0,zi(de))}}function he(e){mo.clear(),me(e,mo)}function me(e,t){var n,r,i=Array.isArray(e);if((i||l(e))&&Object.isExtensible(e)){if(e.__ob__){var o=e.__ob__.dep.id;if(t.has(o))return;t.add(o)}if(i)for(n=e.length;n--;)me(e[n],t);else for(r=Object.keys(e),n=r.length;n--;)me(e[r[n]],t)}}function ge(e,t,n){go.get=function(){return this[t][n]},go.set=function(e){this[t][n]=e},Object.defineProperty(e,n,go)}function ye(e){e._watchers=[];var t=e.$options;t.props&&_e(e,t.props),t.methods&&ke(e,t.methods),t.data?be(e):k(e._data={},!0),t.computed&&we(e,t.computed),t.watch&&Ae(e,t.watch)}function _e(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[],o=!e.$parent;Qi.shouldConvert=o;for(var a in t)!function(o){i.push(o);var a=P(o,t,n,e);A(r,o,a),o in e||ge(e,"_props",o)}(a);Qi.shouldConvert=!0}function be(e){var t=e.$options.data;t=e._data="function"==typeof t?$e(t,e):t||{},f(t)||(t={});for(var n=Object.keys(t),r=e.$options.props,o=n.length;o--;)r&&i(r,n[o])||g(n[o])||ge(e,"_data",n[o]);k(t,!0)}function $e(e,t){try{return e.call(t)}catch(e){return U(e,t,"data()"),{}}}function we(e,t){var n=e._computedWatchers=Object.create(null);for(var r in t){var i=t[r],o="function"==typeof i?i:i.get;n[r]=new ho(e,o,d,yo),r in e||xe(e,r,i)}}function xe(e,t,n){"function"==typeof n?(go.get=Ce(t),go.set=d):(go.get=n.get?n.cache!==!1?Ce(t):n.get:d,go.set=n.set?n.set:d),Object.defineProperty(e,t,go)}function Ce(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),qi.target&&t.depend(),t.value}}function ke(e,t){e.$options.props;for(var n in t)e[n]=null==t[n]?d:s(t[n],e)}function Ae(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)Oe(e,n,r[i]);else Oe(e,n,r)}}function Oe(e,t,n){var r;f(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}function Te(e,t,n,r,i){if(e){var o=n.$options._base;if(l(e)&&(e=o.extend(e)),"function"==typeof e){if(!e.cid)if(e.resolved)e=e.resolved;else if(!(e=je(e,o,function(){n.$forceUpdate()})))return;Xe(e),t=t||{},t.model&&Me(e.options,t);var a=Ne(t,e,i);if(e.options.functional)return Se(e,a,t,n,r);var s=t.on;t.on=t.nativeOn,e.options.abstract&&(t={}),Le(t);var c=e.options.name||i;return new no("vue-component-"+e.cid+(c?"-"+c:""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:a,listeners:s,tag:i,children:r})}}}function Se(e,t,n,r,i){var o={},a=e.options.props;if(a)for(var s in a)o[s]=P(s,a,t);var c=Object.create(r),u=function(e,t,n,r){return Pe(c,e,t,n,r,!0)},l=e.options.render.call(null,u,{props:o,data:n,parent:r,children:i,slots:function(){return ne(i,r)}});return l instanceof no&&(l.functionalContext=r,n.slot&&((l.data||(l.data={})).slot=n.slot)),l}function Ee(e,t,n,r){var i=e.componentOptions,o={_isComponent:!0,parent:t,propsData:i.propsData,_componentTag:i.tag,_parentVnode:e,_parentListeners:i.listeners,_renderChildren:i.children,_parentElm:n||null,_refElm:r||null},a=e.data.inlineTemplate;return a&&(o.render=a.render,o.staticRenderFns=a.staticRenderFns),new i.Ctor(o)}function je(e,t,n){if(!e.requested){e.requested=!0;var r=e.pendingCallbacks=[n],i=!0,o=function(n){if(l(n)&&(n=t.extend(n)),e.resolved=n,!i)for(var o=0,a=r.length;o<a;o++)r[o](n)},a=function(e){},s=e(o,a);return s&&"function"==typeof s.then&&!e.resolved&&s.then(o,a),i=!1,e.resolved}e.pendingCallbacks.push(n)}function Ne(e,t,n){var r=t.options.props;if(r){var i={},o=e.attrs,a=e.props,s=e.domProps;if(o||a||s)for(var c in r){var u=Ci(c);Ie(i,a,c,u,!0)||Ie(i,o,c,u)||Ie(i,s,c,u)}return i}}function Ie(e,t,n,r,o){if(t){if(i(t,n))return e[n]=t[n],o||delete t[n],!0;if(i(t,r))return e[n]=t[r],o||delete t[r],!0}return!1}function Le(e){e.hook||(e.hook={});for(var t=0;t<bo.length;t++){var n=bo[t],r=e.hook[n],i=_o[n];e.hook[n]=r?De(i,r):i}}function De(e,t){return function(n,r,i,o){e(n,r,i,o),t(n,r,i,o)}}function Me(e,t){var n=e.model&&e.model.prop||"value",r=e.model&&e.model.event||"input";(t.props||(t.props={}))[n]=t.model.value;var i=t.on||(t.on={});i[r]?i[r]=[t.model.callback].concat(i[r]):i[r]=t.model.callback}function Pe(e,t,n,r,i,a){return(Array.isArray(n)||o(n))&&(i=r,r=n,n=void 0),a&&(i=wo),Re(e,t,n,r,i)}function Re(e,t,n,r,i){if(n&&n.__ob__)return oo();if(!t)return oo();Array.isArray(r)&&"function"==typeof r[0]&&(n=n||{},n.scopedSlots={default:r[0]},r.length=0),i===wo?r=Z(r):i===$o&&(r=W(r));var o,a;if("string"==typeof t){var s;a=Si.getTagNamespace(t),o=Si.isReservedTag(t)?new no(Si.parsePlatformTagName(t),n,r,void 0,void 0,e):(s=M(e.$options,"components",t))?Te(s,n,e,r,t):new no(t,n,r,void 0,void 0,e)}else o=Te(t,n,e,r);return o?(a&&Fe(o,a),o):oo()}function Fe(e,t){if(e.ns=t,"foreignObject"!==e.tag&&e.children)for(var n=0,r=e.children.length;n<r;n++){var i=e.children[n];i.tag&&!i.ns&&Fe(i,t)}}function He(e,t){var n,r,i,o,a;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),r=0,i=e.length;r<i;r++)n[r]=t(e[r],r);else if("number"==typeof e)for(n=new Array(e),r=0;r<e;r++)n[r]=t(r+1,r);else if(l(e))for(o=Object.keys(e),n=new Array(o.length),r=0,i=o.length;r<i;r++)a=o[r],n[r]=t(e[a],a,r);return n}function Ue(e,t,n,r){var i=this.$scopedSlots[e];if(i)return n=n||{},r&&u(n,r),i(n)||t;var o=this.$slots[e];return o||t}function Be(e){return M(this.$options,"filters",e,!0)||Ti}function Ve(e,t,n){var r=Si.keyCodes[t]||n;return Array.isArray(r)?r.indexOf(e)===-1:r!==e}function ze(e,t,n,r){if(n)if(l(n)){Array.isArray(n)&&(n=p(n));var i;for(var o in n){if("class"===o||"style"===o)i=e;else{var a=e.attrs&&e.attrs.type;i=r||Si.mustUseProp(t,a,o)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}o in i||(i[o]=n[o])}}else;return e}function Je(e,t){var n=this._staticTrees[e];return n&&!t?Array.isArray(n)?z(n):V(n):(n=this._staticTrees[e]=this.$options.staticRenderFns[e].call(this._renderProxy),qe(n,"__static__"+e,!1),n)}function Ke(e,t,n){return qe(e,"__once__"+t+(n?"_"+n:""),!0),e}function qe(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&We(e[r],t+"_"+r,n);else We(e,t,n)}function We(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function Ze(e){e.$vnode=null,e._vnode=null,e._staticTrees=null;var t=e.$options._parentVnode,n=t&&t.context;e.$slots=ne(e.$options._renderChildren,n),e.$scopedSlots=Ei,e._c=function(t,n,r,i){return Pe(e,t,n,r,i,!1)},e.$createElement=function(t,n,r,i){return Pe(e,t,n,r,i,!0)}}function Ge(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}function Ye(e){var t=e.$options.inject;if(t)for(var n=Array.isArray(t),r=n?t:Vi?Reflect.ownKeys(t):Object.keys(t),i=0;i<r.length;i++)!function(i){for(var o=r[i],a=n?o:t[o],s=e;s;){if(s._provided&&a in s._provided){A(e,o,s._provided[a]);break}s=s.$parent}}(i)}function Qe(e,t){var n=e.$options=Object.create(e.constructor.options);n.parent=t.parent,n.propsData=t.propsData,n._parentVnode=t._parentVnode,n._parentListeners=t._parentListeners,n._renderChildren=t._renderChildren,n._componentTag=t._componentTag,n._parentElm=t._parentElm,n._refElm=t._refElm,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}function Xe(e){var t=e.options;if(e.super){var n=Xe(e.super);if(n!==e.superOptions){e.superOptions=n;var r=et(e);r&&u(e.extendOptions,r),t=e.options=D(n,e.extendOptions),t.name&&(t.components[t.name]=e)}}return t}function et(e){var t,n=e.options,r=e.sealedOptions;for(var i in n)n[i]!==r[i]&&(t||(t={}),t[i]=tt(n[i],r[i]));return t}function tt(e,t){if(Array.isArray(e)){var n=[];t=Array.isArray(t)?t:[t];for(var r=0;r<e.length;r++)t.indexOf(e[r])<0&&n.push(e[r]);return n}return e}function nt(e){this._init(e)}function rt(e){e.use=function(e){if(!e.installed){var t=c(arguments,1);return t.unshift(this),"function"==typeof e.install?e.install.apply(e,t):"function"==typeof e&&e.apply(null,t),e.installed=!0,this}}}function it(e){e.mixin=function(e){this.options=D(this.options,e)}}function ot(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name,a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=D(n.options,e),a.super=n,a.options.props&&at(a),a.options.computed&&st(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,Si._assetTypes.forEach(function(e){a[e]=n[e]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=u({},a.options),i[r]=a,a}}function at(e){var t=e.options.props;for(var n in t)ge(e.prototype,"_props",n)}function st(e){var t=e.options.computed;for(var n in t)xe(e.prototype,n,t[n])}function ct(e){Si._assetTypes.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&f(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}function ut(e){return e&&(e.Ctor.options.name||e.tag)}function lt(e,t){return"string"==typeof e?e.split(",").indexOf(t)>-1:e instanceof RegExp&&e.test(t)}function ft(e,t){for(var n in e){var r=e[n];if(r){var i=ut(r.componentOptions);i&&!t(i)&&(pt(r),e[n]=null)}}}function pt(e){e&&(e.componentInstance._inactive||fe(e.componentInstance,"deactivated"),e.componentInstance.$destroy())}function dt(e){for(var t=e.data,n=e,r=e;r.componentInstance;)r=r.componentInstance._vnode,r.data&&(t=vt(r.data,t));for(;n=n.parent;)n.data&&(t=vt(t,n.data));return ht(t)}function vt(e,t){return{staticClass:mt(e.staticClass,t.staticClass),class:e.class?[e.class,t.class]:t.class}}function ht(e){var t=e.class,n=e.staticClass;return n||t?mt(n,gt(t)):""}function mt(e,t){return e?t?e+" "+t:e:t||""}function gt(e){var t="";if(!e)return t;if("string"==typeof e)return e;if(Array.isArray(e)){for(var n,r=0,i=e.length;r<i;r++)e[r]&&(n=gt(e[r]))&&(t+=n+" ");return t.slice(0,-1)}if(l(e)){for(var o in e)e[o]&&(t+=o+" ");return t.slice(0,-1)}return t}function yt(e){return Ko(e)?"svg":"math"===e?"math":void 0}function _t(e){if(!Ii)return!0;if(Wo(e))return!1;if(e=e.toLowerCase(),null!=Zo[e])return Zo[e];var t=document.createElement(e);return e.indexOf("-")>-1?Zo[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Zo[e]=/HTMLUnknownElement/.test(t.toString())}function bt(e){if("string"==typeof e){var t=document.querySelector(e);return t?t:document.createElement("div")}return e}function $t(e,t){var n=document.createElement(e);return"select"!==e?n:(t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function wt(e,t){return document.createElementNS(zo[e],t)}function xt(e){return document.createTextNode(e)}function Ct(e){return document.createComment(e)}function kt(e,t,n){e.insertBefore(t,n)}function At(e,t){e.removeChild(t)}function Ot(e,t){e.appendChild(t)}function Tt(e){return e.parentNode}function St(e){return e.nextSibling}function Et(e){return e.tagName}function jt(e,t){e.textContent=t}function Nt(e,t,n){e.setAttribute(t,n)}function It(e,t){var n=e.data.ref;if(n){var i=e.context,o=e.componentInstance||e.elm,a=i.$refs;t?Array.isArray(a[n])?r(a[n],o):a[n]===o&&(a[n]=void 0):e.data.refInFor?Array.isArray(a[n])&&a[n].indexOf(o)<0?a[n].push(o):a[n]=[o]:a[n]=o}}function Lt(e){return void 0===e||null===e}function Dt(e){return void 0!==e&&null!==e}function Mt(e){return e===!0}function Pt(e,t){return e.key===t.key&&e.tag===t.tag&&e.isComment===t.isComment&&Dt(e.data)===Dt(t.data)&&Rt(e,t)}function Rt(e,t){if("input"!==e.tag)return!0;var n;return(Dt(n=e.data)&&Dt(n=n.attrs)&&n.type)===(Dt(n=t.data)&&Dt(n=n.attrs)&&n.type)}function Ft(e,t,n){var r,i,o={};for(r=t;r<=n;++r)i=e[r].key,Dt(i)&&(o[i]=r);return o}function Ht(e,t){(e.data.directives||t.data.directives)&&Ut(e,t)}function Ut(e,t){var n,r,i,o=e===Qo,a=t===Qo,s=Bt(e.data.directives,e.context),c=Bt(t.data.directives,t.context),u=[],l=[];for(n in c)r=s[n],i=c[n],r?(i.oldValue=r.value,zt(i,"update",t,e),i.def&&i.def.componentUpdated&&l.push(i)):(zt(i,"bind",t,e),i.def&&i.def.inserted&&u.push(i));if(u.length){var f=function(){for(var n=0;n<u.length;n++)zt(u[n],"inserted",t,e)};o?q(t.data.hook||(t.data.hook={}),"insert",f):f()}if(l.length&&q(t.data.hook||(t.data.hook={}),"postpatch",function(){for(var n=0;n<l.length;n++)zt(l[n],"componentUpdated",t,e)}),!o)for(n in s)c[n]||zt(s[n],"unbind",e,e,a)}function Bt(e,t){var n=Object.create(null);if(!e)return n;var r,i;for(r=0;r<e.length;r++)i=e[r],i.modifiers||(i.modifiers=ta),n[Vt(i)]=i,i.def=M(t.$options,"directives",i.name,!0);return n}function Vt(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function zt(e,t,n,r,i){var o=e.def&&e.def[t];o&&o(n.elm,e,n,r,i)}function Jt(e,t){if(e.data.attrs||t.data.attrs){var n,r,i=t.elm,o=e.data.attrs||{},a=t.data.attrs||{};a.__ob__&&(a=t.data.attrs=u({},a));for(n in a)r=a[n],o[n]!==r&&Kt(i,n,r);Mi&&a.value!==o.value&&Kt(i,"value",a.value);for(n in o)null==a[n]&&(Uo(n)?i.removeAttributeNS(Ho,Bo(n)):Ro(n)||i.removeAttribute(n))}}function Kt(e,t,n){Fo(t)?Vo(n)?e.removeAttribute(t):e.setAttribute(t,t):Ro(t)?e.setAttribute(t,Vo(n)||"false"===n?"false":"true"):Uo(t)?Vo(n)?e.removeAttributeNS(Ho,Bo(t)):e.setAttributeNS(Ho,t,n):Vo(n)?e.removeAttribute(t):e.setAttribute(t,n)}function qt(e,t){var n=t.elm,r=t.data,i=e.data;if(r.staticClass||r.class||i&&(i.staticClass||i.class)){var o=dt(t),a=n._transitionClasses;a&&(o=mt(o,gt(a))),o!==n._prevClass&&(n.setAttribute("class",o),n._prevClass=o)}}function Wt(e){function t(){(a||(a=[])).push(e.slice(v,i).trim()),v=i+1}var n,r,i,o,a,s=!1,c=!1,u=!1,l=!1,f=0,p=0,d=0,v=0;for(i=0;i<e.length;i++)if(r=n,n=e.charCodeAt(i),s)39===n&&92!==r&&(s=!1);else if(c)34===n&&92!==r&&(c=!1);else if(u)96===n&&92!==r&&(u=!1);else if(l)47===n&&92!==r&&(l=!1);else if(124!==n||124===e.charCodeAt(i+1)||124===e.charCodeAt(i-1)||f||p||d){switch(n){case 34:c=!0;break;case 39:s=!0;break;case 96:u=!0;break;case 40:d++;break;case 41:d--;break;case 91:p++;break;case 93:p--;break;case 123:f++;break;case 125:f--}if(47===n){for(var h=i-1,m=void 0;h>=0&&" "===(m=e.charAt(h));h--);m&&oa.test(m)||(l=!0)}}else void 0===o?(v=i+1,o=e.slice(0,i).trim()):t();if(void 0===o?o=e.slice(0,i).trim():0!==v&&t(),a)for(i=0;i<a.length;i++)o=Zt(o,a[i]);return o}function Zt(e,t){var n=t.indexOf("(");return n<0?'_f("'+t+'")('+e+")":'_f("'+t.slice(0,n)+'")('+e+","+t.slice(n+1)}function Gt(e){console.error("[Vue compiler]: "+e)}function Yt(e,t){return e?e.map(function(e){return e[t]}).filter(function(e){return e}):[]}function Qt(e,t,n){(e.props||(e.props=[])).push({name:t,value:n})}function Xt(e,t,n){(e.attrs||(e.attrs=[])).push({name:t,value:n})}function en(e,t,n,r,i,o){(e.directives||(e.directives=[])).push({name:t,rawName:n,value:r,arg:i,modifiers:o})}function tn(e,t,n,r,i){r&&r.capture&&(delete r.capture,t="!"+t),r&&r.once&&(delete r.once,t="~"+t);var o;r&&r.native?(delete r.native,o=e.nativeEvents||(e.nativeEvents={})):o=e.events||(e.events={});var a={value:n,modifiers:r},s=o[t];Array.isArray(s)?i?s.unshift(a):s.push(a):o[t]=s?i?[a,s]:[s,a]:a}function nn(e,t,n){var r=rn(e,":"+t)||rn(e,"v-bind:"+t);if(null!=r)return Wt(r);if(n!==!1){var i=rn(e,t);if(null!=i)return JSON.stringify(i)}}function rn(e,t){var n;if(null!=(n=e.attrsMap[t]))for(var r=e.attrsList,i=0,o=r.length;i<o;i++)if(r[i].name===t){r.splice(i,1);break}return n}function on(e,t,n){var r=n||{},i=r.number,o=r.trim,a="$$v";o&&(a="(typeof $$v === 'string'? $$v.trim(): $$v)"),i&&(a="_n("+a+")");var s=an(t,a);e.model={value:"("+t+")",expression:'"'+t+'"',callback:"function ($$v) {"+s+"}"}}function an(e,t){var n=sn(e);return null===n.idx?e+"="+t:"var $$exp = "+n.exp+", $$idx = "+n.idx+";if (!Array.isArray($$exp)){"+e+"="+t+"}else{$$exp.splice($$idx, 1, "+t+")}"}function sn(e){if(To=e,Oo=To.length,Eo=jo=No=0,e.indexOf("[")<0||e.lastIndexOf("]")<Oo-1)return{exp:e,idx:null};for(;!un();)So=cn(),ln(So)?pn(So):91===So&&fn(So);return{exp:e.substring(0,jo),idx:e.substring(jo+1,No)}}function cn(){return To.charCodeAt(++Eo)}function un(){return Eo>=Oo}function ln(e){return 34===e||39===e}function fn(e){var t=1;for(jo=Eo;!un();)if(e=cn(),ln(e))pn(e);else if(91===e&&t++,93===e&&t--,0===t){No=Eo;break}}function pn(e){for(var t=e;!un()&&(e=cn())!==t;);}function dn(e,t,n){Io=n;var r=t.value,i=t.modifiers,o=e.tag,a=e.attrsMap.type;if("select"===o)mn(e,r,i);else if("input"===o&&"checkbox"===a)vn(e,r,i);else if("input"===o&&"radio"===a)hn(e,r,i);else if("input"===o||"textarea"===o)gn(e,r,i);else if(!Si.isReservedTag(o))return on(e,r,i),!1;return!0}function vn(e,t,n){var r=n&&n.number,i=nn(e,"value")||"null",o=nn(e,"true-value")||"true",a=nn(e,"false-value")||"false";Qt(e,"checked","Array.isArray("+t+")?_i("+t+","+i+")>-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),tn(e,sa,"var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$c){$$i<0&&("+t+"=$$a.concat($$v))}else{$$i>-1&&("+t+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+t+"=$$c}",null,!0)}function hn(e,t,n){var r=n&&n.number,i=nn(e,"value")||"null";i=r?"_n("+i+")":i,Qt(e,"checked","_q("+t+","+i+")"),tn(e,sa,an(t,i),null,!0)}function mn(e,t,n){var r=n&&n.number,i='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",o="var $$selectedVal = "+i+";";o=o+" "+an(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),tn(e,"change",o,null,!0)}function gn(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?aa:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=an(t,l);c&&(f="if($event.target.composing)return;"+f),Qt(e,"value","("+t+")"),tn(e,u,f,null,!0),(s||a||"number"===r)&&tn(e,"blur","$forceUpdate()")}function yn(e){var t;e[aa]&&(t=Di?"change":"input",e[t]=[].concat(e[aa],e[t]||[]),delete e[aa]),e[sa]&&(t=Hi?"click":"change",e[t]=[].concat(e[sa],e[t]||[]),delete e[sa])}function _n(e,t,n,r){if(n){var i=t,o=Lo;t=function(n){null!==(1===arguments.length?i(n):i.apply(null,arguments))&&bn(e,t,r,o)}}Lo.addEventListener(e,t,r)}function bn(e,t,n,r){(r||Lo).removeEventListener(e,t,n)}function $n(e,t){if(e.data.on||t.data.on){var n=t.data.on||{},r=e.data.on||{};Lo=t.elm,yn(n),K(n,r,_n,bn,t.context)}}function wn(e,t){if(e.data.domProps||t.data.domProps){var n,r,i=t.elm,o=e.data.domProps||{},a=t.data.domProps||{};a.__ob__&&(a=t.data.domProps=u({},a));for(n in o)null==a[n]&&(i[n]="");for(n in a)if(r=a[n],"textContent"!==n&&"innerHTML"!==n||(t.children&&(t.children.length=0),r!==o[n]))if("value"===n){i._value=r;var s=null==r?"":String(r);xn(i,t,s)&&(i.value=s)}else i[n]=r}}function xn(e,t,n){return!e.composing&&("option"===t.tag||Cn(e,n)||kn(e,n))}function Cn(e,t){return document.activeElement!==e&&e.value!==t}function kn(e,n){var r=e.value,i=e._vModifiers;return i&&i.number||"number"===e.type?t(r)!==t(n):i&&i.trim?r.trim()!==n.trim():r!==n}function An(e){var t=On(e.style);return e.staticStyle?u(e.staticStyle,t):t}function On(e){return Array.isArray(e)?p(e):"string"==typeof e?la(e):e}function Tn(e,t){var n,r={};if(t)for(var i=e;i.componentInstance;)i=i.componentInstance._vnode,i.data&&(n=An(i.data))&&u(r,n);(n=An(e.data))&&u(r,n);for(var o=e;o=o.parent;)o.data&&(n=An(o.data))&&u(r,n);return r}function Sn(e,t){var n=t.data,r=e.data;if(n.staticStyle||n.style||r.staticStyle||r.style){var i,o,a=t.elm,s=e.data.staticStyle,c=e.data.style||{},l=s||c,f=On(t.data.style)||{};t.data.style=f.__ob__?u({},f):f;var p=Tn(t,!0);for(o in l)null==p[o]&&da(a,o,"");for(o in p)(i=p[o])!==l[o]&&da(a,o,null==i?"":i)}}function En(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function jn(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t);else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");e.setAttribute("class",n.trim())}}function Nn(e){if(e){if("object"==typeof e){var t={};return e.css!==!1&&u(t,ga(e.name||"v")),u(t,e),t}return"string"==typeof e?ga(e):void 0}}function In(e){ka(function(){ka(e)})}function Ln(e,t){(e._transitionClasses||(e._transitionClasses=[])).push(t),En(e,t)}function Dn(e,t){e._transitionClasses&&r(e._transitionClasses,t),jn(e,t)}function Mn(e,t,n){var r=Pn(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===_a?wa:Ca,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c<a&&u()},o+1),e.addEventListener(s,l)}function Pn(e,t){var n,r=window.getComputedStyle(e),i=r[$a+"Delay"].split(", "),o=r[$a+"Duration"].split(", "),a=Rn(i,o),s=r[xa+"Delay"].split(", "),c=r[xa+"Duration"].split(", "),u=Rn(s,c),l=0,f=0;return t===_a?a>0&&(n=_a,l=a,f=o.length):t===ba?u>0&&(n=ba,l=u,f=c.length):(l=Math.max(a,u),n=l>0?a>u?_a:ba:null,f=n?n===_a?o.length:c.length:0),{type:n,timeout:l,propCount:f,hasTransform:n===_a&&Aa.test(r[$a+"Property"])}}function Rn(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map(function(t,n){return Fn(t)+Fn(e[n])}))}function Fn(e){return 1e3*Number(e.slice(0,-1))}function Hn(e,n){var r=e.elm;r._leaveCb&&(r._leaveCb.cancelled=!0,r._leaveCb());var i=Nn(e.data.transition);if(i&&!r._enterCb&&1===r.nodeType){for(var o=i.css,a=i.type,s=i.enterClass,c=i.enterToClass,u=i.enterActiveClass,f=i.appearClass,p=i.appearToClass,d=i.appearActiveClass,v=i.beforeEnter,h=i.enter,g=i.afterEnter,y=i.enterCancelled,_=i.beforeAppear,b=i.appear,$=i.afterAppear,w=i.appearCancelled,x=i.duration,C=so,k=so.$vnode;k&&k.parent;)k=k.parent,C=k.context;var A=!C._isMounted||!e.isRootInsert;if(!A||b||""===b){var O=A&&f?f:s,T=A&&d?d:u,S=A&&p?p:c,E=A?_||v:v,j=A&&"function"==typeof b?b:h,N=A?$||g:g,I=A?w||y:y,L=t(l(x)?x.enter:x),D=o!==!1&&!Mi,M=Vn(j),P=r._enterCb=m(function(){D&&(Dn(r,S),Dn(r,T)),P.cancelled?(D&&Dn(r,O),I&&I(r)):N&&N(r),r._enterCb=null});e.data.show||q(e.data.hook||(e.data.hook={}),"insert",function(){var t=r.parentNode,n=t&&t._pending&&t._pending[e.key];n&&n.tag===e.tag&&n.elm._leaveCb&&n.elm._leaveCb(),j&&j(r,P)}),E&&E(r),D&&(Ln(r,O),Ln(r,T),In(function(){Ln(r,S),Dn(r,O),P.cancelled||M||(Bn(L)?setTimeout(P,L):Mn(r,a,P))})),e.data.show&&(n&&n(),j&&j(r,P)),D||M||P()}}}function Un(e,n){function r(){w.cancelled||(e.data.show||((i.parentNode._pending||(i.parentNode._pending={}))[e.key]=e),p&&p(i),_&&(Ln(i,c),Ln(i,f),In(function(){Ln(i,u),Dn(i,c),w.cancelled||b||(Bn($)?setTimeout(w,$):Mn(i,s,w))})),d&&d(i,w),_||b||w())}var i=e.elm;i._enterCb&&(i._enterCb.cancelled=!0,i._enterCb());var o=Nn(e.data.transition);if(!o)return n();if(!i._leaveCb&&1===i.nodeType){ -var a=o.css,s=o.type,c=o.leaveClass,u=o.leaveToClass,f=o.leaveActiveClass,p=o.beforeLeave,d=o.leave,v=o.afterLeave,h=o.leaveCancelled,g=o.delayLeave,y=o.duration,_=a!==!1&&!Mi,b=Vn(d),$=t(l(y)?y.leave:y),w=i._leaveCb=m(function(){i.parentNode&&i.parentNode._pending&&(i.parentNode._pending[e.key]=null),_&&(Dn(i,u),Dn(i,f)),w.cancelled?(_&&Dn(i,c),h&&h(i)):(n(),v&&v(i)),i._leaveCb=null});g?g(r):r()}}function Bn(e){return"number"==typeof e&&!isNaN(e)}function Vn(e){if(!e)return!1;var t=e.fns;return t?Vn(Array.isArray(t)?t[0]:t):(e._length||e.length)>1}function zn(e,t){t.data.show||Hn(t)}function Jn(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=e.options.length;s<c;s++)if(a=e.options[s],i)o=h(r,qn(a))>-1,a.selected!==o&&(a.selected=o);else if(v(qn(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function Kn(e,t){for(var n=0,r=t.length;n<r;n++)if(v(qn(t[n]),e))return!1;return!0}function qn(e){return"_value"in e?e._value:e.value}function Wn(e){e.target.composing=!0}function Zn(e){e.target.composing=!1,Gn(e.target,"input")}function Gn(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Yn(e){return!e.componentInstance||e.data&&e.data.transition?e:Yn(e.componentInstance._vnode)}function Qn(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Qn(Y(t.children)):e}function Xn(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[wi(o)]=i[o];return t}function er(e,t){return/\d-keep-alive$/.test(t.tag)?e("keep-alive"):null}function tr(e){for(;e=e.parent;)if(e.data.transition)return!0}function nr(e,t){return t.key===e.key&&t.tag===e.tag}function rr(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function ir(e){e.data.newPos=e.elm.getBoundingClientRect()}function or(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}function ar(e){return Fa=Fa||document.createElement("div"),Fa.innerHTML=e,Fa.textContent}function sr(e,t){var n=t?ws:$s;return e.replace(n,function(e){return bs[e]})}function cr(e,t){function n(t){l+=t,e=e.substring(t)}function r(e,n,r){var i,s;if(null==n&&(n=l),null==r&&(r=l),e&&(s=e.toLowerCase()),e)for(i=a.length-1;i>=0&&a[i].lowerCasedTag!==s;i--);else i=0;if(i>=0){for(var c=a.length-1;c>=i;c--)t.end&&t.end(a[c].tag,n,r);a.length=i,o=i&&a[i-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,r):"p"===s&&(t.start&&t.start(e,[],!1,n,r),t.end&&t.end(e,n,r))}for(var i,o,a=[],s=t.expectHTML,c=t.isUnaryTag||Oi,u=t.canBeLeftOpenTag||Oi,l=0;e;){if(i=e,o&&ys(o)){var f=o.toLowerCase(),p=_s[f]||(_s[f]=new RegExp("([\\s\\S]*?)(</"+f+"[^>]*>)","i")),d=0,v=e.replace(p,function(e,n,r){return d=r.length,ys(f)||"noscript"===f||(n=n.replace(/<!--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),t.chars&&t.chars(n),""});l+=e.length-v.length,e=v,r(f,l-d,l)}else{var h=e.indexOf("<");if(0===h){if(Ya.test(e)){var m=e.indexOf("-->");if(m>=0){n(m+3);continue}}if(Qa.test(e)){var g=e.indexOf("]>");if(g>=0){n(g+2);continue}}var y=e.match(Ga);if(y){n(y[0].length);continue}var _=e.match(Za);if(_){var b=l;n(_[0].length),r(_[1],b,l);continue}var $=function(){var t=e.match(qa);if(t){var r={tagName:t[1],attrs:[],start:l};n(t[0].length);for(var i,o;!(i=e.match(Wa))&&(o=e.match(Ja));)n(o[0].length),r.attrs.push(o);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=l,r}}();if($){!function(e){var n=e.tagName,i=e.unarySlash;s&&("p"===o&&Va(n)&&r(o),u(n)&&o===n&&r(n));for(var l=c(n)||"html"===n&&"head"===o||!!i,f=e.attrs.length,p=new Array(f),d=0;d<f;d++){var v=e.attrs[d];Xa&&v[0].indexOf('""')===-1&&(""===v[3]&&delete v[3],""===v[4]&&delete v[4],""===v[5]&&delete v[5]);var h=v[3]||v[4]||v[5]||"";p[d]={name:v[1],value:sr(h,t.shouldDecodeNewlines)}}l||(a.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:p}),o=n),t.start&&t.start(n,p,l,e.start,e.end)}($);continue}}var w=void 0,x=void 0,C=void 0;if(h>=0){for(x=e.slice(h);!(Za.test(x)||qa.test(x)||Ya.test(x)||Qa.test(x)||(C=x.indexOf("<",1))<0);)h+=C,x=e.slice(h);w=e.substring(0,h),n(h)}h<0&&(w=e,e=""),t.chars&&w&&t.chars(w)}if(e===i){t.chars&&t.chars(e);break}}r()}function ur(e,t){var n=t?Cs(t):xs;if(n.test(e)){for(var r,i,o=[],a=n.lastIndex=0;r=n.exec(e);){i=r.index,i>a&&o.push(JSON.stringify(e.slice(a,i)));var s=Wt(r[1].trim());o.push("_s("+s+")"),a=i+r[0].length}return a<e.length&&o.push(JSON.stringify(e.slice(a))),o.join("+")}}function lr(e,t){function n(e){e.pre&&(s=!1),os(e.tag)&&(c=!1)}es=t.warn||Gt,ss=t.getTagNamespace||Oi,as=t.mustUseProp||Oi,os=t.isPreTag||Oi,rs=Yt(t.modules,"preTransformNode"),ns=Yt(t.modules,"transformNode"),is=Yt(t.modules,"postTransformNode"),ts=t.delimiters;var r,i,o=[],a=t.preserveWhitespace!==!1,s=!1,c=!1;return cr(e,{warn:es,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,start:function(e,a,u){var l=i&&i.ns||ss(e);Di&&"svg"===l&&(a=Tr(a));var f={type:1,tag:e,attrsList:a,attrsMap:Ar(a),parent:i,children:[]};l&&(f.ns=l),Or(f)&&!Ui()&&(f.forbidden=!0);for(var p=0;p<rs.length;p++)rs[p](f,t);if(s||(fr(f),f.pre&&(s=!0)),os(f.tag)&&(c=!0),s)pr(f);else{hr(f),mr(f),br(f),dr(f),f.plain=!f.key&&!a.length,vr(f),$r(f),wr(f);for(var d=0;d<ns.length;d++)ns[d](f,t);xr(f)}if(r?o.length||r.if&&(f.elseif||f.else)&&_r(r,{exp:f.elseif,block:f}):r=f,i&&!f.forbidden)if(f.elseif||f.else)gr(f,i);else if(f.slotScope){i.plain=!1;var v=f.slotTarget||'"default"';(i.scopedSlots||(i.scopedSlots={}))[v]=f}else i.children.push(f),f.parent=i;u?n(f):(i=f,o.push(f));for(var h=0;h<is.length;h++)is[h](f,t)},end:function(){var e=o[o.length-1],t=e.children[e.children.length-1];t&&3===t.type&&" "===t.text&&!c&&e.children.pop(),o.length-=1,i=o[o.length-1],n(e)},chars:function(e){if(i&&(!Di||"textarea"!==i.tag||i.attrsMap.placeholder!==e)){var t=i.children;if(e=c||e.trim()?Ns(e):a&&t.length?" ":""){var n;!s&&" "!==e&&(n=ur(e,ts))?t.push({type:2,expression:n,text:e}):" "===e&&t.length&&" "===t[t.length-1].text||t.push({type:3,text:e})}}}}),r}function fr(e){null!=rn(e,"v-pre")&&(e.pre=!0)}function pr(e){var t=e.attrsList.length;if(t)for(var n=e.attrs=new Array(t),r=0;r<t;r++)n[r]={name:e.attrsList[r].name,value:JSON.stringify(e.attrsList[r].value)};else e.pre||(e.plain=!0)}function dr(e){var t=nn(e,"key");t&&(e.key=t)}function vr(e){var t=nn(e,"ref");t&&(e.ref=t,e.refInFor=Cr(e))}function hr(e){var t;if(t=rn(e,"v-for")){var n=t.match(Os);if(!n)return;e.for=n[2].trim();var r=n[1].trim(),i=r.match(Ts);i?(e.alias=i[1].trim(),e.iterator1=i[2].trim(),i[3]&&(e.iterator2=i[3].trim())):e.alias=r}}function mr(e){var t=rn(e,"v-if");if(t)e.if=t,_r(e,{exp:t,block:e});else{null!=rn(e,"v-else")&&(e.else=!0);var n=rn(e,"v-else-if");n&&(e.elseif=n)}}function gr(e,t){var n=yr(t.children);n&&n.if&&_r(n,{exp:e.elseif,block:e})}function yr(e){for(var t=e.length;t--;){if(1===e[t].type)return e[t];e.pop()}}function _r(e,t){e.ifConditions||(e.ifConditions=[]),e.ifConditions.push(t)}function br(e){null!=rn(e,"v-once")&&(e.once=!0)}function $r(e){if("slot"===e.tag)e.slotName=nn(e,"name");else{var t=nn(e,"slot");t&&(e.slotTarget='""'===t?'"default"':t),"template"===e.tag&&(e.slotScope=rn(e,"scope"))}}function wr(e){var t;(t=nn(e,"is"))&&(e.component=t),null!=rn(e,"inline-template")&&(e.inlineTemplate=!0)}function xr(e){var t,n,r,i,o,a,s,c=e.attrsList;for(t=0,n=c.length;t<n;t++)if(r=i=c[t].name,o=c[t].value,As.test(r))if(e.hasBindings=!0,a=kr(r),a&&(r=r.replace(js,"")),Es.test(r))r=r.replace(Es,""),o=Wt(o),s=!1,a&&(a.prop&&(s=!0,"innerHtml"===(r=wi(r))&&(r="innerHTML")),a.camel&&(r=wi(r))),s||as(e.tag,e.attrsMap.type,r)?Qt(e,r,o):Xt(e,r,o);else if(ks.test(r))r=r.replace(ks,""),tn(e,r,o,a);else{r=r.replace(As,"");var u=r.match(Ss),l=u&&u[1];l&&(r=r.slice(0,-(l.length+1))),en(e,r,i,o,l,a)}else Xt(e,r,JSON.stringify(o))}function Cr(e){for(var t=e;t;){if(void 0!==t.for)return!0;t=t.parent}return!1}function kr(e){var t=e.match(js);if(t){var n={};return t.forEach(function(e){n[e.slice(1)]=!0}),n}}function Ar(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n].name]=e[n].value;return t}function Or(e){return"style"===e.tag||"script"===e.tag&&(!e.attrsMap.type||"text/javascript"===e.attrsMap.type)}function Tr(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];Is.test(r.name)||(r.name=r.name.replace(Ls,""),t.push(r))}return t}function Sr(e,t){e&&(cs=Ds(t.staticKeys||""),us=t.isReservedTag||Oi,jr(e),Nr(e,!1))}function Er(e){return n("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(e?","+e:""))}function jr(e){if(e.static=Lr(e),1===e.type){if(!us(e.tag)&&"slot"!==e.tag&&null==e.attrsMap["inline-template"])return;for(var t=0,n=e.children.length;t<n;t++){var r=e.children[t];jr(r),r.static||(e.static=!1)}}}function Nr(e,t){if(1===e.type){if((e.static||e.once)&&(e.staticInFor=t),e.static&&e.children.length&&(1!==e.children.length||3!==e.children[0].type))return void(e.staticRoot=!0);if(e.staticRoot=!1,e.children)for(var n=0,r=e.children.length;n<r;n++)Nr(e.children[n],t||!!e.for);e.ifConditions&&Ir(e.ifConditions,t)}}function Ir(e,t){for(var n=1,r=e.length;n<r;n++)Nr(e[n].block,t)}function Lr(e){return 2!==e.type&&(3===e.type||!(!e.pre&&(e.hasBindings||e.if||e.for||bi(e.tag)||!us(e.tag)||Dr(e)||!Object.keys(e).every(cs))))}function Dr(e){for(;e.parent;){if(e=e.parent,"template"!==e.tag)return!1;if(e.for)return!0}return!1}function Mr(e,t){var n=t?"nativeOn:{":"on:{";for(var r in e)n+='"'+r+'":'+Pr(r,e[r])+",";return n.slice(0,-1)+"}"}function Pr(e,t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map(function(t){return Pr(e,t)}).join(",")+"]";var n=Ps.test(t.value),r=Ms.test(t.value);if(t.modifiers){var i="",o="",a=[];for(var s in t.modifiers)Hs[s]?(o+=Hs[s],Rs[s]&&a.push(s)):a.push(s);a.length&&(i+=Rr(a)),o&&(i+=o);return"function($event){"+i+(n?t.value+"($event)":r?"("+t.value+")($event)":t.value)+"}"}return n||r?t.value:"function($event){"+t.value+"}"}function Rr(e){return"if(!('button' in $event)&&"+e.map(Fr).join("&&")+")return null;"}function Fr(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Rs[e];return"_k($event.keyCode,"+JSON.stringify(e)+(n?","+JSON.stringify(n):"")+")"}function Hr(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+(t.modifiers&&t.modifiers.prop?",true":"")+")"}}function Ur(e,t){var n=hs,r=hs=[],i=ms;ms=0,gs=t,ls=t.warn||Gt,fs=Yt(t.modules,"transformCode"),ps=Yt(t.modules,"genData"),ds=t.directives||{},vs=t.isReservedTag||Oi;var o=e?Br(e):'_c("div")';return hs=n,ms=i,{render:"with(this){return "+o+"}",staticRenderFns:r}}function Br(e){if(e.staticRoot&&!e.staticProcessed)return Vr(e);if(e.once&&!e.onceProcessed)return zr(e);if(e.for&&!e.forProcessed)return qr(e);if(e.if&&!e.ifProcessed)return Jr(e);if("template"!==e.tag||e.slotTarget){if("slot"===e.tag)return oi(e);var t;if(e.component)t=ai(e.component,e);else{var n=e.plain?void 0:Wr(e),r=e.inlineTemplate?null:Xr(e,!0);t="_c('"+e.tag+"'"+(n?","+n:"")+(r?","+r:"")+")"}for(var i=0;i<fs.length;i++)t=fs[i](e,t);return t}return Xr(e)||"void 0"}function Vr(e){return e.staticProcessed=!0,hs.push("with(this){return "+Br(e)+"}"),"_m("+(hs.length-1)+(e.staticInFor?",true":"")+")"}function zr(e){if(e.onceProcessed=!0,e.if&&!e.ifProcessed)return Jr(e);if(e.staticInFor){for(var t="",n=e.parent;n;){if(n.for){t=n.key;break}n=n.parent}return t?"_o("+Br(e)+","+ms+++(t?","+t:"")+")":Br(e)}return Vr(e)}function Jr(e){return e.ifProcessed=!0,Kr(e.ifConditions.slice())}function Kr(e){function t(e){return e.once?zr(e):Br(e)}if(!e.length)return"_e()";var n=e.shift();return n.exp?"("+n.exp+")?"+t(n.block)+":"+Kr(e):""+t(n.block)}function qr(e){var t=e.for,n=e.alias,r=e.iterator1?","+e.iterator1:"",i=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,"_l(("+t+"),function("+n+r+i+"){return "+Br(e)+"})"}function Wr(e){var t="{",n=Zr(e);n&&(t+=n+","),e.key&&(t+="key:"+e.key+","),e.ref&&(t+="ref:"+e.ref+","),e.refInFor&&(t+="refInFor:true,"),e.pre&&(t+="pre:true,"),e.component&&(t+='tag:"'+e.tag+'",');for(var r=0;r<ps.length;r++)t+=ps[r](e);if(e.attrs&&(t+="attrs:{"+si(e.attrs)+"},"),e.props&&(t+="domProps:{"+si(e.props)+"},"),e.events&&(t+=Mr(e.events)+","),e.nativeEvents&&(t+=Mr(e.nativeEvents,!0)+","),e.slotTarget&&(t+="slot:"+e.slotTarget+","),e.scopedSlots&&(t+=Yr(e.scopedSlots)+","),e.model&&(t+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var i=Gr(e);i&&(t+=i+",")}return t=t.replace(/,$/,"")+"}",e.wrapData&&(t=e.wrapData(t)),t}function Zr(e){var t=e.directives;if(t){var n,r,i,o,a="directives:[",s=!1;for(n=0,r=t.length;n<r;n++){i=t[n],o=!0;var c=ds[i.name]||Us[i.name];c&&(o=!!c(e,i,ls)),o&&(s=!0,a+='{name:"'+i.name+'",rawName:"'+i.rawName+'"'+(i.value?",value:("+i.value+"),expression:"+JSON.stringify(i.value):"")+(i.arg?',arg:"'+i.arg+'"':"")+(i.modifiers?",modifiers:"+JSON.stringify(i.modifiers):"")+"},")}return s?a.slice(0,-1)+"]":void 0}}function Gr(e){var t=e.children[0];if(1===t.type){var n=Ur(t,gs);return"inlineTemplate:{render:function(){"+n.render+"},staticRenderFns:["+n.staticRenderFns.map(function(e){return"function(){"+e+"}"}).join(",")+"]}"}}function Yr(e){return"scopedSlots:_u(["+Object.keys(e).map(function(t){return Qr(t,e[t])}).join(",")+"])"}function Qr(e,t){return"["+e+",function("+String(t.attrsMap.scope)+"){return "+("template"===t.tag?Xr(t)||"void 0":Br(t))+"}]"}function Xr(e,t){var n=e.children;if(n.length){var r=n[0];if(1===n.length&&r.for&&"template"!==r.tag&&"slot"!==r.tag)return Br(r);var i=t?ei(n):0;return"["+n.map(ri).join(",")+"]"+(i?","+i:"")}}function ei(e){for(var t=0,n=0;n<e.length;n++){var r=e[n];if(1===r.type){if(ti(r)||r.ifConditions&&r.ifConditions.some(function(e){return ti(e.block)})){t=2;break}(ni(r)||r.ifConditions&&r.ifConditions.some(function(e){return ni(e.block)}))&&(t=1)}}return t}function ti(e){return void 0!==e.for||"template"===e.tag||"slot"===e.tag}function ni(e){return!vs(e.tag)}function ri(e){return 1===e.type?Br(e):ii(e)}function ii(e){return"_v("+(2===e.type?e.expression:ci(JSON.stringify(e.text)))+")"}function oi(e){var t=e.slotName||'"default"',n=Xr(e),r="_t("+t+(n?","+n:""),i=e.attrs&&"{"+e.attrs.map(function(e){return wi(e.name)+":"+e.value}).join(",")+"}",o=e.attrsMap["v-bind"];return!i&&!o||n||(r+=",null"),i&&(r+=","+i),o&&(r+=(i?"":",null")+","+o),r+")"}function ai(e,t){var n=t.inlineTemplate?null:Xr(t,!0);return"_c("+e+","+Wr(t)+(n?","+n:"")+")"}function si(e){for(var t="",n=0;n<e.length;n++){var r=e[n];t+='"'+r.name+'":'+ci(r.value)+","}return t.slice(0,-1)}function ci(e){return e.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function ui(e,t){var n=lr(e.trim(),t);Sr(n,t);var r=Ur(n,t);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}}function li(e,t){try{return new Function(e)}catch(n){return t.push({err:n,code:e}),d}}function fi(e,t){var n=(t.warn,rn(e,"class"));n&&(e.staticClass=JSON.stringify(n));var r=nn(e,"class",!1);r&&(e.classBinding=r)}function pi(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}function di(e,t){var n=(t.warn,rn(e,"style"));n&&(e.staticStyle=JSON.stringify(la(n)));var r=nn(e,"style",!1);r&&(e.styleBinding=r)}function vi(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}function hi(e,t){t.value&&Qt(e,"textContent","_s("+t.value+")")}function mi(e,t){t.value&&Qt(e,"innerHTML","_s("+t.value+")")}function gi(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}var yi,_i,bi=n("slot,component",!0),$i=Object.prototype.hasOwnProperty,wi=a(function(e){return e.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():""})}),xi=a(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),Ci=a(function(e){return e.replace(/([^-])([A-Z])/g,"$1-$2").replace(/([^-])([A-Z])/g,"$1-$2").toLowerCase()}),ki=Object.prototype.toString,Ai="[object Object]",Oi=function(){return!1},Ti=function(e){return e},Si={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:Oi,isUnknownElement:Oi,getTagNamespace:d,parsePlatformTagName:Ti,mustUseProp:Oi,_assetTypes:["component","directive","filter"],_lifecycleHooks:["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated"],_maxUpdateCount:100},Ei=Object.freeze({}),ji=/[^\w.$]/,Ni="__proto__"in{},Ii="undefined"!=typeof window,Li=Ii&&window.navigator.userAgent.toLowerCase(),Di=Li&&/msie|trident/.test(Li),Mi=Li&&Li.indexOf("msie 9.0")>0,Pi=Li&&Li.indexOf("edge/")>0,Ri=Li&&Li.indexOf("android")>0,Fi=Li&&/iphone|ipad|ipod|ios/.test(Li),Hi=Li&&/chrome\/\d+/.test(Li)&&!Pi,Ui=function(){return void 0===yi&&(yi=!Ii&&"undefined"!=typeof global&&"server"===global.process.env.VUE_ENV),yi},Bi=Ii&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Vi="undefined"!=typeof Symbol&&b(Symbol)&&"undefined"!=typeof Reflect&&b(Reflect.ownKeys),zi=function(){function e(){r=!1;var e=n.slice(0);n.length=0;for(var t=0;t<e.length;t++)e[t]()}var t,n=[],r=!1;if("undefined"!=typeof Promise&&b(Promise)){var i=Promise.resolve(),o=function(e){console.error(e)};t=function(){i.then(e).catch(o),Fi&&setTimeout(d)}}else if("undefined"==typeof MutationObserver||!b(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())t=function(){setTimeout(e,0)};else{var a=1,s=new MutationObserver(e),c=document.createTextNode(String(a));s.observe(c,{characterData:!0}),t=function(){a=(a+1)%2,c.data=String(a)}}return function(e,i){var o;if(n.push(function(){e&&e.call(i),o&&o(i)}),r||(r=!0,t()),!e&&"undefined"!=typeof Promise)return new Promise(function(e){o=e})}}();_i="undefined"!=typeof Set&&b(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return this.set[e]===!0},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var Ji=d,Ki=0,qi=function(){this.id=Ki++,this.subs=[]};qi.prototype.addSub=function(e){this.subs.push(e)},qi.prototype.removeSub=function(e){r(this.subs,e)},qi.prototype.depend=function(){qi.target&&qi.target.addDep(this)},qi.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},qi.target=null;var Wi=[],Zi=Array.prototype,Gi=Object.create(Zi);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(e){var t=Zi[e];y(Gi,e,function(){for(var n=arguments,r=arguments.length,i=new Array(r);r--;)i[r]=n[r];var o,a=t.apply(this,i),s=this.__ob__;switch(e){case"push":o=i;break;case"unshift":o=i;break;case"splice":o=i.slice(2)}return o&&s.observeArray(o),s.dep.notify(),a})});var Yi=Object.getOwnPropertyNames(Gi),Qi={shouldConvert:!0,isSettingProps:!1},Xi=function(e){if(this.value=e,this.dep=new qi,this.vmCount=0,y(e,"__ob__",this),Array.isArray(e)){(Ni?x:C)(e,Gi,Yi),this.observeArray(e)}else this.walk(e)};Xi.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)A(e,t[n],e[t[n]])},Xi.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)k(e[t])};var eo=Si.optionMergeStrategies;eo.data=function(e,t,n){return n?e||t?function(){var r="function"==typeof t?t.call(n):t,i="function"==typeof e?e.call(n):void 0;return r?E(r,i):i}:void 0:t?"function"!=typeof t?e:e?function(){return E(t.call(this),e.call(this))}:t:e},Si._lifecycleHooks.forEach(function(e){eo[e]=j}),Si._assetTypes.forEach(function(e){eo[e+"s"]=N}),eo.watch=function(e,t){if(!t)return Object.create(e||null);if(!e)return t;var n={};u(n,e);for(var r in t){var i=n[r],o=t[r];i&&!Array.isArray(i)&&(i=[i]),n[r]=i?i.concat(o):[o]}return n},eo.props=eo.methods=eo.computed=function(e,t){if(!t)return Object.create(e||null);if(!e)return t;var n=Object.create(null);return u(n,e),u(n,t),n};var to=function(e,t){return void 0===t?e:t},no=function(e,t,n,r,i,o,a){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.functionalContext=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1},ro={child:{}};ro.child.get=function(){return this.componentInstance},Object.defineProperties(no.prototype,ro);var io,oo=function(){var e=new no;return e.text="",e.isComment=!0,e},ao=a(function(e){var t="~"===e.charAt(0);e=t?e.slice(1):e;var n="!"===e.charAt(0);return e=n?e.slice(1):e,{name:e,once:t,capture:n}}),so=null,co=[],uo={},lo=!1,fo=!1,po=0,vo=0,ho=function(e,t,n,r){this.vm=e,e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++vo,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new _i,this.newDepIds=new _i,this.expression="","function"==typeof t?this.getter=t:(this.getter=_(t),this.getter||(this.getter=function(){})),this.value=this.lazy?void 0:this.get()};ho.prototype.get=function(){$(this);var e,t=this.vm;if(this.user)try{e=this.getter.call(t,t)}catch(e){U(e,t,'getter for watcher "'+this.expression+'"')}else e=this.getter.call(t,t);return this.deep&&he(e),w(),this.cleanupDeps(),e},ho.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},ho.prototype.cleanupDeps=function(){for(var e=this,t=this.deps.length;t--;){var n=e.deps[t];e.newDepIds.has(n.id)||n.removeSub(e)}var r=this.depIds;this.depIds=this.newDepIds,this.newDepIds=r,this.newDepIds.clear(),r=this.deps,this.deps=this.newDeps,this.newDeps=r,this.newDeps.length=0},ho.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():ve(this)},ho.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||l(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){U(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},ho.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},ho.prototype.depend=function(){for(var e=this,t=this.deps.length;t--;)e.deps[t].depend()},ho.prototype.teardown=function(){var e=this;if(this.active){this.vm._isBeingDestroyed||r(this.vm._watchers,this);for(var t=this.deps.length;t--;)e.deps[t].removeSub(e);this.active=!1}};var mo=new _i,go={enumerable:!0,configurable:!0,get:d,set:d},yo={lazy:!0},_o={init:function(e,t,n,r){if(!e.componentInstance||e.componentInstance._isDestroyed){(e.componentInstance=Ee(e,so,n,r)).$mount(t?e.elm:void 0,t)}else if(e.data.keepAlive){var i=e;_o.prepatch(i,i)}},prepatch:function(e,t){var n=t.componentOptions;se(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){e.componentInstance._isMounted||(e.componentInstance._isMounted=!0,fe(e.componentInstance,"mounted")),e.data.keepAlive&&ue(e.componentInstance,!0)},destroy:function(e){e.componentInstance._isDestroyed||(e.data.keepAlive?le(e.componentInstance,!0):e.componentInstance.$destroy())}},bo=Object.keys(_o),$o=1,wo=2,xo=0;!function(e){e.prototype._init=function(e){var t=this;t._uid=xo++,t._isVue=!0,e&&e._isComponent?Qe(t,e):t.$options=D(Xe(t.constructor),e||{},t),t._renderProxy=t,t._self=t,oe(t),Q(t),Ze(t),fe(t,"beforeCreate"),Ye(t),ye(t),Ge(t),fe(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(nt),function(e){var t={};t.get=function(){return this._data};var n={};n.get=function(){return this._props},Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=O,e.prototype.$delete=T,e.prototype.$watch=function(e,t,n){var r=this;n=n||{},n.user=!0;var i=new ho(r,e,t,n);return n.immediate&&t.call(r,i.value),function(){i.teardown()}}}(nt),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this,i=this;if(Array.isArray(e))for(var o=0,a=e.length;o<a;o++)r.$on(e[o],n);else(i._events[e]||(i._events[e]=[])).push(n),t.test(e)&&(i._hasHookEvent=!0);return i},e.prototype.$once=function(e,t){function n(){r.$off(e,n),t.apply(r,arguments)}var r=this;return n.fn=t,r.$on(e,n),r},e.prototype.$off=function(e,t){var n=this,r=this;if(!arguments.length)return r._events=Object.create(null),r;if(Array.isArray(e)){for(var i=0,o=e.length;i<o;i++)n.$off(e[i],t);return r}var a=r._events[e];if(!a)return r;if(1===arguments.length)return r._events[e]=null,r;for(var s,c=a.length;c--;)if((s=a[c])===t||s.fn===t){a.splice(c,1);break}return r},e.prototype.$emit=function(e){var t=this,n=t._events[e];if(n){n=n.length>1?c(n):n;for(var r=c(arguments,1),i=0,o=n.length;i<o;i++)n[i].apply(t,r)}return t}}(nt),function(e){e.prototype._update=function(e,t){var n=this;n._isMounted&&fe(n,"beforeUpdate");var r=n.$el,i=n._vnode,o=so;so=n,n._vnode=e,n.$el=i?n.__patch__(i,e):n.__patch__(n.$el,e,t,!1,n.$options._parentElm,n.$options._refElm),so=o,r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){var e=this;e._watcher&&e._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){fe(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||r(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),fe(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$options._parentElm=e.$options._refElm=null}}}(nt),function(n){n.prototype.$nextTick=function(e){return zi(e,this)},n.prototype._render=function(){var e=this,t=e.$options,n=t.render,r=t.staticRenderFns,i=t._parentVnode;if(e._isMounted)for(var o in e.$slots)e.$slots[o]=z(e.$slots[o]);e.$scopedSlots=i&&i.data.scopedSlots||Ei,r&&!e._staticTrees&&(e._staticTrees=[]),e.$vnode=i;var a;try{a=n.call(e._renderProxy,e.$createElement)}catch(t){U(t,e,"render function"),a=e._vnode}return a instanceof no||(a=oo()),a.parent=i,a},n.prototype._o=Ke,n.prototype._n=t,n.prototype._s=e,n.prototype._l=He,n.prototype._t=Ue,n.prototype._q=v,n.prototype._i=h,n.prototype._m=Je,n.prototype._f=Be,n.prototype._k=Ve,n.prototype._b=ze,n.prototype._v=B,n.prototype._e=oo,n.prototype._u=ie}(nt);var Co=[String,RegExp],ko={name:"keep-alive",abstract:!0,props:{include:Co,exclude:Co},created:function(){this.cache=Object.create(null)},destroyed:function(){var e=this;for(var t in e.cache)pt(e.cache[t])},watch:{include:function(e){ft(this.cache,function(t){return lt(e,t)})},exclude:function(e){ft(this.cache,function(t){return!lt(e,t)})}},render:function(){var e=Y(this.$slots.default),t=e&&e.componentOptions;if(t){var n=ut(t);if(n&&(this.include&&!lt(this.include,n)||this.exclude&<(this.exclude,n)))return e;var r=null==e.key?t.Ctor.cid+(t.tag?"::"+t.tag:""):e.key;this.cache[r]?e.componentInstance=this.cache[r].componentInstance:this.cache[r]=e,e.data.keepAlive=!0}return e}},Ao={KeepAlive:ko};!function(e){var t={};t.get=function(){return Si},Object.defineProperty(e,"config",t),e.util={warn:Ji,extend:u,mergeOptions:D,defineReactive:A},e.set=O,e.delete=T,e.nextTick=zi,e.options=Object.create(null),Si._assetTypes.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,u(e.options.components,Ao),rt(e),it(e),ot(e),ct(e)}(nt),Object.defineProperty(nt.prototype,"$isServer",{get:Ui}),nt.version="2.2.6";var Oo,To,So,Eo,jo,No,Io,Lo,Do,Mo=n("input,textarea,option,select"),Po=function(e,t,n){return"value"===n&&Mo(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Ro=n("contenteditable,draggable,spellcheck"),Fo=n("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Ho="http://www.w3.org/1999/xlink",Uo=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Bo=function(e){return Uo(e)?e.slice(6,e.length):""},Vo=function(e){return null==e||e===!1},zo={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Jo=n("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template"),Ko=n("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),qo=function(e){return"pre"===e},Wo=function(e){return Jo(e)||Ko(e)},Zo=Object.create(null),Go=Object.freeze({createElement:$t,createElementNS:wt,createTextNode:xt,createComment:Ct,insertBefore:kt,removeChild:At,appendChild:Ot,parentNode:Tt,nextSibling:St,tagName:Et,setTextContent:jt,setAttribute:Nt}),Yo={create:function(e,t){It(t)},update:function(e,t){e.data.ref!==t.data.ref&&(It(e,!0),It(t))},destroy:function(e){It(e,!0)}},Qo=new no("",{},[]),Xo=["create","activate","update","remove","destroy"],ea={create:Ht,update:Ht,destroy:function(e){Ht(e,Qo)}},ta=Object.create(null),na=[Yo,ea],ra={create:Jt,update:Jt},ia={create:qt,update:qt},oa=/[\w).+\-_$\]]/,aa="__r",sa="__c",ca={create:$n,update:$n},ua={create:wn,update:wn},la=a(function(e){var t={};return e.split(/;(?![^(]*\))/g).forEach(function(e){if(e){var n=e.split(/:(.+)/);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}),fa=/^--/,pa=/\s*!important$/,da=function(e,t,n){fa.test(t)?e.style.setProperty(t,n):pa.test(n)?e.style.setProperty(t,n.replace(pa,""),"important"):e.style[ha(t)]=n},va=["Webkit","Moz","ms"],ha=a(function(e){if(Do=Do||document.createElement("div"),"filter"!==(e=wi(e))&&e in Do.style)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<va.length;n++){var r=va[n]+t;if(r in Do.style)return r}}),ma={create:Sn,update:Sn},ga=a(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),ya=Ii&&!Mi,_a="transition",ba="animation",$a="transition",wa="transitionend",xa="animation",Ca="animationend";ya&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&($a="WebkitTransition",wa="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(xa="WebkitAnimation",Ca="webkitAnimationEnd"));var ka=Ii&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout,Aa=/\b(transform|all)(,|$)/,Oa=Ii?{create:zn,activate:zn,remove:function(e,t){e.data.show?t():Un(e,t)}}:{},Ta=[ra,ia,ca,ua,ma,Oa],Sa=Ta.concat(na),Ea=function(e){function t(e){return new no(O.tagName(e).toLowerCase(),{},[],void 0,e)}function r(e,t){function n(){0==--n.listeners&&i(e)}return n.listeners=t,n}function i(e){var t=O.parentNode(e);Dt(t)&&O.removeChild(t,e)}function a(e,t,n,r,i){if(e.isRootInsert=!i,!s(e,t,n,r)){var o=e.data,a=e.children,c=e.tag;Dt(c)?(e.elm=e.ns?O.createElementNS(e.ns,c):O.createElement(c,e),v(e),f(e,a,t),Dt(o)&&d(e,t),l(n,e.elm,r)):Mt(e.isComment)?(e.elm=O.createComment(e.text), -l(n,e.elm,r)):(e.elm=O.createTextNode(e.text),l(n,e.elm,r))}}function s(e,t,n,r){var i=e.data;if(Dt(i)){var o=Dt(e.componentInstance)&&i.keepAlive;if(Dt(i=i.hook)&&Dt(i=i.init)&&i(e,!1,n,r),Dt(e.componentInstance))return c(e,t),Mt(o)&&u(e,t,n,r),!0}}function c(e,t){Dt(e.data.pendingInsert)&&t.push.apply(t,e.data.pendingInsert),e.elm=e.componentInstance.$el,p(e)?(d(e,t),v(e)):(It(e),t.push(e))}function u(e,t,n,r){for(var i,o=e;o.componentInstance;)if(o=o.componentInstance._vnode,Dt(i=o.data)&&Dt(i=i.transition)){for(i=0;i<k.activate.length;++i)k.activate[i](Qo,o);t.push(o);break}l(n,e.elm,r)}function l(e,t,n){Dt(e)&&(Dt(n)?O.insertBefore(e,t,n):O.appendChild(e,t))}function f(e,t,n){if(Array.isArray(t))for(var r=0;r<t.length;++r)a(t[r],n,e.elm,null,!0);else o(e.text)&&O.appendChild(e.elm,O.createTextNode(e.text))}function p(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return Dt(e.tag)}function d(e,t){for(var n=0;n<k.create.length;++n)k.create[n](Qo,e);x=e.data.hook,Dt(x)&&(Dt(x.create)&&x.create(Qo,e),Dt(x.insert)&&t.push(e))}function v(e){for(var t,n=e;n;)Dt(t=n.context)&&Dt(t=t.$options._scopeId)&&O.setAttribute(e.elm,t,""),n=n.parent;Dt(t=so)&&t!==e.context&&Dt(t=t.$options._scopeId)&&O.setAttribute(e.elm,t,"")}function h(e,t,n,r,i,o){for(;r<=i;++r)a(n[r],o,e,t)}function m(e){var t,n,r=e.data;if(Dt(r))for(Dt(t=r.hook)&&Dt(t=t.destroy)&&t(e),t=0;t<k.destroy.length;++t)k.destroy[t](e);if(Dt(t=e.children))for(n=0;n<e.children.length;++n)m(e.children[n])}function g(e,t,n,r){for(;n<=r;++n){var o=t[n];Dt(o)&&(Dt(o.tag)?(y(o),m(o)):i(o.elm))}}function y(e,t){if(Dt(t)||Dt(e.data)){var n=k.remove.length+1;for(Dt(t)?t.listeners+=n:t=r(e.elm,n),Dt(x=e.componentInstance)&&Dt(x=x._vnode)&&Dt(x.data)&&y(x,t),x=0;x<k.remove.length;++x)k.remove[x](e,t);Dt(x=e.data.hook)&&Dt(x=x.remove)?x(e,t):t()}else i(e.elm)}function _(e,t,n,r,i){for(var o,s,c,u,l=0,f=0,p=t.length-1,d=t[0],v=t[p],m=n.length-1,y=n[0],_=n[m],$=!i;l<=p&&f<=m;)Lt(d)?d=t[++l]:Lt(v)?v=t[--p]:Pt(d,y)?(b(d,y,r),d=t[++l],y=n[++f]):Pt(v,_)?(b(v,_,r),v=t[--p],_=n[--m]):Pt(d,_)?(b(d,_,r),$&&O.insertBefore(e,d.elm,O.nextSibling(v.elm)),d=t[++l],_=n[--m]):Pt(v,y)?(b(v,y,r),$&&O.insertBefore(e,v.elm,d.elm),v=t[--p],y=n[++f]):(Lt(o)&&(o=Ft(t,l,p)),s=Dt(y.key)?o[y.key]:null,Lt(s)?(a(y,r,e,d.elm),y=n[++f]):(c=t[s],Pt(c,y)?(b(c,y,r),t[s]=void 0,$&&O.insertBefore(e,y.elm,d.elm),y=n[++f]):(a(y,r,e,d.elm),y=n[++f])));l>p?(u=Lt(n[m+1])?null:n[m+1].elm,h(e,u,n,f,m,r)):f>m&&g(e,t,l,p)}function b(e,t,n,r){if(e!==t){if(Mt(t.isStatic)&&Mt(e.isStatic)&&t.key===e.key&&(Mt(t.isCloned)||Mt(t.isOnce)))return t.elm=e.elm,void(t.componentInstance=e.componentInstance);var i,o=t.data;Dt(o)&&Dt(i=o.hook)&&Dt(i=i.prepatch)&&i(e,t);var a=t.elm=e.elm,s=e.children,c=t.children;if(Dt(o)&&p(t)){for(i=0;i<k.update.length;++i)k.update[i](e,t);Dt(i=o.hook)&&Dt(i=i.update)&&i(e,t)}Lt(t.text)?Dt(s)&&Dt(c)?s!==c&&_(a,s,c,n,r):Dt(c)?(Dt(e.text)&&O.setTextContent(a,""),h(a,null,c,0,c.length-1,n)):Dt(s)?g(a,s,0,s.length-1):Dt(e.text)&&O.setTextContent(a,""):e.text!==t.text&&O.setTextContent(a,t.text),Dt(o)&&Dt(i=o.hook)&&Dt(i=i.postpatch)&&i(e,t)}}function $(e,t,n){if(Mt(n)&&Dt(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r<t.length;++r)t[r].data.hook.insert(t[r])}function w(e,t,n){t.elm=e;var r=t.tag,i=t.data,o=t.children;if(Dt(i)&&(Dt(x=i.hook)&&Dt(x=x.init)&&x(t,!0),Dt(x=t.componentInstance)))return c(t,n),!0;if(Dt(r)){if(Dt(o))if(e.hasChildNodes()){for(var a=!0,s=e.firstChild,u=0;u<o.length;u++){if(!s||!w(s,o[u],n)){a=!1;break}s=s.nextSibling}if(!a||s)return!1}else f(t,o,n);if(Dt(i))for(var l in i)if(!T(l)){d(t,n);break}}else e.data!==t.text&&(e.data=t.text);return!0}var x,C,k={},A=e.modules,O=e.nodeOps;for(x=0;x<Xo.length;++x)for(k[Xo[x]]=[],C=0;C<A.length;++C)Dt(A[C][Xo[x]])&&k[Xo[x]].push(A[C][Xo[x]]);var T=n("attrs,style,class,staticClass,staticStyle,key");return function(e,n,r,i,o,s){if(Lt(n))return void(Dt(e)&&m(e));var c=!1,u=[];if(Lt(e))c=!0,a(n,u,o,s);else{var l=Dt(e.nodeType);if(!l&&Pt(e,n))b(e,n,u,i);else{if(l){if(1===e.nodeType&&e.hasAttribute("server-rendered")&&(e.removeAttribute("server-rendered"),r=!0),Mt(r)&&w(e,n,u))return $(n,u,!0),e;e=t(e)}var f=e.elm,d=O.parentNode(f);if(a(n,u,f._leaveCb?null:d,O.nextSibling(f)),Dt(n.parent)){for(var v=n.parent;v;)v.elm=n.elm,v=v.parent;if(p(n))for(var h=0;h<k.create.length;++h)k.create[h](Qo,n.parent)}Dt(d)?g(d,[e],0,0):Dt(e.tag)&&m(e)}}return $(n,u,c),n.elm}}({nodeOps:Go,modules:Sa});Mi&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&Gn(e,"input")});var ja={inserted:function(e,t,n){if("select"===n.tag){var r=function(){Jn(e,t,n.context)};r(),(Di||Pi)&&setTimeout(r,0)}else"textarea"!==n.tag&&"text"!==e.type&&"password"!==e.type||(e._vModifiers=t.modifiers,t.modifiers.lazy||(Ri||(e.addEventListener("compositionstart",Wn),e.addEventListener("compositionend",Zn)),Mi&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){Jn(e,t,n.context);(e.multiple?t.value.some(function(t){return Kn(t,e.options)}):t.value!==t.oldValue&&Kn(t.value,e.options))&&Gn(e,"change")}}},Na={bind:function(e,t,n){var r=t.value;n=Yn(n);var i=n.data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i&&!Mi?(n.data.show=!0,Hn(n,function(){e.style.display=o})):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;r!==t.oldValue&&(n=Yn(n),n.data&&n.data.transition&&!Mi?(n.data.show=!0,r?Hn(n,function(){e.style.display=e.__vOriginalDisplay}):Un(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}},Ia={model:ja,show:Na},La={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]},Da={name:"transition",props:La,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(function(e){return e.tag}),n.length)){var r=this.mode,i=n[0];if(tr(this.$vnode))return i;var a=Qn(i);if(!a)return i;if(this._leaving)return er(e,i);var s="__transition-"+this._uid+"-";a.key=null==a.key?s+a.tag:o(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=Xn(this),l=this._vnode,f=Qn(l);if(a.data.directives&&a.data.directives.some(function(e){return"show"===e.name})&&(a.data.show=!0),f&&f.data&&!nr(a,f)){var p=f&&(f.data.transition=u({},c));if("out-in"===r)return this._leaving=!0,q(p,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),er(e,i);if("in-out"===r){var d,v=function(){d()};q(c,"afterEnter",v),q(c,"enterCancelled",v),q(p,"delayLeave",function(e){d=e})}}return i}}},Ma=u({tag:String,moveClass:String},La);delete Ma.mode;var Pa={props:Ma,render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=Xn(this),s=0;s<i.length;s++){var c=i[s];c.tag&&null!=c.key&&0!==String(c.key).indexOf("__vlist")&&(o.push(c),n[c.key]=c,(c.data||(c.data={})).transition=a)}if(r){for(var u=[],l=[],f=0;f<r.length;f++){var p=r[f];p.data.transition=a,p.data.pos=p.elm.getBoundingClientRect(),n[p.key]?u.push(p):l.push(p)}this.kept=e(t,null,u),this.removed=l}return e(t,null,o)},beforeUpdate:function(){this.__patch__(this._vnode,this.kept,!1,!0),this._vnode=this.kept},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";if(e.length&&this.hasMove(e[0].elm,t)){e.forEach(rr),e.forEach(ir),e.forEach(or);var n=document.body;n.offsetHeight;e.forEach(function(e){if(e.data.moved){var n=e.elm,r=n.style;Ln(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(wa,n._moveCb=function e(r){r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(wa,e),n._moveCb=null,Dn(n,t))})}})}},methods:{hasMove:function(e,t){if(!ya)return!1;if(null!=this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach(function(e){jn(n,e)}),En(n,t),n.style.display="none",this.$el.appendChild(n);var r=Pn(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}},Ra={Transition:Da,TransitionGroup:Pa};nt.config.mustUseProp=Po,nt.config.isReservedTag=Wo,nt.config.getTagNamespace=yt,nt.config.isUnknownElement=_t,u(nt.options.directives,Ia),u(nt.options.components,Ra),nt.prototype.__patch__=Ii?Ea:d,nt.prototype.$mount=function(e,t){return e=e&&Ii?bt(e):void 0,ae(this,e,t)},setTimeout(function(){Si.devtools&&Bi&&Bi.emit("init",nt)},0);var Fa,Ha=!!Ii&&function(e,t){var n=document.createElement("div");return n.innerHTML='<div a="'+e+'">',n.innerHTML.indexOf(t)>0}("\n"," "),Ua=n("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),Ba=n("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),Va=n("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),za=[/"([^"]*)"+/.source,/'([^']*)'+/.source,/([^\s"'=<>`]+)/.source],Ja=new RegExp("^\\s*"+/([^\s"'<>\/=]+)/.source+"(?:\\s*("+/(?:=)/.source+")\\s*(?:"+za.join("|")+"))?"),Ka="[a-zA-Z_][\\w\\-\\.]*",qa=new RegExp("^<((?:"+Ka+"\\:)?"+Ka+")"),Wa=/^\s*(\/?)>/,Za=new RegExp("^<\\/((?:"+Ka+"\\:)?"+Ka+")[^>]*>"),Ga=/^<!DOCTYPE [^>]+>/i,Ya=/^<!--/,Qa=/^<!\[/,Xa=!1;"x".replace(/x(.)?/g,function(e,t){Xa=""===t});var es,ts,ns,rs,is,os,as,ss,cs,us,ls,fs,ps,ds,vs,hs,ms,gs,ys=n("script,style,textarea",!0),_s={},bs={"<":"<",">":">",""":'"',"&":"&"," ":"\n"},$s=/&(?:lt|gt|quot|amp);/g,ws=/&(?:lt|gt|quot|amp|#10);/g,xs=/\{\{((?:.|\n)+?)\}\}/g,Cs=a(function(e){var t=e[0].replace(/[-.*+?^${}()|[\]\/\\]/g,"\\$&"),n=e[1].replace(/[-.*+?^${}()|[\]\/\\]/g,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")}),ks=/^@|^v-on:/,As=/^v-|^@|^:/,Os=/(.*?)\s+(?:in|of)\s+(.*)/,Ts=/\((\{[^}]*\}|[^,]*),([^,]*)(?:,([^,]*))?\)/,Ss=/:(.*)$/,Es=/^:|^v-bind:/,js=/\.[^.]+/g,Ns=a(ar),Is=/^xmlns:NS\d+/,Ls=/^NS\d+:/,Ds=a(Er),Ms=/^\s*([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/,Ps=/^\s*[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?']|\[".*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*\s*$/,Rs={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Fs=function(e){return"if("+e+")return null;"},Hs={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Fs("$event.target !== $event.currentTarget"),ctrl:Fs("!$event.ctrlKey"),shift:Fs("!$event.shiftKey"),alt:Fs("!$event.altKey"),meta:Fs("!$event.metaKey"),left:Fs("'button' in $event && $event.button !== 0"),middle:Fs("'button' in $event && $event.button !== 1"),right:Fs("'button' in $event && $event.button !== 2")},Us={bind:Hr,cloak:d},Bs={staticKeys:["staticClass"],transformNode:fi,genData:pi},Vs={staticKeys:["staticStyle"],transformNode:di,genData:vi},zs=[Bs,Vs],Js={model:dn,text:hi,html:mi},Ks={expectHTML:!0,modules:zs,directives:Js,isPreTag:qo,isUnaryTag:Ua,mustUseProp:Po,canBeLeftOpenTag:Ba,isReservedTag:Wo,getTagNamespace:yt,staticKeys:function(e){return e.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(",")}(zs)},qs=function(e){function t(t,n){var r=Object.create(e),i=[],o=[];if(r.warn=function(e,t){(t?o:i).push(e)},n){n.modules&&(r.modules=(e.modules||[]).concat(n.modules)),n.directives&&(r.directives=u(Object.create(e.directives),n.directives));for(var a in n)"modules"!==a&&"directives"!==a&&(r[a]=n[a])}var s=ui(t,r);return s.errors=i,s.tips=o,s}function n(e,n,i){n=n||{};var o=n.delimiters?String(n.delimiters)+e:e;if(r[o])return r[o];var a=t(e,n),s={},c=[];s.render=li(a.render,c);var u=a.staticRenderFns.length;s.staticRenderFns=new Array(u);for(var l=0;l<u;l++)s.staticRenderFns[l]=li(a.staticRenderFns[l],c);return r[o]=s}var r=Object.create(null);return{compile:t,compileToFunctions:n}}(Ks),Ws=qs.compileToFunctions,Zs=a(function(e){var t=bt(e);return t&&t.innerHTML}),Gs=nt.prototype.$mount;return nt.prototype.$mount=function(e,t){if((e=e&&bt(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=Zs(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=gi(e));if(r){var i=Ws(r,{shouldDecodeNewlines:Ha,delimiters:n.delimiters},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return Gs.call(this,e,t)},nt.compile=Ws,nt});
\ No newline at end of file diff --git a/nz-admin/src/main/resources/statics/libs/vue.upper.js b/nz-admin/src/main/resources/statics/libs/vue.upper.js deleted file mode 100644 index 4ef7ff1b..00000000 --- a/nz-admin/src/main/resources/statics/libs/vue.upper.js +++ /dev/null @@ -1,11944 +0,0 @@ -/*! - * Vue.js v2.6.10 - * (c) 2014-2019 Evan You - * Released under the MIT License. - */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = global || self, global.Vue = factory()); -}(this, function () { 'use strict'; - - /* */ - - var emptyObject = Object.freeze({}); - - // These helpers produce better VM code in JS engines due to their - // explicitness and function inlining. - function isUndef (v) { - return v === undefined || v === null - } - - function isDef (v) { - return v !== undefined && v !== null - } - - function isTrue (v) { - return v === true - } - - function isFalse (v) { - return v === false - } - - /** - * Check if value is primitive. - */ - function isPrimitive (value) { - return ( - typeof value === 'string' || - typeof value === 'number' || - // $flow-disable-line - typeof value === 'symbol' || - typeof value === 'boolean' - ) - } - - /** - * Quick object check - this is primarily used to tell - * Objects from primitive values when we know the value - * is a JSON-compliant type. - */ - function isObject (obj) { - return obj !== null && typeof obj === 'object' - } - - /** - * Get the raw type string of a value, e.g., [object Object]. - */ - var _toString = Object.prototype.toString; - - function toRawType (value) { - return _toString.call(value).slice(8, -1) - } - - /** - * Strict object type check. Only returns true - * for plain JavaScript objects. - */ - function isPlainObject (obj) { - return _toString.call(obj) === '[object Object]' - } - - function isRegExp (v) { - return _toString.call(v) === '[object RegExp]' - } - - /** - * Check if val is a valid array index. - */ - function isValidArrayIndex (val) { - var n = parseFloat(String(val)); - return n >= 0 && Math.floor(n) === n && isFinite(val) - } - - function isPromise (val) { - return ( - isDef(val) && - typeof val.then === 'function' && - typeof val.catch === 'function' - ) - } - - /** - * Convert a value to a string that is actually rendered. - */ - function toString (val) { - return val == null - ? '' - : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString) - ? JSON.stringify(val, null, 2) - : String(val) - } - - /** - * Convert an input value to a number for persistence. - * If the conversion fails, return original string. - */ - function toNumber (val) { - var n = parseFloat(val); - return isNaN(n) ? val : n - } - - /** - * Make a map and return a function for checking if a key - * is in that map. - */ - function makeMap ( - str, - expectsLowerCase - ) { - var map = Object.create(null); - var list = str.split(','); - for (var i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase - ? function (val) { return map[val.toLowerCase()]; } - : function (val) { return map[val]; } - } - - /** - * Check if a tag is a built-in tag. - */ - var isBuiltInTag = makeMap('slot,component', true); - - /** - * Check if an attribute is a reserved attribute. - */ - var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is'); - - /** - * Remove an item from an array. - */ - function remove (arr, item) { - if (arr.length) { - var index = arr.indexOf(item); - if (index > -1) { - return arr.splice(index, 1) - } - } - } - - /** - * Check whether an object has the property. - */ - var hasOwnProperty = Object.prototype.hasOwnProperty; - function hasOwn (obj, key) { - return hasOwnProperty.call(obj, key) - } - - /** - * Create a cached version of a pure function. - */ - function cached (fn) { - var cache = Object.create(null); - return (function cachedFn (str) { - var hit = cache[str]; - return hit || (cache[str] = fn(str)) - }) - } - - /** - * Camelize a hyphen-delimited string. - */ - var camelizeRE = /-(\w)/g; - var camelize = cached(function (str) { - return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; }) - }); - - /** - * Capitalize a string. - */ - var capitalize = cached(function (str) { - return str.charAt(0).toUpperCase() + str.slice(1) - }); - - /** - * Hyphenate a camelCase string. - */ - var hyphenateRE = /\B([A-Z])/g; - var hyphenate = cached(function (str) { - return str.replace(hyphenateRE, '-$1').toLowerCase() - }); - - /** - * Simple bind polyfill for environments that do not support it, - * e.g., PhantomJS 1.x. Technically, we don't need this anymore - * since native bind is now performant enough in most browsers. - * But removing it would mean breaking code that was able to run in - * PhantomJS 1.x, so this must be kept for backward compatibility. - */ - - /* istanbul ignore next */ - function polyfillBind (fn, ctx) { - function boundFn (a) { - var l = arguments.length; - return l - ? l > 1 - ? fn.apply(ctx, arguments) - : fn.call(ctx, a) - : fn.call(ctx) - } - - boundFn._length = fn.length; - return boundFn - } - - function nativeBind (fn, ctx) { - return fn.bind(ctx) - } - - var bind = Function.prototype.bind - ? nativeBind - : polyfillBind; - - /** - * Convert an Array-like object to a real Array. - */ - function toArray (list, start) { - start = start || 0; - var i = list.length - start; - var ret = new Array(i); - while (i--) { - ret[i] = list[i + start]; - } - return ret - } - - /** - * Mix properties into target object. - */ - function extend (to, _from) { - for (var key in _from) { - to[key] = _from[key]; - } - return to - } - - /** - * Merge an Array of Objects into a single Object. - */ - function toObject (arr) { - var res = {}; - for (var i = 0; i < arr.length; i++) { - if (arr[i]) { - extend(res, arr[i]); - } - } - return res - } - - /* eslint-disable no-unused-vars */ - - /** - * Perform no operation. - * Stubbing args to make Flow happy without leaving useless transpiled code - * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/). - */ - function noop (a, b, c) {} - - /** - * Always return false. - */ - var no = function (a, b, c) { return false; }; - - /* eslint-enable no-unused-vars */ - - /** - * Return the same value. - */ - var identity = function (_) { return _; }; - - /** - * Generate a string containing static keys from compiler modules. - */ - function genStaticKeys (modules) { - return modules.reduce(function (keys, m) { - return keys.concat(m.staticKeys || []) - }, []).join(',') - } - - /** - * Check if two values are loosely equal - that is, - * if they are plain objects, do they have the same shape? - */ - function looseEqual (a, b) { - if (a === b) { return true } - var isObjectA = isObject(a); - var isObjectB = isObject(b); - if (isObjectA && isObjectB) { - try { - var isArrayA = Array.isArray(a); - var isArrayB = Array.isArray(b); - if (isArrayA && isArrayB) { - return a.length === b.length && a.every(function (e, i) { - return looseEqual(e, b[i]) - }) - } else if (a instanceof Date && b instanceof Date) { - return a.getTime() === b.getTime() - } else if (!isArrayA && !isArrayB) { - var keysA = Object.keys(a); - var keysB = Object.keys(b); - return keysA.length === keysB.length && keysA.every(function (key) { - return looseEqual(a[key], b[key]) - }) - } else { - /* istanbul ignore next */ - return false - } - } catch (e) { - /* istanbul ignore next */ - return false - } - } else if (!isObjectA && !isObjectB) { - return String(a) === String(b) - } else { - return false - } - } - - /** - * Return the first index at which a loosely equal value can be - * found in the array (if value is a plain object, the array must - * contain an object of the same shape), or -1 if it is not present. - */ - function looseIndexOf (arr, val) { - for (var i = 0; i < arr.length; i++) { - if (looseEqual(arr[i], val)) { return i } - } - return -1 - } - - /** - * Ensure a function is called only once. - */ - function once (fn) { - var called = false; - return function () { - if (!called) { - called = true; - fn.apply(this, arguments); - } - } - } - - var SSR_ATTR = 'data-server-rendered'; - - var ASSET_TYPES = [ - 'component', - 'directive', - 'filter' - ]; - - var LIFECYCLE_HOOKS = [ - 'beforeCreate', - 'created', - 'beforeMount', - 'mounted', - 'beforeUpdate', - 'updated', - 'beforeDestroy', - 'destroyed', - 'activated', - 'deactivated', - 'errorCaptured', - 'serverPrefetch' - ]; - - /* */ - - - - var config = ({ - /** - * Option merge strategies (used in core/util/options) - */ - // $flow-disable-line - optionMergeStrategies: Object.create(null), - - /** - * Whether to suppress warnings. - */ - silent: false, - - /** - * Show production mode tip message on boot? - */ - productionTip: "development" !== 'production', - - /** - * Whether to enable devtools - */ - devtools: "development" !== 'production', - - /** - * Whether to record perf - */ - performance: false, - - /** - * Error handler for watcher errors - */ - errorHandler: null, - - /** - * Warn handler for watcher warns - */ - warnHandler: null, - - /** - * Ignore certain custom elements - */ - ignoredElements: [], - - /** - * Custom user key aliases for v-on - */ - // $flow-disable-line - keyCodes: Object.create(null), - - /** - * Check if a tag is reserved so that it cannot be registered as a - * component. This is platform-dependent and may be overwritten. - */ - isReservedTag: no, - - /** - * Check if an attribute is reserved so that it cannot be used as a component - * prop. This is platform-dependent and may be overwritten. - */ - isReservedAttr: no, - - /** - * Check if a tag is an unknown element. - * Platform-dependent. - */ - isUnknownElement: no, - - /** - * Get the namespace of an element - */ - getTagNamespace: noop, - - /** - * Parse the real tag name for the specific platform. - */ - parsePlatformTagName: identity, - - /** - * Check if an attribute must be bound using property, e.g. value - * Platform-dependent. - */ - mustUseProp: no, - - /** - * Perform updates asynchronously. Intended to be used by Vue Test Utils - * This will significantly reduce performance if set to false. - */ - async: true, - - /** - * Exposed for legacy reasons - */ - _lifecycleHooks: LIFECYCLE_HOOKS - }); - - /* */ - - /** - * unicode letters used for parsing html tags, component names and property paths. - * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname - * skipping \u10000-\uEFFFF due to it freezing up PhantomJS - */ - var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/; - - /** - * Check if a string starts with $ or _ - */ - function isReserved (str) { - var c = (str + '').charCodeAt(0); - return c === 0x24 || c === 0x5F - } - - /** - * Define a property. - */ - function def (obj, key, val, enumerable) { - Object.defineProperty(obj, key, { - value: val, - enumerable: !!enumerable, - writable: true, - configurable: true - }); - } - - /** - * Parse simple path. - */ - var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]")); - function parsePath (path) { - if (bailRE.test(path)) { - return - } - var segments = path.split('.'); - return function (obj) { - for (var i = 0; i < segments.length; i++) { - if (!obj) { return } - obj = obj[segments[i]]; - } - return obj - } - } - - /* */ - - // can we use __proto__? - var hasProto = '__proto__' in {}; - - // Browser environment sniffing - var inBrowser = typeof window !== 'undefined'; - var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform; - var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase(); - var UA = inBrowser && window.navigator.userAgent.toLowerCase(); - var isIE = UA && /msie|trident/.test(UA); - var isIE9 = UA && UA.indexOf('msie 9.0') > 0; - var isEdge = UA && UA.indexOf('edge/') > 0; - var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android'); - var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios'); - var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge; - var isPhantomJS = UA && /phantomjs/.test(UA); - var isFF = UA && UA.match(/firefox\/(\d+)/); - - // Firefox has a "watch" function on Object.prototype... - var nativeWatch = ({}).watch; - - var supportsPassive = false; - if (inBrowser) { - try { - var opts = {}; - Object.defineProperty(opts, 'passive', ({ - get: function get () { - /* istanbul ignore next */ - supportsPassive = true; - } - })); // https://github.com/facebook/flow/issues/285 - window.addEventListener('test-passive', null, opts); - } catch (e) {} - } - - // this needs to be lazy-evaled because vue may be required before - // vue-server-renderer can set VUE_ENV - var _isServer; - var isServerRendering = function () { - if (_isServer === undefined) { - /* istanbul ignore if */ - if (!inBrowser && !inWeex && typeof global !== 'undefined') { - // detect presence of vue-server-renderer and avoid - // Webpack shimming the process - _isServer = global['process'] && global['process'].env.VUE_ENV === 'server'; - } else { - _isServer = false; - } - } - return _isServer - }; - - // detect devtools - var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__; - - /* istanbul ignore next */ - function isNative (Ctor) { - return typeof Ctor === 'function' && /native code/.test(Ctor.toString()) - } - - var hasSymbol = - typeof Symbol !== 'undefined' && isNative(Symbol) && - typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys); - - var _Set; - /* istanbul ignore if */ // $flow-disable-line - if (typeof Set !== 'undefined' && isNative(Set)) { - // use native Set when available. - _Set = Set; - } else { - // a non-standard Set polyfill that only works with primitive keys. - _Set = /*@__PURE__*/(function () { - function Set () { - this.set = Object.create(null); - } - Set.prototype.has = function has (key) { - return this.set[key] === true - }; - Set.prototype.add = function add (key) { - this.set[key] = true; - }; - Set.prototype.clear = function clear () { - this.set = Object.create(null); - }; - - return Set; - }()); - } - - /* */ - - var warn = noop; - var tip = noop; - var generateComponentTrace = (noop); // work around flow check - var formatComponentName = (noop); - - { - var hasConsole = typeof console !== 'undefined'; - var classifyRE = /(?:^|[-_])(\w)/g; - var classify = function (str) { return str - .replace(classifyRE, function (c) { return c.toUpperCase(); }) - .replace(/[-_]/g, ''); }; - - warn = function (msg, vm) { - var trace = vm ? generateComponentTrace(vm) : ''; - - if (config.warnHandler) { - config.warnHandler.call(null, msg, vm, trace); - } else if (hasConsole && (!config.silent)) { - console.error(("[Vue warn]: " + msg + trace)); - } - }; - - tip = function (msg, vm) { - if (hasConsole && (!config.silent)) { - console.warn("[Vue tip]: " + msg + ( - vm ? generateComponentTrace(vm) : '' - )); - } - }; - - formatComponentName = function (vm, includeFile) { - if (vm.$root === vm) { - return '<Root>' - } - var options = typeof vm === 'function' && vm.cid != null - ? vm.options - : vm._isVue - ? vm.$options || vm.constructor.options - : vm; - var name = options.name || options._componentTag; - var file = options.__file; - if (!name && file) { - var match = file.match(/([^/\\]+)\.vue$/); - name = match && match[1]; - } - - return ( - (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") + - (file && includeFile !== false ? (" at " + file) : '') - ) - }; - - var repeat = function (str, n) { - var res = ''; - while (n) { - if (n % 2 === 1) { res += str; } - if (n > 1) { str += str; } - n >>= 1; - } - return res - }; - - generateComponentTrace = function (vm) { - if (vm._isVue && vm.$parent) { - var tree = []; - var currentRecursiveSequence = 0; - while (vm) { - if (tree.length > 0) { - var last = tree[tree.length - 1]; - if (last.constructor === vm.constructor) { - currentRecursiveSequence++; - vm = vm.$parent; - continue - } else if (currentRecursiveSequence > 0) { - tree[tree.length - 1] = [last, currentRecursiveSequence]; - currentRecursiveSequence = 0; - } - } - tree.push(vm); - vm = vm.$parent; - } - return '\n\nfound in\n\n' + tree - .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm) - ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)") - : formatComponentName(vm))); }) - .join('\n') - } else { - return ("\n\n(found in " + (formatComponentName(vm)) + ")") - } - }; - } - - /* */ - - var uid = 0; - - /** - * A dep is an observable that can have multiple - * directives subscribing to it. - */ - var Dep = function Dep () { - this.id = uid++; - this.subs = []; - }; - - Dep.prototype.addSub = function addSub (sub) { - this.subs.push(sub); - }; - - Dep.prototype.removeSub = function removeSub (sub) { - remove(this.subs, sub); - }; - - Dep.prototype.depend = function depend () { - if (Dep.target) { - Dep.target.addDep(this); - } - }; - - Dep.prototype.notify = function notify () { - // stabilize the subscriber list first - var subs = this.subs.slice(); - if (!config.async) { - // subs aren't sorted in scheduler if not running async - // we need to sort them now to make sure they fire in correct - // order - subs.sort(function (a, b) { return a.id - b.id; }); - } - for (var i = 0, l = subs.length; i < l; i++) { - subs[i].update(); - } - }; - - // The current target watcher being evaluated. - // This is globally unique because only one watcher - // can be evaluated at a time. - Dep.target = null; - var targetStack = []; - - function pushTarget (target) { - targetStack.push(target); - Dep.target = target; - } - - function popTarget () { - targetStack.pop(); - Dep.target = targetStack[targetStack.length - 1]; - } - - /* */ - - var VNode = function VNode ( - tag, - data, - children, - text, - elm, - context, - componentOptions, - asyncFactory - ) { - this.tag = tag; - this.data = data; - this.children = children; - this.text = text; - this.elm = elm; - this.ns = undefined; - this.context = context; - this.fnContext = undefined; - this.fnOptions = undefined; - this.fnScopeId = undefined; - this.key = data && data.key; - this.componentOptions = componentOptions; - this.componentInstance = undefined; - this.parent = undefined; - this.raw = false; - this.isStatic = false; - this.isRootInsert = true; - this.isComment = false; - this.isCloned = false; - this.isOnce = false; - this.asyncFactory = asyncFactory; - this.asyncMeta = undefined; - this.isAsyncPlaceholder = false; - }; - - var prototypeAccessors = { child: { configurable: true } }; - - // DEPRECATED: alias for componentInstance for backwards compat. - /* istanbul ignore next */ - prototypeAccessors.child.get = function () { - return this.componentInstance - }; - - Object.defineProperties( VNode.prototype, prototypeAccessors ); - - var createEmptyVNode = function (text) { - if ( text === void 0 ) text = ''; - - var node = new VNode(); - node.text = text; - node.isComment = true; - return node - }; - - function createTextVNode (val) { - return new VNode(undefined, undefined, undefined, String(val)) - } - - // optimized shallow clone - // used for static nodes and slot nodes because they may be reused across - // multiple renders, cloning them avoids errors when DOM manipulations rely - // on their elm reference. - function cloneVNode (vnode) { - var cloned = new VNode( - vnode.tag, - vnode.data, - // #7975 - // clone children array to avoid mutating original in case of cloning - // a child. - vnode.children && vnode.children.slice(), - vnode.text, - vnode.elm, - vnode.context, - vnode.componentOptions, - vnode.asyncFactory - ); - cloned.ns = vnode.ns; - cloned.isStatic = vnode.isStatic; - cloned.key = vnode.key; - cloned.isComment = vnode.isComment; - cloned.fnContext = vnode.fnContext; - cloned.fnOptions = vnode.fnOptions; - cloned.fnScopeId = vnode.fnScopeId; - cloned.asyncMeta = vnode.asyncMeta; - cloned.isCloned = true; - return cloned - } - - /* - * not type checking this file because flow doesn't play well with - * dynamically accessing methods on Array prototype - */ - - var arrayProto = Array.prototype; - var arrayMethods = Object.create(arrayProto); - - var methodsToPatch = [ - 'push', - 'pop', - 'shift', - 'unshift', - 'splice', - 'sort', - 'reverse' - ]; - - /** - * Intercept mutating methods and emit events - */ - methodsToPatch.forEach(function (method) { - // cache original method - var original = arrayProto[method]; - def(arrayMethods, method, function mutator () { - var args = [], len = arguments.length; - while ( len-- ) args[ len ] = arguments[ len ]; - - var result = original.apply(this, args); - var ob = this.__ob__; - var inserted; - switch (method) { - case 'push': - case 'unshift': - inserted = args; - break - case 'splice': - inserted = args.slice(2); - break - } - if (inserted) { ob.observeArray(inserted); } - // notify change - ob.dep.notify(); - return result - }); - }); - - /* */ - - var arrayKeys = Object.getOwnPropertyNames(arrayMethods); - - /** - * In some cases we may want to disable observation inside a component's - * update computation. - */ - var shouldObserve = true; - - function toggleObserving (value) { - shouldObserve = value; - } - - /** - * Observer class that is attached to each observed - * object. Once attached, the observer converts the target - * object's property keys into getter/setters that - * collect dependencies and dispatch updates. - */ - var Observer = function Observer (value) { - this.value = value; - this.dep = new Dep(); - this.vmCount = 0; - def(value, '__ob__', this); - if (Array.isArray(value)) { - if (hasProto) { - protoAugment(value, arrayMethods); - } else { - copyAugment(value, arrayMethods, arrayKeys); - } - this.observeArray(value); - } else { - this.walk(value); - } - }; - - /** - * Walk through all properties and convert them into - * getter/setters. This method should only be called when - * value type is Object. - */ - Observer.prototype.walk = function walk (obj) { - var keys = Object.keys(obj); - for (var i = 0; i < keys.length; i++) { - defineReactive$$1(obj, keys[i]); - } - }; - - /** - * Observe a list of Array items. - */ - Observer.prototype.observeArray = function observeArray (items) { - for (var i = 0, l = items.length; i < l; i++) { - observe(items[i]); - } - }; - - // helpers - - /** - * Augment a target Object or Array by intercepting - * the prototype chain using __proto__ - */ - function protoAugment (target, src) { - /* eslint-disable no-proto */ - target.__proto__ = src; - /* eslint-enable no-proto */ - } - - /** - * Augment a target Object or Array by defining - * hidden properties. - */ - /* istanbul ignore next */ - function copyAugment (target, src, keys) { - for (var i = 0, l = keys.length; i < l; i++) { - var key = keys[i]; - def(target, key, src[key]); - } - } - - /** - * Attempt to create an observer instance for a value, - * returns the new observer if successfully observed, - * or the existing observer if the value already has one. - */ - function observe (value, asRootData) { - if (!isObject(value) || value instanceof VNode) { - return - } - var ob; - if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) { - ob = value.__ob__; - } else if ( - shouldObserve && - !isServerRendering() && - (Array.isArray(value) || isPlainObject(value)) && - Object.isExtensible(value) && - !value._isVue - ) { - ob = new Observer(value); - } - if (asRootData && ob) { - ob.vmCount++; - } - return ob - } - - /** - * Define a reactive property on an Object. - */ - function defineReactive$$1 ( - obj, - key, - val, - customSetter, - shallow - ) { - var dep = new Dep(); - - var property = Object.getOwnPropertyDescriptor(obj, key); - if (property && property.configurable === false) { - return - } - - // cater for pre-defined getter/setters - var getter = property && property.get; - var setter = property && property.set; - if ((!getter || setter) && arguments.length === 2) { - val = obj[key]; - } - - var childOb = !shallow && observe(val); - Object.defineProperty(obj, key, { - enumerable: true, - configurable: true, - get: function reactiveGetter () { - var value = getter ? getter.call(obj) : val; - if (Dep.target) { - dep.depend(); - if (childOb) { - childOb.dep.depend(); - if (Array.isArray(value)) { - dependArray(value); - } - } - } - return value - }, - set: function reactiveSetter (newVal) { - var value = getter ? getter.call(obj) : val; - /* eslint-disable no-self-compare */ - if (newVal === value || (newVal !== newVal && value !== value)) { - return - } - /* eslint-enable no-self-compare */ - if (customSetter) { - customSetter(); - } - // #7981: for accessor properties without setter - if (getter && !setter) { return } - if (setter) { - setter.call(obj, newVal); - } else { - val = newVal; - } - childOb = !shallow && observe(newVal); - dep.notify(); - } - }); - } - - /** - * Set a property on an object. Adds the new property and - * triggers change notification if the property doesn't - * already exist. - */ - function set (target, key, val) { - if (isUndef(target) || isPrimitive(target) - ) { - warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target)))); - } - if (Array.isArray(target) && isValidArrayIndex(key)) { - target.length = Math.max(target.length, key); - target.splice(key, 1, val); - return val - } - if (key in target && !(key in Object.prototype)) { - target[key] = val; - return val - } - var ob = (target).__ob__; - if (target._isVue || (ob && ob.vmCount)) { - warn( - 'Avoid adding reactive properties to a Vue instance or its root $data ' + - 'at runtime - declare it upfront in the data option.' - ); - return val - } - if (!ob) { - target[key] = val; - return val - } - defineReactive$$1(ob.value, key, val); - ob.dep.notify(); - return val - } - - /** - * Delete a property and trigger change if necessary. - */ - function del (target, key) { - if (isUndef(target) || isPrimitive(target) - ) { - warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target)))); - } - if (Array.isArray(target) && isValidArrayIndex(key)) { - target.splice(key, 1); - return - } - var ob = (target).__ob__; - if (target._isVue || (ob && ob.vmCount)) { - warn( - 'Avoid deleting properties on a Vue instance or its root $data ' + - '- just set it to null.' - ); - return - } - if (!hasOwn(target, key)) { - return - } - delete target[key]; - if (!ob) { - return - } - ob.dep.notify(); - } - - /** - * Collect dependencies on array elements when the array is touched, since - * we cannot intercept array element access like property getters. - */ - function dependArray (value) { - for (var e = (void 0), i = 0, l = value.length; i < l; i++) { - e = value[i]; - e && e.__ob__ && e.__ob__.dep.depend(); - if (Array.isArray(e)) { - dependArray(e); - } - } - } - - /* */ - - /** - * Option overwriting strategies are functions that handle - * how to merge a parent option value and a child option - * value into the final value. - */ - var strats = config.optionMergeStrategies; - - /** - * Options with restrictions - */ - { - strats.el = strats.propsData = function (parent, child, vm, key) { - if (!vm) { - warn( - "option \"" + key + "\" can only be used during instance " + - 'creation with the `new` keyword.' - ); - } - return defaultStrat(parent, child) - }; - } - - /** - * Helper that recursively merges two data objects together. - */ - function mergeData (to, from) { - if (!from) { return to } - var key, toVal, fromVal; - - var keys = hasSymbol - ? Reflect.ownKeys(from) - : Object.keys(from); - - for (var i = 0; i < keys.length; i++) { - key = keys[i]; - // in case the object is already observed... - if (key === '__ob__') { continue } - toVal = to[key]; - fromVal = from[key]; - if (!hasOwn(to, key)) { - set(to, key, fromVal); - } else if ( - toVal !== fromVal && - isPlainObject(toVal) && - isPlainObject(fromVal) - ) { - mergeData(toVal, fromVal); - } - } - return to - } - - /** - * Data - */ - function mergeDataOrFn ( - parentVal, - childVal, - vm - ) { - if (!vm) { - // in a Vue.extend merge, both should be functions - if (!childVal) { - return parentVal - } - if (!parentVal) { - return childVal - } - // when parentVal & childVal are both present, - // we need to return a function that returns the - // merged result of both functions... no need to - // check if parentVal is a function here because - // it has to be a function to pass previous merges. - return function mergedDataFn () { - return mergeData( - typeof childVal === 'function' ? childVal.call(this, this) : childVal, - typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal - ) - } - } else { - return function mergedInstanceDataFn () { - // instance merge - var instanceData = typeof childVal === 'function' - ? childVal.call(vm, vm) - : childVal; - var defaultData = typeof parentVal === 'function' - ? parentVal.call(vm, vm) - : parentVal; - if (instanceData) { - return mergeData(instanceData, defaultData) - } else { - return defaultData - } - } - } - } - - strats.data = function ( - parentVal, - childVal, - vm - ) { - if (!vm) { - if (childVal && typeof childVal !== 'function') { - warn( - 'The "data" option should be a function ' + - 'that returns a per-instance value in component ' + - 'definitions.', - vm - ); - - return parentVal - } - return mergeDataOrFn(parentVal, childVal) - } - - return mergeDataOrFn(parentVal, childVal, vm) - }; - - /** - * Hooks and props are merged as arrays. - */ - function mergeHook ( - parentVal, - childVal - ) { - var res = childVal - ? parentVal - ? parentVal.concat(childVal) - : Array.isArray(childVal) - ? childVal - : [childVal] - : parentVal; - return res - ? dedupeHooks(res) - : res - } - - function dedupeHooks (hooks) { - var res = []; - for (var i = 0; i < hooks.length; i++) { - if (res.indexOf(hooks[i]) === -1) { - res.push(hooks[i]); - } - } - return res - } - - LIFECYCLE_HOOKS.forEach(function (hook) { - strats[hook] = mergeHook; - }); - - /** - * Assets - * - * When a vm is present (instance creation), we need to do - * a three-way merge between constructor options, instance - * options and parent options. - */ - function mergeAssets ( - parentVal, - childVal, - vm, - key - ) { - var res = Object.create(parentVal || null); - if (childVal) { - assertObjectType(key, childVal, vm); - return extend(res, childVal) - } else { - return res - } - } - - ASSET_TYPES.forEach(function (type) { - strats[type + 's'] = mergeAssets; - }); - - /** - * Watchers. - * - * Watchers hashes should not overwrite one - * another, so we merge them as arrays. - */ - strats.watch = function ( - parentVal, - childVal, - vm, - key - ) { - // work around Firefox's Object.prototype.watch... - if (parentVal === nativeWatch) { parentVal = undefined; } - if (childVal === nativeWatch) { childVal = undefined; } - /* istanbul ignore if */ - if (!childVal) { return Object.create(parentVal || null) } - { - assertObjectType(key, childVal, vm); - } - if (!parentVal) { return childVal } - var ret = {}; - extend(ret, parentVal); - for (var key$1 in childVal) { - var parent = ret[key$1]; - var child = childVal[key$1]; - if (parent && !Array.isArray(parent)) { - parent = [parent]; - } - ret[key$1] = parent - ? parent.concat(child) - : Array.isArray(child) ? child : [child]; - } - return ret - }; - - /** - * Other object hashes. - */ - strats.props = - strats.methods = - strats.inject = - strats.computed = function ( - parentVal, - childVal, - vm, - key - ) { - if (childVal && "development" !== 'production') { - assertObjectType(key, childVal, vm); - } - if (!parentVal) { return childVal } - var ret = Object.create(null); - extend(ret, parentVal); - if (childVal) { extend(ret, childVal); } - return ret - }; - strats.provide = mergeDataOrFn; - - /** - * Default strategy. - */ - var defaultStrat = function (parentVal, childVal) { - return childVal === undefined - ? parentVal - : childVal - }; - - /** - * Validate component names - */ - function checkComponents (options) { - for (var key in options.components) { - validateComponentName(key); - } - } - - function validateComponentName (name) { - if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) { - warn( - 'Invalid component name: "' + name + '". Component names ' + - 'should conform to valid custom element name in html5 specification.' - ); - } - if (isBuiltInTag(name) || config.isReservedTag(name)) { - warn( - 'Do not use built-in or reserved HTML elements as component ' + - 'id: ' + name - ); - } - } - - /** - * Ensure all props option syntax are normalized into the - * Object-based format. - */ - function normalizeProps (options, vm) { - var props = options.props; - if (!props) { return } - var res = {}; - var i, val, name; - if (Array.isArray(props)) { - i = props.length; - while (i--) { - val = props[i]; - if (typeof val === 'string') { - name = camelize(val); - res[name] = { type: null }; - } else { - warn('props must be strings when using array syntax.'); - } - } - } else if (isPlainObject(props)) { - for (var key in props) { - val = props[key]; - name = camelize(key); - res[name] = isPlainObject(val) - ? val - : { type: val }; - } - } else { - warn( - "Invalid value for option \"props\": expected an Array or an Object, " + - "but got " + (toRawType(props)) + ".", - vm - ); - } - options.props = res; - } - - /** - * Normalize all injections into Object-based format - */ - function normalizeInject (options, vm) { - var inject = options.inject; - if (!inject) { return } - var normalized = options.inject = {}; - if (Array.isArray(inject)) { - for (var i = 0; i < inject.length; i++) { - normalized[inject[i]] = { from: inject[i] }; - } - } else if (isPlainObject(inject)) { - for (var key in inject) { - var val = inject[key]; - normalized[key] = isPlainObject(val) - ? extend({ from: key }, val) - : { from: val }; - } - } else { - warn( - "Invalid value for option \"inject\": expected an Array or an Object, " + - "but got " + (toRawType(inject)) + ".", - vm - ); - } - } - - /** - * Normalize raw function directives into object format. - */ - function normalizeDirectives (options) { - var dirs = options.directives; - if (dirs) { - for (var key in dirs) { - var def$$1 = dirs[key]; - if (typeof def$$1 === 'function') { - dirs[key] = { bind: def$$1, update: def$$1 }; - } - } - } - } - - function assertObjectType (name, value, vm) { - if (!isPlainObject(value)) { - warn( - "Invalid value for option \"" + name + "\": expected an Object, " + - "but got " + (toRawType(value)) + ".", - vm - ); - } - } - - /** - * Merge two option objects into a new one. - * Core utility used in both instantiation and inheritance. - */ - function mergeOptions ( - parent, - child, - vm - ) { - { - checkComponents(child); - } - - if (typeof child === 'function') { - child = child.options; - } - - normalizeProps(child, vm); - normalizeInject(child, vm); - normalizeDirectives(child); - - // Apply extends and mixins on the child options, - // but only if it is a raw options object that isn't - // the result of another mergeOptions call. - // Only merged options has the _base property. - if (!child._base) { - if (child.extends) { - parent = mergeOptions(parent, child.extends, vm); - } - if (child.mixins) { - for (var i = 0, l = child.mixins.length; i < l; i++) { - parent = mergeOptions(parent, child.mixins[i], vm); - } - } - } - - var options = {}; - var key; - for (key in parent) { - mergeField(key); - } - for (key in child) { - if (!hasOwn(parent, key)) { - mergeField(key); - } - } - function mergeField (key) { - var strat = strats[key] || defaultStrat; - options[key] = strat(parent[key], child[key], vm, key); - } - return options - } - - /** - * Resolve an asset. - * This function is used because child instances need access - * to assets defined in its ancestor chain. - */ - function resolveAsset ( - options, - type, - id, - warnMissing - ) { - /* istanbul ignore if */ - if (typeof id !== 'string') { - return - } - var assets = options[type]; - // check local registration variations first - if (hasOwn(assets, id)) { return assets[id] } - var camelizedId = camelize(id); - if (hasOwn(assets, camelizedId)) { return assets[camelizedId] } - var PascalCaseId = capitalize(camelizedId); - if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] } - // fallback to prototype chain - var res = assets[id] || assets[camelizedId] || assets[PascalCaseId]; - if (warnMissing && !res) { - warn( - 'Failed to resolve ' + type.slice(0, -1) + ': ' + id, - options - ); - } - return res - } - - /* */ - - - - function validateProp ( - key, - propOptions, - propsData, - vm - ) { - var prop = propOptions[key]; - var absent = !hasOwn(propsData, key); - var value = propsData[key]; - // boolean casting - var booleanIndex = getTypeIndex(Boolean, prop.type); - if (booleanIndex > -1) { - if (absent && !hasOwn(prop, 'default')) { - value = false; - } else if (value === '' || value === hyphenate(key)) { - // only cast empty string / same name to boolean if - // boolean has higher priority - var stringIndex = getTypeIndex(String, prop.type); - if (stringIndex < 0 || booleanIndex < stringIndex) { - value = true; - } - } - } - // check default value - if (value === undefined) { - value = getPropDefaultValue(vm, prop, key); - // since the default value is a fresh copy, - // make sure to observe it. - var prevShouldObserve = shouldObserve; - toggleObserving(true); - observe(value); - toggleObserving(prevShouldObserve); - } - { - assertProp(prop, key, value, vm, absent); - } - return value - } - - /** - * Get the default value of a prop. - */ - function getPropDefaultValue (vm, prop, key) { - // no default, return undefined - if (!hasOwn(prop, 'default')) { - return undefined - } - var def = prop.default; - // warn against non-factory defaults for Object & Array - if (isObject(def)) { - warn( - 'Invalid default value for prop "' + key + '": ' + - 'Props with type Object/Array must use a factory function ' + - 'to return the default value.', - vm - ); - } - // the raw prop value was also undefined from previous render, - // return previous default value to avoid unnecessary watcher trigger - if (vm && vm.$options.propsData && - vm.$options.propsData[key] === undefined && - vm._props[key] !== undefined - ) { - return vm._props[key] - } - // call factory function for non-Function types - // a value is Function if its prototype is function even across different execution context - return typeof def === 'function' && getType(prop.type) !== 'Function' - ? def.call(vm) - : def - } - - /** - * Assert whether a prop is valid. - */ - function assertProp ( - prop, - name, - value, - vm, - absent - ) { - if (prop.required && absent) { - warn( - 'Missing required prop: "' + name + '"', - vm - ); - return - } - if (value == null && !prop.required) { - return - } - var type = prop.type; - var valid = !type || type === true; - var expectedTypes = []; - if (type) { - if (!Array.isArray(type)) { - type = [type]; - } - for (var i = 0; i < type.length && !valid; i++) { - var assertedType = assertType(value, type[i]); - expectedTypes.push(assertedType.expectedType || ''); - valid = assertedType.valid; - } - } - - if (!valid) { - warn( - getInvalidTypeMessage(name, value, expectedTypes), - vm - ); - return - } - var validator = prop.validator; - if (validator) { - if (!validator(value)) { - warn( - 'Invalid prop: custom validator check failed for prop "' + name + '".', - vm - ); - } - } - } - - var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/; - - function assertType (value, type) { - var valid; - var expectedType = getType(type); - if (simpleCheckRE.test(expectedType)) { - var t = typeof value; - valid = t === expectedType.toLowerCase(); - // for primitive wrapper objects - if (!valid && t === 'object') { - valid = value instanceof type; - } - } else if (expectedType === 'Object') { - valid = isPlainObject(value); - } else if (expectedType === 'Array') { - valid = Array.isArray(value); - } else { - valid = value instanceof type; - } - return { - valid: valid, - expectedType: expectedType - } - } - - /** - * Use function string name to check built-in types, - * because a simple equality check will fail when running - * across different vms / iframes. - */ - function getType (fn) { - var match = fn && fn.toString().match(/^\s*function (\w+)/); - return match ? match[1] : '' - } - - function isSameType (a, b) { - return getType(a) === getType(b) - } - - function getTypeIndex (type, expectedTypes) { - if (!Array.isArray(expectedTypes)) { - return isSameType(expectedTypes, type) ? 0 : -1 - } - for (var i = 0, len = expectedTypes.length; i < len; i++) { - if (isSameType(expectedTypes[i], type)) { - return i - } - } - return -1 - } - - function getInvalidTypeMessage (name, value, expectedTypes) { - var message = "Invalid prop: type check failed for prop \"" + name + "\"." + - " Expected " + (expectedTypes.map(capitalize).join(', ')); - var expectedType = expectedTypes[0]; - var receivedType = toRawType(value); - var expectedValue = styleValue(value, expectedType); - var receivedValue = styleValue(value, receivedType); - // check if we need to specify expected value - if (expectedTypes.length === 1 && - isExplicable(expectedType) && - !isBoolean(expectedType, receivedType)) { - message += " with value " + expectedValue; - } - message += ", got " + receivedType + " "; - // check if we need to specify received value - if (isExplicable(receivedType)) { - message += "with value " + receivedValue + "."; - } - return message - } - - function styleValue (value, type) { - if (type === 'String') { - return ("\"" + value + "\"") - } else if (type === 'Number') { - return ("" + (Number(value))) - } else { - return ("" + value) - } - } - - function isExplicable (value) { - var explicitTypes = ['string', 'number', 'boolean']; - return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; }) - } - - function isBoolean () { - var args = [], len = arguments.length; - while ( len-- ) args[ len ] = arguments[ len ]; - - return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; }) - } - - /* */ - - function handleError (err, vm, info) { - // Deactivate deps tracking while processing error handler to avoid possible infinite rendering. - // See: https://github.com/vuejs/vuex/issues/1505 - pushTarget(); - try { - if (vm) { - var cur = vm; - while ((cur = cur.$parent)) { - var hooks = cur.$options.errorCaptured; - if (hooks) { - for (var i = 0; i < hooks.length; i++) { - try { - var capture = hooks[i].call(cur, err, vm, info) === false; - if (capture) { return } - } catch (e) { - globalHandleError(e, cur, 'errorCaptured hook'); - } - } - } - } - } - globalHandleError(err, vm, info); - } finally { - popTarget(); - } - } - - function invokeWithErrorHandling ( - handler, - context, - args, - vm, - info - ) { - var res; - try { - res = args ? handler.apply(context, args) : handler.call(context); - if (res && !res._isVue && isPromise(res) && !res._handled) { - res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); }); - // issue #9511 - // avoid catch triggering multiple times when nested calls - res._handled = true; - } - } catch (e) { - handleError(e, vm, info); - } - return res - } - - function globalHandleError (err, vm, info) { - if (config.errorHandler) { - try { - return config.errorHandler.call(null, err, vm, info) - } catch (e) { - // if the user intentionally throws the original error in the handler, - // do not log it twice - if (e !== err) { - logError(e, null, 'config.errorHandler'); - } - } - } - logError(err, vm, info); - } - - function logError (err, vm, info) { - { - warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm); - } - /* istanbul ignore else */ - if ((inBrowser || inWeex) && typeof console !== 'undefined') { - console.error(err); - } else { - throw err - } - } - - /* */ - - var isUsingMicroTask = false; - - var callbacks = []; - var pending = false; - - function flushCallbacks () { - pending = false; - var copies = callbacks.slice(0); - callbacks.length = 0; - for (var i = 0; i < copies.length; i++) { - copies[i](); - } - } - - // Here we have async deferring wrappers using microtasks. - // In 2.5 we used (macro) tasks (in combination with microtasks). - // However, it has subtle problems when state is changed right before repaint - // (e.g. #6813, out-in transitions). - // Also, using (macro) tasks in event handler would cause some weird behaviors - // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109). - // So we now use microtasks everywhere, again. - // A major drawback of this tradeoff is that there are some scenarios - // where microtasks have too high a priority and fire in between supposedly - // sequential events (e.g. #4521, #6690, which have workarounds) - // or even between bubbling of the same event (#6566). - var timerFunc; - - // The nextTick behavior leverages the microtask queue, which can be accessed - // via either native Promise.then or MutationObserver. - // MutationObserver has wider support, however it is seriously bugged in - // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It - // completely stops working after triggering a few times... so, if native - // Promise is available, we will use it: - /* istanbul ignore next, $flow-disable-line */ - if (typeof Promise !== 'undefined' && isNative(Promise)) { - var p = Promise.resolve(); - timerFunc = function () { - p.then(flushCallbacks); - // In problematic UIWebViews, Promise.then doesn't completely break, but - // it can get stuck in a weird state where callbacks are pushed into the - // microtask queue but the queue isn't being flushed, until the browser - // needs to do some other work, e.g. handle a timer. Therefore we can - // "force" the microtask queue to be flushed by adding an empty timer. - if (isIOS) { setTimeout(noop); } - }; - isUsingMicroTask = true; - } else if (!isIE && typeof MutationObserver !== 'undefined' && ( - isNative(MutationObserver) || - // PhantomJS and iOS 7.x - MutationObserver.toString() === '[object MutationObserverConstructor]' - )) { - // Use MutationObserver where native Promise is not available, - // e.g. PhantomJS, iOS7, Android 4.4 - // (#6466 MutationObserver is unreliable in IE11) - var counter = 1; - var observer = new MutationObserver(flushCallbacks); - var textNode = document.createTextNode(String(counter)); - observer.observe(textNode, { - characterData: true - }); - timerFunc = function () { - counter = (counter + 1) % 2; - textNode.data = String(counter); - }; - isUsingMicroTask = true; - } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) { - // Fallback to setImmediate. - // Techinically it leverages the (macro) task queue, - // but it is still a better choice than setTimeout. - timerFunc = function () { - setImmediate(flushCallbacks); - }; - } else { - // Fallback to setTimeout. - timerFunc = function () { - setTimeout(flushCallbacks, 0); - }; - } - - function nextTick (cb, ctx) { - var _resolve; - callbacks.push(function () { - if (cb) { - try { - cb.call(ctx); - } catch (e) { - handleError(e, ctx, 'nextTick'); - } - } else if (_resolve) { - _resolve(ctx); - } - }); - if (!pending) { - pending = true; - timerFunc(); - } - // $flow-disable-line - if (!cb && typeof Promise !== 'undefined') { - return new Promise(function (resolve) { - _resolve = resolve; - }) - } - } - - /* */ - - var mark; - var measure; - - { - var perf = inBrowser && window.performance; - /* istanbul ignore if */ - if ( - perf && - perf.mark && - perf.measure && - perf.clearMarks && - perf.clearMeasures - ) { - mark = function (tag) { return perf.mark(tag); }; - measure = function (name, startTag, endTag) { - perf.measure(name, startTag, endTag); - perf.clearMarks(startTag); - perf.clearMarks(endTag); - // perf.clearMeasures(name) - }; - } - } - - /* not type checking this file because flow doesn't play well with Proxy */ - - var initProxy; - - { - var allowedGlobals = makeMap( - 'Infinity,undefined,NaN,isFinite,isNaN,' + - 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' + - 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' + - 'require' // for Webpack/Browserify - ); - - var warnNonPresent = function (target, key) { - warn( - "Property or method \"" + key + "\" is not defined on the instance but " + - 'referenced during render. Make sure that this property is reactive, ' + - 'either in the data option, or for class-based components, by ' + - 'initializing the property. ' + - 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', - target - ); - }; - - var warnReservedPrefix = function (target, key) { - warn( - "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " + - 'properties starting with "$" or "_" are not proxied in the Vue instance to ' + - 'prevent conflicts with Vue internals' + - 'See: https://vuejs.org/v2/api/#data', - target - ); - }; - - var hasProxy = - typeof Proxy !== 'undefined' && isNative(Proxy); - - if (hasProxy) { - var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact'); - config.keyCodes = new Proxy(config.keyCodes, { - set: function set (target, key, value) { - if (isBuiltInModifier(key)) { - warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key)); - return false - } else { - target[key] = value; - return true - } - } - }); - } - - var hasHandler = { - has: function has (target, key) { - var has = key in target; - var isAllowed = allowedGlobals(key) || - (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data)); - if (!has && !isAllowed) { - if (key in target.$data) { warnReservedPrefix(target, key); } - else { warnNonPresent(target, key); } - } - return has || !isAllowed - } - }; - - var getHandler = { - get: function get (target, key) { - if (typeof key === 'string' && !(key in target)) { - if (key in target.$data) { warnReservedPrefix(target, key); } - else { warnNonPresent(target, key); } - } - return target[key] - } - }; - - initProxy = function initProxy (vm) { - if (hasProxy) { - // determine which proxy handler to use - var options = vm.$options; - var handlers = options.render && options.render._withStripped - ? getHandler - : hasHandler; - vm._renderProxy = new Proxy(vm, handlers); - } else { - vm._renderProxy = vm; - } - }; - } - - /* */ - - var seenObjects = new _Set(); - - /** - * Recursively traverse an object to evoke all converted - * getters, so that every nested property inside the object - * is collected as a "deep" dependency. - */ - function traverse (val) { - _traverse(val, seenObjects); - seenObjects.clear(); - } - - function _traverse (val, seen) { - var i, keys; - var isA = Array.isArray(val); - if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) { - return - } - if (val.__ob__) { - var depId = val.__ob__.dep.id; - if (seen.has(depId)) { - return - } - seen.add(depId); - } - if (isA) { - i = val.length; - while (i--) { _traverse(val[i], seen); } - } else { - keys = Object.keys(val); - i = keys.length; - while (i--) { _traverse(val[keys[i]], seen); } - } - } - - /* */ - - var normalizeEvent = cached(function (name) { - var passive = name.charAt(0) === '&'; - name = passive ? name.slice(1) : name; - var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first - name = once$$1 ? name.slice(1) : name; - var capture = name.charAt(0) === '!'; - name = capture ? name.slice(1) : name; - return { - name: name, - once: once$$1, - capture: capture, - passive: passive - } - }); - - function createFnInvoker (fns, vm) { - function invoker () { - var arguments$1 = arguments; - - var fns = invoker.fns; - if (Array.isArray(fns)) { - var cloned = fns.slice(); - for (var i = 0; i < cloned.length; i++) { - invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler"); - } - } else { - // return handler return value for single handlers - return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler") - } - } - invoker.fns = fns; - return invoker - } - - function updateListeners ( - on, - oldOn, - add, - remove$$1, - createOnceHandler, - vm - ) { - var name, def$$1, cur, old, event; - for (name in on) { - def$$1 = cur = on[name]; - old = oldOn[name]; - event = normalizeEvent(name); - if (isUndef(cur)) { - warn( - "Invalid handler for event \"" + (event.name) + "\": got " + String(cur), - vm - ); - } else if (isUndef(old)) { - if (isUndef(cur.fns)) { - cur = on[name] = createFnInvoker(cur, vm); - } - if (isTrue(event.once)) { - cur = on[name] = createOnceHandler(event.name, cur, event.capture); - } - add(event.name, cur, event.capture, event.passive, event.params); - } else if (cur !== old) { - old.fns = cur; - on[name] = old; - } - } - for (name in oldOn) { - if (isUndef(on[name])) { - event = normalizeEvent(name); - remove$$1(event.name, oldOn[name], event.capture); - } - } - } - - /* */ - - function mergeVNodeHook (def, hookKey, hook) { - if (def instanceof VNode) { - def = def.data.hook || (def.data.hook = {}); - } - var invoker; - var oldHook = def[hookKey]; - - function wrappedHook () { - hook.apply(this, arguments); - // important: remove merged hook to ensure it's called only once - // and prevent memory leak - remove(invoker.fns, wrappedHook); - } - - if (isUndef(oldHook)) { - // no existing hook - invoker = createFnInvoker([wrappedHook]); - } else { - /* istanbul ignore if */ - if (isDef(oldHook.fns) && isTrue(oldHook.merged)) { - // already a merged invoker - invoker = oldHook; - invoker.fns.push(wrappedHook); - } else { - // existing plain hook - invoker = createFnInvoker([oldHook, wrappedHook]); - } - } - - invoker.merged = true; - def[hookKey] = invoker; - } - - /* */ - - function extractPropsFromVNodeData ( - data, - Ctor, - tag - ) { - // we are only extracting raw values here. - // validation and default values are handled in the child - // component itself. - var propOptions = Ctor.options.props; - if (isUndef(propOptions)) { - return - } - var res = {}; - var attrs = data.attrs; - var props = data.props; - if (isDef(attrs) || isDef(props)) { - for (var key in propOptions) { - var altKey = hyphenate(key); - { - var keyInLowerCase = key.toLowerCase(); - if ( - key !== keyInLowerCase && - attrs && hasOwn(attrs, keyInLowerCase) - ) { - tip( - "Prop \"" + keyInLowerCase + "\" is passed to component " + - (formatComponentName(tag || Ctor)) + ", but the declared prop name is" + - " \"" + key + "\". " + - "Note that HTML attributes are case-insensitive and camelCased " + - "props need to use their kebab-case equivalents when using in-DOM " + - "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"." - ); - } - } - checkProp(res, props, key, altKey, true) || - checkProp(res, attrs, key, altKey, false); - } - } - return res - } - - function checkProp ( - res, - hash, - key, - altKey, - preserve - ) { - if (isDef(hash)) { - if (hasOwn(hash, key)) { - res[key] = hash[key]; - if (!preserve) { - delete hash[key]; - } - return true - } else if (hasOwn(hash, altKey)) { - res[key] = hash[altKey]; - if (!preserve) { - delete hash[altKey]; - } - return true - } - } - return false - } - - /* */ - - // The template compiler attempts to minimize the need for normalization by - // statically analyzing the template at compile time. - // - // For plain HTML markup, normalization can be completely skipped because the - // generated render function is guaranteed to return Array<VNode>. There are - // two cases where extra normalization is needed: - - // 1. When the children contains components - because a functional component - // may return an Array instead of a single root. In this case, just a simple - // normalization is needed - if any child is an Array, we flatten the whole - // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep - // because functional components already normalize their own children. - function simpleNormalizeChildren (children) { - for (var i = 0; i < children.length; i++) { - if (Array.isArray(children[i])) { - return Array.prototype.concat.apply([], children) - } - } - return children - } - - // 2. When the children contains constructs that always generated nested Arrays, - // e.g. <template>, <slot>, v-for, or when the children is provided by user - // with hand-written render functions / JSX. In such cases a full normalization - // is needed to cater to all possible types of children values. - function normalizeChildren (children) { - return isPrimitive(children) - ? [createTextVNode(children)] - : Array.isArray(children) - ? normalizeArrayChildren(children) - : undefined - } - - function isTextNode (node) { - return isDef(node) && isDef(node.text) && isFalse(node.isComment) - } - - function normalizeArrayChildren (children, nestedIndex) { - var res = []; - var i, c, lastIndex, last; - for (i = 0; i < children.length; i++) { - c = children[i]; - if (isUndef(c) || typeof c === 'boolean') { continue } - lastIndex = res.length - 1; - last = res[lastIndex]; - // nested - if (Array.isArray(c)) { - if (c.length > 0) { - c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i)); - // merge adjacent text nodes - if (isTextNode(c[0]) && isTextNode(last)) { - res[lastIndex] = createTextVNode(last.text + (c[0]).text); - c.shift(); - } - res.push.apply(res, c); - } - } else if (isPrimitive(c)) { - if (isTextNode(last)) { - // merge adjacent text nodes - // this is necessary for SSR hydration because text nodes are - // essentially merged when rendered to HTML strings - res[lastIndex] = createTextVNode(last.text + c); - } else if (c !== '') { - // convert primitive to vnode - res.push(createTextVNode(c)); - } - } else { - if (isTextNode(c) && isTextNode(last)) { - // merge adjacent text nodes - res[lastIndex] = createTextVNode(last.text + c.text); - } else { - // default key for nested array children (likely generated by v-for) - if (isTrue(children._isVList) && - isDef(c.tag) && - isUndef(c.key) && - isDef(nestedIndex)) { - c.key = "__vlist" + nestedIndex + "_" + i + "__"; - } - res.push(c); - } - } - } - return res - } - - /* */ - - function initProvide (vm) { - var provide = vm.$options.provide; - if (provide) { - vm._provided = typeof provide === 'function' - ? provide.call(vm) - : provide; - } - } - - function initInjections (vm) { - var result = resolveInject(vm.$options.inject, vm); - if (result) { - toggleObserving(false); - Object.keys(result).forEach(function (key) { - /* istanbul ignore else */ - { - defineReactive$$1(vm, key, result[key], function () { - warn( - "Avoid mutating an injected value directly since the changes will be " + - "overwritten whenever the provided component re-renders. " + - "injection being mutated: \"" + key + "\"", - vm - ); - }); - } - }); - toggleObserving(true); - } - } - - function resolveInject (inject, vm) { - if (inject) { - // inject is :any because flow is not smart enough to figure out cached - var result = Object.create(null); - var keys = hasSymbol - ? Reflect.ownKeys(inject) - : Object.keys(inject); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - // #6574 in case the inject object is observed... - if (key === '__ob__') { continue } - var provideKey = inject[key].from; - var source = vm; - while (source) { - if (source._provided && hasOwn(source._provided, provideKey)) { - result[key] = source._provided[provideKey]; - break - } - source = source.$parent; - } - if (!source) { - if ('default' in inject[key]) { - var provideDefault = inject[key].default; - result[key] = typeof provideDefault === 'function' - ? provideDefault.call(vm) - : provideDefault; - } else { - warn(("Injection \"" + key + "\" not found"), vm); - } - } - } - return result - } - } - - /* */ - - - - /** - * Runtime helper for resolving raw children VNodes into a slot object. - */ - function resolveSlots ( - children, - context - ) { - if (!children || !children.length) { - return {} - } - var slots = {}; - for (var i = 0, l = children.length; i < l; i++) { - var child = children[i]; - var data = child.data; - // remove slot attribute if the node is resolved as a Vue slot node - if (data && data.attrs && data.attrs.slot) { - delete data.attrs.slot; - } - // named slots should only be respected if the vnode was rendered in the - // same context. - if ((child.context === context || child.fnContext === context) && - data && data.slot != null - ) { - var name = data.slot; - var slot = (slots[name] || (slots[name] = [])); - if (child.tag === 'template') { - slot.push.apply(slot, child.children || []); - } else { - slot.push(child); - } - } else { - (slots.default || (slots.default = [])).push(child); - } - } - // ignore slots that contains only whitespace - for (var name$1 in slots) { - if (slots[name$1].every(isWhitespace)) { - delete slots[name$1]; - } - } - return slots - } - - function isWhitespace (node) { - return (node.isComment && !node.asyncFactory) || node.text === ' ' - } - - /* */ - - function normalizeScopedSlots ( - slots, - normalSlots, - prevSlots - ) { - var res; - var hasNormalSlots = Object.keys(normalSlots).length > 0; - var isStable = slots ? !!slots.$stable : !hasNormalSlots; - var key = slots && slots.$key; - if (!slots) { - res = {}; - } else if (slots._normalized) { - // fast path 1: child component re-render only, parent did not change - return slots._normalized - } else if ( - isStable && - prevSlots && - prevSlots !== emptyObject && - key === prevSlots.$key && - !hasNormalSlots && - !prevSlots.$hasNormal - ) { - // fast path 2: stable scoped slots w/ no normal slots to proxy, - // only need to normalize once - return prevSlots - } else { - res = {}; - for (var key$1 in slots) { - if (slots[key$1] && key$1[0] !== '$') { - res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]); - } - } - } - // expose normal slots on scopedSlots - for (var key$2 in normalSlots) { - if (!(key$2 in res)) { - res[key$2] = proxyNormalSlot(normalSlots, key$2); - } - } - // avoriaz seems to mock a non-extensible $scopedSlots object - // and when that is passed down this would cause an error - if (slots && Object.isExtensible(slots)) { - (slots)._normalized = res; - } - def(res, '$stable', isStable); - def(res, '$key', key); - def(res, '$hasNormal', hasNormalSlots); - return res - } - - function normalizeScopedSlot(normalSlots, key, fn) { - var normalized = function () { - var res = arguments.length ? fn.apply(null, arguments) : fn({}); - res = res && typeof res === 'object' && !Array.isArray(res) - ? [res] // single vnode - : normalizeChildren(res); - return res && ( - res.length === 0 || - (res.length === 1 && res[0].isComment) // #9658 - ) ? undefined - : res - }; - // this is a slot using the new v-slot syntax without scope. although it is - // compiled as a scoped slot, render fn users would expect it to be present - // on this.$slots because the usage is semantically a normal slot. - if (fn.proxy) { - Object.defineProperty(normalSlots, key, { - get: normalized, - enumerable: true, - configurable: true - }); - } - return normalized - } - - function proxyNormalSlot(slots, key) { - return function () { return slots[key]; } - } - - /* */ - - /** - * Runtime helper for rendering v-for lists. - */ - function renderList ( - val, - render - ) { - var ret, i, l, keys, key; - if (Array.isArray(val) || typeof val === 'string') { - ret = new Array(val.length); - for (i = 0, l = val.length; i < l; i++) { - ret[i] = render(val[i], i); - } - } else if (typeof val === 'number') { - ret = new Array(val); - for (i = 0; i < val; i++) { - ret[i] = render(i + 1, i); - } - } else if (isObject(val)) { - if (hasSymbol && val[Symbol.iterator]) { - ret = []; - var iterator = val[Symbol.iterator](); - var result = iterator.next(); - while (!result.done) { - ret.push(render(result.value, ret.length)); - result = iterator.next(); - } - } else { - keys = Object.keys(val); - ret = new Array(keys.length); - for (i = 0, l = keys.length; i < l; i++) { - key = keys[i]; - ret[i] = render(val[key], key, i); - } - } - } - if (!isDef(ret)) { - ret = []; - } - (ret)._isVList = true; - return ret - } - - /* */ - - /** - * Runtime helper for rendering <slot> - */ - function renderSlot ( - name, - fallback, - props, - bindObject - ) { - var scopedSlotFn = this.$scopedSlots[name]; - var nodes; - if (scopedSlotFn) { // scoped slot - props = props || {}; - if (bindObject) { - if (!isObject(bindObject)) { - warn( - 'slot v-bind without argument expects an Object', - this - ); - } - props = extend(extend({}, bindObject), props); - } - nodes = scopedSlotFn(props) || fallback; - } else { - nodes = this.$slots[name] || fallback; - } - - var target = props && props.slot; - if (target) { - return this.$createElement('template', { slot: target }, nodes) - } else { - return nodes - } - } - - /* */ - - /** - * Runtime helper for resolving filters - */ - function resolveFilter (id) { - return resolveAsset(this.$options, 'filters', id, true) || identity - } - - /* */ - - function isKeyNotMatch (expect, actual) { - if (Array.isArray(expect)) { - return expect.indexOf(actual) === -1 - } else { - return expect !== actual - } - } - - /** - * Runtime helper for checking keyCodes from config. - * exposed as Vue.prototype._k - * passing in eventKeyName as last argument separately for backwards compat - */ - function checkKeyCodes ( - eventKeyCode, - key, - builtInKeyCode, - eventKeyName, - builtInKeyName - ) { - var mappedKeyCode = config.keyCodes[key] || builtInKeyCode; - if (builtInKeyName && eventKeyName && !config.keyCodes[key]) { - return isKeyNotMatch(builtInKeyName, eventKeyName) - } else if (mappedKeyCode) { - return isKeyNotMatch(mappedKeyCode, eventKeyCode) - } else if (eventKeyName) { - return hyphenate(eventKeyName) !== key - } - } - - /* */ - - /** - * Runtime helper for merging v-bind="object" into a VNode's data. - */ - function bindObjectProps ( - data, - tag, - value, - asProp, - isSync - ) { - if (value) { - if (!isObject(value)) { - warn( - 'v-bind without argument expects an Object or Array value', - this - ); - } else { - if (Array.isArray(value)) { - value = toObject(value); - } - var hash; - var loop = function ( key ) { - if ( - key === 'class' || - key === 'style' || - isReservedAttribute(key) - ) { - hash = data; - } else { - var type = data.attrs && data.attrs.type; - hash = asProp || config.mustUseProp(tag, type, key) - ? data.domProps || (data.domProps = {}) - : data.attrs || (data.attrs = {}); - } - var camelizedKey = camelize(key); - var hyphenatedKey = hyphenate(key); - if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) { - hash[key] = value[key]; - - if (isSync) { - var on = data.on || (data.on = {}); - on[("update:" + key)] = function ($event) { - value[key] = $event; - }; - } - } - }; - - for (var key in value) loop( key ); - } - } - return data - } - - /* */ - - /** - * Runtime helper for rendering static trees. - */ - function renderStatic ( - index, - isInFor - ) { - var cached = this._staticTrees || (this._staticTrees = []); - var tree = cached[index]; - // if has already-rendered static tree and not inside v-for, - // we can reuse the same tree. - if (tree && !isInFor) { - return tree - } - // otherwise, render a fresh tree. - tree = cached[index] = this.$options.staticRenderFns[index].call( - this._renderProxy, - null, - this // for render fns generated for functional component templates - ); - markStatic(tree, ("__static__" + index), false); - return tree - } - - /** - * Runtime helper for v-once. - * Effectively it means marking the node as static with a unique key. - */ - function markOnce ( - tree, - index, - key - ) { - markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true); - return tree - } - - function markStatic ( - tree, - key, - isOnce - ) { - if (Array.isArray(tree)) { - for (var i = 0; i < tree.length; i++) { - if (tree[i] && typeof tree[i] !== 'string') { - markStaticNode(tree[i], (key + "_" + i), isOnce); - } - } - } else { - markStaticNode(tree, key, isOnce); - } - } - - function markStaticNode (node, key, isOnce) { - node.isStatic = true; - node.key = key; - node.isOnce = isOnce; - } - - /* */ - - function bindObjectListeners (data, value) { - if (value) { - if (!isPlainObject(value)) { - warn( - 'v-on without argument expects an Object value', - this - ); - } else { - var on = data.on = data.on ? extend({}, data.on) : {}; - for (var key in value) { - var existing = on[key]; - var ours = value[key]; - on[key] = existing ? [].concat(existing, ours) : ours; - } - } - } - return data - } - - /* */ - - function resolveScopedSlots ( - fns, // see flow/vnode - res, - // the following are added in 2.6 - hasDynamicKeys, - contentHashKey - ) { - res = res || { $stable: !hasDynamicKeys }; - for (var i = 0; i < fns.length; i++) { - var slot = fns[i]; - if (Array.isArray(slot)) { - resolveScopedSlots(slot, res, hasDynamicKeys); - } else if (slot) { - // marker for reverse proxying v-slot without scope on this.$slots - if (slot.proxy) { - slot.fn.proxy = true; - } - res[slot.key] = slot.fn; - } - } - if (contentHashKey) { - (res).$key = contentHashKey; - } - return res - } - - /* */ - - function bindDynamicKeys (baseObj, values) { - for (var i = 0; i < values.length; i += 2) { - var key = values[i]; - if (typeof key === 'string' && key) { - baseObj[values[i]] = values[i + 1]; - } else if (key !== '' && key !== null) { - // null is a speical value for explicitly removing a binding - warn( - ("Invalid value for dynamic directive argument (expected string or null): " + key), - this - ); - } - } - return baseObj - } - - // helper to dynamically append modifier runtime markers to event names. - // ensure only append when value is already string, otherwise it will be cast - // to string and cause the type check to miss. - function prependModifier (value, symbol) { - return typeof value === 'string' ? symbol + value : value - } - - /* */ - - function installRenderHelpers (target) { - target._o = markOnce; - target._n = toNumber; - target._s = toString; - target._l = renderList; - target._t = renderSlot; - target._q = looseEqual; - target._i = looseIndexOf; - target._m = renderStatic; - target._f = resolveFilter; - target._k = checkKeyCodes; - target._b = bindObjectProps; - target._v = createTextVNode; - target._e = createEmptyVNode; - target._u = resolveScopedSlots; - target._g = bindObjectListeners; - target._d = bindDynamicKeys; - target._p = prependModifier; - } - - /* */ - - function FunctionalRenderContext ( - data, - props, - children, - parent, - Ctor - ) { - var this$1 = this; - - var options = Ctor.options; - // ensure the createElement function in functional components - // gets a unique context - this is necessary for correct named slot check - var contextVm; - if (hasOwn(parent, '_uid')) { - contextVm = Object.create(parent); - // $flow-disable-line - contextVm._original = parent; - } else { - // the context vm passed in is a functional context as well. - // in this case we want to make sure we are able to get a hold to the - // real context instance. - contextVm = parent; - // $flow-disable-line - parent = parent._original; - } - var isCompiled = isTrue(options._compiled); - var needNormalization = !isCompiled; - - this.data = data; - this.props = props; - this.children = children; - this.parent = parent; - this.listeners = data.on || emptyObject; - this.injections = resolveInject(options.inject, parent); - this.slots = function () { - if (!this$1.$slots) { - normalizeScopedSlots( - data.scopedSlots, - this$1.$slots = resolveSlots(children, parent) - ); - } - return this$1.$slots - }; - - Object.defineProperty(this, 'scopedSlots', ({ - enumerable: true, - get: function get () { - return normalizeScopedSlots(data.scopedSlots, this.slots()) - } - })); - - // support for compiled functional template - if (isCompiled) { - // exposing $options for renderStatic() - this.$options = options; - // pre-resolve slots for renderSlot() - this.$slots = this.slots(); - this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots); - } - - if (options._scopeId) { - this._c = function (a, b, c, d) { - var vnode = createElement(contextVm, a, b, c, d, needNormalization); - if (vnode && !Array.isArray(vnode)) { - vnode.fnScopeId = options._scopeId; - vnode.fnContext = parent; - } - return vnode - }; - } else { - this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); }; - } - } - - installRenderHelpers(FunctionalRenderContext.prototype); - - function createFunctionalComponent ( - Ctor, - propsData, - data, - contextVm, - children - ) { - var options = Ctor.options; - var props = {}; - var propOptions = options.props; - if (isDef(propOptions)) { - for (var key in propOptions) { - props[key] = validateProp(key, propOptions, propsData || emptyObject); - } - } else { - if (isDef(data.attrs)) { mergeProps(props, data.attrs); } - if (isDef(data.props)) { mergeProps(props, data.props); } - } - - var renderContext = new FunctionalRenderContext( - data, - props, - children, - contextVm, - Ctor - ); - - var vnode = options.render.call(null, renderContext._c, renderContext); - - if (vnode instanceof VNode) { - return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext) - } else if (Array.isArray(vnode)) { - var vnodes = normalizeChildren(vnode) || []; - var res = new Array(vnodes.length); - for (var i = 0; i < vnodes.length; i++) { - res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext); - } - return res - } - } - - function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) { - // #7817 clone node before setting fnContext, otherwise if the node is reused - // (e.g. it was from a cached normal slot) the fnContext causes named slots - // that should not be matched to match. - var clone = cloneVNode(vnode); - clone.fnContext = contextVm; - clone.fnOptions = options; - { - (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext; - } - if (data.slot) { - (clone.data || (clone.data = {})).slot = data.slot; - } - return clone - } - - function mergeProps (to, from) { - for (var key in from) { - to[camelize(key)] = from[key]; - } - } - - /* */ - - /* */ - - /* */ - - /* */ - - // inline hooks to be invoked on component VNodes during patch - var componentVNodeHooks = { - init: function init (vnode, hydrating) { - if ( - vnode.componentInstance && - !vnode.componentInstance._isDestroyed && - vnode.data.keepAlive - ) { - // kept-alive components, treat as a patch - var mountedNode = vnode; // work around flow - componentVNodeHooks.prepatch(mountedNode, mountedNode); - } else { - var child = vnode.componentInstance = createComponentInstanceForVnode( - vnode, - activeInstance - ); - child.$mount(hydrating ? vnode.elm : undefined, hydrating); - } - }, - - prepatch: function prepatch (oldVnode, vnode) { - var options = vnode.componentOptions; - var child = vnode.componentInstance = oldVnode.componentInstance; - updateChildComponent( - child, - options.propsData, // updated props - options.listeners, // updated listeners - vnode, // new parent vnode - options.children // new children - ); - }, - - insert: function insert (vnode) { - var context = vnode.context; - var componentInstance = vnode.componentInstance; - if (!componentInstance._isMounted) { - componentInstance._isMounted = true; - callHook(componentInstance, 'mounted'); - } - if (vnode.data.keepAlive) { - if (context._isMounted) { - // vue-router#1212 - // During updates, a kept-alive component's child components may - // change, so directly walking the tree here may call activated hooks - // on incorrect children. Instead we push them into a queue which will - // be processed after the whole patch process ended. - queueActivatedComponent(componentInstance); - } else { - activateChildComponent(componentInstance, true /* direct */); - } - } - }, - - destroy: function destroy (vnode) { - var componentInstance = vnode.componentInstance; - if (!componentInstance._isDestroyed) { - if (!vnode.data.keepAlive) { - componentInstance.$destroy(); - } else { - deactivateChildComponent(componentInstance, true /* direct */); - } - } - } - }; - - var hooksToMerge = Object.keys(componentVNodeHooks); - - function createComponent ( - Ctor, - data, - context, - children, - tag - ) { - if (isUndef(Ctor)) { - return - } - - var baseCtor = context.$options._base; - - // plain options object: turn it into a constructor - if (isObject(Ctor)) { - Ctor = baseCtor.extend(Ctor); - } - - // if at this stage it's not a constructor or an async component factory, - // reject. - if (typeof Ctor !== 'function') { - { - warn(("Invalid Component definition: " + (String(Ctor))), context); - } - return - } - - // async component - var asyncFactory; - if (isUndef(Ctor.cid)) { - asyncFactory = Ctor; - Ctor = resolveAsyncComponent(asyncFactory, baseCtor); - if (Ctor === undefined) { - // return a placeholder node for async component, which is rendered - // as a comment node but preserves all the raw information for the node. - // the information will be used for async server-rendering and hydration. - return createAsyncPlaceholder( - asyncFactory, - data, - context, - children, - tag - ) - } - } - - data = data || {}; - - // resolve constructor options in case global mixins are applied after - // component constructor creation - resolveConstructorOptions(Ctor); - - // transform component v-model data into props & events - if (isDef(data.model)) { - transformModel(Ctor.options, data); - } - - // extract props - var propsData = extractPropsFromVNodeData(data, Ctor, tag); - - // functional component - if (isTrue(Ctor.options.functional)) { - return createFunctionalComponent(Ctor, propsData, data, context, children) - } - - // extract listeners, since these needs to be treated as - // child component listeners instead of DOM listeners - var listeners = data.on; - // replace with listeners with .native modifier - // so it gets processed during parent component patch. - data.on = data.nativeOn; - - if (isTrue(Ctor.options.abstract)) { - // abstract components do not keep anything - // other than props & listeners & slot - - // work around flow - var slot = data.slot; - data = {}; - if (slot) { - data.slot = slot; - } - } - - // install component management hooks onto the placeholder node - installComponentHooks(data); - - // return a placeholder vnode - var name = Ctor.options.name || tag; - var vnode = new VNode( - ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')), - data, undefined, undefined, undefined, context, - { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }, - asyncFactory - ); - - return vnode - } - - function createComponentInstanceForVnode ( - vnode, // we know it's MountedComponentVNode but flow doesn't - parent // activeInstance in lifecycle state - ) { - var options = { - _isComponent: true, - _parentVnode: vnode, - parent: parent - }; - // check inline-template render functions - var inlineTemplate = vnode.data.inlineTemplate; - if (isDef(inlineTemplate)) { - options.render = inlineTemplate.render; - options.staticRenderFns = inlineTemplate.staticRenderFns; - } - return new vnode.componentOptions.Ctor(options) - } - - function installComponentHooks (data) { - var hooks = data.hook || (data.hook = {}); - for (var i = 0; i < hooksToMerge.length; i++) { - var key = hooksToMerge[i]; - var existing = hooks[key]; - var toMerge = componentVNodeHooks[key]; - if (existing !== toMerge && !(existing && existing._merged)) { - hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge; - } - } - } - - function mergeHook$1 (f1, f2) { - var merged = function (a, b) { - // flow complains about extra args which is why we use any - f1(a, b); - f2(a, b); - }; - merged._merged = true; - return merged - } - - // transform component v-model info (value and callback) into - // prop and event handler respectively. - function transformModel (options, data) { - var prop = (options.model && options.model.prop) || 'value'; - var event = (options.model && options.model.event) || 'input' - ;(data.attrs || (data.attrs = {}))[prop] = data.model.value; - var on = data.on || (data.on = {}); - var existing = on[event]; - var callback = data.model.callback; - if (isDef(existing)) { - if ( - Array.isArray(existing) - ? existing.indexOf(callback) === -1 - : existing !== callback - ) { - on[event] = [callback].concat(existing); - } - } else { - on[event] = callback; - } - } - - /* */ - - var SIMPLE_NORMALIZE = 1; - var ALWAYS_NORMALIZE = 2; - - // wrapper function for providing a more flexible interface - // without getting yelled at by flow - function createElement ( - context, - tag, - data, - children, - normalizationType, - alwaysNormalize - ) { - if (Array.isArray(data) || isPrimitive(data)) { - normalizationType = children; - children = data; - data = undefined; - } - if (isTrue(alwaysNormalize)) { - normalizationType = ALWAYS_NORMALIZE; - } - return _createElement(context, tag, data, children, normalizationType) - } - - function _createElement ( - context, - tag, - data, - children, - normalizationType - ) { - if (isDef(data) && isDef((data).__ob__)) { - warn( - "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" + - 'Always create fresh vnode data objects in each render!', - context - ); - return createEmptyVNode() - } - // object syntax in v-bind - if (isDef(data) && isDef(data.is)) { - tag = data.is; - } - if (!tag) { - // in case of component :is set to falsy value - return createEmptyVNode() - } - // warn against non-primitive key - if (isDef(data) && isDef(data.key) && !isPrimitive(data.key) - ) { - { - warn( - 'Avoid using non-primitive value as key, ' + - 'use string/number value instead.', - context - ); - } - } - // support single function children as default scoped slot - if (Array.isArray(children) && - typeof children[0] === 'function' - ) { - data = data || {}; - data.scopedSlots = { default: children[0] }; - children.length = 0; - } - if (normalizationType === ALWAYS_NORMALIZE) { - children = normalizeChildren(children); - } else if (normalizationType === SIMPLE_NORMALIZE) { - children = simpleNormalizeChildren(children); - } - var vnode, ns; - if (typeof tag === 'string') { - var Ctor; - ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag); - if (config.isReservedTag(tag)) { - // platform built-in elements - vnode = new VNode( - config.parsePlatformTagName(tag), data, children, - undefined, undefined, context - ); - } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) { - // component - vnode = createComponent(Ctor, data, context, children, tag); - } else { - // unknown or unlisted namespaced elements - // check at runtime because it may get assigned a namespace when its - // parent normalizes children - vnode = new VNode( - tag, data, children, - undefined, undefined, context - ); - } - } else { - // direct component options / constructor - vnode = createComponent(tag, data, context, children); - } - if (Array.isArray(vnode)) { - return vnode - } else if (isDef(vnode)) { - if (isDef(ns)) { applyNS(vnode, ns); } - if (isDef(data)) { registerDeepBindings(data); } - return vnode - } else { - return createEmptyVNode() - } - } - - function applyNS (vnode, ns, force) { - vnode.ns = ns; - if (vnode.tag === 'foreignObject') { - // use default namespace inside foreignObject - ns = undefined; - force = true; - } - if (isDef(vnode.children)) { - for (var i = 0, l = vnode.children.length; i < l; i++) { - var child = vnode.children[i]; - if (isDef(child.tag) && ( - isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) { - applyNS(child, ns, force); - } - } - } - } - - // ref #5318 - // necessary to ensure parent re-render when deep bindings like :style and - // :class are used on slot nodes - function registerDeepBindings (data) { - if (isObject(data.style)) { - traverse(data.style); - } - if (isObject(data.class)) { - traverse(data.class); - } - } - - /* */ - - function initRender (vm) { - vm._vnode = null; // the root of the child tree - vm._staticTrees = null; // v-once cached trees - var options = vm.$options; - var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree - var renderContext = parentVnode && parentVnode.context; - vm.$slots = resolveSlots(options._renderChildren, renderContext); - vm.$scopedSlots = emptyObject; - // bind the createElement fn to this instance - // so that we get proper render context inside it. - // args order: tag, data, children, normalizationType, alwaysNormalize - // internal version is used by render functions compiled from templates - vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); }; - // normalization is always applied for the public version, used in - // user-written render functions. - vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); }; - - // $attrs & $listeners are exposed for easier HOC creation. - // they need to be reactive so that HOCs using them are always updated - var parentData = parentVnode && parentVnode.data; - - /* istanbul ignore else */ - { - defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () { - !isUpdatingChildComponent && warn("$attrs is readonly.", vm); - }, true); - defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () { - !isUpdatingChildComponent && warn("$listeners is readonly.", vm); - }, true); - } - } - - var currentRenderingInstance = null; - - function renderMixin (Vue) { - // install runtime convenience helpers - installRenderHelpers(Vue.prototype); - - Vue.prototype.$nextTick = function (fn) { - return nextTick(fn, this) - }; - - Vue.prototype._render = function () { - var vm = this; - var ref = vm.$options; - var render = ref.render; - var _parentVnode = ref._parentVnode; - - if (_parentVnode) { - vm.$scopedSlots = normalizeScopedSlots( - _parentVnode.data.scopedSlots, - vm.$slots, - vm.$scopedSlots - ); - } - - // set parent vnode. this allows render functions to have access - // to the data on the placeholder node. - vm.$vnode = _parentVnode; - // render self - var vnode; - try { - // There's no need to maintain a stack becaues all render fns are called - // separately from one another. Nested component's render fns are called - // when parent component is patched. - currentRenderingInstance = vm; - vnode = render.call(vm._renderProxy, vm.$createElement); - } catch (e) { - handleError(e, vm, "render"); - // return error render result, - // or previous vnode to prevent render error causing blank component - /* istanbul ignore else */ - if (vm.$options.renderError) { - try { - vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e); - } catch (e) { - handleError(e, vm, "renderError"); - vnode = vm._vnode; - } - } else { - vnode = vm._vnode; - } - } finally { - currentRenderingInstance = null; - } - // if the returned array contains only a single node, allow it - if (Array.isArray(vnode) && vnode.length === 1) { - vnode = vnode[0]; - } - // return empty vnode in case the render function errored out - if (!(vnode instanceof VNode)) { - if (Array.isArray(vnode)) { - warn( - 'Multiple root nodes returned from render function. Render function ' + - 'should return a single root node.', - vm - ); - } - vnode = createEmptyVNode(); - } - // set parent - vnode.parent = _parentVnode; - return vnode - }; - } - - /* */ - - function ensureCtor (comp, base) { - if ( - comp.__esModule || - (hasSymbol && comp[Symbol.toStringTag] === 'Module') - ) { - comp = comp.default; - } - return isObject(comp) - ? base.extend(comp) - : comp - } - - function createAsyncPlaceholder ( - factory, - data, - context, - children, - tag - ) { - var node = createEmptyVNode(); - node.asyncFactory = factory; - node.asyncMeta = { data: data, context: context, children: children, tag: tag }; - return node - } - - function resolveAsyncComponent ( - factory, - baseCtor - ) { - if (isTrue(factory.error) && isDef(factory.errorComp)) { - return factory.errorComp - } - - if (isDef(factory.resolved)) { - return factory.resolved - } - - var owner = currentRenderingInstance; - if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) { - // already pending - factory.owners.push(owner); - } - - if (isTrue(factory.loading) && isDef(factory.loadingComp)) { - return factory.loadingComp - } - - if (owner && !isDef(factory.owners)) { - var owners = factory.owners = [owner]; - var sync = true; - var timerLoading = null; - var timerTimeout = null - - ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); }); - - var forceRender = function (renderCompleted) { - for (var i = 0, l = owners.length; i < l; i++) { - (owners[i]).$forceUpdate(); - } - - if (renderCompleted) { - owners.length = 0; - if (timerLoading !== null) { - clearTimeout(timerLoading); - timerLoading = null; - } - if (timerTimeout !== null) { - clearTimeout(timerTimeout); - timerTimeout = null; - } - } - }; - - var resolve = once(function (res) { - // cache resolved - factory.resolved = ensureCtor(res, baseCtor); - // invoke callbacks only if this is not a synchronous resolve - // (async resolves are shimmed as synchronous during SSR) - if (!sync) { - forceRender(true); - } else { - owners.length = 0; - } - }); - - var reject = once(function (reason) { - warn( - "Failed to resolve async component: " + (String(factory)) + - (reason ? ("\nReason: " + reason) : '') - ); - if (isDef(factory.errorComp)) { - factory.error = true; - forceRender(true); - } - }); - - var res = factory(resolve, reject); - - if (isObject(res)) { - if (isPromise(res)) { - // () => Promise - if (isUndef(factory.resolved)) { - res.then(resolve, reject); - } - } else if (isPromise(res.component)) { - res.component.then(resolve, reject); - - if (isDef(res.error)) { - factory.errorComp = ensureCtor(res.error, baseCtor); - } - - if (isDef(res.loading)) { - factory.loadingComp = ensureCtor(res.loading, baseCtor); - if (res.delay === 0) { - factory.loading = true; - } else { - timerLoading = setTimeout(function () { - timerLoading = null; - if (isUndef(factory.resolved) && isUndef(factory.error)) { - factory.loading = true; - forceRender(false); - } - }, res.delay || 200); - } - } - - if (isDef(res.timeout)) { - timerTimeout = setTimeout(function () { - timerTimeout = null; - if (isUndef(factory.resolved)) { - reject( - "timeout (" + (res.timeout) + "ms)" - ); - } - }, res.timeout); - } - } - } - - sync = false; - // return in case resolved synchronously - return factory.loading - ? factory.loadingComp - : factory.resolved - } - } - - /* */ - - function isAsyncPlaceholder (node) { - return node.isComment && node.asyncFactory - } - - /* */ - - function getFirstComponentChild (children) { - if (Array.isArray(children)) { - for (var i = 0; i < children.length; i++) { - var c = children[i]; - if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) { - return c - } - } - } - } - - /* */ - - /* */ - - function initEvents (vm) { - vm._events = Object.create(null); - vm._hasHookEvent = false; - // init parent attached events - var listeners = vm.$options._parentListeners; - if (listeners) { - updateComponentListeners(vm, listeners); - } - } - - var target; - - function add (event, fn) { - target.$on(event, fn); - } - - function remove$1 (event, fn) { - target.$off(event, fn); - } - - function createOnceHandler (event, fn) { - var _target = target; - return function onceHandler () { - var res = fn.apply(null, arguments); - if (res !== null) { - _target.$off(event, onceHandler); - } - } - } - - function updateComponentListeners ( - vm, - listeners, - oldListeners - ) { - target = vm; - updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm); - target = undefined; - } - - function eventsMixin (Vue) { - var hookRE = /^hook:/; - Vue.prototype.$on = function (event, fn) { - var vm = this; - if (Array.isArray(event)) { - for (var i = 0, l = event.length; i < l; i++) { - vm.$on(event[i], fn); - } - } else { - (vm._events[event] || (vm._events[event] = [])).push(fn); - // optimize hook:event cost by using a boolean flag marked at registration - // instead of a hash lookup - if (hookRE.test(event)) { - vm._hasHookEvent = true; - } - } - return vm - }; - - Vue.prototype.$once = function (event, fn) { - var vm = this; - function on () { - vm.$off(event, on); - fn.apply(vm, arguments); - } - on.fn = fn; - vm.$on(event, on); - return vm - }; - - Vue.prototype.$off = function (event, fn) { - var vm = this; - // all - if (!arguments.length) { - vm._events = Object.create(null); - return vm - } - // array of events - if (Array.isArray(event)) { - for (var i$1 = 0, l = event.length; i$1 < l; i$1++) { - vm.$off(event[i$1], fn); - } - return vm - } - // specific event - var cbs = vm._events[event]; - if (!cbs) { - return vm - } - if (!fn) { - vm._events[event] = null; - return vm - } - // specific handler - var cb; - var i = cbs.length; - while (i--) { - cb = cbs[i]; - if (cb === fn || cb.fn === fn) { - cbs.splice(i, 1); - break - } - } - return vm - }; - - Vue.prototype.$emit = function (event) { - var vm = this; - { - var lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) { - tip( - "Event \"" + lowerCaseEvent + "\" is emitted in component " + - (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " + - "Note that HTML attributes are case-insensitive and you cannot use " + - "v-on to listen to camelCase events when using in-DOM templates. " + - "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"." - ); - } - } - var cbs = vm._events[event]; - if (cbs) { - cbs = cbs.length > 1 ? toArray(cbs) : cbs; - var args = toArray(arguments, 1); - var info = "event handler for \"" + event + "\""; - for (var i = 0, l = cbs.length; i < l; i++) { - invokeWithErrorHandling(cbs[i], vm, args, vm, info); - } - } - return vm - }; - } - - /* */ - - var activeInstance = null; - var isUpdatingChildComponent = false; - - function setActiveInstance(vm) { - var prevActiveInstance = activeInstance; - activeInstance = vm; - return function () { - activeInstance = prevActiveInstance; - } - } - - function initLifecycle (vm) { - var options = vm.$options; - - // locate first non-abstract parent - var parent = options.parent; - if (parent && !options.abstract) { - while (parent.$options.abstract && parent.$parent) { - parent = parent.$parent; - } - parent.$children.push(vm); - } - - vm.$parent = parent; - vm.$root = parent ? parent.$root : vm; - - vm.$children = []; - vm.$refs = {}; - - vm._watcher = null; - vm._inactive = null; - vm._directInactive = false; - vm._isMounted = false; - vm._isDestroyed = false; - vm._isBeingDestroyed = false; - } - - function lifecycleMixin (Vue) { - Vue.prototype._update = function (vnode, hydrating) { - var vm = this; - var prevEl = vm.$el; - var prevVnode = vm._vnode; - var restoreActiveInstance = setActiveInstance(vm); - vm._vnode = vnode; - // Vue.prototype.__patch__ is injected in entry points - // based on the rendering backend used. - if (!prevVnode) { - // initial render - vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */); - } else { - // updates - vm.$el = vm.__patch__(prevVnode, vnode); - } - restoreActiveInstance(); - // update __vue__ reference - if (prevEl) { - prevEl.__vue__ = null; - } - if (vm.$el) { - vm.$el.__vue__ = vm; - } - // if parent is an HOC, update its $el as well - if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) { - vm.$parent.$el = vm.$el; - } - // updated hook is called by the scheduler to ensure that children are - // updated in a parent's updated hook. - }; - - Vue.prototype.$forceUpdate = function () { - var vm = this; - if (vm._watcher) { - vm._watcher.update(); - } - }; - - Vue.prototype.$destroy = function () { - var vm = this; - if (vm._isBeingDestroyed) { - return - } - callHook(vm, 'beforeDestroy'); - vm._isBeingDestroyed = true; - // remove self from parent - var parent = vm.$parent; - if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) { - remove(parent.$children, vm); - } - // teardown watchers - if (vm._watcher) { - vm._watcher.teardown(); - } - var i = vm._watchers.length; - while (i--) { - vm._watchers[i].teardown(); - } - // remove reference from data ob - // frozen object may not have observer. - if (vm._data.__ob__) { - vm._data.__ob__.vmCount--; - } - // call the last hook... - vm._isDestroyed = true; - // invoke destroy hooks on current rendered tree - vm.__patch__(vm._vnode, null); - // fire destroyed hook - callHook(vm, 'destroyed'); - // turn off all instance listeners. - vm.$off(); - // remove __vue__ reference - if (vm.$el) { - vm.$el.__vue__ = null; - } - // release circular reference (#6759) - if (vm.$vnode) { - vm.$vnode.parent = null; - } - }; - } - - function mountComponent ( - vm, - el, - hydrating - ) { - vm.$el = el; - if (!vm.$options.render) { - vm.$options.render = createEmptyVNode; - { - /* istanbul ignore if */ - if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') || - vm.$options.el || el) { - warn( - 'You are using the runtime-only build of Vue where the template ' + - 'compiler is not available. Either pre-compile the templates into ' + - 'render functions, or use the compiler-included build.', - vm - ); - } else { - warn( - 'Failed to mount component: template or render function not defined.', - vm - ); - } - } - } - callHook(vm, 'beforeMount'); - - var updateComponent; - /* istanbul ignore if */ - if (config.performance && mark) { - updateComponent = function () { - var name = vm._name; - var id = vm._uid; - var startTag = "vue-perf-start:" + id; - var endTag = "vue-perf-end:" + id; - - mark(startTag); - var vnode = vm._render(); - mark(endTag); - measure(("vue " + name + " render"), startTag, endTag); - - mark(startTag); - vm._update(vnode, hydrating); - mark(endTag); - measure(("vue " + name + " patch"), startTag, endTag); - }; - } else { - updateComponent = function () { - vm._update(vm._render(), hydrating); - }; - } - - // we set this to vm._watcher inside the watcher's constructor - // since the watcher's initial patch may call $forceUpdate (e.g. inside child - // component's mounted hook), which relies on vm._watcher being already defined - new Watcher(vm, updateComponent, noop, { - before: function before () { - if (vm._isMounted && !vm._isDestroyed) { - callHook(vm, 'beforeUpdate'); - } - } - }, true /* isRenderWatcher */); - hydrating = false; - - // manually mounted instance, call mounted on self - // mounted is called for render-created child components in its inserted hook - if (vm.$vnode == null) { - vm._isMounted = true; - callHook(vm, 'mounted'); - } - return vm - } - - function updateChildComponent ( - vm, - propsData, - listeners, - parentVnode, - renderChildren - ) { - { - isUpdatingChildComponent = true; - } - - // determine whether component has slot children - // we need to do this before overwriting $options._renderChildren. - - // check if there are dynamic scopedSlots (hand-written or compiled but with - // dynamic slot names). Static scoped slots compiled from template has the - // "$stable" marker. - var newScopedSlots = parentVnode.data.scopedSlots; - var oldScopedSlots = vm.$scopedSlots; - var hasDynamicScopedSlot = !!( - (newScopedSlots && !newScopedSlots.$stable) || - (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) || - (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) - ); - - // Any static slot children from the parent may have changed during parent's - // update. Dynamic scoped slots may also have changed. In such cases, a forced - // update is necessary to ensure correctness. - var needsForceUpdate = !!( - renderChildren || // has new static slots - vm.$options._renderChildren || // has old static slots - hasDynamicScopedSlot - ); - - vm.$options._parentVnode = parentVnode; - vm.$vnode = parentVnode; // update vm's placeholder node without re-render - - if (vm._vnode) { // update child tree's parent - vm._vnode.parent = parentVnode; - } - vm.$options._renderChildren = renderChildren; - - // update $attrs and $listeners hash - // these are also reactive so they may trigger child update if the child - // used them during render - vm.$attrs = parentVnode.data.attrs || emptyObject; - vm.$listeners = listeners || emptyObject; - - // update props - if (propsData && vm.$options.props) { - toggleObserving(false); - var props = vm._props; - var propKeys = vm.$options._propKeys || []; - for (var i = 0; i < propKeys.length; i++) { - var key = propKeys[i]; - var propOptions = vm.$options.props; // wtf flow? - props[key] = validateProp(key, propOptions, propsData, vm); - } - toggleObserving(true); - // keep a copy of raw propsData - vm.$options.propsData = propsData; - } - - // update listeners - listeners = listeners || emptyObject; - var oldListeners = vm.$options._parentListeners; - vm.$options._parentListeners = listeners; - updateComponentListeners(vm, listeners, oldListeners); - - // resolve slots + force update if has children - if (needsForceUpdate) { - vm.$slots = resolveSlots(renderChildren, parentVnode.context); - vm.$forceUpdate(); - } - - { - isUpdatingChildComponent = false; - } - } - - function isInInactiveTree (vm) { - while (vm && (vm = vm.$parent)) { - if (vm._inactive) { return true } - } - return false - } - - function activateChildComponent (vm, direct) { - if (direct) { - vm._directInactive = false; - if (isInInactiveTree(vm)) { - return - } - } else if (vm._directInactive) { - return - } - if (vm._inactive || vm._inactive === null) { - vm._inactive = false; - for (var i = 0; i < vm.$children.length; i++) { - activateChildComponent(vm.$children[i]); - } - callHook(vm, 'activated'); - } - } - - function deactivateChildComponent (vm, direct) { - if (direct) { - vm._directInactive = true; - if (isInInactiveTree(vm)) { - return - } - } - if (!vm._inactive) { - vm._inactive = true; - for (var i = 0; i < vm.$children.length; i++) { - deactivateChildComponent(vm.$children[i]); - } - callHook(vm, 'deactivated'); - } - } - - function callHook (vm, hook) { - // #7573 disable dep collection when invoking lifecycle hooks - pushTarget(); - var handlers = vm.$options[hook]; - var info = hook + " hook"; - if (handlers) { - for (var i = 0, j = handlers.length; i < j; i++) { - invokeWithErrorHandling(handlers[i], vm, null, vm, info); - } - } - if (vm._hasHookEvent) { - vm.$emit('hook:' + hook); - } - popTarget(); - } - - /* */ - - var MAX_UPDATE_COUNT = 100; - - var queue = []; - var activatedChildren = []; - var has = {}; - var circular = {}; - var waiting = false; - var flushing = false; - var index = 0; - - /** - * Reset the scheduler's state. - */ - function resetSchedulerState () { - index = queue.length = activatedChildren.length = 0; - has = {}; - { - circular = {}; - } - waiting = flushing = false; - } - - // Async edge case #6566 requires saving the timestamp when event listeners are - // attached. However, calling performance.now() has a perf overhead especially - // if the page has thousands of event listeners. Instead, we take a timestamp - // every time the scheduler flushes and use that for all event listeners - // attached during that flush. - var currentFlushTimestamp = 0; - - // Async edge case fix requires storing an event listener's attach timestamp. - var getNow = Date.now; - - // Determine what event timestamp the browser is using. Annoyingly, the - // timestamp can either be hi-res (relative to page load) or low-res - // (relative to UNIX epoch), so in order to compare time we have to use the - // same timestamp type when saving the flush timestamp. - // All IE versions use low-res event timestamps, and have problematic clock - // implementations (#9632) - if (inBrowser && !isIE) { - var performance = window.performance; - if ( - performance && - typeof performance.now === 'function' && - getNow() > document.createEvent('Event').timeStamp - ) { - // if the event timestamp, although evaluated AFTER the Date.now(), is - // smaller than it, it means the event is using a hi-res timestamp, - // and we need to use the hi-res version for event listener timestamps as - // well. - getNow = function () { return performance.now(); }; - } - } - - /** - * Flush both queues and run the watchers. - */ - function flushSchedulerQueue () { - currentFlushTimestamp = getNow(); - flushing = true; - var watcher, id; - - // Sort queue before flush. - // This ensures that: - // 1. Components are updated from parent to child. (because parent is always - // created before the child) - // 2. A component's user watchers are run before its render watcher (because - // user watchers are created before the render watcher) - // 3. If a component is destroyed during a parent component's watcher run, - // its watchers can be skipped. - queue.sort(function (a, b) { return a.id - b.id; }); - - // do not cache length because more watchers might be pushed - // as we run existing watchers - for (index = 0; index < queue.length; index++) { - watcher = queue[index]; - if (watcher.before) { - watcher.before(); - } - id = watcher.id; - has[id] = null; - watcher.run(); - // in dev build, check and stop circular updates. - if (has[id] != null) { - circular[id] = (circular[id] || 0) + 1; - if (circular[id] > MAX_UPDATE_COUNT) { - warn( - 'You may have an infinite update loop ' + ( - watcher.user - ? ("in watcher with expression \"" + (watcher.expression) + "\"") - : "in a component render function." - ), - watcher.vm - ); - break - } - } - } - - // keep copies of post queues before resetting state - var activatedQueue = activatedChildren.slice(); - var updatedQueue = queue.slice(); - - resetSchedulerState(); - - // call component updated and activated hooks - callActivatedHooks(activatedQueue); - callUpdatedHooks(updatedQueue); - - // devtool hook - /* istanbul ignore if */ - if (devtools && config.devtools) { - devtools.emit('flush'); - } - } - - function callUpdatedHooks (queue) { - var i = queue.length; - while (i--) { - var watcher = queue[i]; - var vm = watcher.vm; - if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) { - callHook(vm, 'updated'); - } - } - } - - /** - * Queue a kept-alive component that was activated during patch. - * The queue will be processed after the entire tree has been patched. - */ - function queueActivatedComponent (vm) { - // setting _inactive to false here so that a render function can - // rely on checking whether it's in an inactive tree (e.g. router-view) - vm._inactive = false; - activatedChildren.push(vm); - } - - function callActivatedHooks (queue) { - for (var i = 0; i < queue.length; i++) { - queue[i]._inactive = true; - activateChildComponent(queue[i], true /* true */); - } - } - - /** - * Push a watcher into the watcher queue. - * Jobs with duplicate IDs will be skipped unless it's - * pushed when the queue is being flushed. - */ - function queueWatcher (watcher) { - var id = watcher.id; - if (has[id] == null) { - has[id] = true; - if (!flushing) { - queue.push(watcher); - } else { - // if already flushing, splice the watcher based on its id - // if already past its id, it will be run next immediately. - var i = queue.length - 1; - while (i > index && queue[i].id > watcher.id) { - i--; - } - queue.splice(i + 1, 0, watcher); - } - // queue the flush - if (!waiting) { - waiting = true; - - if (!config.async) { - flushSchedulerQueue(); - return - } - nextTick(flushSchedulerQueue); - } - } - } - - /* */ - - - - var uid$2 = 0; - - /** - * A watcher parses an expression, collects dependencies, - * and fires callback when the expression value changes. - * This is used for both the $watch() api and directives. - */ - var Watcher = function Watcher ( - vm, - expOrFn, - cb, - options, - isRenderWatcher - ) { - this.vm = vm; - if (isRenderWatcher) { - vm._watcher = this; - } - vm._watchers.push(this); - // options - if (options) { - this.deep = !!options.deep; - this.user = !!options.user; - this.lazy = !!options.lazy; - this.sync = !!options.sync; - this.before = options.before; - } else { - this.deep = this.user = this.lazy = this.sync = false; - } - this.cb = cb; - this.id = ++uid$2; // uid for batching - this.active = true; - this.dirty = this.lazy; // for lazy watchers - this.deps = []; - this.newDeps = []; - this.depIds = new _Set(); - this.newDepIds = new _Set(); - this.expression = expOrFn.toString(); - // parse expression for getter - if (typeof expOrFn === 'function') { - this.getter = expOrFn; - } else { - this.getter = parsePath(expOrFn); - if (!this.getter) { - this.getter = noop; - warn( - "Failed watching path: \"" + expOrFn + "\" " + - 'Watcher only accepts simple dot-delimited paths. ' + - 'For full control, use a function instead.', - vm - ); - } - } - this.value = this.lazy - ? undefined - : this.get(); - }; - - /** - * Evaluate the getter, and re-collect dependencies. - */ - Watcher.prototype.get = function get () { - pushTarget(this); - var value; - var vm = this.vm; - try { - value = this.getter.call(vm, vm); - } catch (e) { - if (this.user) { - handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\"")); - } else { - throw e - } - } finally { - // "touch" every property so they are all tracked as - // dependencies for deep watching - if (this.deep) { - traverse(value); - } - popTarget(); - this.cleanupDeps(); - } - return value - }; - - /** - * Add a dependency to this directive. - */ - Watcher.prototype.addDep = function addDep (dep) { - var id = dep.id; - if (!this.newDepIds.has(id)) { - this.newDepIds.add(id); - this.newDeps.push(dep); - if (!this.depIds.has(id)) { - dep.addSub(this); - } - } - }; - - /** - * Clean up for dependency collection. - */ - Watcher.prototype.cleanupDeps = function cleanupDeps () { - var i = this.deps.length; - while (i--) { - var dep = this.deps[i]; - if (!this.newDepIds.has(dep.id)) { - dep.removeSub(this); - } - } - var tmp = this.depIds; - this.depIds = this.newDepIds; - this.newDepIds = tmp; - this.newDepIds.clear(); - tmp = this.deps; - this.deps = this.newDeps; - this.newDeps = tmp; - this.newDeps.length = 0; - }; - - /** - * Subscriber interface. - * Will be called when a dependency changes. - */ - Watcher.prototype.update = function update () { - /* istanbul ignore else */ - if (this.lazy) { - this.dirty = true; - } else if (this.sync) { - this.run(); - } else { - queueWatcher(this); - } - }; - - /** - * Scheduler job interface. - * Will be called by the scheduler. - */ - Watcher.prototype.run = function run () { - if (this.active) { - var value = this.get(); - if ( - value !== this.value || - // Deep watchers and watchers on Object/Arrays should fire even - // when the value is the same, because the value may - // have mutated. - isObject(value) || - this.deep - ) { - // set new value - var oldValue = this.value; - this.value = value; - if (this.user) { - try { - this.cb.call(this.vm, value, oldValue); - } catch (e) { - handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\"")); - } - } else { - this.cb.call(this.vm, value, oldValue); - } - } - } - }; - - /** - * Evaluate the value of the watcher. - * This only gets called for lazy watchers. - */ - Watcher.prototype.evaluate = function evaluate () { - this.value = this.get(); - this.dirty = false; - }; - - /** - * Depend on all deps collected by this watcher. - */ - Watcher.prototype.depend = function depend () { - var i = this.deps.length; - while (i--) { - this.deps[i].depend(); - } - }; - - /** - * Remove self from all dependencies' subscriber list. - */ - Watcher.prototype.teardown = function teardown () { - if (this.active) { - // remove self from vm's watcher list - // this is a somewhat expensive operation so we skip it - // if the vm is being destroyed. - if (!this.vm._isBeingDestroyed) { - remove(this.vm._watchers, this); - } - var i = this.deps.length; - while (i--) { - this.deps[i].removeSub(this); - } - this.active = false; - } - }; - - /* */ - - var sharedPropertyDefinition = { - enumerable: true, - configurable: true, - get: noop, - set: noop - }; - - function proxy (target, sourceKey, key) { - sharedPropertyDefinition.get = function proxyGetter () { - return this[sourceKey][key] - }; - sharedPropertyDefinition.set = function proxySetter (val) { - this[sourceKey][key] = val; - }; - Object.defineProperty(target, key, sharedPropertyDefinition); - } - - function initState (vm) { - vm._watchers = []; - var opts = vm.$options; - if (opts.props) { initProps(vm, opts.props); } - if (opts.methods) { initMethods(vm, opts.methods); } - if (opts.data) { - initData(vm); - } else { - observe(vm._data = {}, true /* asRootData */); - } - if (opts.computed) { initComputed(vm, opts.computed); } - if (opts.watch && opts.watch !== nativeWatch) { - initWatch(vm, opts.watch); - } - } - - function initProps (vm, propsOptions) { - var propsData = vm.$options.propsData || {}; - var props = vm._props = {}; - // cache prop keys so that future props updates can iterate using Array - // instead of dynamic object key enumeration. - var keys = vm.$options._propKeys = []; - var isRoot = !vm.$parent; - // root instance props should be converted - if (!isRoot) { - toggleObserving(false); - } - var loop = function ( key ) { - keys.push(key); - var value = validateProp(key, propsOptions, propsData, vm); - /* istanbul ignore else */ - { - var hyphenatedKey = hyphenate(key); - if (isReservedAttribute(hyphenatedKey) || - config.isReservedAttr(hyphenatedKey)) { - warn( - ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."), - vm - ); - } - defineReactive$$1(props, key, value, function () { - if (!isRoot && !isUpdatingChildComponent) { - warn( - "Avoid mutating a prop directly since the value will be " + - "overwritten whenever the parent component re-renders. " + - "Instead, use a data or computed property based on the prop's " + - "value. Prop being mutated: \"" + key + "\"", - vm - ); - } - }); - } - // static props are already proxied on the component's prototype - // during Vue.extend(). We only need to proxy props defined at - // instantiation here. - if (!(key in vm)) { - proxy(vm, "_props", key); - } - }; - - for (var key in propsOptions) loop( key ); - toggleObserving(true); - } - - function initData (vm) { - var data = vm.$options.data; - data = vm._data = typeof data === 'function' - ? getData(data, vm) - : data || {}; - if (!isPlainObject(data)) { - data = {}; - warn( - 'data functions should return an object:\n' + - 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', - vm - ); - } - // proxy data on instance - var keys = Object.keys(data); - var props = vm.$options.props; - var methods = vm.$options.methods; - var i = keys.length; - while (i--) { - var key = keys[i]; - { - if (methods && hasOwn(methods, key)) { - warn( - ("Method \"" + key + "\" has already been defined as a data property."), - vm - ); - } - } - if (props && hasOwn(props, key)) { - warn( - "The data property \"" + key + "\" is already declared as a prop. " + - "Use prop default value instead.", - vm - ); - } else if (!isReserved(key)) { - proxy(vm, "_data", key); - } - } - // observe data - observe(data, true /* asRootData */); - } - - function getData (data, vm) { - // #7573 disable dep collection when invoking data getters - pushTarget(); - try { - return data.call(vm, vm) - } catch (e) { - handleError(e, vm, "data()"); - return {} - } finally { - popTarget(); - } - } - - var computedWatcherOptions = { lazy: true }; - - function initComputed (vm, computed) { - // $flow-disable-line - var watchers = vm._computedWatchers = Object.create(null); - // computed properties are just getters during SSR - var isSSR = isServerRendering(); - - for (var key in computed) { - var userDef = computed[key]; - var getter = typeof userDef === 'function' ? userDef : userDef.get; - if (getter == null) { - warn( - ("Getter is missing for computed property \"" + key + "\"."), - vm - ); - } - - if (!isSSR) { - // create internal watcher for the computed property. - watchers[key] = new Watcher( - vm, - getter || noop, - noop, - computedWatcherOptions - ); - } - - // component-defined computed properties are already defined on the - // component prototype. We only need to define computed properties defined - // at instantiation here. - if (!(key in vm)) { - defineComputed(vm, key, userDef); - } else { - if (key in vm.$data) { - warn(("The computed property \"" + key + "\" is already defined in data."), vm); - } else if (vm.$options.props && key in vm.$options.props) { - warn(("The computed property \"" + key + "\" is already defined as a prop."), vm); - } - } - } - } - - function defineComputed ( - target, - key, - userDef - ) { - var shouldCache = !isServerRendering(); - if (typeof userDef === 'function') { - sharedPropertyDefinition.get = shouldCache - ? createComputedGetter(key) - : createGetterInvoker(userDef); - sharedPropertyDefinition.set = noop; - } else { - sharedPropertyDefinition.get = userDef.get - ? shouldCache && userDef.cache !== false - ? createComputedGetter(key) - : createGetterInvoker(userDef.get) - : noop; - sharedPropertyDefinition.set = userDef.set || noop; - } - if (sharedPropertyDefinition.set === noop) { - sharedPropertyDefinition.set = function () { - warn( - ("Computed property \"" + key + "\" was assigned to but it has no setter."), - this - ); - }; - } - Object.defineProperty(target, key, sharedPropertyDefinition); - } - - function createComputedGetter (key) { - return function computedGetter () { - var watcher = this._computedWatchers && this._computedWatchers[key]; - if (watcher) { - if (watcher.dirty) { - watcher.evaluate(); - } - if (Dep.target) { - watcher.depend(); - } - return watcher.value - } - } - } - - function createGetterInvoker(fn) { - return function computedGetter () { - return fn.call(this, this) - } - } - - function initMethods (vm, methods) { - var props = vm.$options.props; - for (var key in methods) { - { - if (typeof methods[key] !== 'function') { - warn( - "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " + - "Did you reference the function correctly?", - vm - ); - } - if (props && hasOwn(props, key)) { - warn( - ("Method \"" + key + "\" has already been defined as a prop."), - vm - ); - } - if ((key in vm) && isReserved(key)) { - warn( - "Method \"" + key + "\" conflicts with an existing Vue instance method. " + - "Avoid defining component methods that start with _ or $." - ); - } - } - vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm); - } - } - - function initWatch (vm, watch) { - for (var key in watch) { - var handler = watch[key]; - if (Array.isArray(handler)) { - for (var i = 0; i < handler.length; i++) { - createWatcher(vm, key, handler[i]); - } - } else { - createWatcher(vm, key, handler); - } - } - } - - function createWatcher ( - vm, - expOrFn, - handler, - options - ) { - if (isPlainObject(handler)) { - options = handler; - handler = handler.handler; - } - if (typeof handler === 'string') { - handler = vm[handler]; - } - return vm.$watch(expOrFn, handler, options) - } - - function stateMixin (Vue) { - // flow somehow has problems with directly declared definition object - // when using Object.defineProperty, so we have to procedurally build up - // the object here. - var dataDef = {}; - dataDef.get = function () { return this._data }; - var propsDef = {}; - propsDef.get = function () { return this._props }; - { - dataDef.set = function () { - warn( - 'Avoid replacing instance root $data. ' + - 'Use nested data properties instead.', - this - ); - }; - propsDef.set = function () { - warn("$props is readonly.", this); - }; - } - Object.defineProperty(Vue.prototype, '$data', dataDef); - Object.defineProperty(Vue.prototype, '$props', propsDef); - - Vue.prototype.$set = set; - Vue.prototype.$delete = del; - - Vue.prototype.$watch = function ( - expOrFn, - cb, - options - ) { - var vm = this; - if (isPlainObject(cb)) { - return createWatcher(vm, expOrFn, cb, options) - } - options = options || {}; - options.user = true; - var watcher = new Watcher(vm, expOrFn, cb, options); - if (options.immediate) { - try { - cb.call(vm, watcher.value); - } catch (error) { - handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\"")); - } - } - return function unwatchFn () { - watcher.teardown(); - } - }; - } - - /* */ - - var uid$3 = 0; - - function initMixin (Vue) { - Vue.prototype._init = function (options) { - var vm = this; - // a uid - vm._uid = uid$3++; - - var startTag, endTag; - /* istanbul ignore if */ - if (config.performance && mark) { - startTag = "vue-perf-start:" + (vm._uid); - endTag = "vue-perf-end:" + (vm._uid); - mark(startTag); - } - - // a flag to avoid this being observed - vm._isVue = true; - // merge options - if (options && options._isComponent) { - // optimize internal component instantiation - // since dynamic options merging is pretty slow, and none of the - // internal component options needs special treatment. - initInternalComponent(vm, options); - } else { - vm.$options = mergeOptions( - resolveConstructorOptions(vm.constructor), - options || {}, - vm - ); - } - /* istanbul ignore else */ - { - initProxy(vm); - } - // expose real self - vm._self = vm; - initLifecycle(vm); - initEvents(vm); - initRender(vm); - callHook(vm, 'beforeCreate'); - initInjections(vm); // resolve injections before data/props - initState(vm); - initProvide(vm); // resolve provide after data/props - callHook(vm, 'created'); - - /* istanbul ignore if */ - if (config.performance && mark) { - vm._name = formatComponentName(vm, false); - mark(endTag); - measure(("vue " + (vm._name) + " init"), startTag, endTag); - } - - if (vm.$options.el) { - vm.$mount(vm.$options.el); - } - }; - } - - function initInternalComponent (vm, options) { - var opts = vm.$options = Object.create(vm.constructor.options); - // doing this because it's faster than dynamic enumeration. - var parentVnode = options._parentVnode; - opts.parent = options.parent; - opts._parentVnode = parentVnode; - - var vnodeComponentOptions = parentVnode.componentOptions; - opts.propsData = vnodeComponentOptions.propsData; - opts._parentListeners = vnodeComponentOptions.listeners; - opts._renderChildren = vnodeComponentOptions.children; - opts._componentTag = vnodeComponentOptions.tag; - - if (options.render) { - opts.render = options.render; - opts.staticRenderFns = options.staticRenderFns; - } - } - - function resolveConstructorOptions (Ctor) { - var options = Ctor.options; - if (Ctor.super) { - var superOptions = resolveConstructorOptions(Ctor.super); - var cachedSuperOptions = Ctor.superOptions; - if (superOptions !== cachedSuperOptions) { - // super option changed, - // need to resolve new options. - Ctor.superOptions = superOptions; - // check if there are any late-modified/attached options (#4976) - var modifiedOptions = resolveModifiedOptions(Ctor); - // update base extend options - if (modifiedOptions) { - extend(Ctor.extendOptions, modifiedOptions); - } - options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions); - if (options.name) { - options.components[options.name] = Ctor; - } - } - } - return options - } - - function resolveModifiedOptions (Ctor) { - var modified; - var latest = Ctor.options; - var sealed = Ctor.sealedOptions; - for (var key in latest) { - if (latest[key] !== sealed[key]) { - if (!modified) { modified = {}; } - modified[key] = latest[key]; - } - } - return modified - } - - function Vue (options) { - if (!(this instanceof Vue) - ) { - warn('Vue is a constructor and should be called with the `new` keyword'); - } - this._init(options); - } - - initMixin(Vue); - stateMixin(Vue); - eventsMixin(Vue); - lifecycleMixin(Vue); - renderMixin(Vue); - - /* */ - - function initUse (Vue) { - Vue.use = function (plugin) { - var installedPlugins = (this._installedPlugins || (this._installedPlugins = [])); - if (installedPlugins.indexOf(plugin) > -1) { - return this - } - - // additional parameters - var args = toArray(arguments, 1); - args.unshift(this); - if (typeof plugin.install === 'function') { - plugin.install.apply(plugin, args); - } else if (typeof plugin === 'function') { - plugin.apply(null, args); - } - installedPlugins.push(plugin); - return this - }; - } - - /* */ - - function initMixin$1 (Vue) { - Vue.mixin = function (mixin) { - this.options = mergeOptions(this.options, mixin); - return this - }; - } - - /* */ - - function initExtend (Vue) { - /** - * Each instance constructor, including Vue, has a unique - * cid. This enables us to create wrapped "child - * constructors" for prototypal inheritance and cache them. - */ - Vue.cid = 0; - var cid = 1; - - /** - * Class inheritance - */ - Vue.extend = function (extendOptions) { - extendOptions = extendOptions || {}; - var Super = this; - var SuperId = Super.cid; - var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {}); - if (cachedCtors[SuperId]) { - return cachedCtors[SuperId] - } - - var name = extendOptions.name || Super.options.name; - if (name) { - validateComponentName(name); - } - - var Sub = function VueComponent (options) { - this._init(options); - }; - Sub.prototype = Object.create(Super.prototype); - Sub.prototype.constructor = Sub; - Sub.cid = cid++; - Sub.options = mergeOptions( - Super.options, - extendOptions - ); - Sub['super'] = Super; - - // For props and computed properties, we define the proxy getters on - // the Vue instances at extension time, on the extended prototype. This - // avoids Object.defineProperty calls for each instance created. - if (Sub.options.props) { - initProps$1(Sub); - } - if (Sub.options.computed) { - initComputed$1(Sub); - } - - // allow further extension/mixin/plugin usage - Sub.extend = Super.extend; - Sub.mixin = Super.mixin; - Sub.use = Super.use; - - // create asset registers, so extended classes - // can have their private assets too. - ASSET_TYPES.forEach(function (type) { - Sub[type] = Super[type]; - }); - // enable recursive self-lookup - if (name) { - Sub.options.components[name] = Sub; - } - - // keep a reference to the super options at extension time. - // later at instantiation we can check if Super's options have - // been updated. - Sub.superOptions = Super.options; - Sub.extendOptions = extendOptions; - Sub.sealedOptions = extend({}, Sub.options); - - // cache constructor - cachedCtors[SuperId] = Sub; - return Sub - }; - } - - function initProps$1 (Comp) { - var props = Comp.options.props; - for (var key in props) { - proxy(Comp.prototype, "_props", key); - } - } - - function initComputed$1 (Comp) { - var computed = Comp.options.computed; - for (var key in computed) { - defineComputed(Comp.prototype, key, computed[key]); - } - } - - /* */ - - function initAssetRegisters (Vue) { - /** - * Create asset registration methods. - */ - ASSET_TYPES.forEach(function (type) { - Vue[type] = function ( - id, - definition - ) { - if (!definition) { - return this.options[type + 's'][id] - } else { - /* istanbul ignore if */ - if (type === 'component') { - validateComponentName(id); - } - if (type === 'component' && isPlainObject(definition)) { - definition.name = definition.name || id; - definition = this.options._base.extend(definition); - } - if (type === 'directive' && typeof definition === 'function') { - definition = { bind: definition, update: definition }; - } - this.options[type + 's'][id] = definition; - return definition - } - }; - }); - } - - /* */ - - - - function getComponentName (opts) { - return opts && (opts.Ctor.options.name || opts.tag) - } - - function matches (pattern, name) { - if (Array.isArray(pattern)) { - return pattern.indexOf(name) > -1 - } else if (typeof pattern === 'string') { - return pattern.split(',').indexOf(name) > -1 - } else if (isRegExp(pattern)) { - return pattern.test(name) - } - /* istanbul ignore next */ - return false - } - - function pruneCache (keepAliveInstance, filter) { - var cache = keepAliveInstance.cache; - var keys = keepAliveInstance.keys; - var _vnode = keepAliveInstance._vnode; - for (var key in cache) { - var cachedNode = cache[key]; - if (cachedNode) { - var name = getComponentName(cachedNode.componentOptions); - if (name && !filter(name)) { - pruneCacheEntry(cache, key, keys, _vnode); - } - } - } - } - - function pruneCacheEntry ( - cache, - key, - keys, - current - ) { - var cached$$1 = cache[key]; - if (cached$$1 && (!current || cached$$1.tag !== current.tag)) { - cached$$1.componentInstance.$destroy(); - } - cache[key] = null; - remove(keys, key); - } - - var patternTypes = [String, RegExp, Array]; - - var KeepAlive = { - name: 'keep-alive', - abstract: true, - - props: { - include: patternTypes, - exclude: patternTypes, - max: [String, Number] - }, - - created: function created () { - this.cache = Object.create(null); - this.keys = []; - }, - - destroyed: function destroyed () { - for (var key in this.cache) { - pruneCacheEntry(this.cache, key, this.keys); - } - }, - - mounted: function mounted () { - var this$1 = this; - - this.$watch('include', function (val) { - pruneCache(this$1, function (name) { return matches(val, name); }); - }); - this.$watch('exclude', function (val) { - pruneCache(this$1, function (name) { return !matches(val, name); }); - }); - }, - - render: function render () { - var slot = this.$slots.default; - var vnode = getFirstComponentChild(slot); - var componentOptions = vnode && vnode.componentOptions; - if (componentOptions) { - // check pattern - var name = getComponentName(componentOptions); - var ref = this; - var include = ref.include; - var exclude = ref.exclude; - if ( - // not included - (include && (!name || !matches(include, name))) || - // excluded - (exclude && name && matches(exclude, name)) - ) { - return vnode - } - - var ref$1 = this; - var cache = ref$1.cache; - var keys = ref$1.keys; - var key = vnode.key == null - // same constructor may get registered as different local components - // so cid alone is not enough (#3269) - ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '') - : vnode.key; - if (cache[key]) { - vnode.componentInstance = cache[key].componentInstance; - // make current key freshest - remove(keys, key); - keys.push(key); - } else { - cache[key] = vnode; - keys.push(key); - // prune oldest entry - if (this.max && keys.length > parseInt(this.max)) { - pruneCacheEntry(cache, keys[0], keys, this._vnode); - } - } - - vnode.data.keepAlive = true; - } - return vnode || (slot && slot[0]) - } - }; - - var builtInComponents = { - KeepAlive: KeepAlive - }; - - /* */ - - function initGlobalAPI (Vue) { - // config - var configDef = {}; - configDef.get = function () { return config; }; - { - configDef.set = function () { - warn( - 'Do not replace the Vue.config object, set individual fields instead.' - ); - }; - } - Object.defineProperty(Vue, 'config', configDef); - - // exposed util methods. - // NOTE: these are not considered part of the public API - avoid relying on - // them unless you are aware of the risk. - Vue.util = { - warn: warn, - extend: extend, - mergeOptions: mergeOptions, - defineReactive: defineReactive$$1 - }; - - Vue.set = set; - Vue.delete = del; - Vue.nextTick = nextTick; - - // 2.6 explicit observable API - Vue.observable = function (obj) { - observe(obj); - return obj - }; - - Vue.options = Object.create(null); - ASSET_TYPES.forEach(function (type) { - Vue.options[type + 's'] = Object.create(null); - }); - - // this is used to identify the "base" constructor to extend all plain-object - // components with in Weex's multi-instance scenarios. - Vue.options._base = Vue; - - extend(Vue.options.components, builtInComponents); - - initUse(Vue); - initMixin$1(Vue); - initExtend(Vue); - initAssetRegisters(Vue); - } - - initGlobalAPI(Vue); - - Object.defineProperty(Vue.prototype, '$isServer', { - get: isServerRendering - }); - - Object.defineProperty(Vue.prototype, '$ssrContext', { - get: function get () { - /* istanbul ignore next */ - return this.$vnode && this.$vnode.ssrContext - } - }); - - // expose FunctionalRenderContext for ssr runtime helper installation - Object.defineProperty(Vue, 'FunctionalRenderContext', { - value: FunctionalRenderContext - }); - - Vue.version = '2.6.10'; - - /* */ - - // these are reserved for web because they are directly compiled away - // during template compilation - var isReservedAttr = makeMap('style,class'); - - // attributes that should be using props for binding - var acceptValue = makeMap('input,textarea,option,select,progress'); - var mustUseProp = function (tag, type, attr) { - return ( - (attr === 'value' && acceptValue(tag)) && type !== 'button' || - (attr === 'selected' && tag === 'option') || - (attr === 'checked' && tag === 'input') || - (attr === 'muted' && tag === 'video') - ) - }; - - var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck'); - - var isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only'); - - var convertEnumeratedValue = function (key, value) { - return isFalsyAttrValue(value) || value === 'false' - ? 'false' - // allow arbitrary string value for contenteditable - : key === 'contenteditable' && isValidContentEditableValue(value) - ? value - : 'true' - }; - - var isBooleanAttr = makeMap( - 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' + - 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' + - 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' + - 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' + - 'required,reversed,scoped,seamless,selected,sortable,translate,' + - 'truespeed,typemustmatch,visible' - ); - - var xlinkNS = 'http://www.w3.org/1999/xlink'; - - var isXlink = function (name) { - return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink' - }; - - var getXlinkProp = function (name) { - return isXlink(name) ? name.slice(6, name.length) : '' - }; - - var isFalsyAttrValue = function (val) { - return val == null || val === false - }; - - /* */ - - function genClassForVnode (vnode) { - var data = vnode.data; - var parentNode = vnode; - var childNode = vnode; - while (isDef(childNode.componentInstance)) { - childNode = childNode.componentInstance._vnode; - if (childNode && childNode.data) { - data = mergeClassData(childNode.data, data); - } - } - while (isDef(parentNode = parentNode.parent)) { - if (parentNode && parentNode.data) { - data = mergeClassData(data, parentNode.data); - } - } - return renderClass(data.staticClass, data.class) - } - - function mergeClassData (child, parent) { - return { - staticClass: concat(child.staticClass, parent.staticClass), - class: isDef(child.class) - ? [child.class, parent.class] - : parent.class - } - } - - function renderClass ( - staticClass, - dynamicClass - ) { - if (isDef(staticClass) || isDef(dynamicClass)) { - return concat(staticClass, stringifyClass(dynamicClass)) - } - /* istanbul ignore next */ - return '' - } - - function concat (a, b) { - return a ? b ? (a + ' ' + b) : a : (b || '') - } - - function stringifyClass (value) { - if (Array.isArray(value)) { - return stringifyArray(value) - } - if (isObject(value)) { - return stringifyObject(value) - } - if (typeof value === 'string') { - return value - } - /* istanbul ignore next */ - return '' - } - - function stringifyArray (value) { - var res = ''; - var stringified; - for (var i = 0, l = value.length; i < l; i++) { - if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') { - if (res) { res += ' '; } - res += stringified; - } - } - return res - } - - function stringifyObject (value) { - var res = ''; - for (var key in value) { - if (value[key]) { - if (res) { res += ' '; } - res += key; - } - } - return res - } - - /* */ - - var namespaceMap = { - svg: 'http://www.w3.org/2000/svg', - math: 'http://www.w3.org/1998/Math/MathML' - }; - - var isHTMLTag = makeMap( - 'html,body,base,head,link,meta,style,title,' + - 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' + - 'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' + - 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' + - 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' + - 'embed,object,param,source,canvas,script,noscript,del,ins,' + - 'caption,col,colgroup,table,thead,tbody,td,th,tr,' + - 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' + - 'output,progress,select,textarea,' + - 'details,dialog,menu,menuitem,summary,' + - 'content,element,shadow,template,blockquote,iframe,tfoot' - ); - - // this map is intentionally selective, only covering SVG elements that may - // contain child elements. - var isSVG = makeMap( - 'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' + - 'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' + - 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', - true - ); - - var isPreTag = function (tag) { return tag === 'pre'; }; - - var isReservedTag = function (tag) { - return isHTMLTag(tag) || isSVG(tag) - }; - - function getTagNamespace (tag) { - if (isSVG(tag)) { - return 'svg' - } - // basic support for MathML - // note it doesn't support other MathML elements being component roots - if (tag === 'math') { - return 'math' - } - } - - var unknownElementCache = Object.create(null); - function isUnknownElement (tag) { - /* istanbul ignore if */ - if (!inBrowser) { - return true - } - if (isReservedTag(tag)) { - return false - } - tag = tag.toLowerCase(); - /* istanbul ignore if */ - if (unknownElementCache[tag] != null) { - return unknownElementCache[tag] - } - var el = document.createElement(tag); - if (tag.indexOf('-') > -1) { - // http://stackoverflow.com/a/28210364/1070244 - return (unknownElementCache[tag] = ( - el.constructor === window.HTMLUnknownElement || - el.constructor === window.HTMLElement - )) - } else { - return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString())) - } - } - - var isTextInputType = makeMap('text,number,password,search,email,tel,url'); - - /* */ - - /** - * Query an element selector if it's not an element already. - */ - function query (el) { - if (typeof el === 'string') { - var selected = document.querySelector(el); - if (!selected) { - warn( - 'Cannot find element: ' + el - ); - return document.createElement('div') - } - return selected - } else { - return el - } - } - - /* */ - - function createElement$1 (tagName, vnode) { - var elm = document.createElement(tagName); - if (tagName !== 'select') { - return elm - } - // false or null will remove the attribute but undefined will not - if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) { - elm.setAttribute('multiple', 'multiple'); - } - return elm - } - - function createElementNS (namespace, tagName) { - return document.createElementNS(namespaceMap[namespace], tagName) - } - - function createTextNode (text) { - return document.createTextNode(text) - } - - function createComment (text) { - return document.createComment(text) - } - - function insertBefore (parentNode, newNode, referenceNode) { - parentNode.insertBefore(newNode, referenceNode); - } - - function removeChild (node, child) { - node.removeChild(child); - } - - function appendChild (node, child) { - node.appendChild(child); - } - - function parentNode (node) { - return node.parentNode - } - - function nextSibling (node) { - return node.nextSibling - } - - function tagName (node) { - return node.tagName - } - - function setTextContent (node, text) { - node.textContent = text; - } - - function setStyleScope (node, scopeId) { - node.setAttribute(scopeId, ''); - } - - var nodeOps = /*#__PURE__*/Object.freeze({ - createElement: createElement$1, - createElementNS: createElementNS, - createTextNode: createTextNode, - createComment: createComment, - insertBefore: insertBefore, - removeChild: removeChild, - appendChild: appendChild, - parentNode: parentNode, - nextSibling: nextSibling, - tagName: tagName, - setTextContent: setTextContent, - setStyleScope: setStyleScope - }); - - /* */ - - var ref = { - create: function create (_, vnode) { - registerRef(vnode); - }, - update: function update (oldVnode, vnode) { - if (oldVnode.data.ref !== vnode.data.ref) { - registerRef(oldVnode, true); - registerRef(vnode); - } - }, - destroy: function destroy (vnode) { - registerRef(vnode, true); - } - }; - - function registerRef (vnode, isRemoval) { - var key = vnode.data.ref; - if (!isDef(key)) { return } - - var vm = vnode.context; - var ref = vnode.componentInstance || vnode.elm; - var refs = vm.$refs; - if (isRemoval) { - if (Array.isArray(refs[key])) { - remove(refs[key], ref); - } else if (refs[key] === ref) { - refs[key] = undefined; - } - } else { - if (vnode.data.refInFor) { - if (!Array.isArray(refs[key])) { - refs[key] = [ref]; - } else if (refs[key].indexOf(ref) < 0) { - // $flow-disable-line - refs[key].push(ref); - } - } else { - refs[key] = ref; - } - } - } - - /** - * Virtual DOM patching algorithm based on Snabbdom by - * Simon Friis Vindum (@paldepind) - * Licensed under the MIT License - * https://github.com/paldepind/snabbdom/blob/master/LICENSE - * - * modified by Evan You (@yyx990803) - * - * Not type-checking this because this file is perf-critical and the cost - * of making flow understand it is not worth it. - */ - - var emptyNode = new VNode('', {}, []); - - var hooks = ['create', 'activate', 'update', 'remove', 'destroy']; - - function sameVnode (a, b) { - return ( - a.key === b.key && ( - ( - a.tag === b.tag && - a.isComment === b.isComment && - isDef(a.data) === isDef(b.data) && - sameInputType(a, b) - ) || ( - isTrue(a.isAsyncPlaceholder) && - a.asyncFactory === b.asyncFactory && - isUndef(b.asyncFactory.error) - ) - ) - ) - } - - function sameInputType (a, b) { - if (a.tag !== 'input') { return true } - var i; - var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type; - var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type; - return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB) - } - - function createKeyToOldIdx (children, beginIdx, endIdx) { - var i, key; - var map = {}; - for (i = beginIdx; i <= endIdx; ++i) { - key = children[i].key; - if (isDef(key)) { map[key] = i; } - } - return map - } - - function createPatchFunction (backend) { - var i, j; - var cbs = {}; - - var modules = backend.modules; - var nodeOps = backend.nodeOps; - - for (i = 0; i < hooks.length; ++i) { - cbs[hooks[i]] = []; - for (j = 0; j < modules.length; ++j) { - if (isDef(modules[j][hooks[i]])) { - cbs[hooks[i]].push(modules[j][hooks[i]]); - } - } - } - - function emptyNodeAt (elm) { - return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm) - } - - function createRmCb (childElm, listeners) { - function remove$$1 () { - if (--remove$$1.listeners === 0) { - removeNode(childElm); - } - } - remove$$1.listeners = listeners; - return remove$$1 - } - - function removeNode (el) { - var parent = nodeOps.parentNode(el); - // element may have already been removed due to v-html / v-text - if (isDef(parent)) { - nodeOps.removeChild(parent, el); - } - } - - function isUnknownElement$$1 (vnode, inVPre) { - return ( - !inVPre && - !vnode.ns && - !( - config.ignoredElements.length && - config.ignoredElements.some(function (ignore) { - return isRegExp(ignore) - ? ignore.test(vnode.tag) - : ignore === vnode.tag - }) - ) && - config.isUnknownElement(vnode.tag) - ) - } - - var creatingElmInVPre = 0; - - function createElm ( - vnode, - insertedVnodeQueue, - parentElm, - refElm, - nested, - ownerArray, - index - ) { - if (isDef(vnode.elm) && isDef(ownerArray)) { - // This vnode was used in a previous render! - // now it's used as a new node, overwriting its elm would cause - // potential patch errors down the road when it's used as an insertion - // reference node. Instead, we clone the node on-demand before creating - // associated DOM element for it. - vnode = ownerArray[index] = cloneVNode(vnode); - } - - vnode.isRootInsert = !nested; // for transition enter check - if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) { - return - } - - var data = vnode.data; - var children = vnode.children; - var tag = vnode.tag; - if (isDef(tag)) { - { - if (data && data.pre) { - creatingElmInVPre++; - } - if (isUnknownElement$$1(vnode, creatingElmInVPre)) { - warn( - 'Unknown custom element: <' + tag + '> - did you ' + - 'register the component correctly? For recursive components, ' + - 'make sure to provide the "name" option.', - vnode.context - ); - } - } - - vnode.elm = vnode.ns - ? nodeOps.createElementNS(vnode.ns, tag) - : nodeOps.createElement(tag, vnode); - setScope(vnode); - - /* istanbul ignore if */ - { - createChildren(vnode, children, insertedVnodeQueue); - if (isDef(data)) { - invokeCreateHooks(vnode, insertedVnodeQueue); - } - insert(parentElm, vnode.elm, refElm); - } - - if (data && data.pre) { - creatingElmInVPre--; - } - } else if (isTrue(vnode.isComment)) { - vnode.elm = nodeOps.createComment(vnode.text); - insert(parentElm, vnode.elm, refElm); - } else { - vnode.elm = nodeOps.createTextNode(vnode.text); - insert(parentElm, vnode.elm, refElm); - } - } - - function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) { - var i = vnode.data; - if (isDef(i)) { - var isReactivated = isDef(vnode.componentInstance) && i.keepAlive; - if (isDef(i = i.hook) && isDef(i = i.init)) { - i(vnode, false /* hydrating */); - } - // after calling the init hook, if the vnode is a child component - // it should've created a child instance and mounted it. the child - // component also has set the placeholder vnode's elm. - // in that case we can just return the element and be done. - if (isDef(vnode.componentInstance)) { - initComponent(vnode, insertedVnodeQueue); - insert(parentElm, vnode.elm, refElm); - if (isTrue(isReactivated)) { - reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm); - } - return true - } - } - } - - function initComponent (vnode, insertedVnodeQueue) { - if (isDef(vnode.data.pendingInsert)) { - insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert); - vnode.data.pendingInsert = null; - } - vnode.elm = vnode.componentInstance.$el; - if (isPatchable(vnode)) { - invokeCreateHooks(vnode, insertedVnodeQueue); - setScope(vnode); - } else { - // empty component root. - // skip all element-related modules except for ref (#3455) - registerRef(vnode); - // make sure to invoke the insert hook - insertedVnodeQueue.push(vnode); - } - } - - function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) { - var i; - // hack for #4339: a reactivated component with inner transition - // does not trigger because the inner node's created hooks are not called - // again. It's not ideal to involve module-specific logic in here but - // there doesn't seem to be a better way to do it. - var innerNode = vnode; - while (innerNode.componentInstance) { - innerNode = innerNode.componentInstance._vnode; - if (isDef(i = innerNode.data) && isDef(i = i.transition)) { - for (i = 0; i < cbs.activate.length; ++i) { - cbs.activate[i](emptyNode, innerNode); - } - insertedVnodeQueue.push(innerNode); - break - } - } - // unlike a newly created component, - // a reactivated keep-alive component doesn't insert itself - insert(parentElm, vnode.elm, refElm); - } - - function insert (parent, elm, ref$$1) { - if (isDef(parent)) { - if (isDef(ref$$1)) { - if (nodeOps.parentNode(ref$$1) === parent) { - nodeOps.insertBefore(parent, elm, ref$$1); - } - } else { - nodeOps.appendChild(parent, elm); - } - } - } - - function createChildren (vnode, children, insertedVnodeQueue) { - if (Array.isArray(children)) { - { - checkDuplicateKeys(children); - } - for (var i = 0; i < children.length; ++i) { - createElm(children[i], insertedVnodeQueue, vnode.elm, null, true, children, i); - } - } else if (isPrimitive(vnode.text)) { - nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text))); - } - } - - function isPatchable (vnode) { - while (vnode.componentInstance) { - vnode = vnode.componentInstance._vnode; - } - return isDef(vnode.tag) - } - - function invokeCreateHooks (vnode, insertedVnodeQueue) { - for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) { - cbs.create[i$1](emptyNode, vnode); - } - i = vnode.data.hook; // Reuse variable - if (isDef(i)) { - if (isDef(i.create)) { i.create(emptyNode, vnode); } - if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); } - } - } - - // set scope id attribute for scoped CSS. - // this is implemented as a special case to avoid the overhead - // of going through the normal attribute patching process. - function setScope (vnode) { - var i; - if (isDef(i = vnode.fnScopeId)) { - nodeOps.setStyleScope(vnode.elm, i); - } else { - var ancestor = vnode; - while (ancestor) { - if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) { - nodeOps.setStyleScope(vnode.elm, i); - } - ancestor = ancestor.parent; - } - } - // for slot content they should also get the scopeId from the host instance. - if (isDef(i = activeInstance) && - i !== vnode.context && - i !== vnode.fnContext && - isDef(i = i.$options._scopeId) - ) { - nodeOps.setStyleScope(vnode.elm, i); - } - } - - function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) { - for (; startIdx <= endIdx; ++startIdx) { - createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx); - } - } - - function invokeDestroyHook (vnode) { - var i, j; - var data = vnode.data; - if (isDef(data)) { - if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); } - for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); } - } - if (isDef(i = vnode.children)) { - for (j = 0; j < vnode.children.length; ++j) { - invokeDestroyHook(vnode.children[j]); - } - } - } - - function removeVnodes (parentElm, vnodes, startIdx, endIdx) { - for (; startIdx <= endIdx; ++startIdx) { - var ch = vnodes[startIdx]; - if (isDef(ch)) { - if (isDef(ch.tag)) { - removeAndInvokeRemoveHook(ch); - invokeDestroyHook(ch); - } else { // Text node - removeNode(ch.elm); - } - } - } - } - - function removeAndInvokeRemoveHook (vnode, rm) { - if (isDef(rm) || isDef(vnode.data)) { - var i; - var listeners = cbs.remove.length + 1; - if (isDef(rm)) { - // we have a recursively passed down rm callback - // increase the listeners count - rm.listeners += listeners; - } else { - // directly removing - rm = createRmCb(vnode.elm, listeners); - } - // recursively invoke hooks on child component root node - if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) { - removeAndInvokeRemoveHook(i, rm); - } - for (i = 0; i < cbs.remove.length; ++i) { - cbs.remove[i](vnode, rm); - } - if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) { - i(vnode, rm); - } else { - rm(); - } - } else { - removeNode(vnode.elm); - } - } - - function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) { - var oldStartIdx = 0; - var newStartIdx = 0; - var oldEndIdx = oldCh.length - 1; - var oldStartVnode = oldCh[0]; - var oldEndVnode = oldCh[oldEndIdx]; - var newEndIdx = newCh.length - 1; - var newStartVnode = newCh[0]; - var newEndVnode = newCh[newEndIdx]; - var oldKeyToIdx, idxInOld, vnodeToMove, refElm; - - // removeOnly is a special flag used only by <transition-group> - // to ensure removed elements stay in correct relative positions - // during leaving transitions - var canMove = !removeOnly; - - { - checkDuplicateKeys(newCh); - } - - while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) { - if (isUndef(oldStartVnode)) { - oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left - } else if (isUndef(oldEndVnode)) { - oldEndVnode = oldCh[--oldEndIdx]; - } else if (sameVnode(oldStartVnode, newStartVnode)) { - patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx); - oldStartVnode = oldCh[++oldStartIdx]; - newStartVnode = newCh[++newStartIdx]; - } else if (sameVnode(oldEndVnode, newEndVnode)) { - patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx); - oldEndVnode = oldCh[--oldEndIdx]; - newEndVnode = newCh[--newEndIdx]; - } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right - patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx); - canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm)); - oldStartVnode = oldCh[++oldStartIdx]; - newEndVnode = newCh[--newEndIdx]; - } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left - patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx); - canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm); - oldEndVnode = oldCh[--oldEndIdx]; - newStartVnode = newCh[++newStartIdx]; - } else { - if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); } - idxInOld = isDef(newStartVnode.key) - ? oldKeyToIdx[newStartVnode.key] - : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx); - if (isUndef(idxInOld)) { // New element - createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx); - } else { - vnodeToMove = oldCh[idxInOld]; - if (sameVnode(vnodeToMove, newStartVnode)) { - patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx); - oldCh[idxInOld] = undefined; - canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm); - } else { - // same key but different element. treat as new element - createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx); - } - } - newStartVnode = newCh[++newStartIdx]; - } - } - if (oldStartIdx > oldEndIdx) { - refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm; - addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue); - } else if (newStartIdx > newEndIdx) { - removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx); - } - } - - function checkDuplicateKeys (children) { - var seenKeys = {}; - for (var i = 0; i < children.length; i++) { - var vnode = children[i]; - var key = vnode.key; - if (isDef(key)) { - if (seenKeys[key]) { - warn( - ("Duplicate keys detected: '" + key + "'. This may cause an update error."), - vnode.context - ); - } else { - seenKeys[key] = true; - } - } - } - } - - function findIdxInOld (node, oldCh, start, end) { - for (var i = start; i < end; i++) { - var c = oldCh[i]; - if (isDef(c) && sameVnode(node, c)) { return i } - } - } - - function patchVnode ( - oldVnode, - vnode, - insertedVnodeQueue, - ownerArray, - index, - removeOnly - ) { - if (oldVnode === vnode) { - return - } - - if (isDef(vnode.elm) && isDef(ownerArray)) { - // clone reused vnode - vnode = ownerArray[index] = cloneVNode(vnode); - } - - var elm = vnode.elm = oldVnode.elm; - - if (isTrue(oldVnode.isAsyncPlaceholder)) { - if (isDef(vnode.asyncFactory.resolved)) { - hydrate(oldVnode.elm, vnode, insertedVnodeQueue); - } else { - vnode.isAsyncPlaceholder = true; - } - return - } - - // reuse element for static trees. - // note we only do this if the vnode is cloned - - // if the new node is not cloned it means the render functions have been - // reset by the hot-reload-api and we need to do a proper re-render. - if (isTrue(vnode.isStatic) && - isTrue(oldVnode.isStatic) && - vnode.key === oldVnode.key && - (isTrue(vnode.isCloned) || isTrue(vnode.isOnce)) - ) { - vnode.componentInstance = oldVnode.componentInstance; - return - } - - var i; - var data = vnode.data; - if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) { - i(oldVnode, vnode); - } - - var oldCh = oldVnode.children; - var ch = vnode.children; - if (isDef(data) && isPatchable(vnode)) { - for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); } - if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); } - } - if (isUndef(vnode.text)) { - if (isDef(oldCh) && isDef(ch)) { - if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); } - } else if (isDef(ch)) { - { - checkDuplicateKeys(ch); - } - if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); } - addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue); - } else if (isDef(oldCh)) { - removeVnodes(elm, oldCh, 0, oldCh.length - 1); - } else if (isDef(oldVnode.text)) { - nodeOps.setTextContent(elm, ''); - } - } else if (oldVnode.text !== vnode.text) { - nodeOps.setTextContent(elm, vnode.text); - } - if (isDef(data)) { - if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); } - } - } - - function invokeInsertHook (vnode, queue, initial) { - // delay insert hooks for component root nodes, invoke them after the - // element is really inserted - if (isTrue(initial) && isDef(vnode.parent)) { - vnode.parent.data.pendingInsert = queue; - } else { - for (var i = 0; i < queue.length; ++i) { - queue[i].data.hook.insert(queue[i]); - } - } - } - - var hydrationBailed = false; - // list of modules that can skip create hook during hydration because they - // are already rendered on the client or has no need for initialization - // Note: style is excluded because it relies on initial clone for future - // deep updates (#7063). - var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key'); - - // Note: this is a browser-only function so we can assume elms are DOM nodes. - function hydrate (elm, vnode, insertedVnodeQueue, inVPre) { - var i; - var tag = vnode.tag; - var data = vnode.data; - var children = vnode.children; - inVPre = inVPre || (data && data.pre); - vnode.elm = elm; - - if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) { - vnode.isAsyncPlaceholder = true; - return true - } - // assert node match - { - if (!assertNodeMatch(elm, vnode, inVPre)) { - return false - } - } - if (isDef(data)) { - if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); } - if (isDef(i = vnode.componentInstance)) { - // child component. it should have hydrated its own tree. - initComponent(vnode, insertedVnodeQueue); - return true - } - } - if (isDef(tag)) { - if (isDef(children)) { - // empty element, allow client to pick up and populate children - if (!elm.hasChildNodes()) { - createChildren(vnode, children, insertedVnodeQueue); - } else { - // v-html and domProps: innerHTML - if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) { - if (i !== elm.innerHTML) { - /* istanbul ignore if */ - if (typeof console !== 'undefined' && - !hydrationBailed - ) { - hydrationBailed = true; - console.warn('Parent: ', elm); - console.warn('server innerHTML: ', i); - console.warn('client innerHTML: ', elm.innerHTML); - } - return false - } - } else { - // iterate and compare children lists - var childrenMatch = true; - var childNode = elm.firstChild; - for (var i$1 = 0; i$1 < children.length; i$1++) { - if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) { - childrenMatch = false; - break - } - childNode = childNode.nextSibling; - } - // if childNode is not null, it means the actual childNodes list is - // longer than the virtual children list. - if (!childrenMatch || childNode) { - /* istanbul ignore if */ - if (typeof console !== 'undefined' && - !hydrationBailed - ) { - hydrationBailed = true; - console.warn('Parent: ', elm); - console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children); - } - return false - } - } - } - } - if (isDef(data)) { - var fullInvoke = false; - for (var key in data) { - if (!isRenderedModule(key)) { - fullInvoke = true; - invokeCreateHooks(vnode, insertedVnodeQueue); - break - } - } - if (!fullInvoke && data['class']) { - // ensure collecting deps for deep class bindings for future updates - traverse(data['class']); - } - } - } else if (elm.data !== vnode.text) { - elm.data = vnode.text; - } - return true - } - - function assertNodeMatch (node, vnode, inVPre) { - if (isDef(vnode.tag)) { - return vnode.tag.indexOf('vue-component') === 0 || ( - !isUnknownElement$$1(vnode, inVPre) && - vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase()) - ) - } else { - return node.nodeType === (vnode.isComment ? 8 : 3) - } - } - - return function patch (oldVnode, vnode, hydrating, removeOnly) { - if (isUndef(vnode)) { - if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); } - return - } - - var isInitialPatch = false; - var insertedVnodeQueue = []; - - if (isUndef(oldVnode)) { - // empty mount (likely as component), create new root element - isInitialPatch = true; - createElm(vnode, insertedVnodeQueue); - } else { - var isRealElement = isDef(oldVnode.nodeType); - if (!isRealElement && sameVnode(oldVnode, vnode)) { - // patch existing root node - patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly); - } else { - if (isRealElement) { - // mounting to a real element - // check if this is server-rendered content and if we can perform - // a successful hydration. - if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) { - oldVnode.removeAttribute(SSR_ATTR); - hydrating = true; - } - if (isTrue(hydrating)) { - if (hydrate(oldVnode, vnode, insertedVnodeQueue)) { - invokeInsertHook(vnode, insertedVnodeQueue, true); - return oldVnode - } else { - warn( - 'The client-side rendered virtual DOM tree is not matching ' + - 'server-rendered content. This is likely caused by incorrect ' + - 'HTML markup, for example nesting block-level elements inside ' + - '<p>, or missing <tbody>. Bailing hydration and performing ' + - 'full client-side render.' - ); - } - } - // either not server-rendered, or hydration failed. - // create an empty node and replace it - oldVnode = emptyNodeAt(oldVnode); - } - - // replacing existing element - var oldElm = oldVnode.elm; - var parentElm = nodeOps.parentNode(oldElm); - - // create new node - createElm( - vnode, - insertedVnodeQueue, - // extremely rare edge case: do not insert if old element is in a - // leaving transition. Only happens when combining transition + - // keep-alive + HOCs. (#4590) - oldElm._leaveCb ? null : parentElm, - nodeOps.nextSibling(oldElm) - ); - - // update parent placeholder node element, recursively - if (isDef(vnode.parent)) { - var ancestor = vnode.parent; - var patchable = isPatchable(vnode); - while (ancestor) { - for (var i = 0; i < cbs.destroy.length; ++i) { - cbs.destroy[i](ancestor); - } - ancestor.elm = vnode.elm; - if (patchable) { - for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) { - cbs.create[i$1](emptyNode, ancestor); - } - // #6513 - // invoke insert hooks that may have been merged by create hooks. - // e.g. for directives that uses the "inserted" hook. - var insert = ancestor.data.hook.insert; - if (insert.merged) { - // start at index 1 to avoid re-invoking component mounted hook - for (var i$2 = 1; i$2 < insert.fns.length; i$2++) { - insert.fns[i$2](); - } - } - } else { - registerRef(ancestor); - } - ancestor = ancestor.parent; - } - } - - // destroy old node - if (isDef(parentElm)) { - removeVnodes(parentElm, [oldVnode], 0, 0); - } else if (isDef(oldVnode.tag)) { - invokeDestroyHook(oldVnode); - } - } - } - - invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch); - return vnode.elm - } - } - - /* */ - - var directives = { - create: updateDirectives, - update: updateDirectives, - destroy: function unbindDirectives (vnode) { - updateDirectives(vnode, emptyNode); - } - }; - - function updateDirectives (oldVnode, vnode) { - if (oldVnode.data.directives || vnode.data.directives) { - _update(oldVnode, vnode); - } - } - - function _update (oldVnode, vnode) { - var isCreate = oldVnode === emptyNode; - var isDestroy = vnode === emptyNode; - var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context); - var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context); - - var dirsWithInsert = []; - var dirsWithPostpatch = []; - - var key, oldDir, dir; - for (key in newDirs) { - oldDir = oldDirs[key]; - dir = newDirs[key]; - if (!oldDir) { - // new directive, bind - callHook$1(dir, 'bind', vnode, oldVnode); - if (dir.def && dir.def.inserted) { - dirsWithInsert.push(dir); - } - } else { - // existing directive, update - dir.oldValue = oldDir.value; - dir.oldArg = oldDir.arg; - callHook$1(dir, 'update', vnode, oldVnode); - if (dir.def && dir.def.componentUpdated) { - dirsWithPostpatch.push(dir); - } - } - } - - if (dirsWithInsert.length) { - var callInsert = function () { - for (var i = 0; i < dirsWithInsert.length; i++) { - callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode); - } - }; - if (isCreate) { - mergeVNodeHook(vnode, 'insert', callInsert); - } else { - callInsert(); - } - } - - if (dirsWithPostpatch.length) { - mergeVNodeHook(vnode, 'postpatch', function () { - for (var i = 0; i < dirsWithPostpatch.length; i++) { - callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode); - } - }); - } - - if (!isCreate) { - for (key in oldDirs) { - if (!newDirs[key]) { - // no longer present, unbind - callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy); - } - } - } - } - - var emptyModifiers = Object.create(null); - - function normalizeDirectives$1 ( - dirs, - vm - ) { - var res = Object.create(null); - if (!dirs) { - // $flow-disable-line - return res - } - var i, dir; - for (i = 0; i < dirs.length; i++) { - dir = dirs[i]; - if (!dir.modifiers) { - // $flow-disable-line - dir.modifiers = emptyModifiers; - } - res[getRawDirName(dir)] = dir; - dir.def = resolveAsset(vm.$options, 'directives', dir.name, true); - } - // $flow-disable-line - return res - } - - function getRawDirName (dir) { - return dir.rawName || ((dir.name) + "." + (Object.keys(dir.modifiers || {}).join('.'))) - } - - function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) { - var fn = dir.def && dir.def[hook]; - if (fn) { - try { - fn(vnode.elm, dir, vnode, oldVnode, isDestroy); - } catch (e) { - handleError(e, vnode.context, ("directive " + (dir.name) + " " + hook + " hook")); - } - } - } - - var baseModules = [ - ref, - directives - ]; - - /* */ - - function updateAttrs (oldVnode, vnode) { - var opts = vnode.componentOptions; - if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) { - return - } - if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) { - return - } - var key, cur, old; - var elm = vnode.elm; - var oldAttrs = oldVnode.data.attrs || {}; - var attrs = vnode.data.attrs || {}; - // clone observed objects, as the user probably wants to mutate it - if (isDef(attrs.__ob__)) { - attrs = vnode.data.attrs = extend({}, attrs); - } - - for (key in attrs) { - cur = attrs[key]; - old = oldAttrs[key]; - if (old !== cur) { - setAttr(elm, key, cur); - } - } - // #4391: in IE9, setting type can reset value for input[type=radio] - // #6666: IE/Edge forces progress value down to 1 before setting a max - /* istanbul ignore if */ - if ((isIE || isEdge) && attrs.value !== oldAttrs.value) { - setAttr(elm, 'value', attrs.value); - } - for (key in oldAttrs) { - if (isUndef(attrs[key])) { - if (isXlink(key)) { - elm.removeAttributeNS(xlinkNS, getXlinkProp(key)); - } else if (!isEnumeratedAttr(key)) { - elm.removeAttribute(key); - } - } - } - } - - function setAttr (el, key, value) { - if (el.tagName.indexOf('-') > -1) { - baseSetAttr(el, key, value); - } else if (isBooleanAttr(key)) { - // set attribute for blank value - // e.g. <option disabled>Select one</option> - if (isFalsyAttrValue(value)) { - el.removeAttribute(key); - } else { - // technically allowfullscreen is a boolean attribute for <iframe>, - // but Flash expects a value of "true" when used on <embed> tag - value = key === 'allowfullscreen' && el.tagName === 'EMBED' - ? 'true' - : key; - el.setAttribute(key, value); - } - } else if (isEnumeratedAttr(key)) { - el.setAttribute(key, convertEnumeratedValue(key, value)); - } else if (isXlink(key)) { - if (isFalsyAttrValue(value)) { - el.removeAttributeNS(xlinkNS, getXlinkProp(key)); - } else { - el.setAttributeNS(xlinkNS, key, value); - } - } else { - baseSetAttr(el, key, value); - } - } - - function baseSetAttr (el, key, value) { - if (isFalsyAttrValue(value)) { - el.removeAttribute(key); - } else { - // #7138: IE10 & 11 fires input event when setting placeholder on - // <textarea>... block the first input event and remove the blocker - // immediately. - /* istanbul ignore if */ - if ( - isIE && !isIE9 && - el.tagName === 'TEXTAREA' && - key === 'placeholder' && value !== '' && !el.__ieph - ) { - var blocker = function (e) { - e.stopImmediatePropagation(); - el.removeEventListener('input', blocker); - }; - el.addEventListener('input', blocker); - // $flow-disable-line - el.__ieph = true; /* IE placeholder patched */ - } - el.setAttribute(key, value); - } - } - - var attrs = { - create: updateAttrs, - update: updateAttrs - }; - - /* */ - - function updateClass (oldVnode, vnode) { - var el = vnode.elm; - var data = vnode.data; - var oldData = oldVnode.data; - if ( - isUndef(data.staticClass) && - isUndef(data.class) && ( - isUndef(oldData) || ( - isUndef(oldData.staticClass) && - isUndef(oldData.class) - ) - ) - ) { - return - } - - var cls = genClassForVnode(vnode); - - // handle transition classes - var transitionClass = el._transitionClasses; - if (isDef(transitionClass)) { - cls = concat(cls, stringifyClass(transitionClass)); - } - - // set the class - if (cls !== el._prevClass) { - el.setAttribute('class', cls); - el._prevClass = cls; - } - } - - var klass = { - create: updateClass, - update: updateClass - }; - - /* */ - - var validDivisionCharRE = /[\w).+\-_$\]]/; - - function parseFilters (exp) { - var inSingle = false; - var inDouble = false; - var inTemplateString = false; - var inRegex = false; - var curly = 0; - var square = 0; - var paren = 0; - var lastFilterIndex = 0; - var c, prev, i, expression, filters; - - for (i = 0; i < exp.length; i++) { - prev = c; - c = exp.charCodeAt(i); - if (inSingle) { - if (c === 0x27 && prev !== 0x5C) { inSingle = false; } - } else if (inDouble) { - if (c === 0x22 && prev !== 0x5C) { inDouble = false; } - } else if (inTemplateString) { - if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; } - } else if (inRegex) { - if (c === 0x2f && prev !== 0x5C) { inRegex = false; } - } else if ( - c === 0x7C && // pipe - exp.charCodeAt(i + 1) !== 0x7C && - exp.charCodeAt(i - 1) !== 0x7C && - !curly && !square && !paren - ) { - if (expression === undefined) { - // first filter, end of expression - lastFilterIndex = i + 1; - expression = exp.slice(0, i).trim(); - } else { - pushFilter(); - } - } else { - switch (c) { - case 0x22: inDouble = true; break // " - case 0x27: inSingle = true; break // ' - case 0x60: inTemplateString = true; break // ` - case 0x28: paren++; break // ( - case 0x29: paren--; break // ) - case 0x5B: square++; break // [ - case 0x5D: square--; break // ] - case 0x7B: curly++; break // { - case 0x7D: curly--; break // } - } - if (c === 0x2f) { // / - var j = i - 1; - var p = (void 0); - // find first non-whitespace prev char - for (; j >= 0; j--) { - p = exp.charAt(j); - if (p !== ' ') { break } - } - if (!p || !validDivisionCharRE.test(p)) { - inRegex = true; - } - } - } - } - - if (expression === undefined) { - expression = exp.slice(0, i).trim(); - } else if (lastFilterIndex !== 0) { - pushFilter(); - } - - function pushFilter () { - (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim()); - lastFilterIndex = i + 1; - } - - if (filters) { - for (i = 0; i < filters.length; i++) { - expression = wrapFilter(expression, filters[i]); - } - } - - return expression - } - - function wrapFilter (exp, filter) { - var i = filter.indexOf('('); - if (i < 0) { - // _f: resolveFilter - return ("_f(\"" + filter + "\")(" + exp + ")") - } else { - var name = filter.slice(0, i); - var args = filter.slice(i + 1); - return ("_f(\"" + name + "\")(" + exp + (args !== ')' ? ',' + args : args)) - } - } - - /* */ - - - - /* eslint-disable no-unused-vars */ - function baseWarn (msg, range) { - console.error(("[Vue compiler]: " + msg)); - } - /* eslint-enable no-unused-vars */ - - function pluckModuleFunction ( - modules, - key - ) { - return modules - ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; }) - : [] - } - - function addProp (el, name, value, range, dynamic) { - (el.props || (el.props = [])).push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range)); - el.plain = false; - } - - function addAttr (el, name, value, range, dynamic) { - var attrs = dynamic - ? (el.dynamicAttrs || (el.dynamicAttrs = [])) - : (el.attrs || (el.attrs = [])); - attrs.push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range)); - el.plain = false; - } - - // add a raw attr (use this in preTransforms) - function addRawAttr (el, name, value, range) { - el.attrsMap[name] = value; - el.attrsList.push(rangeSetItem({ name: name, value: value }, range)); - } - - function addDirective ( - el, - name, - rawName, - value, - arg, - isDynamicArg, - modifiers, - range - ) { - (el.directives || (el.directives = [])).push(rangeSetItem({ - name: name, - rawName: rawName, - value: value, - arg: arg, - isDynamicArg: isDynamicArg, - modifiers: modifiers - }, range)); - el.plain = false; - } - - function prependModifierMarker (symbol, name, dynamic) { - return dynamic - ? ("_p(" + name + ",\"" + symbol + "\")") - : symbol + name // mark the event as captured - } - - function addHandler ( - el, - name, - value, - modifiers, - important, - warn, - range, - dynamic - ) { - modifiers = modifiers || emptyObject; - // warn prevent and passive modifier - /* istanbul ignore if */ - if ( - warn && - modifiers.prevent && modifiers.passive - ) { - warn( - 'passive and prevent can\'t be used together. ' + - 'Passive handler can\'t prevent default event.', - range - ); - } - - // normalize click.right and click.middle since they don't actually fire - // this is technically browser-specific, but at least for now browsers are - // the only target envs that have right/middle clicks. - if (modifiers.right) { - if (dynamic) { - name = "(" + name + ")==='click'?'contextmenu':(" + name + ")"; - } else if (name === 'click') { - name = 'contextmenu'; - delete modifiers.right; - } - } else if (modifiers.middle) { - if (dynamic) { - name = "(" + name + ")==='click'?'mouseup':(" + name + ")"; - } else if (name === 'click') { - name = 'mouseup'; - } - } - - // check capture modifier - if (modifiers.capture) { - delete modifiers.capture; - name = prependModifierMarker('!', name, dynamic); - } - if (modifiers.once) { - delete modifiers.once; - name = prependModifierMarker('~', name, dynamic); - } - /* istanbul ignore if */ - if (modifiers.passive) { - delete modifiers.passive; - name = prependModifierMarker('&', name, dynamic); - } - - var events; - if (modifiers.native) { - delete modifiers.native; - events = el.nativeEvents || (el.nativeEvents = {}); - } else { - events = el.events || (el.events = {}); - } - - var newHandler = rangeSetItem({ value: value.trim(), dynamic: dynamic }, range); - if (modifiers !== emptyObject) { - newHandler.modifiers = modifiers; - } - - var handlers = events[name]; - /* istanbul ignore if */ - if (Array.isArray(handlers)) { - important ? handlers.unshift(newHandler) : handlers.push(newHandler); - } else if (handlers) { - events[name] = important ? [newHandler, handlers] : [handlers, newHandler]; - } else { - events[name] = newHandler; - } - - el.plain = false; - } - - function getRawBindingAttr ( - el, - name - ) { - return el.rawAttrsMap[':' + name] || - el.rawAttrsMap['v-bind:' + name] || - el.rawAttrsMap[name] - } - - function getBindingAttr ( - el, - name, - getStatic - ) { - var dynamicValue = - getAndRemoveAttr(el, ':' + name) || - getAndRemoveAttr(el, 'v-bind:' + name); - if (dynamicValue != null) { - return parseFilters(dynamicValue) - } else if (getStatic !== false) { - var staticValue = getAndRemoveAttr(el, name); - if (staticValue != null) { - return JSON.stringify(staticValue) - } - } - } - - // note: this only removes the attr from the Array (attrsList) so that it - // doesn't get processed by processAttrs. - // By default it does NOT remove it from the map (attrsMap) because the map is - // needed during codegen. - function getAndRemoveAttr ( - el, - name, - removeFromMap - ) { - var val; - if ((val = el.attrsMap[name]) != null) { - var list = el.attrsList; - for (var i = 0, l = list.length; i < l; i++) { - if (list[i].name === name) { - list.splice(i, 1); - break - } - } - } - if (removeFromMap) { - delete el.attrsMap[name]; - } - return val - } - - function getAndRemoveAttrByRegex ( - el, - name - ) { - var list = el.attrsList; - for (var i = 0, l = list.length; i < l; i++) { - var attr = list[i]; - if (name.test(attr.name)) { - list.splice(i, 1); - return attr - } - } - } - - function rangeSetItem ( - item, - range - ) { - if (range) { - if (range.start != null) { - item.start = range.start; - } - if (range.end != null) { - item.end = range.end; - } - } - return item - } - - /* */ - - /** - * Cross-platform code generation for component v-model - */ - function genComponentModel ( - el, - value, - modifiers - ) { - var ref = modifiers || {}; - var number = ref.number; - var trim = ref.trim; - - var baseValueExpression = '$$v'; - var valueExpression = baseValueExpression; - if (trim) { - valueExpression = - "(typeof " + baseValueExpression + " === 'string'" + - "? " + baseValueExpression + ".trim()" + - ": " + baseValueExpression + ")"; - } - if (number) { - valueExpression = "_n(" + valueExpression + ")"; - } - var assignment = genAssignmentCode(value, valueExpression); - - el.model = { - value: ("(" + value + ")"), - expression: JSON.stringify(value), - callback: ("function (" + baseValueExpression + ") {" + assignment + "}") - }; - } - - /** - * Cross-platform codegen helper for generating v-model value assignment code. - */ - function genAssignmentCode ( - value, - assignment - ) { - var res = parseModel(value); - if (res.key === null) { - return (value + "=" + assignment) - } else { - return ("$set(" + (res.exp) + ", " + (res.key) + ", " + assignment + ")") - } - } - - /** - * Parse a v-model expression into a base path and a final key segment. - * Handles both dot-path and possible square brackets. - * - * Possible cases: - * - * - test - * - test[key] - * - test[test1[key]] - * - test["a"][key] - * - xxx.test[a[a].test1[key]] - * - test.xxx.a["asa"][test1[key]] - * - */ - - var len, str, chr, index$1, expressionPos, expressionEndPos; - - - - function parseModel (val) { - // Fix https://github.com/vuejs/vue/pull/7730 - // allow v-model="obj.val " (trailing whitespace) - val = val.trim(); - len = val.length; - - if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) { - index$1 = val.lastIndexOf('.'); - if (index$1 > -1) { - return { - exp: val.slice(0, index$1), - key: '"' + val.slice(index$1 + 1) + '"' - } - } else { - return { - exp: val, - key: null - } - } - } - - str = val; - index$1 = expressionPos = expressionEndPos = 0; - - while (!eof()) { - chr = next(); - /* istanbul ignore if */ - if (isStringStart(chr)) { - parseString(chr); - } else if (chr === 0x5B) { - parseBracket(chr); - } - } - - return { - exp: val.slice(0, expressionPos), - key: val.slice(expressionPos + 1, expressionEndPos) - } - } - - function next () { - return str.charCodeAt(++index$1) - } - - function eof () { - return index$1 >= len - } - - function isStringStart (chr) { - return chr === 0x22 || chr === 0x27 - } - - function parseBracket (chr) { - var inBracket = 1; - expressionPos = index$1; - while (!eof()) { - chr = next(); - if (isStringStart(chr)) { - parseString(chr); - continue - } - if (chr === 0x5B) { inBracket++; } - if (chr === 0x5D) { inBracket--; } - if (inBracket === 0) { - expressionEndPos = index$1; - break - } - } - } - - function parseString (chr) { - var stringQuote = chr; - while (!eof()) { - chr = next(); - if (chr === stringQuote) { - break - } - } - } - - /* */ - - var warn$1; - - // in some cases, the event used has to be determined at runtime - // so we used some reserved tokens during compile. - var RANGE_TOKEN = '__r'; - var CHECKBOX_RADIO_TOKEN = '__c'; - - function model ( - el, - dir, - _warn - ) { - warn$1 = _warn; - var value = dir.value; - var modifiers = dir.modifiers; - var tag = el.tag; - var type = el.attrsMap.type; - - { - // inputs with type="file" are read only and setting the input's - // value will throw an error. - if (tag === 'input' && type === 'file') { - warn$1( - "<" + (el.tag) + " v-model=\"" + value + "\" type=\"file\">:\n" + - "File inputs are read only. Use a v-on:change listener instead.", - el.rawAttrsMap['v-model'] - ); - } - } - - if (el.component) { - genComponentModel(el, value, modifiers); - // component v-model doesn't need extra runtime - return false - } else if (tag === 'select') { - genSelect(el, value, modifiers); - } else if (tag === 'input' && type === 'checkbox') { - genCheckboxModel(el, value, modifiers); - } else if (tag === 'input' && type === 'radio') { - genRadioModel(el, value, modifiers); - } else if (tag === 'input' || tag === 'textarea') { - genDefaultModel(el, value, modifiers); - } else if (!config.isReservedTag(tag)) { - genComponentModel(el, value, modifiers); - // component v-model doesn't need extra runtime - return false - } else { - warn$1( - "<" + (el.tag) + " v-model=\"" + value + "\">: " + - "v-model is not supported on this element type. " + - 'If you are working with contenteditable, it\'s recommended to ' + - 'wrap a library dedicated for that purpose inside a custom component.', - el.rawAttrsMap['v-model'] - ); - } - - // ensure runtime directive metadata - return true - } - - function genCheckboxModel ( - el, - value, - modifiers - ) { - var number = modifiers && modifiers.number; - var valueBinding = getBindingAttr(el, 'value') || 'null'; - var trueValueBinding = getBindingAttr(el, 'true-value') || 'true'; - var falseValueBinding = getBindingAttr(el, 'false-value') || 'false'; - addProp(el, 'checked', - "Array.isArray(" + value + ")" + - "?_i(" + value + "," + valueBinding + ")>-1" + ( - trueValueBinding === 'true' - ? (":(" + value + ")") - : (":_q(" + value + "," + trueValueBinding + ")") - ) - ); - addHandler(el, 'change', - "var $$a=" + value + "," + - '$$el=$event.target,' + - "$$c=$$el.checked?(" + trueValueBinding + "):(" + falseValueBinding + ");" + - 'if(Array.isArray($$a)){' + - "var $$v=" + (number ? '_n(' + valueBinding + ')' : valueBinding) + "," + - '$$i=_i($$a,$$v);' + - "if($$el.checked){$$i<0&&(" + (genAssignmentCode(value, '$$a.concat([$$v])')) + ")}" + - "else{$$i>-1&&(" + (genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))')) + ")}" + - "}else{" + (genAssignmentCode(value, '$$c')) + "}", - null, true - ); - } - - function genRadioModel ( - el, - value, - modifiers - ) { - var number = modifiers && modifiers.number; - var valueBinding = getBindingAttr(el, 'value') || 'null'; - valueBinding = number ? ("_n(" + valueBinding + ")") : valueBinding; - addProp(el, 'checked', ("_q(" + value + "," + valueBinding + ")")); - addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true); - } - - function genSelect ( - el, - value, - modifiers - ) { - var number = modifiers && modifiers.number; - var selectedVal = "Array.prototype.filter" + - ".call($event.target.options,function(o){return o.selected})" + - ".map(function(o){var val = \"_value\" in o ? o._value : o.value;" + - "return " + (number ? '_n(val)' : 'val') + "})"; - - var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]'; - var code = "var $$selectedVal = " + selectedVal + ";"; - code = code + " " + (genAssignmentCode(value, assignment)); - addHandler(el, 'change', code, null, true); - } - - function genDefaultModel ( - el, - value, - modifiers - ) { - var type = el.attrsMap.type; - - // warn if v-bind:value conflicts with v-model - // except for inputs with v-bind:type - { - var value$1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value']; - var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type']; - if (value$1 && !typeBinding) { - var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value'; - warn$1( - binding + "=\"" + value$1 + "\" conflicts with v-model on the same element " + - 'because the latter already expands to a value binding internally', - el.rawAttrsMap[binding] - ); - } - } - - var ref = modifiers || {}; - var lazy = ref.lazy; - var number = ref.number; - var trim = ref.trim; - var needCompositionGuard = !lazy && type !== 'range'; - var event = lazy - ? 'change' - : type === 'range' - ? RANGE_TOKEN - : 'input'; - - var valueExpression = '$event.target.value'; - if (trim) { - valueExpression = "$event.target.value.trim()"; - } - if (number) { - valueExpression = "_n(" + valueExpression + ")"; - } - - var code = genAssignmentCode(value, valueExpression); - if (needCompositionGuard) { - code = "if($event.target.composing)return;" + code; - } - - addProp(el, 'value', ("(" + value + ")")); - addHandler(el, event, code, null, true); - if (trim || number) { - addHandler(el, 'blur', '$forceUpdate()'); - } - } - - /* */ - - // normalize v-model event tokens that can only be determined at runtime. - // it's important to place the event as the first in the array because - // the whole point is ensuring the v-model callback gets called before - // user-attached handlers. - function normalizeEvents (on) { - /* istanbul ignore if */ - if (isDef(on[RANGE_TOKEN])) { - // IE input[type=range] only supports `change` event - var event = isIE ? 'change' : 'input'; - on[event] = [].concat(on[RANGE_TOKEN], on[event] || []); - delete on[RANGE_TOKEN]; - } - // This was originally intended to fix #4521 but no longer necessary - // after 2.5. Keeping it for backwards compat with generated code from < 2.4 - /* istanbul ignore if */ - if (isDef(on[CHECKBOX_RADIO_TOKEN])) { - on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []); - delete on[CHECKBOX_RADIO_TOKEN]; - } - } - - var target$1; - - function createOnceHandler$1 (event, handler, capture) { - var _target = target$1; // save current target element in closure - return function onceHandler () { - var res = handler.apply(null, arguments); - if (res !== null) { - remove$2(event, onceHandler, capture, _target); - } - } - } - - // #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp - // implementation and does not fire microtasks in between event propagation, so - // safe to exclude. - var useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53); - - function add$1 ( - name, - handler, - capture, - passive - ) { - // async edge case #6566: inner click event triggers patch, event handler - // attached to outer element during patch, and triggered again. This - // happens because browsers fire microtask ticks between event propagation. - // the solution is simple: we save the timestamp when a handler is attached, - // and the handler would only fire if the event passed to it was fired - // AFTER it was attached. - if (useMicrotaskFix) { - var attachedTimestamp = currentFlushTimestamp; - var original = handler; - handler = original._wrapper = function (e) { - if ( - // no bubbling, should always fire. - // this is just a safety net in case event.timeStamp is unreliable in - // certain weird environments... - e.target === e.currentTarget || - // event is fired after handler attachment - e.timeStamp >= attachedTimestamp || - // bail for environments that have buggy event.timeStamp implementations - // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState - // #9681 QtWebEngine event.timeStamp is negative value - e.timeStamp <= 0 || - // #9448 bail if event is fired in another document in a multi-page - // electron/nw.js app, since event.timeStamp will be using a different - // starting reference - e.target.ownerDocument !== document - ) { - return original.apply(this, arguments) - } - }; - } - target$1.addEventListener( - name, - handler, - supportsPassive - ? { capture: capture, passive: passive } - : capture - ); - } - - function remove$2 ( - name, - handler, - capture, - _target - ) { - (_target || target$1).removeEventListener( - name, - handler._wrapper || handler, - capture - ); - } - - function updateDOMListeners (oldVnode, vnode) { - if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) { - return - } - var on = vnode.data.on || {}; - var oldOn = oldVnode.data.on || {}; - target$1 = vnode.elm; - normalizeEvents(on); - updateListeners(on, oldOn, add$1, remove$2, createOnceHandler$1, vnode.context); - target$1 = undefined; - } - - var events = { - create: updateDOMListeners, - update: updateDOMListeners - }; - - /* */ - - var svgContainer; - - function updateDOMProps (oldVnode, vnode) { - if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) { - return - } - var key, cur; - var elm = vnode.elm; - var oldProps = oldVnode.data.domProps || {}; - var props = vnode.data.domProps || {}; - // clone observed objects, as the user probably wants to mutate it - if (isDef(props.__ob__)) { - props = vnode.data.domProps = extend({}, props); - } - - for (key in oldProps) { - if (!(key in props)) { - elm[key] = ''; - } - } - - for (key in props) { - cur = props[key]; - // ignore children if the node has textContent or innerHTML, - // as these will throw away existing DOM nodes and cause removal errors - // on subsequent patches (#3360) - if (key === 'textContent' || key === 'innerHTML') { - if (vnode.children) { vnode.children.length = 0; } - if (cur === oldProps[key]) { continue } - // #6601 work around Chrome version <= 55 bug where single textNode - // replaced by innerHTML/textContent retains its parentNode property - if (elm.childNodes.length === 1) { - elm.removeChild(elm.childNodes[0]); - } - } - - if (key === 'value' && elm.tagName !== 'PROGRESS') { - // store value as _value as well since - // non-string values will be stringified - elm._value = cur; - // avoid resetting cursor position when value is the same - var strCur = isUndef(cur) ? '' : String(cur); - if (shouldUpdateValue(elm, strCur)) { - elm.value = strCur; - } - } else if (key === 'innerHTML' && isSVG(elm.tagName) && isUndef(elm.innerHTML)) { - // IE doesn't support innerHTML for SVG elements - svgContainer = svgContainer || document.createElement('div'); - svgContainer.innerHTML = "<svg>" + cur + "</svg>"; - var svg = svgContainer.firstChild; - while (elm.firstChild) { - elm.removeChild(elm.firstChild); - } - while (svg.firstChild) { - elm.appendChild(svg.firstChild); - } - } else if ( - // skip the update if old and new VDOM state is the same. - // `value` is handled separately because the DOM value may be temporarily - // out of sync with VDOM state due to focus, composition and modifiers. - // This #4521 by skipping the unnecesarry `checked` update. - cur !== oldProps[key] - ) { - // some property updates can throw - // e.g. `value` on <progress> w/ non-finite value - try { - elm[key] = cur; - } catch (e) {} - } - } - } - - // check platforms/web/util/attrs.js acceptValue - - - function shouldUpdateValue (elm, checkVal) { - return (!elm.composing && ( - elm.tagName === 'OPTION' || - isNotInFocusAndDirty(elm, checkVal) || - isDirtyWithModifiers(elm, checkVal) - )) - } - - function isNotInFocusAndDirty (elm, checkVal) { - // return true when textbox (.number and .trim) loses focus and its value is - // not equal to the updated value - var notInFocus = true; - // #6157 - // work around IE bug when accessing document.activeElement in an iframe - try { notInFocus = document.activeElement !== elm; } catch (e) {} - return notInFocus && elm.value !== checkVal - } - - function isDirtyWithModifiers (elm, newVal) { - var value = elm.value; - var modifiers = elm._vModifiers; // injected by v-model runtime - if (isDef(modifiers)) { - if (modifiers.number) { - return toNumber(value) !== toNumber(newVal) - } - if (modifiers.trim) { - return value.trim() !== newVal.trim() - } - } - return value !== newVal - } - - var domProps = { - create: updateDOMProps, - update: updateDOMProps - }; - - /* */ - - var parseStyleText = cached(function (cssText) { - var res = {}; - var listDelimiter = /;(?![^(]*\))/g; - var propertyDelimiter = /:(.+)/; - cssText.split(listDelimiter).forEach(function (item) { - if (item) { - var tmp = item.split(propertyDelimiter); - tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim()); - } - }); - return res - }); - - // merge static and dynamic style data on the same vnode - function normalizeStyleData (data) { - var style = normalizeStyleBinding(data.style); - // static style is pre-processed into an object during compilation - // and is always a fresh object, so it's safe to merge into it - return data.staticStyle - ? extend(data.staticStyle, style) - : style - } - - // normalize possible array / string values into Object - function normalizeStyleBinding (bindingStyle) { - if (Array.isArray(bindingStyle)) { - return toObject(bindingStyle) - } - if (typeof bindingStyle === 'string') { - return parseStyleText(bindingStyle) - } - return bindingStyle - } - - /** - * parent component style should be after child's - * so that parent component's style could override it - */ - function getStyle (vnode, checkChild) { - var res = {}; - var styleData; - - if (checkChild) { - var childNode = vnode; - while (childNode.componentInstance) { - childNode = childNode.componentInstance._vnode; - if ( - childNode && childNode.data && - (styleData = normalizeStyleData(childNode.data)) - ) { - extend(res, styleData); - } - } - } - - if ((styleData = normalizeStyleData(vnode.data))) { - extend(res, styleData); - } - - var parentNode = vnode; - while ((parentNode = parentNode.parent)) { - if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) { - extend(res, styleData); - } - } - return res - } - - /* */ - - var cssVarRE = /^--/; - var importantRE = /\s*!important$/; - var setProp = function (el, name, val) { - /* istanbul ignore if */ - if (cssVarRE.test(name)) { - el.style.setProperty(name, val); - } else if (importantRE.test(val)) { - el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important'); - } else { - var normalizedName = normalize(name); - if (Array.isArray(val)) { - // Support values array created by autoprefixer, e.g. - // {display: ["-webkit-box", "-ms-flexbox", "flex"]} - // Set them one by one, and the browser will only set those it can recognize - for (var i = 0, len = val.length; i < len; i++) { - el.style[normalizedName] = val[i]; - } - } else { - el.style[normalizedName] = val; - } - } - }; - - var vendorNames = ['Webkit', 'Moz', 'ms']; - - var emptyStyle; - var normalize = cached(function (prop) { - emptyStyle = emptyStyle || document.createElement('div').style; - prop = camelize(prop); - if (prop !== 'filter' && (prop in emptyStyle)) { - return prop - } - var capName = prop.charAt(0).toUpperCase() + prop.slice(1); - for (var i = 0; i < vendorNames.length; i++) { - var name = vendorNames[i] + capName; - if (name in emptyStyle) { - return name - } - } - }); - - function updateStyle (oldVnode, vnode) { - var data = vnode.data; - var oldData = oldVnode.data; - - if (isUndef(data.staticStyle) && isUndef(data.style) && - isUndef(oldData.staticStyle) && isUndef(oldData.style) - ) { - return - } - - var cur, name; - var el = vnode.elm; - var oldStaticStyle = oldData.staticStyle; - var oldStyleBinding = oldData.normalizedStyle || oldData.style || {}; - - // if static style exists, stylebinding already merged into it when doing normalizeStyleData - var oldStyle = oldStaticStyle || oldStyleBinding; - - var style = normalizeStyleBinding(vnode.data.style) || {}; - - // store normalized style under a different key for next diff - // make sure to clone it if it's reactive, since the user likely wants - // to mutate it. - vnode.data.normalizedStyle = isDef(style.__ob__) - ? extend({}, style) - : style; - - var newStyle = getStyle(vnode, true); - - for (name in oldStyle) { - if (isUndef(newStyle[name])) { - setProp(el, name, ''); - } - } - for (name in newStyle) { - cur = newStyle[name]; - if (cur !== oldStyle[name]) { - // ie9 setting to null has no effect, must use empty string - setProp(el, name, cur == null ? '' : cur); - } - } - } - - var style = { - create: updateStyle, - update: updateStyle - }; - - /* */ - - var whitespaceRE = /\s+/; - - /** - * Add class with compatibility for SVG since classList is not supported on - * SVG elements in IE - */ - function addClass (el, cls) { - /* istanbul ignore if */ - if (!cls || !(cls = cls.trim())) { - return - } - - /* istanbul ignore else */ - if (el.classList) { - if (cls.indexOf(' ') > -1) { - cls.split(whitespaceRE).forEach(function (c) { return el.classList.add(c); }); - } else { - el.classList.add(cls); - } - } else { - var cur = " " + (el.getAttribute('class') || '') + " "; - if (cur.indexOf(' ' + cls + ' ') < 0) { - el.setAttribute('class', (cur + cls).trim()); - } - } - } - - /** - * Remove class with compatibility for SVG since classList is not supported on - * SVG elements in IE - */ - function removeClass (el, cls) { - /* istanbul ignore if */ - if (!cls || !(cls = cls.trim())) { - return - } - - /* istanbul ignore else */ - if (el.classList) { - if (cls.indexOf(' ') > -1) { - cls.split(whitespaceRE).forEach(function (c) { return el.classList.remove(c); }); - } else { - el.classList.remove(cls); - } - if (!el.classList.length) { - el.removeAttribute('class'); - } - } else { - var cur = " " + (el.getAttribute('class') || '') + " "; - var tar = ' ' + cls + ' '; - while (cur.indexOf(tar) >= 0) { - cur = cur.replace(tar, ' '); - } - cur = cur.trim(); - if (cur) { - el.setAttribute('class', cur); - } else { - el.removeAttribute('class'); - } - } - } - - /* */ - - function resolveTransition (def$$1) { - if (!def$$1) { - return - } - /* istanbul ignore else */ - if (typeof def$$1 === 'object') { - var res = {}; - if (def$$1.css !== false) { - extend(res, autoCssTransition(def$$1.name || 'v')); - } - extend(res, def$$1); - return res - } else if (typeof def$$1 === 'string') { - return autoCssTransition(def$$1) - } - } - - var autoCssTransition = cached(function (name) { - return { - enterClass: (name + "-enter"), - enterToClass: (name + "-enter-to"), - enterActiveClass: (name + "-enter-active"), - leaveClass: (name + "-leave"), - leaveToClass: (name + "-leave-to"), - leaveActiveClass: (name + "-leave-active") - } - }); - - var hasTransition = inBrowser && !isIE9; - var TRANSITION = 'transition'; - var ANIMATION = 'animation'; - - // Transition property/event sniffing - var transitionProp = 'transition'; - var transitionEndEvent = 'transitionend'; - var animationProp = 'animation'; - var animationEndEvent = 'animationend'; - if (hasTransition) { - /* istanbul ignore if */ - if (window.ontransitionend === undefined && - window.onwebkittransitionend !== undefined - ) { - transitionProp = 'WebkitTransition'; - transitionEndEvent = 'webkitTransitionEnd'; - } - if (window.onanimationend === undefined && - window.onwebkitanimationend !== undefined - ) { - animationProp = 'WebkitAnimation'; - animationEndEvent = 'webkitAnimationEnd'; - } - } - - // binding to window is necessary to make hot reload work in IE in strict mode - var raf = inBrowser - ? window.requestAnimationFrame - ? window.requestAnimationFrame.bind(window) - : setTimeout - : /* istanbul ignore next */ function (fn) { return fn(); }; - - function nextFrame (fn) { - raf(function () { - raf(fn); - }); - } - - function addTransitionClass (el, cls) { - var transitionClasses = el._transitionClasses || (el._transitionClasses = []); - if (transitionClasses.indexOf(cls) < 0) { - transitionClasses.push(cls); - addClass(el, cls); - } - } - - function removeTransitionClass (el, cls) { - if (el._transitionClasses) { - remove(el._transitionClasses, cls); - } - removeClass(el, cls); - } - - function whenTransitionEnds ( - el, - expectedType, - cb - ) { - var ref = getTransitionInfo(el, expectedType); - var type = ref.type; - var timeout = ref.timeout; - var propCount = ref.propCount; - if (!type) { return cb() } - var event = type === TRANSITION ? transitionEndEvent : animationEndEvent; - var ended = 0; - var end = function () { - el.removeEventListener(event, onEnd); - cb(); - }; - var onEnd = function (e) { - if (e.target === el) { - if (++ended >= propCount) { - end(); - } - } - }; - setTimeout(function () { - if (ended < propCount) { - end(); - } - }, timeout + 1); - el.addEventListener(event, onEnd); - } - - var transformRE = /\b(transform|all)(,|$)/; - - function getTransitionInfo (el, expectedType) { - var styles = window.getComputedStyle(el); - // JSDOM may return undefined for transition properties - var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', '); - var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', '); - var transitionTimeout = getTimeout(transitionDelays, transitionDurations); - var animationDelays = (styles[animationProp + 'Delay'] || '').split(', '); - var animationDurations = (styles[animationProp + 'Duration'] || '').split(', '); - var animationTimeout = getTimeout(animationDelays, animationDurations); - - var type; - var timeout = 0; - var propCount = 0; - /* istanbul ignore if */ - if (expectedType === TRANSITION) { - if (transitionTimeout > 0) { - type = TRANSITION; - timeout = transitionTimeout; - propCount = transitionDurations.length; - } - } else if (expectedType === ANIMATION) { - if (animationTimeout > 0) { - type = ANIMATION; - timeout = animationTimeout; - propCount = animationDurations.length; - } - } else { - timeout = Math.max(transitionTimeout, animationTimeout); - type = timeout > 0 - ? transitionTimeout > animationTimeout - ? TRANSITION - : ANIMATION - : null; - propCount = type - ? type === TRANSITION - ? transitionDurations.length - : animationDurations.length - : 0; - } - var hasTransform = - type === TRANSITION && - transformRE.test(styles[transitionProp + 'Property']); - return { - type: type, - timeout: timeout, - propCount: propCount, - hasTransform: hasTransform - } - } - - function getTimeout (delays, durations) { - /* istanbul ignore next */ - while (delays.length < durations.length) { - delays = delays.concat(delays); - } - - return Math.max.apply(null, durations.map(function (d, i) { - return toMs(d) + toMs(delays[i]) - })) - } - - // Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers - // in a locale-dependent way, using a comma instead of a dot. - // If comma is not replaced with a dot, the input will be rounded down (i.e. acting - // as a floor function) causing unexpected behaviors - function toMs (s) { - return Number(s.slice(0, -1).replace(',', '.')) * 1000 - } - - /* */ - - function enter (vnode, toggleDisplay) { - var el = vnode.elm; - - // call leave callback now - if (isDef(el._leaveCb)) { - el._leaveCb.cancelled = true; - el._leaveCb(); - } - - var data = resolveTransition(vnode.data.transition); - if (isUndef(data)) { - return - } - - /* istanbul ignore if */ - if (isDef(el._enterCb) || el.nodeType !== 1) { - return - } - - var css = data.css; - var type = data.type; - var enterClass = data.enterClass; - var enterToClass = data.enterToClass; - var enterActiveClass = data.enterActiveClass; - var appearClass = data.appearClass; - var appearToClass = data.appearToClass; - var appearActiveClass = data.appearActiveClass; - var beforeEnter = data.beforeEnter; - var enter = data.enter; - var afterEnter = data.afterEnter; - var enterCancelled = data.enterCancelled; - var beforeAppear = data.beforeAppear; - var appear = data.appear; - var afterAppear = data.afterAppear; - var appearCancelled = data.appearCancelled; - var duration = data.duration; - - // activeInstance will always be the <transition> component managing this - // transition. One edge case to check is when the <transition> is placed - // as the root node of a child component. In that case we need to check - // <transition>'s parent for appear check. - var context = activeInstance; - var transitionNode = activeInstance.$vnode; - while (transitionNode && transitionNode.parent) { - context = transitionNode.context; - transitionNode = transitionNode.parent; - } - - var isAppear = !context._isMounted || !vnode.isRootInsert; - - if (isAppear && !appear && appear !== '') { - return - } - - var startClass = isAppear && appearClass - ? appearClass - : enterClass; - var activeClass = isAppear && appearActiveClass - ? appearActiveClass - : enterActiveClass; - var toClass = isAppear && appearToClass - ? appearToClass - : enterToClass; - - var beforeEnterHook = isAppear - ? (beforeAppear || beforeEnter) - : beforeEnter; - var enterHook = isAppear - ? (typeof appear === 'function' ? appear : enter) - : enter; - var afterEnterHook = isAppear - ? (afterAppear || afterEnter) - : afterEnter; - var enterCancelledHook = isAppear - ? (appearCancelled || enterCancelled) - : enterCancelled; - - var explicitEnterDuration = toNumber( - isObject(duration) - ? duration.enter - : duration - ); - - if (explicitEnterDuration != null) { - checkDuration(explicitEnterDuration, 'enter', vnode); - } - - var expectsCSS = css !== false && !isIE9; - var userWantsControl = getHookArgumentsLength(enterHook); - - var cb = el._enterCb = once(function () { - if (expectsCSS) { - removeTransitionClass(el, toClass); - removeTransitionClass(el, activeClass); - } - if (cb.cancelled) { - if (expectsCSS) { - removeTransitionClass(el, startClass); - } - enterCancelledHook && enterCancelledHook(el); - } else { - afterEnterHook && afterEnterHook(el); - } - el._enterCb = null; - }); - - if (!vnode.data.show) { - // remove pending leave element on enter by injecting an insert hook - mergeVNodeHook(vnode, 'insert', function () { - var parent = el.parentNode; - var pendingNode = parent && parent._pending && parent._pending[vnode.key]; - if (pendingNode && - pendingNode.tag === vnode.tag && - pendingNode.elm._leaveCb - ) { - pendingNode.elm._leaveCb(); - } - enterHook && enterHook(el, cb); - }); - } - - // start enter transition - beforeEnterHook && beforeEnterHook(el); - if (expectsCSS) { - addTransitionClass(el, startClass); - addTransitionClass(el, activeClass); - nextFrame(function () { - removeTransitionClass(el, startClass); - if (!cb.cancelled) { - addTransitionClass(el, toClass); - if (!userWantsControl) { - if (isValidDuration(explicitEnterDuration)) { - setTimeout(cb, explicitEnterDuration); - } else { - whenTransitionEnds(el, type, cb); - } - } - } - }); - } - - if (vnode.data.show) { - toggleDisplay && toggleDisplay(); - enterHook && enterHook(el, cb); - } - - if (!expectsCSS && !userWantsControl) { - cb(); - } - } - - function leave (vnode, rm) { - var el = vnode.elm; - - // call enter callback now - if (isDef(el._enterCb)) { - el._enterCb.cancelled = true; - el._enterCb(); - } - - var data = resolveTransition(vnode.data.transition); - if (isUndef(data) || el.nodeType !== 1) { - return rm() - } - - /* istanbul ignore if */ - if (isDef(el._leaveCb)) { - return - } - - var css = data.css; - var type = data.type; - var leaveClass = data.leaveClass; - var leaveToClass = data.leaveToClass; - var leaveActiveClass = data.leaveActiveClass; - var beforeLeave = data.beforeLeave; - var leave = data.leave; - var afterLeave = data.afterLeave; - var leaveCancelled = data.leaveCancelled; - var delayLeave = data.delayLeave; - var duration = data.duration; - - var expectsCSS = css !== false && !isIE9; - var userWantsControl = getHookArgumentsLength(leave); - - var explicitLeaveDuration = toNumber( - isObject(duration) - ? duration.leave - : duration - ); - - if (isDef(explicitLeaveDuration)) { - checkDuration(explicitLeaveDuration, 'leave', vnode); - } - - var cb = el._leaveCb = once(function () { - if (el.parentNode && el.parentNode._pending) { - el.parentNode._pending[vnode.key] = null; - } - if (expectsCSS) { - removeTransitionClass(el, leaveToClass); - removeTransitionClass(el, leaveActiveClass); - } - if (cb.cancelled) { - if (expectsCSS) { - removeTransitionClass(el, leaveClass); - } - leaveCancelled && leaveCancelled(el); - } else { - rm(); - afterLeave && afterLeave(el); - } - el._leaveCb = null; - }); - - if (delayLeave) { - delayLeave(performLeave); - } else { - performLeave(); - } - - function performLeave () { - // the delayed leave may have already been cancelled - if (cb.cancelled) { - return - } - // record leaving element - if (!vnode.data.show && el.parentNode) { - (el.parentNode._pending || (el.parentNode._pending = {}))[(vnode.key)] = vnode; - } - beforeLeave && beforeLeave(el); - if (expectsCSS) { - addTransitionClass(el, leaveClass); - addTransitionClass(el, leaveActiveClass); - nextFrame(function () { - removeTransitionClass(el, leaveClass); - if (!cb.cancelled) { - addTransitionClass(el, leaveToClass); - if (!userWantsControl) { - if (isValidDuration(explicitLeaveDuration)) { - setTimeout(cb, explicitLeaveDuration); - } else { - whenTransitionEnds(el, type, cb); - } - } - } - }); - } - leave && leave(el, cb); - if (!expectsCSS && !userWantsControl) { - cb(); - } - } - } - - // only used in dev mode - function checkDuration (val, name, vnode) { - if (typeof val !== 'number') { - warn( - "<transition> explicit " + name + " duration is not a valid number - " + - "got " + (JSON.stringify(val)) + ".", - vnode.context - ); - } else if (isNaN(val)) { - warn( - "<transition> explicit " + name + " duration is NaN - " + - 'the duration expression might be incorrect.', - vnode.context - ); - } - } - - function isValidDuration (val) { - return typeof val === 'number' && !isNaN(val) - } - - /** - * Normalize a transition hook's argument length. The hook may be: - * - a merged hook (invoker) with the original in .fns - * - a wrapped component method (check ._length) - * - a plain function (.length) - */ - function getHookArgumentsLength (fn) { - if (isUndef(fn)) { - return false - } - var invokerFns = fn.fns; - if (isDef(invokerFns)) { - // invoker - return getHookArgumentsLength( - Array.isArray(invokerFns) - ? invokerFns[0] - : invokerFns - ) - } else { - return (fn._length || fn.length) > 1 - } - } - - function _enter (_, vnode) { - if (vnode.data.show !== true) { - enter(vnode); - } - } - - var transition = inBrowser ? { - create: _enter, - activate: _enter, - remove: function remove$$1 (vnode, rm) { - /* istanbul ignore else */ - if (vnode.data.show !== true) { - leave(vnode, rm); - } else { - rm(); - } - } - } : {}; - - var platformModules = [ - attrs, - klass, - events, - domProps, - style, - transition - ]; - - /* */ - - // the directive module should be applied last, after all - // built-in modules have been applied. - var modules = platformModules.concat(baseModules); - - var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules }); - - /** - * Not type checking this file because flow doesn't like attaching - * properties to Elements. - */ - - /* istanbul ignore if */ - if (isIE9) { - // http://www.matts411.com/post/internet-explorer-9-oninput/ - document.addEventListener('selectionchange', function () { - var el = document.activeElement; - if (el && el.vmodel) { - trigger(el, 'input'); - } - }); - } - - var directive = { - inserted: function inserted (el, binding, vnode, oldVnode) { - if (vnode.tag === 'select') { - // #6903 - if (oldVnode.elm && !oldVnode.elm._vOptions) { - mergeVNodeHook(vnode, 'postpatch', function () { - directive.componentUpdated(el, binding, vnode); - }); - } else { - setSelected(el, binding, vnode.context); - } - el._vOptions = [].map.call(el.options, getValue); - } else if (vnode.tag === 'textarea' || isTextInputType(el.type)) { - el._vModifiers = binding.modifiers; - if (!binding.modifiers.lazy) { - el.addEventListener('compositionstart', onCompositionStart); - el.addEventListener('compositionend', onCompositionEnd); - // Safari < 10.2 & UIWebView doesn't fire compositionend when - // switching focus before confirming composition choice - // this also fixes the issue where some browsers e.g. iOS Chrome - // fires "change" instead of "input" on autocomplete. - el.addEventListener('change', onCompositionEnd); - /* istanbul ignore if */ - if (isIE9) { - el.vmodel = true; - } - } - } - }, - - componentUpdated: function componentUpdated (el, binding, vnode) { - if (vnode.tag === 'select') { - setSelected(el, binding, vnode.context); - // in case the options rendered by v-for have changed, - // it's possible that the value is out-of-sync with the rendered options. - // detect such cases and filter out values that no longer has a matching - // option in the DOM. - var prevOptions = el._vOptions; - var curOptions = el._vOptions = [].map.call(el.options, getValue); - if (curOptions.some(function (o, i) { return !looseEqual(o, prevOptions[i]); })) { - // trigger change event if - // no matching option found for at least one value - var needReset = el.multiple - ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions); }) - : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, curOptions); - if (needReset) { - trigger(el, 'change'); - } - } - } - } - }; - - function setSelected (el, binding, vm) { - actuallySetSelected(el, binding, vm); - /* istanbul ignore if */ - if (isIE || isEdge) { - setTimeout(function () { - actuallySetSelected(el, binding, vm); - }, 0); - } - } - - function actuallySetSelected (el, binding, vm) { - var value = binding.value; - var isMultiple = el.multiple; - if (isMultiple && !Array.isArray(value)) { - warn( - "<select multiple v-model=\"" + (binding.expression) + "\"> " + - "expects an Array value for its binding, but got " + (Object.prototype.toString.call(value).slice(8, -1)), - vm - ); - return - } - var selected, option; - for (var i = 0, l = el.options.length; i < l; i++) { - option = el.options[i]; - if (isMultiple) { - selected = looseIndexOf(value, getValue(option)) > -1; - if (option.selected !== selected) { - option.selected = selected; - } - } else { - if (looseEqual(getValue(option), value)) { - if (el.selectedIndex !== i) { - el.selectedIndex = i; - } - return - } - } - } - if (!isMultiple) { - el.selectedIndex = -1; - } - } - - function hasNoMatchingOption (value, options) { - return options.every(function (o) { return !looseEqual(o, value); }) - } - - function getValue (option) { - return '_value' in option - ? option._value - : option.value - } - - function onCompositionStart (e) { - e.target.composing = true; - } - - function onCompositionEnd (e) { - // prevent triggering an input event for no reason - if (!e.target.composing) { return } - e.target.composing = false; - trigger(e.target, 'input'); - } - - function trigger (el, type) { - var e = document.createEvent('HTMLEvents'); - e.initEvent(type, true, true); - el.dispatchEvent(e); - } - - /* */ - - // recursively search for possible transition defined inside the component root - function locateNode (vnode) { - return vnode.componentInstance && (!vnode.data || !vnode.data.transition) - ? locateNode(vnode.componentInstance._vnode) - : vnode - } - - var show = { - bind: function bind (el, ref, vnode) { - var value = ref.value; - - vnode = locateNode(vnode); - var transition$$1 = vnode.data && vnode.data.transition; - var originalDisplay = el.__vOriginalDisplay = - el.style.display === 'none' ? '' : el.style.display; - if (value && transition$$1) { - vnode.data.show = true; - enter(vnode, function () { - el.style.display = originalDisplay; - }); - } else { - el.style.display = value ? originalDisplay : 'none'; - } - }, - - update: function update (el, ref, vnode) { - var value = ref.value; - var oldValue = ref.oldValue; - - /* istanbul ignore if */ - if (!value === !oldValue) { return } - vnode = locateNode(vnode); - var transition$$1 = vnode.data && vnode.data.transition; - if (transition$$1) { - vnode.data.show = true; - if (value) { - enter(vnode, function () { - el.style.display = el.__vOriginalDisplay; - }); - } else { - leave(vnode, function () { - el.style.display = 'none'; - }); - } - } else { - el.style.display = value ? el.__vOriginalDisplay : 'none'; - } - }, - - unbind: function unbind ( - el, - binding, - vnode, - oldVnode, - isDestroy - ) { - if (!isDestroy) { - el.style.display = el.__vOriginalDisplay; - } - } - }; - - var platformDirectives = { - model: directive, - show: show - }; - - /* */ - - var transitionProps = { - name: String, - appear: Boolean, - css: Boolean, - mode: String, - type: String, - enterClass: String, - leaveClass: String, - enterToClass: String, - leaveToClass: String, - enterActiveClass: String, - leaveActiveClass: String, - appearClass: String, - appearActiveClass: String, - appearToClass: String, - duration: [Number, String, Object] - }; - - // in case the child is also an abstract component, e.g. <keep-alive> - // we want to recursively retrieve the real component to be rendered - function getRealChild (vnode) { - var compOptions = vnode && vnode.componentOptions; - if (compOptions && compOptions.Ctor.options.abstract) { - return getRealChild(getFirstComponentChild(compOptions.children)) - } else { - return vnode - } - } - - function extractTransitionData (comp) { - var data = {}; - var options = comp.$options; - // props - for (var key in options.propsData) { - data[key] = comp[key]; - } - // events. - // extract listeners and pass them directly to the transition methods - var listeners = options._parentListeners; - for (var key$1 in listeners) { - data[camelize(key$1)] = listeners[key$1]; - } - return data - } - - function placeholder (h, rawChild) { - if (/\d-keep-alive$/.test(rawChild.tag)) { - return h('keep-alive', { - props: rawChild.componentOptions.propsData - }) - } - } - - function hasParentTransition (vnode) { - while ((vnode = vnode.parent)) { - if (vnode.data.transition) { - return true - } - } - } - - function isSameChild (child, oldChild) { - return oldChild.key === child.key && oldChild.tag === child.tag - } - - var isNotTextNode = function (c) { return c.tag || isAsyncPlaceholder(c); }; - - var isVShowDirective = function (d) { return d.name === 'show'; }; - - var Transition = { - name: 'transition', - props: transitionProps, - abstract: true, - - render: function render (h) { - var this$1 = this; - - var children = this.$slots.default; - if (!children) { - return - } - - // filter out text nodes (possible whitespaces) - children = children.filter(isNotTextNode); - /* istanbul ignore if */ - if (!children.length) { - return - } - - // warn multiple elements - if (children.length > 1) { - warn( - '<transition> can only be used on a single element. Use ' + - '<transition-group> for lists.', - this.$parent - ); - } - - var mode = this.mode; - - // warn invalid mode - if (mode && mode !== 'in-out' && mode !== 'out-in' - ) { - warn( - 'invalid <transition> mode: ' + mode, - this.$parent - ); - } - - var rawChild = children[0]; - - // if this is a component root node and the component's - // parent container node also has transition, skip. - if (hasParentTransition(this.$vnode)) { - return rawChild - } - - // apply transition data to child - // use getRealChild() to ignore abstract components e.g. keep-alive - var child = getRealChild(rawChild); - /* istanbul ignore if */ - if (!child) { - return rawChild - } - - if (this._leaving) { - return placeholder(h, rawChild) - } - - // ensure a key that is unique to the vnode type and to this transition - // component instance. This key will be used to remove pending leaving nodes - // during entering. - var id = "__transition-" + (this._uid) + "-"; - child.key = child.key == null - ? child.isComment - ? id + 'comment' - : id + child.tag - : isPrimitive(child.key) - ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key) - : child.key; - - var data = (child.data || (child.data = {})).transition = extractTransitionData(this); - var oldRawChild = this._vnode; - var oldChild = getRealChild(oldRawChild); - - // mark v-show - // so that the transition module can hand over the control to the directive - if (child.data.directives && child.data.directives.some(isVShowDirective)) { - child.data.show = true; - } - - if ( - oldChild && - oldChild.data && - !isSameChild(child, oldChild) && - !isAsyncPlaceholder(oldChild) && - // #6687 component root is a comment node - !(oldChild.componentInstance && oldChild.componentInstance._vnode.isComment) - ) { - // replace old child transition data with fresh one - // important for dynamic transitions! - var oldData = oldChild.data.transition = extend({}, data); - // handle transition mode - if (mode === 'out-in') { - // return placeholder node and queue update when leave finishes - this._leaving = true; - mergeVNodeHook(oldData, 'afterLeave', function () { - this$1._leaving = false; - this$1.$forceUpdate(); - }); - return placeholder(h, rawChild) - } else if (mode === 'in-out') { - if (isAsyncPlaceholder(child)) { - return oldRawChild - } - var delayedLeave; - var performLeave = function () { delayedLeave(); }; - mergeVNodeHook(data, 'afterEnter', performLeave); - mergeVNodeHook(data, 'enterCancelled', performLeave); - mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; }); - } - } - - return rawChild - } - }; - - /* */ - - var props = extend({ - tag: String, - moveClass: String - }, transitionProps); - - delete props.mode; - - var TransitionGroup = { - props: props, - - beforeMount: function beforeMount () { - var this$1 = this; - - var update = this._update; - this._update = function (vnode, hydrating) { - var restoreActiveInstance = setActiveInstance(this$1); - // force removing pass - this$1.__patch__( - this$1._vnode, - this$1.kept, - false, // hydrating - true // removeOnly (!important, avoids unnecessary moves) - ); - this$1._vnode = this$1.kept; - restoreActiveInstance(); - update.call(this$1, vnode, hydrating); - }; - }, - - render: function render (h) { - var tag = this.tag || this.$vnode.data.tag || 'span'; - var map = Object.create(null); - var prevChildren = this.prevChildren = this.children; - var rawChildren = this.$slots.default || []; - var children = this.children = []; - var transitionData = extractTransitionData(this); - - for (var i = 0; i < rawChildren.length; i++) { - var c = rawChildren[i]; - if (c.tag) { - if (c.key != null && String(c.key).indexOf('__vlist') !== 0) { - children.push(c); - map[c.key] = c - ;(c.data || (c.data = {})).transition = transitionData; - } else { - var opts = c.componentOptions; - var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag; - warn(("<transition-group> children must be keyed: <" + name + ">")); - } - } - } - - if (prevChildren) { - var kept = []; - var removed = []; - for (var i$1 = 0; i$1 < prevChildren.length; i$1++) { - var c$1 = prevChildren[i$1]; - c$1.data.transition = transitionData; - c$1.data.pos = c$1.elm.getBoundingClientRect(); - if (map[c$1.key]) { - kept.push(c$1); - } else { - removed.push(c$1); - } - } - this.kept = h(tag, null, kept); - this.removed = removed; - } - - return h(tag, null, children) - }, - - updated: function updated () { - var children = this.prevChildren; - var moveClass = this.moveClass || ((this.name || 'v') + '-move'); - if (!children.length || !this.hasMove(children[0].elm, moveClass)) { - return - } - - // we divide the work into three loops to avoid mixing DOM reads and writes - // in each iteration - which helps prevent layout thrashing. - children.forEach(callPendingCbs); - children.forEach(recordPosition); - children.forEach(applyTranslation); - - // force reflow to put everything in position - // assign to this to avoid being removed in tree-shaking - // $flow-disable-line - this._reflow = document.body.offsetHeight; - - children.forEach(function (c) { - if (c.data.moved) { - var el = c.elm; - var s = el.style; - addTransitionClass(el, moveClass); - s.transform = s.WebkitTransform = s.transitionDuration = ''; - el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) { - if (e && e.target !== el) { - return - } - if (!e || /transform$/.test(e.propertyName)) { - el.removeEventListener(transitionEndEvent, cb); - el._moveCb = null; - removeTransitionClass(el, moveClass); - } - }); - } - }); - }, - - methods: { - hasMove: function hasMove (el, moveClass) { - /* istanbul ignore if */ - if (!hasTransition) { - return false - } - /* istanbul ignore if */ - if (this._hasMove) { - return this._hasMove - } - // Detect whether an element with the move class applied has - // CSS transitions. Since the element may be inside an entering - // transition at this very moment, we make a clone of it and remove - // all other transition classes applied to ensure only the move class - // is applied. - var clone = el.cloneNode(); - if (el._transitionClasses) { - el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); }); - } - addClass(clone, moveClass); - clone.style.display = 'none'; - this.$el.appendChild(clone); - var info = getTransitionInfo(clone); - this.$el.removeChild(clone); - return (this._hasMove = info.hasTransform) - } - } - }; - - function callPendingCbs (c) { - /* istanbul ignore if */ - if (c.elm._moveCb) { - c.elm._moveCb(); - } - /* istanbul ignore if */ - if (c.elm._enterCb) { - c.elm._enterCb(); - } - } - - function recordPosition (c) { - c.data.newPos = c.elm.getBoundingClientRect(); - } - - function applyTranslation (c) { - var oldPos = c.data.pos; - var newPos = c.data.newPos; - var dx = oldPos.left - newPos.left; - var dy = oldPos.top - newPos.top; - if (dx || dy) { - c.data.moved = true; - var s = c.elm.style; - s.transform = s.WebkitTransform = "translate(" + dx + "px," + dy + "px)"; - s.transitionDuration = '0s'; - } - } - - var platformComponents = { - Transition: Transition, - TransitionGroup: TransitionGroup - }; - - /* */ - - // install platform specific utils - Vue.config.mustUseProp = mustUseProp; - Vue.config.isReservedTag = isReservedTag; - Vue.config.isReservedAttr = isReservedAttr; - Vue.config.getTagNamespace = getTagNamespace; - Vue.config.isUnknownElement = isUnknownElement; - - // install platform runtime directives & components - extend(Vue.options.directives, platformDirectives); - extend(Vue.options.components, platformComponents); - - // install platform patch function - Vue.prototype.__patch__ = inBrowser ? patch : noop; - - // public mount method - Vue.prototype.$mount = function ( - el, - hydrating - ) { - el = el && inBrowser ? query(el) : undefined; - return mountComponent(this, el, hydrating) - }; - - // devtools global hook - /* istanbul ignore next */ - if (inBrowser) { - setTimeout(function () { - if (config.devtools) { - if (devtools) { - devtools.emit('init', Vue); - } else { - console[console.info ? 'info' : 'log']( - 'Download the Vue Devtools extension for a better development experience:\n' + - 'https://github.com/vuejs/vue-devtools' - ); - } - } - if (config.productionTip !== false && - typeof console !== 'undefined' - ) { - console[console.info ? 'info' : 'log']( - "You are running Vue in development mode.\n" + - "Make sure to turn on production mode when deploying for production.\n" + - "See more tips at https://vuejs.org/guide/deployment.html" - ); - } - }, 0); - } - - /* */ - - var defaultTagRE = /\{\{((?:.|\r?\n)+?)\}\}/g; - var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g; - - var buildRegex = cached(function (delimiters) { - var open = delimiters[0].replace(regexEscapeRE, '\\$&'); - var close = delimiters[1].replace(regexEscapeRE, '\\$&'); - return new RegExp(open + '((?:.|\\n)+?)' + close, 'g') - }); - - - - function parseText ( - text, - delimiters - ) { - var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE; - if (!tagRE.test(text)) { - return - } - var tokens = []; - var rawTokens = []; - var lastIndex = tagRE.lastIndex = 0; - var match, index, tokenValue; - while ((match = tagRE.exec(text))) { - index = match.index; - // push text token - if (index > lastIndex) { - rawTokens.push(tokenValue = text.slice(lastIndex, index)); - tokens.push(JSON.stringify(tokenValue)); - } - // tag token - var exp = parseFilters(match[1].trim()); - tokens.push(("_s(" + exp + ")")); - rawTokens.push({ '@binding': exp }); - lastIndex = index + match[0].length; - } - if (lastIndex < text.length) { - rawTokens.push(tokenValue = text.slice(lastIndex)); - tokens.push(JSON.stringify(tokenValue)); - } - return { - expression: tokens.join('+'), - tokens: rawTokens - } - } - - /* */ - - function transformNode (el, options) { - var warn = options.warn || baseWarn; - var staticClass = getAndRemoveAttr(el, 'class'); - if (staticClass) { - var res = parseText(staticClass, options.delimiters); - if (res) { - warn( - "class=\"" + staticClass + "\": " + - 'Interpolation inside attributes has been removed. ' + - 'Use v-bind or the colon shorthand instead. For example, ' + - 'instead of <div class="{{ val }}">, use <div :class="val">.', - el.rawAttrsMap['class'] - ); - } - } - if (staticClass) { - el.staticClass = JSON.stringify(staticClass); - } - var classBinding = getBindingAttr(el, 'class', false /* getStatic */); - if (classBinding) { - el.classBinding = classBinding; - } - } - - function genData (el) { - var data = ''; - if (el.staticClass) { - data += "staticClass:" + (el.staticClass) + ","; - } - if (el.classBinding) { - data += "class:" + (el.classBinding) + ","; - } - return data - } - - var klass$1 = { - staticKeys: ['staticClass'], - transformNode: transformNode, - genData: genData - }; - - /* */ - - function transformNode$1 (el, options) { - var warn = options.warn || baseWarn; - var staticStyle = getAndRemoveAttr(el, 'style'); - if (staticStyle) { - /* istanbul ignore if */ - { - var res = parseText(staticStyle, options.delimiters); - if (res) { - warn( - "style=\"" + staticStyle + "\": " + - 'Interpolation inside attributes has been removed. ' + - 'Use v-bind or the colon shorthand instead. For example, ' + - 'instead of <div style="{{ val }}">, use <div :style="val">.', - el.rawAttrsMap['style'] - ); - } - } - el.staticStyle = JSON.stringify(parseStyleText(staticStyle)); - } - - var styleBinding = getBindingAttr(el, 'style', false /* getStatic */); - if (styleBinding) { - el.styleBinding = styleBinding; - } - } - - function genData$1 (el) { - var data = ''; - if (el.staticStyle) { - data += "staticStyle:" + (el.staticStyle) + ","; - } - if (el.styleBinding) { - data += "style:(" + (el.styleBinding) + "),"; - } - return data - } - - var style$1 = { - staticKeys: ['staticStyle'], - transformNode: transformNode$1, - genData: genData$1 - }; - - /* */ - - var decoder; - - var he = { - decode: function decode (html) { - decoder = decoder || document.createElement('div'); - decoder.innerHTML = html; - return decoder.textContent - } - }; - - /* */ - - var isUnaryTag = makeMap( - 'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' + - 'link,meta,param,source,track,wbr' - ); - - // Elements that you can, intentionally, leave open - // (and which close themselves) - var canBeLeftOpenTag = makeMap( - 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source' - ); - - // HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3 - // Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content - var isNonPhrasingTag = makeMap( - 'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' + - 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' + - 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' + - 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' + - 'title,tr,track' - ); - - /** - * Not type-checking this file because it's mostly vendor code. - */ - - // Regular Expressions for parsing tags and attributes - var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; - var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; - var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + (unicodeRegExp.source) + "]*"; - var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")"; - var startTagOpen = new RegExp(("^<" + qnameCapture)); - var startTagClose = /^\s*(\/?)>/; - var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>")); - var doctype = /^<!DOCTYPE [^>]+>/i; - // #7298: escape - to avoid being pased as HTML comment when inlined in page - var comment = /^<!\--/; - var conditionalComment = /^<!\[/; - - // Special Elements (can contain anything) - var isPlainTextElement = makeMap('script,style,textarea', true); - var reCache = {}; - - var decodingMap = { - '<': '<', - '>': '>', - '"': '"', - '&': '&', - ' ': '\n', - '	': '\t', - ''': "'" - }; - var encodedAttr = /&(?:lt|gt|quot|amp|#39);/g; - var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g; - - // #5992 - var isIgnoreNewlineTag = makeMap('pre,textarea', true); - var shouldIgnoreFirstNewline = function (tag, html) { return tag && isIgnoreNewlineTag(tag) && html[0] === '\n'; }; - - function decodeAttr (value, shouldDecodeNewlines) { - var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr; - return value.replace(re, function (match) { return decodingMap[match]; }) - } - - function parseHTML (html, options) { - var stack = []; - var expectHTML = options.expectHTML; - var isUnaryTag$$1 = options.isUnaryTag || no; - var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no; - var index = 0; - var last, lastTag; - while (html) { - last = html; - // Make sure we're not in a plaintext content element like script/style - if (!lastTag || !isPlainTextElement(lastTag)) { - var textEnd = html.indexOf('<'); - if (textEnd === 0) { - // Comment: - if (comment.test(html)) { - var commentEnd = html.indexOf('-->'); - - if (commentEnd >= 0) { - if (options.shouldKeepComment) { - options.comment(html.substring(4, commentEnd), index, index + commentEnd + 3); - } - advance(commentEnd + 3); - continue - } - } - - // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment - if (conditionalComment.test(html)) { - var conditionalEnd = html.indexOf(']>'); - - if (conditionalEnd >= 0) { - advance(conditionalEnd + 2); - continue - } - } - - // Doctype: - var doctypeMatch = html.match(doctype); - if (doctypeMatch) { - advance(doctypeMatch[0].length); - continue - } - - // End tag: - var endTagMatch = html.match(endTag); - if (endTagMatch) { - var curIndex = index; - advance(endTagMatch[0].length); - parseEndTag(endTagMatch[1], curIndex, index); - continue - } - - // Start tag: - var startTagMatch = parseStartTag(); - if (startTagMatch) { - handleStartTag(startTagMatch); - if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) { - advance(1); - } - continue - } - } - - var text = (void 0), rest = (void 0), next = (void 0); - if (textEnd >= 0) { - rest = html.slice(textEnd); - while ( - !endTag.test(rest) && - !startTagOpen.test(rest) && - !comment.test(rest) && - !conditionalComment.test(rest) - ) { - // < in plain text, be forgiving and treat it as text - next = rest.indexOf('<', 1); - if (next < 0) { break } - textEnd += next; - rest = html.slice(textEnd); - } - text = html.substring(0, textEnd); - } - - if (textEnd < 0) { - text = html; - } - - if (text) { - advance(text.length); - } - - if (options.chars && text) { - options.chars(text, index - text.length, index); - } - } else { - var endTagLength = 0; - var stackedTag = lastTag.toLowerCase(); - var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\s\\S]*?)(</' + stackedTag + '[^>]*>)', 'i')); - var rest$1 = html.replace(reStackedTag, function (all, text, endTag) { - endTagLength = endTag.length; - if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') { - text = text - .replace(/<!\--([\s\S]*?)-->/g, '$1') // #7298 - .replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1'); - } - if (shouldIgnoreFirstNewline(stackedTag, text)) { - text = text.slice(1); - } - if (options.chars) { - options.chars(text); - } - return '' - }); - index += html.length - rest$1.length; - html = rest$1; - parseEndTag(stackedTag, index - endTagLength, index); - } - - if (html === last) { - options.chars && options.chars(html); - if (!stack.length && options.warn) { - options.warn(("Mal-formatted tag at end of template: \"" + html + "\""), { start: index + html.length }); - } - break - } - } - - // Clean up any remaining tags - parseEndTag(); - - function advance (n) { - index += n; - html = html.substring(n); - } - - function parseStartTag () { - var start = html.match(startTagOpen); - if (start) { - var match = { - tagName: start[1], - attrs: [], - start: index - }; - advance(start[0].length); - var end, attr; - while (!(end = html.match(startTagClose)) && (attr = html.match(dynamicArgAttribute) || html.match(attribute))) { - attr.start = index; - advance(attr[0].length); - attr.end = index; - match.attrs.push(attr); - } - if (end) { - match.unarySlash = end[1]; - advance(end[0].length); - match.end = index; - return match - } - } - } - - function handleStartTag (match) { - var tagName = match.tagName; - var unarySlash = match.unarySlash; - - if (expectHTML) { - if (lastTag === 'p' && isNonPhrasingTag(tagName)) { - parseEndTag(lastTag); - } - if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) { - parseEndTag(tagName); - } - } - - var unary = isUnaryTag$$1(tagName) || !!unarySlash; - - var l = match.attrs.length; - var attrs = new Array(l); - for (var i = 0; i < l; i++) { - var args = match.attrs[i]; - var value = args[3] || args[4] || args[5] || ''; - var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href' - ? options.shouldDecodeNewlinesForHref - : options.shouldDecodeNewlines; - attrs[i] = { - name: args[1], - value: decodeAttr(value, shouldDecodeNewlines) - }; - if (options.outputSourceRange) { - attrs[i].start = args.start + args[0].match(/^\s*/).length; - attrs[i].end = args.end; - } - } - - if (!unary) { - stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs, start: match.start, end: match.end }); - lastTag = tagName; - } - - if (options.start) { - options.start(tagName, attrs, unary, match.start, match.end); - } - } - - function parseEndTag (tagName, start, end) { - var pos, lowerCasedTagName; - if (start == null) { start = index; } - if (end == null) { end = index; } - - // Find the closest opened tag of the same type - if (tagName) { - lowerCasedTagName = tagName.toLowerCase(); - for (pos = stack.length - 1; pos >= 0; pos--) { - if (stack[pos].lowerCasedTag === lowerCasedTagName) { - break - } - } - } else { - // If no tag name is provided, clean shop - pos = 0; - } - - if (pos >= 0) { - // Close all the open elements, up the stack - for (var i = stack.length - 1; i >= pos; i--) { - if (i > pos || !tagName && - options.warn - ) { - options.warn( - ("tag <" + (stack[i].tag) + "> has no matching end tag."), - { start: stack[i].start, end: stack[i].end } - ); - } - if (options.end) { - options.end(stack[i].tag, start, end); - } - } - - // Remove the open elements from the stack - stack.length = pos; - lastTag = pos && stack[pos - 1].tag; - } else if (lowerCasedTagName === 'br') { - if (options.start) { - options.start(tagName, [], true, start, end); - } - } else if (lowerCasedTagName === 'p') { - if (options.start) { - options.start(tagName, [], false, start, end); - } - if (options.end) { - options.end(tagName, start, end); - } - } - } - } - - /* */ - - var onRE = /^@|^v-on:/; - var dirRE = /^v-|^@|^:/; - var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; - var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; - var stripParensRE = /^\(|\)$/g; - var dynamicArgRE = /^\[.*\]$/; - - var argRE = /:(.*)$/; - var bindRE = /^:|^\.|^v-bind:/; - var modifierRE = /\.[^.\]]+(?=[^\]]*$)/g; - - var slotRE = /^v-slot(:|$)|^#/; - - var lineBreakRE = /[\r\n]/; - var whitespaceRE$1 = /\s+/g; - - var invalidAttributeRE = /[\s"'<>\/=]/; - - var decodeHTMLCached = cached(he.decode); - - var emptySlotScopeToken = "_empty_"; - - // configurable state - var warn$2; - var delimiters; - var transforms; - var preTransforms; - var postTransforms; - var platformIsPreTag; - var platformMustUseProp; - var platformGetTagNamespace; - var maybeComponent; - - function createASTElement ( - tag, - attrs, - parent - ) { - return { - type: 1, - tag: tag, - attrsList: attrs, - attrsMap: makeAttrsMap(attrs), - rawAttrsMap: {}, - parent: parent, - children: [] - } - } - - /** - * Convert HTML string to AST. - */ - function parse ( - template, - options - ) { - warn$2 = options.warn || baseWarn; - - platformIsPreTag = options.isPreTag || no; - platformMustUseProp = options.mustUseProp || no; - platformGetTagNamespace = options.getTagNamespace || no; - var isReservedTag = options.isReservedTag || no; - maybeComponent = function (el) { return !!el.component || !isReservedTag(el.tag); }; - - transforms = pluckModuleFunction(options.modules, 'transformNode'); - preTransforms = pluckModuleFunction(options.modules, 'preTransformNode'); - postTransforms = pluckModuleFunction(options.modules, 'postTransformNode'); - - delimiters = options.delimiters; - - var stack = []; - var preserveWhitespace = options.preserveWhitespace !== false; - var whitespaceOption = options.whitespace; - var root; - var currentParent; - var inVPre = false; - var inPre = false; - var warned = false; - - function warnOnce (msg, range) { - if (!warned) { - warned = true; - warn$2(msg, range); - } - } - - function closeElement (element) { - trimEndingWhitespace(element); - if (!inVPre && !element.processed) { - element = processElement(element, options); - } - // tree management - if (!stack.length && element !== root) { - // allow root elements with v-if, v-else-if and v-else - if (root.if && (element.elseif || element.else)) { - { - checkRootConstraints(element); - } - addIfCondition(root, { - exp: element.elseif, - block: element - }); - } else { - warnOnce( - "Component template should contain exactly one root element. " + - "If you are using v-if on multiple elements, " + - "use v-else-if to chain them instead.", - { start: element.start } - ); - } - } - if (currentParent && !element.forbidden) { - if (element.elseif || element.else) { - processIfConditions(element, currentParent); - } else { - if (element.slotScope) { - // scoped slot - // keep it in the children list so that v-else(-if) conditions can - // find it as the prev node. - var name = element.slotTarget || '"default"' - ;(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element; - } - currentParent.children.push(element); - element.parent = currentParent; - } - } - - // final children cleanup - // filter out scoped slots - element.children = element.children.filter(function (c) { return !(c).slotScope; }); - // remove trailing whitespace node again - trimEndingWhitespace(element); - - // check pre state - if (element.pre) { - inVPre = false; - } - if (platformIsPreTag(element.tag)) { - inPre = false; - } - // apply post-transforms - for (var i = 0; i < postTransforms.length; i++) { - postTransforms[i](element, options); - } - } - - function trimEndingWhitespace (el) { - // remove trailing whitespace node - if (!inPre) { - var lastNode; - while ( - (lastNode = el.children[el.children.length - 1]) && - lastNode.type === 3 && - lastNode.text === ' ' - ) { - el.children.pop(); - } - } - } - - function checkRootConstraints (el) { - if (el.tag === 'slot' || el.tag === 'template') { - warnOnce( - "Cannot use <" + (el.tag) + "> as component root element because it may " + - 'contain multiple nodes.', - { start: el.start } - ); - } - if (el.attrsMap.hasOwnProperty('v-for')) { - warnOnce( - 'Cannot use v-for on stateful component root element because ' + - 'it renders multiple elements.', - el.rawAttrsMap['v-for'] - ); - } - } - - parseHTML(template, { - warn: warn$2, - expectHTML: options.expectHTML, - isUnaryTag: options.isUnaryTag, - canBeLeftOpenTag: options.canBeLeftOpenTag, - shouldDecodeNewlines: options.shouldDecodeNewlines, - shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref, - shouldKeepComment: options.comments, - outputSourceRange: options.outputSourceRange, - start: function start (tag, attrs, unary, start$1, end) { - // check namespace. - // inherit parent ns if there is one - var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag); - - // handle IE svg bug - /* istanbul ignore if */ - if (isIE && ns === 'svg') { - attrs = guardIESVGBug(attrs); - } - - var element = createASTElement(tag, attrs, currentParent); - if (ns) { - element.ns = ns; - } - - { - if (options.outputSourceRange) { - element.start = start$1; - element.end = end; - element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) { - cumulated[attr.name] = attr; - return cumulated - }, {}); - } - attrs.forEach(function (attr) { - if (invalidAttributeRE.test(attr.name)) { - warn$2( - "Invalid dynamic argument expression: attribute names cannot contain " + - "spaces, quotes, <, >, / or =.", - { - start: attr.start + attr.name.indexOf("["), - end: attr.start + attr.name.length - } - ); - } - }); - } - - if (isForbiddenTag(element) && !isServerRendering()) { - element.forbidden = true; - warn$2( - 'Templates should only be responsible for mapping the state to the ' + - 'UI. Avoid placing tags with side-effects in your templates, such as ' + - "<" + tag + ">" + ', as they will not be parsed.', - { start: element.start } - ); - } - - // apply pre-transforms - for (var i = 0; i < preTransforms.length; i++) { - element = preTransforms[i](element, options) || element; - } - - if (!inVPre) { - processPre(element); - if (element.pre) { - inVPre = true; - } - } - if (platformIsPreTag(element.tag)) { - inPre = true; - } - if (inVPre) { - processRawAttrs(element); - } else if (!element.processed) { - // structural directives - processFor(element); - processIf(element); - processOnce(element); - } - - if (!root) { - root = element; - { - checkRootConstraints(root); - } - } - - if (!unary) { - currentParent = element; - stack.push(element); - } else { - closeElement(element); - } - }, - - end: function end (tag, start, end$1) { - var element = stack[stack.length - 1]; - // pop stack - stack.length -= 1; - currentParent = stack[stack.length - 1]; - if (options.outputSourceRange) { - element.end = end$1; - } - closeElement(element); - }, - - chars: function chars (text, start, end) { - if (!currentParent) { - { - if (text === template) { - warnOnce( - 'Component template requires a root element, rather than just text.', - { start: start } - ); - } else if ((text = text.trim())) { - warnOnce( - ("text \"" + text + "\" outside root element will be ignored."), - { start: start } - ); - } - } - return - } - // IE textarea placeholder bug - /* istanbul ignore if */ - if (isIE && - currentParent.tag === 'textarea' && - currentParent.attrsMap.placeholder === text - ) { - return - } - var children = currentParent.children; - if (inPre || text.trim()) { - text = isTextTag(currentParent) ? text : decodeHTMLCached(text); - } else if (!children.length) { - // remove the whitespace-only node right after an opening tag - text = ''; - } else if (whitespaceOption) { - if (whitespaceOption === 'condense') { - // in condense mode, remove the whitespace node if it contains - // line break, otherwise condense to a single space - text = lineBreakRE.test(text) ? '' : ' '; - } else { - text = ' '; - } - } else { - text = preserveWhitespace ? ' ' : ''; - } - if (text) { - if (!inPre && whitespaceOption === 'condense') { - // condense consecutive whitespaces into single space - text = text.replace(whitespaceRE$1, ' '); - } - var res; - var child; - if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) { - child = { - type: 2, - expression: res.expression, - tokens: res.tokens, - text: text - }; - } else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') { - child = { - type: 3, - text: text - }; - } - if (child) { - if (options.outputSourceRange) { - child.start = start; - child.end = end; - } - children.push(child); - } - } - }, - comment: function comment (text, start, end) { - // adding anyting as a sibling to the root node is forbidden - // comments should still be allowed, but ignored - if (currentParent) { - var child = { - type: 3, - text: text, - isComment: true - }; - if (options.outputSourceRange) { - child.start = start; - child.end = end; - } - currentParent.children.push(child); - } - } - }); - return root - } - - function processPre (el) { - if (getAndRemoveAttr(el, 'v-pre') != null) { - el.pre = true; - } - } - - function processRawAttrs (el) { - var list = el.attrsList; - var len = list.length; - if (len) { - var attrs = el.attrs = new Array(len); - for (var i = 0; i < len; i++) { - attrs[i] = { - name: list[i].name, - value: JSON.stringify(list[i].value) - }; - if (list[i].start != null) { - attrs[i].start = list[i].start; - attrs[i].end = list[i].end; - } - } - } else if (!el.pre) { - // non root node in pre blocks with no attributes - el.plain = true; - } - } - - function processElement ( - element, - options - ) { - processKey(element); - - // determine whether this is a plain element after - // removing structural attributes - element.plain = ( - !element.key && - !element.scopedSlots && - !element.attrsList.length - ); - - processRef(element); - processSlotContent(element); - processSlotOutlet(element); - processComponent(element); - for (var i = 0; i < transforms.length; i++) { - element = transforms[i](element, options) || element; - } - processAttrs(element); - return element - } - - function processKey (el) { - var exp = getBindingAttr(el, 'key'); - if (exp) { - { - if (el.tag === 'template') { - warn$2( - "<template> cannot be keyed. Place the key on real elements instead.", - getRawBindingAttr(el, 'key') - ); - } - if (el.for) { - var iterator = el.iterator2 || el.iterator1; - var parent = el.parent; - if (iterator && iterator === exp && parent && parent.tag === 'transition-group') { - warn$2( - "Do not use v-for index as key on <transition-group> children, " + - "this is the same as not using keys.", - getRawBindingAttr(el, 'key'), - true /* tip */ - ); - } - } - } - el.key = exp; - } - } - - function processRef (el) { - var ref = getBindingAttr(el, 'ref'); - if (ref) { - el.ref = ref; - el.refInFor = checkInFor(el); - } - } - - function processFor (el) { - var exp; - if ((exp = getAndRemoveAttr(el, 'v-for'))) { - var res = parseFor(exp); - if (res) { - extend(el, res); - } else { - warn$2( - ("Invalid v-for expression: " + exp), - el.rawAttrsMap['v-for'] - ); - } - } - } - - - - function parseFor (exp) { - var inMatch = exp.match(forAliasRE); - if (!inMatch) { return } - var res = {}; - res.for = inMatch[2].trim(); - var alias = inMatch[1].trim().replace(stripParensRE, ''); - var iteratorMatch = alias.match(forIteratorRE); - if (iteratorMatch) { - res.alias = alias.replace(forIteratorRE, '').trim(); - res.iterator1 = iteratorMatch[1].trim(); - if (iteratorMatch[2]) { - res.iterator2 = iteratorMatch[2].trim(); - } - } else { - res.alias = alias; - } - return res - } - - function processIf (el) { - var exp = getAndRemoveAttr(el, 'v-if'); - if (exp) { - el.if = exp; - addIfCondition(el, { - exp: exp, - block: el - }); - } else { - if (getAndRemoveAttr(el, 'v-else') != null) { - el.else = true; - } - var elseif = getAndRemoveAttr(el, 'v-else-if'); - if (elseif) { - el.elseif = elseif; - } - } - } - - function processIfConditions (el, parent) { - var prev = findPrevElement(parent.children); - if (prev && prev.if) { - addIfCondition(prev, { - exp: el.elseif, - block: el - }); - } else { - warn$2( - "v-" + (el.elseif ? ('else-if="' + el.elseif + '"') : 'else') + " " + - "used on element <" + (el.tag) + "> without corresponding v-if.", - el.rawAttrsMap[el.elseif ? 'v-else-if' : 'v-else'] - ); - } - } - - function findPrevElement (children) { - var i = children.length; - while (i--) { - if (children[i].type === 1) { - return children[i] - } else { - if (children[i].text !== ' ') { - warn$2( - "text \"" + (children[i].text.trim()) + "\" between v-if and v-else(-if) " + - "will be ignored.", - children[i] - ); - } - children.pop(); - } - } - } - - function addIfCondition (el, condition) { - if (!el.ifConditions) { - el.ifConditions = []; - } - el.ifConditions.push(condition); - } - - function processOnce (el) { - var once$$1 = getAndRemoveAttr(el, 'v-once'); - if (once$$1 != null) { - el.once = true; - } - } - - // handle content being passed to a component as slot, - // e.g. <template slot="xxx">, <div slot-scope="xxx"> - function processSlotContent (el) { - var slotScope; - if (el.tag === 'template') { - slotScope = getAndRemoveAttr(el, 'scope'); - /* istanbul ignore if */ - if (slotScope) { - warn$2( - "the \"scope\" attribute for scoped slots have been deprecated and " + - "replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " + - "can also be used on plain elements in addition to <template> to " + - "denote scoped slots.", - el.rawAttrsMap['scope'], - true - ); - } - el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope'); - } else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) { - /* istanbul ignore if */ - if (el.attrsMap['v-for']) { - warn$2( - "Ambiguous combined usage of slot-scope and v-for on <" + (el.tag) + "> " + - "(v-for takes higher priority). Use a wrapper <template> for the " + - "scoped slot to make it clearer.", - el.rawAttrsMap['slot-scope'], - true - ); - } - el.slotScope = slotScope; - } - - // slot="xxx" - var slotTarget = getBindingAttr(el, 'slot'); - if (slotTarget) { - el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget; - el.slotTargetDynamic = !!(el.attrsMap[':slot'] || el.attrsMap['v-bind:slot']); - // preserve slot as an attribute for native shadow DOM compat - // only for non-scoped slots. - if (el.tag !== 'template' && !el.slotScope) { - addAttr(el, 'slot', slotTarget, getRawBindingAttr(el, 'slot')); - } - } - - // 2.6 v-slot syntax - { - if (el.tag === 'template') { - // v-slot on <template> - var slotBinding = getAndRemoveAttrByRegex(el, slotRE); - if (slotBinding) { - { - if (el.slotTarget || el.slotScope) { - warn$2( - "Unexpected mixed usage of different slot syntaxes.", - el - ); - } - if (el.parent && !maybeComponent(el.parent)) { - warn$2( - "<template v-slot> can only appear at the root level inside " + - "the receiving the component", - el - ); - } - } - var ref = getSlotName(slotBinding); - var name = ref.name; - var dynamic = ref.dynamic; - el.slotTarget = name; - el.slotTargetDynamic = dynamic; - el.slotScope = slotBinding.value || emptySlotScopeToken; // force it into a scoped slot for perf - } - } else { - // v-slot on component, denotes default slot - var slotBinding$1 = getAndRemoveAttrByRegex(el, slotRE); - if (slotBinding$1) { - { - if (!maybeComponent(el)) { - warn$2( - "v-slot can only be used on components or <template>.", - slotBinding$1 - ); - } - if (el.slotScope || el.slotTarget) { - warn$2( - "Unexpected mixed usage of different slot syntaxes.", - el - ); - } - if (el.scopedSlots) { - warn$2( - "To avoid scope ambiguity, the default slot should also use " + - "<template> syntax when there are other named slots.", - slotBinding$1 - ); - } - } - // add the component's children to its default slot - var slots = el.scopedSlots || (el.scopedSlots = {}); - var ref$1 = getSlotName(slotBinding$1); - var name$1 = ref$1.name; - var dynamic$1 = ref$1.dynamic; - var slotContainer = slots[name$1] = createASTElement('template', [], el); - slotContainer.slotTarget = name$1; - slotContainer.slotTargetDynamic = dynamic$1; - slotContainer.children = el.children.filter(function (c) { - if (!c.slotScope) { - c.parent = slotContainer; - return true - } - }); - slotContainer.slotScope = slotBinding$1.value || emptySlotScopeToken; - // remove children as they are returned from scopedSlots now - el.children = []; - // mark el non-plain so data gets generated - el.plain = false; - } - } - } - } - - function getSlotName (binding) { - var name = binding.name.replace(slotRE, ''); - if (!name) { - if (binding.name[0] !== '#') { - name = 'default'; - } else { - warn$2( - "v-slot shorthand syntax requires a slot name.", - binding - ); - } - } - return dynamicArgRE.test(name) - // dynamic [name] - ? { name: name.slice(1, -1), dynamic: true } - // static name - : { name: ("\"" + name + "\""), dynamic: false } - } - - // handle <slot/> outlets - function processSlotOutlet (el) { - if (el.tag === 'slot') { - el.slotName = getBindingAttr(el, 'name'); - if (el.key) { - warn$2( - "`key` does not work on <slot> because slots are abstract outlets " + - "and can possibly expand into multiple elements. " + - "Use the key on a wrapping element instead.", - getRawBindingAttr(el, 'key') - ); - } - } - } - - function processComponent (el) { - var binding; - if ((binding = getBindingAttr(el, 'is'))) { - el.component = binding; - } - if (getAndRemoveAttr(el, 'inline-template') != null) { - el.inlineTemplate = true; - } - } - - function processAttrs (el) { - var list = el.attrsList; - var i, l, name, rawName, value, modifiers, syncGen, isDynamic; - for (i = 0, l = list.length; i < l; i++) { - name = rawName = list[i].name; - value = list[i].value; - if (dirRE.test(name)) { - // mark element as dynamic - el.hasBindings = true; - // modifiers - modifiers = parseModifiers(name.replace(dirRE, '')); - // support .foo shorthand syntax for the .prop modifier - if (modifiers) { - name = name.replace(modifierRE, ''); - } - if (bindRE.test(name)) { // v-bind - name = name.replace(bindRE, ''); - value = parseFilters(value); - isDynamic = dynamicArgRE.test(name); - if (isDynamic) { - name = name.slice(1, -1); - } - if ( - value.trim().length === 0 - ) { - warn$2( - ("The value for a v-bind expression cannot be empty. Found in \"v-bind:" + name + "\"") - ); - } - if (modifiers) { - if (modifiers.prop && !isDynamic) { - name = camelize(name); - if (name === 'innerHtml') { name = 'innerHTML'; } - } - if (modifiers.camel && !isDynamic) { - name = camelize(name); - } - if (modifiers.sync) { - syncGen = genAssignmentCode(value, "$event"); - if (!isDynamic) { - addHandler( - el, - ("update:" + (camelize(name))), - syncGen, - null, - false, - warn$2, - list[i] - ); - if (hyphenate(name) !== camelize(name)) { - addHandler( - el, - ("update:" + (hyphenate(name))), - syncGen, - null, - false, - warn$2, - list[i] - ); - } - } else { - // handler w/ dynamic event name - addHandler( - el, - ("\"update:\"+(" + name + ")"), - syncGen, - null, - false, - warn$2, - list[i], - true // dynamic - ); - } - } - } - if ((modifiers && modifiers.prop) || ( - !el.component && platformMustUseProp(el.tag, el.attrsMap.type, name) - )) { - addProp(el, name, value, list[i], isDynamic); - } else { - addAttr(el, name, value, list[i], isDynamic); - } - } else if (onRE.test(name)) { // v-on - name = name.replace(onRE, ''); - isDynamic = dynamicArgRE.test(name); - if (isDynamic) { - name = name.slice(1, -1); - } - addHandler(el, name, value, modifiers, false, warn$2, list[i], isDynamic); - } else { // normal directives - name = name.replace(dirRE, ''); - // parse arg - var argMatch = name.match(argRE); - var arg = argMatch && argMatch[1]; - isDynamic = false; - if (arg) { - name = name.slice(0, -(arg.length + 1)); - if (dynamicArgRE.test(arg)) { - arg = arg.slice(1, -1); - isDynamic = true; - } - } - addDirective(el, name, rawName, value, arg, isDynamic, modifiers, list[i]); - if (name === 'model') { - checkForAliasModel(el, value); - } - } - } else { - // literal attribute - { - var res = parseText(value, delimiters); - if (res) { - warn$2( - name + "=\"" + value + "\": " + - 'Interpolation inside attributes has been removed. ' + - 'Use v-bind or the colon shorthand instead. For example, ' + - 'instead of <div id="{{ val }}">, use <div :id="val">.', - list[i] - ); - } - } - addAttr(el, name, JSON.stringify(value), list[i]); - // #6887 firefox doesn't update muted state if set via attribute - // even immediately after element creation - if (!el.component && - name === 'muted' && - platformMustUseProp(el.tag, el.attrsMap.type, name)) { - addProp(el, name, 'true', list[i]); - } - } - } - } - - function checkInFor (el) { - var parent = el; - while (parent) { - if (parent.for !== undefined) { - return true - } - parent = parent.parent; - } - return false - } - - function parseModifiers (name) { - var match = name.match(modifierRE); - if (match) { - var ret = {}; - match.forEach(function (m) { ret[m.slice(1)] = true; }); - return ret - } - } - - function makeAttrsMap (attrs) { - var map = {}; - for (var i = 0, l = attrs.length; i < l; i++) { - if ( - map[attrs[i].name] && !isIE && !isEdge - ) { - warn$2('duplicate attribute: ' + attrs[i].name, attrs[i]); - } - map[attrs[i].name] = attrs[i].value; - } - return map - } - - // for script (e.g. type="x/template") or style, do not decode content - function isTextTag (el) { - return el.tag === 'script' || el.tag === 'style' - } - - function isForbiddenTag (el) { - return ( - el.tag === 'style' || - (el.tag === 'script' && ( - !el.attrsMap.type || - el.attrsMap.type === 'text/javascript' - )) - ) - } - - var ieNSBug = /^xmlns:NS\d+/; - var ieNSPrefix = /^NS\d+:/; - - /* istanbul ignore next */ - function guardIESVGBug (attrs) { - var res = []; - for (var i = 0; i < attrs.length; i++) { - var attr = attrs[i]; - if (!ieNSBug.test(attr.name)) { - attr.name = attr.name.replace(ieNSPrefix, ''); - res.push(attr); - } - } - return res - } - - function checkForAliasModel (el, value) { - var _el = el; - while (_el) { - if (_el.for && _el.alias === value) { - warn$2( - "<" + (el.tag) + " v-model=\"" + value + "\">: " + - "You are binding v-model directly to a v-for iteration alias. " + - "This will not be able to modify the v-for source array because " + - "writing to the alias is like modifying a function local variable. " + - "Consider using an array of objects and use v-model on an object property instead.", - el.rawAttrsMap['v-model'] - ); - } - _el = _el.parent; - } - } - - /* */ - - function preTransformNode (el, options) { - if (el.tag === 'input') { - var map = el.attrsMap; - if (!map['v-model']) { - return - } - - var typeBinding; - if (map[':type'] || map['v-bind:type']) { - typeBinding = getBindingAttr(el, 'type'); - } - if (!map.type && !typeBinding && map['v-bind']) { - typeBinding = "(" + (map['v-bind']) + ").type"; - } - - if (typeBinding) { - var ifCondition = getAndRemoveAttr(el, 'v-if', true); - var ifConditionExtra = ifCondition ? ("&&(" + ifCondition + ")") : ""; - var hasElse = getAndRemoveAttr(el, 'v-else', true) != null; - var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true); - // 1. checkbox - var branch0 = cloneASTElement(el); - // process for on the main node - processFor(branch0); - addRawAttr(branch0, 'type', 'checkbox'); - processElement(branch0, options); - branch0.processed = true; // prevent it from double-processed - branch0.if = "(" + typeBinding + ")==='checkbox'" + ifConditionExtra; - addIfCondition(branch0, { - exp: branch0.if, - block: branch0 - }); - // 2. add radio else-if condition - var branch1 = cloneASTElement(el); - getAndRemoveAttr(branch1, 'v-for', true); - addRawAttr(branch1, 'type', 'radio'); - processElement(branch1, options); - addIfCondition(branch0, { - exp: "(" + typeBinding + ")==='radio'" + ifConditionExtra, - block: branch1 - }); - // 3. other - var branch2 = cloneASTElement(el); - getAndRemoveAttr(branch2, 'v-for', true); - addRawAttr(branch2, ':type', typeBinding); - processElement(branch2, options); - addIfCondition(branch0, { - exp: ifCondition, - block: branch2 - }); - - if (hasElse) { - branch0.else = true; - } else if (elseIfCondition) { - branch0.elseif = elseIfCondition; - } - - return branch0 - } - } - } - - function cloneASTElement (el) { - return createASTElement(el.tag, el.attrsList.slice(), el.parent) - } - - var model$1 = { - preTransformNode: preTransformNode - }; - - var modules$1 = [ - klass$1, - style$1, - model$1 - ]; - - /* */ - - function text (el, dir) { - if (dir.value) { - addProp(el, 'textContent', ("_s(" + (dir.value) + ")"), dir); - } - } - - /* */ - - function html (el, dir) { - if (dir.value) { - addProp(el, 'innerHTML', ("_s(" + (dir.value) + ")"), dir); - } - } - - var directives$1 = { - model: model, - text: text, - html: html - }; - - /* */ - - var baseOptions = { - expectHTML: true, - modules: modules$1, - directives: directives$1, - isPreTag: isPreTag, - isUnaryTag: isUnaryTag, - mustUseProp: mustUseProp, - canBeLeftOpenTag: canBeLeftOpenTag, - isReservedTag: isReservedTag, - getTagNamespace: getTagNamespace, - staticKeys: genStaticKeys(modules$1) - }; - - /* */ - - var isStaticKey; - var isPlatformReservedTag; - - var genStaticKeysCached = cached(genStaticKeys$1); - - /** - * Goal of the optimizer: walk the generated template AST tree - * and detect sub-trees that are purely static, i.e. parts of - * the DOM that never needs to change. - * - * Once we detect these sub-trees, we can: - * - * 1. Hoist them into constants, so that we no longer need to - * create fresh nodes for them on each re-render; - * 2. Completely skip them in the patching process. - */ - function optimize (root, options) { - if (!root) { return } - isStaticKey = genStaticKeysCached(options.staticKeys || ''); - isPlatformReservedTag = options.isReservedTag || no; - // first pass: mark all non-static nodes. - markStatic$1(root); - // second pass: mark static roots. - markStaticRoots(root, false); - } - - function genStaticKeys$1 (keys) { - return makeMap( - 'type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap' + - (keys ? ',' + keys : '') - ) - } - - function markStatic$1 (node) { - node.static = isStatic(node); - if (node.type === 1) { - // do not make component slot content static. this avoids - // 1. components not able to mutate slot nodes - // 2. static slot content fails for hot-reloading - if ( - !isPlatformReservedTag(node.tag) && - node.tag !== 'slot' && - node.attrsMap['inline-template'] == null - ) { - return - } - for (var i = 0, l = node.children.length; i < l; i++) { - var child = node.children[i]; - markStatic$1(child); - if (!child.static) { - node.static = false; - } - } - if (node.ifConditions) { - for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) { - var block = node.ifConditions[i$1].block; - markStatic$1(block); - if (!block.static) { - node.static = false; - } - } - } - } - } - - function markStaticRoots (node, isInFor) { - if (node.type === 1) { - if (node.static || node.once) { - node.staticInFor = isInFor; - } - // For a node to qualify as a static root, it should have children that - // are not just static text. Otherwise the cost of hoisting out will - // outweigh the benefits and it's better off to just always render it fresh. - if (node.static && node.children.length && !( - node.children.length === 1 && - node.children[0].type === 3 - )) { - node.staticRoot = true; - return - } else { - node.staticRoot = false; - } - if (node.children) { - for (var i = 0, l = node.children.length; i < l; i++) { - markStaticRoots(node.children[i], isInFor || !!node.for); - } - } - if (node.ifConditions) { - for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) { - markStaticRoots(node.ifConditions[i$1].block, isInFor); - } - } - } - } - - function isStatic (node) { - if (node.type === 2) { // expression - return false - } - if (node.type === 3) { // text - return true - } - return !!(node.pre || ( - !node.hasBindings && // no dynamic bindings - !node.if && !node.for && // not v-if or v-for or v-else - !isBuiltInTag(node.tag) && // not a built-in - isPlatformReservedTag(node.tag) && // not a component - !isDirectChildOfTemplateFor(node) && - Object.keys(node).every(isStaticKey) - )) - } - - function isDirectChildOfTemplateFor (node) { - while (node.parent) { - node = node.parent; - if (node.tag !== 'template') { - return false - } - if (node.for) { - return true - } - } - return false - } - - /* */ - - var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*(?:[\w$]+)?\s*\(/; - var fnInvokeRE = /\([^)]*?\);*$/; - var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/; - - // KeyboardEvent.keyCode aliases - var keyCodes = { - esc: 27, - tab: 9, - enter: 13, - space: 32, - up: 38, - left: 37, - right: 39, - down: 40, - 'delete': [8, 46] - }; - - // KeyboardEvent.key aliases - var keyNames = { - // #7880: IE11 and Edge use `Esc` for Escape key name. - esc: ['Esc', 'Escape'], - tab: 'Tab', - enter: 'Enter', - // #9112: IE11 uses `Spacebar` for Space key name. - space: [' ', 'Spacebar'], - // #7806: IE11 uses key names without `Arrow` prefix for arrow keys. - up: ['Up', 'ArrowUp'], - left: ['Left', 'ArrowLeft'], - right: ['Right', 'ArrowRight'], - down: ['Down', 'ArrowDown'], - // #9112: IE11 uses `Del` for Delete key name. - 'delete': ['Backspace', 'Delete', 'Del'] - }; - - // #4868: modifiers that prevent the execution of the listener - // need to explicitly return null so that we can determine whether to remove - // the listener for .once - var genGuard = function (condition) { return ("if(" + condition + ")return null;"); }; - - var modifierCode = { - stop: '$event.stopPropagation();', - prevent: '$event.preventDefault();', - self: genGuard("$event.target !== $event.currentTarget"), - ctrl: genGuard("!$event.ctrlKey"), - shift: genGuard("!$event.shiftKey"), - alt: genGuard("!$event.altKey"), - meta: genGuard("!$event.metaKey"), - left: genGuard("'button' in $event && $event.button !== 0"), - middle: genGuard("'button' in $event && $event.button !== 1"), - right: genGuard("'button' in $event && $event.button !== 2") - }; - - function genHandlers ( - events, - isNative - ) { - var prefix = isNative ? 'nativeOn:' : 'on:'; - var staticHandlers = ""; - var dynamicHandlers = ""; - for (var name in events) { - var handlerCode = genHandler(events[name]); - if (events[name] && events[name].dynamic) { - dynamicHandlers += name + "," + handlerCode + ","; - } else { - staticHandlers += "\"" + name + "\":" + handlerCode + ","; - } - } - staticHandlers = "{" + (staticHandlers.slice(0, -1)) + "}"; - if (dynamicHandlers) { - return prefix + "_d(" + staticHandlers + ",[" + (dynamicHandlers.slice(0, -1)) + "])" - } else { - return prefix + staticHandlers - } - } - - function genHandler (handler) { - if (!handler) { - return 'function(){}' - } - - if (Array.isArray(handler)) { - return ("[" + (handler.map(function (handler) { return genHandler(handler); }).join(',')) + "]") - } - - var isMethodPath = simplePathRE.test(handler.value); - var isFunctionExpression = fnExpRE.test(handler.value); - var isFunctionInvocation = simplePathRE.test(handler.value.replace(fnInvokeRE, '')); - - if (!handler.modifiers) { - if (isMethodPath || isFunctionExpression) { - return handler.value - } - return ("function($event){" + (isFunctionInvocation ? ("return " + (handler.value)) : handler.value) + "}") // inline statement - } else { - var code = ''; - var genModifierCode = ''; - var keys = []; - for (var key in handler.modifiers) { - if (modifierCode[key]) { - genModifierCode += modifierCode[key]; - // left/right - if (keyCodes[key]) { - keys.push(key); - } - } else if (key === 'exact') { - var modifiers = (handler.modifiers); - genModifierCode += genGuard( - ['ctrl', 'shift', 'alt', 'meta'] - .filter(function (keyModifier) { return !modifiers[keyModifier]; }) - .map(function (keyModifier) { return ("$event." + keyModifier + "Key"); }) - .join('||') - ); - } else { - keys.push(key); - } - } - if (keys.length) { - code += genKeyFilter(keys); - } - // Make sure modifiers like prevent and stop get executed after key filtering - if (genModifierCode) { - code += genModifierCode; - } - var handlerCode = isMethodPath - ? ("return " + (handler.value) + "($event)") - : isFunctionExpression - ? ("return (" + (handler.value) + ")($event)") - : isFunctionInvocation - ? ("return " + (handler.value)) - : handler.value; - return ("function($event){" + code + handlerCode + "}") - } - } - - function genKeyFilter (keys) { - return ( - // make sure the key filters only apply to KeyboardEvents - // #9441: can't use 'keyCode' in $event because Chrome autofill fires fake - // key events that do not have keyCode property... - "if(!$event.type.indexOf('key')&&" + - (keys.map(genFilterCode).join('&&')) + ")return null;" - ) - } - - function genFilterCode (key) { - var keyVal = parseInt(key, 10); - if (keyVal) { - return ("$event.keyCode!==" + keyVal) - } - var keyCode = keyCodes[key]; - var keyName = keyNames[key]; - return ( - "_k($event.keyCode," + - (JSON.stringify(key)) + "," + - (JSON.stringify(keyCode)) + "," + - "$event.key," + - "" + (JSON.stringify(keyName)) + - ")" - ) - } - - /* */ - - function on (el, dir) { - if (dir.modifiers) { - warn("v-on without argument does not support modifiers."); - } - el.wrapListeners = function (code) { return ("_g(" + code + "," + (dir.value) + ")"); }; - } - - /* */ - - function bind$1 (el, dir) { - el.wrapData = function (code) { - return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + "," + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + ")") - }; - } - - /* */ - - var baseDirectives = { - on: on, - bind: bind$1, - cloak: noop - }; - - /* */ - - - - - - var CodegenState = function CodegenState (options) { - this.options = options; - this.warn = options.warn || baseWarn; - this.transforms = pluckModuleFunction(options.modules, 'transformCode'); - this.dataGenFns = pluckModuleFunction(options.modules, 'genData'); - this.directives = extend(extend({}, baseDirectives), options.directives); - var isReservedTag = options.isReservedTag || no; - this.maybeComponent = function (el) { return !!el.component || !isReservedTag(el.tag); }; - this.onceId = 0; - this.staticRenderFns = []; - this.pre = false; - }; - - - - function generate ( - ast, - options - ) { - var state = new CodegenState(options); - var code = ast ? genElement(ast, state) : '_c("div")'; - return { - render: ("with(this){return " + code + "}"), - staticRenderFns: state.staticRenderFns - } - } - - function genElement (el, state) { - if (el.parent) { - el.pre = el.pre || el.parent.pre; - } - - if (el.staticRoot && !el.staticProcessed) { - return genStatic(el, state) - } else if (el.once && !el.onceProcessed) { - return genOnce(el, state) - } else if (el.for && !el.forProcessed) { - return genFor(el, state) - } else if (el.if && !el.ifProcessed) { - return genIf(el, state) - } else if (el.tag === 'template' && !el.slotTarget && !state.pre) { - return genChildren(el, state) || 'void 0' - } else if (el.tag === 'slot') { - return genSlot(el, state) - } else { - // component or element - var code; - if (el.component) { - code = genComponent(el.component, el, state); - } else { - var data; - if (!el.plain || (el.pre && state.maybeComponent(el))) { - data = genData$2(el, state); - } - - var children = el.inlineTemplate ? null : genChildren(el, state, true); - code = "_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")"; - } - // module transforms - for (var i = 0; i < state.transforms.length; i++) { - code = state.transforms[i](el, code); - } - return code - } - } - - // hoist static sub-trees out - function genStatic (el, state) { - el.staticProcessed = true; - // Some elements (templates) need to behave differently inside of a v-pre - // node. All pre nodes are static roots, so we can use this as a location to - // wrap a state change and reset it upon exiting the pre node. - var originalPreState = state.pre; - if (el.pre) { - state.pre = el.pre; - } - state.staticRenderFns.push(("with(this){return " + (genElement(el, state)) + "}")); - state.pre = originalPreState; - return ("_m(" + (state.staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + ")") - } - - // v-once - function genOnce (el, state) { - el.onceProcessed = true; - if (el.if && !el.ifProcessed) { - return genIf(el, state) - } else if (el.staticInFor) { - var key = ''; - var parent = el.parent; - while (parent) { - if (parent.for) { - key = parent.key; - break - } - parent = parent.parent; - } - if (!key) { - state.warn( - "v-once can only be used inside v-for that is keyed. ", - el.rawAttrsMap['v-once'] - ); - return genElement(el, state) - } - return ("_o(" + (genElement(el, state)) + "," + (state.onceId++) + "," + key + ")") - } else { - return genStatic(el, state) - } - } - - function genIf ( - el, - state, - altGen, - altEmpty - ) { - el.ifProcessed = true; // avoid recursion - return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty) - } - - function genIfConditions ( - conditions, - state, - altGen, - altEmpty - ) { - if (!conditions.length) { - return altEmpty || '_e()' - } - - var condition = conditions.shift(); - if (condition.exp) { - return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions, state, altGen, altEmpty))) - } else { - return ("" + (genTernaryExp(condition.block))) - } - - // v-if with v-once should generate code like (a)?_m(0):_m(1) - function genTernaryExp (el) { - return altGen - ? altGen(el, state) - : el.once - ? genOnce(el, state) - : genElement(el, state) - } - } - - function genFor ( - el, - state, - altGen, - altHelper - ) { - var exp = el.for; - var alias = el.alias; - var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : ''; - var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : ''; - - if (state.maybeComponent(el) && - el.tag !== 'slot' && - el.tag !== 'template' && - !el.key - ) { - state.warn( - "<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " + - "v-for should have explicit keys. " + - "See https://vuejs.org/guide/list.html#key for more info.", - el.rawAttrsMap['v-for'], - true /* tip */ - ); - } - - el.forProcessed = true; // avoid recursion - return (altHelper || '_l') + "((" + exp + ")," + - "function(" + alias + iterator1 + iterator2 + "){" + - "return " + ((altGen || genElement)(el, state)) + - '})' - } - - function genData$2 (el, state) { - var data = '{'; - - // directives first. - // directives may mutate the el's other properties before they are generated. - var dirs = genDirectives(el, state); - if (dirs) { data += dirs + ','; } - - // key - if (el.key) { - data += "key:" + (el.key) + ","; - } - // ref - if (el.ref) { - data += "ref:" + (el.ref) + ","; - } - if (el.refInFor) { - data += "refInFor:true,"; - } - // pre - if (el.pre) { - data += "pre:true,"; - } - // record original tag name for components using "is" attribute - if (el.component) { - data += "tag:\"" + (el.tag) + "\","; - } - // module data generation functions - for (var i = 0; i < state.dataGenFns.length; i++) { - data += state.dataGenFns[i](el); - } - // attributes - if (el.attrs) { - data += "attrs:" + (genProps(el.attrs)) + ","; - } - // DOM props - if (el.props) { - data += "domProps:" + (genProps(el.props)) + ","; - } - // event handlers - if (el.events) { - data += (genHandlers(el.events, false)) + ","; - } - if (el.nativeEvents) { - data += (genHandlers(el.nativeEvents, true)) + ","; - } - // slot target - // only for non-scoped slots - if (el.slotTarget && !el.slotScope) { - data += "slot:" + (el.slotTarget) + ","; - } - // scoped slots - if (el.scopedSlots) { - data += (genScopedSlots(el, el.scopedSlots, state)) + ","; - } - // component v-model - if (el.model) { - data += "model:{value:" + (el.model.value) + ",callback:" + (el.model.callback) + ",expression:" + (el.model.expression) + "},"; - } - // inline-template - if (el.inlineTemplate) { - var inlineTemplate = genInlineTemplate(el, state); - if (inlineTemplate) { - data += inlineTemplate + ","; - } - } - data = data.replace(/,$/, '') + '}'; - // v-bind dynamic argument wrap - // v-bind with dynamic arguments must be applied using the same v-bind object - // merge helper so that class/style/mustUseProp attrs are handled correctly. - if (el.dynamicAttrs) { - data = "_b(" + data + ",\"" + (el.tag) + "\"," + (genProps(el.dynamicAttrs)) + ")"; - } - // v-bind data wrap - if (el.wrapData) { - data = el.wrapData(data); - } - // v-on data wrap - if (el.wrapListeners) { - data = el.wrapListeners(data); - } - return data - } - - function genDirectives (el, state) { - var dirs = el.directives; - if (!dirs) { return } - var res = 'directives:['; - var hasRuntime = false; - var i, l, dir, needRuntime; - for (i = 0, l = dirs.length; i < l; i++) { - dir = dirs[i]; - needRuntime = true; - var gen = state.directives[dir.name]; - if (gen) { - // compile-time directive that manipulates AST. - // returns true if it also needs a runtime counterpart. - needRuntime = !!gen(el, dir, state.warn); - } - if (needRuntime) { - hasRuntime = true; - res += "{name:\"" + (dir.name) + "\",rawName:\"" + (dir.rawName) + "\"" + (dir.value ? (",value:(" + (dir.value) + "),expression:" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (",arg:" + (dir.isDynamicArg ? dir.arg : ("\"" + (dir.arg) + "\""))) : '') + (dir.modifiers ? (",modifiers:" + (JSON.stringify(dir.modifiers))) : '') + "},"; - } - } - if (hasRuntime) { - return res.slice(0, -1) + ']' - } - } - - function genInlineTemplate (el, state) { - var ast = el.children[0]; - if (el.children.length !== 1 || ast.type !== 1) { - state.warn( - 'Inline-template components must have exactly one child element.', - { start: el.start } - ); - } - if (ast && ast.type === 1) { - var inlineRenderFns = generate(ast, state.options); - return ("inlineTemplate:{render:function(){" + (inlineRenderFns.render) + "},staticRenderFns:[" + (inlineRenderFns.staticRenderFns.map(function (code) { return ("function(){" + code + "}"); }).join(',')) + "]}") - } - } - - function genScopedSlots ( - el, - slots, - state - ) { - // by default scoped slots are considered "stable", this allows child - // components with only scoped slots to skip forced updates from parent. - // but in some cases we have to bail-out of this optimization - // for example if the slot contains dynamic names, has v-if or v-for on them... - var needsForceUpdate = el.for || Object.keys(slots).some(function (key) { - var slot = slots[key]; - return ( - slot.slotTargetDynamic || - slot.if || - slot.for || - containsSlotChild(slot) // is passing down slot from parent which may be dynamic - ) - }); - - // #9534: if a component with scoped slots is inside a conditional branch, - // it's possible for the same component to be reused but with different - // compiled slot content. To avoid that, we generate a unique key based on - // the generated code of all the slot contents. - var needsKey = !!el.if; - - // OR when it is inside another scoped slot or v-for (the reactivity may be - // disconnected due to the intermediate scope variable) - // #9438, #9506 - // TODO: this can be further optimized by properly analyzing in-scope bindings - // and skip force updating ones that do not actually use scope variables. - if (!needsForceUpdate) { - var parent = el.parent; - while (parent) { - if ( - (parent.slotScope && parent.slotScope !== emptySlotScopeToken) || - parent.for - ) { - needsForceUpdate = true; - break - } - if (parent.if) { - needsKey = true; - } - parent = parent.parent; - } - } - - var generatedSlots = Object.keys(slots) - .map(function (key) { return genScopedSlot(slots[key], state); }) - .join(','); - - return ("scopedSlots:_u([" + generatedSlots + "]" + (needsForceUpdate ? ",null,true" : "") + (!needsForceUpdate && needsKey ? (",null,false," + (hash(generatedSlots))) : "") + ")") - } - - function hash(str) { - var hash = 5381; - var i = str.length; - while(i) { - hash = (hash * 33) ^ str.charCodeAt(--i); - } - return hash >>> 0 - } - - function containsSlotChild (el) { - if (el.type === 1) { - if (el.tag === 'slot') { - return true - } - return el.children.some(containsSlotChild) - } - return false - } - - function genScopedSlot ( - el, - state - ) { - var isLegacySyntax = el.attrsMap['slot-scope']; - if (el.if && !el.ifProcessed && !isLegacySyntax) { - return genIf(el, state, genScopedSlot, "null") - } - if (el.for && !el.forProcessed) { - return genFor(el, state, genScopedSlot) - } - var slotScope = el.slotScope === emptySlotScopeToken - ? "" - : String(el.slotScope); - var fn = "function(" + slotScope + "){" + - "return " + (el.tag === 'template' - ? el.if && isLegacySyntax - ? ("(" + (el.if) + ")?" + (genChildren(el, state) || 'undefined') + ":undefined") - : genChildren(el, state) || 'undefined' - : genElement(el, state)) + "}"; - // reverse proxy v-slot without scope on this.$slots - var reverseProxy = slotScope ? "" : ",proxy:true"; - return ("{key:" + (el.slotTarget || "\"default\"") + ",fn:" + fn + reverseProxy + "}") - } - - function genChildren ( - el, - state, - checkSkip, - altGenElement, - altGenNode - ) { - var children = el.children; - if (children.length) { - var el$1 = children[0]; - // optimize single v-for - if (children.length === 1 && - el$1.for && - el$1.tag !== 'template' && - el$1.tag !== 'slot' - ) { - var normalizationType = checkSkip - ? state.maybeComponent(el$1) ? ",1" : ",0" - : ""; - return ("" + ((altGenElement || genElement)(el$1, state)) + normalizationType) - } - var normalizationType$1 = checkSkip - ? getNormalizationType(children, state.maybeComponent) - : 0; - var gen = altGenNode || genNode; - return ("[" + (children.map(function (c) { return gen(c, state); }).join(',')) + "]" + (normalizationType$1 ? ("," + normalizationType$1) : '')) - } - } - - // determine the normalization needed for the children array. - // 0: no normalization needed - // 1: simple normalization needed (possible 1-level deep nested array) - // 2: full normalization needed - function getNormalizationType ( - children, - maybeComponent - ) { - var res = 0; - for (var i = 0; i < children.length; i++) { - var el = children[i]; - if (el.type !== 1) { - continue - } - if (needsNormalization(el) || - (el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) { - res = 2; - break - } - if (maybeComponent(el) || - (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) { - res = 1; - } - } - return res - } - - function needsNormalization (el) { - return el.for !== undefined || el.tag === 'template' || el.tag === 'slot' - } - - function genNode (node, state) { - if (node.type === 1) { - return genElement(node, state) - } else if (node.type === 3 && node.isComment) { - return genComment(node) - } else { - return genText(node) - } - } - - function genText (text) { - return ("_v(" + (text.type === 2 - ? text.expression // no need for () because already wrapped in _s() - : transformSpecialNewlines(JSON.stringify(text.text))) + ")") - } - - function genComment (comment) { - return ("_e(" + (JSON.stringify(comment.text)) + ")") - } - - function genSlot (el, state) { - var slotName = el.slotName || '"default"'; - var children = genChildren(el, state); - var res = "_t(" + slotName + (children ? ("," + children) : ''); - var attrs = el.attrs || el.dynamicAttrs - ? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(function (attr) { return ({ - // slot props are camelized - name: camelize(attr.name), - value: attr.value, - dynamic: attr.dynamic - }); })) - : null; - var bind$$1 = el.attrsMap['v-bind']; - if ((attrs || bind$$1) && !children) { - res += ",null"; - } - if (attrs) { - res += "," + attrs; - } - if (bind$$1) { - res += (attrs ? '' : ',null') + "," + bind$$1; - } - return res + ')' - } - - // componentName is el.component, take it as argument to shun flow's pessimistic refinement - function genComponent ( - componentName, - el, - state - ) { - var children = el.inlineTemplate ? null : genChildren(el, state, true); - return ("_c(" + componentName + "," + (genData$2(el, state)) + (children ? ("," + children) : '') + ")") - } - - function genProps (props) { - var staticProps = ""; - var dynamicProps = ""; - for (var i = 0; i < props.length; i++) { - var prop = props[i]; - var value = transformSpecialNewlines(prop.value); - if (prop.dynamic) { - dynamicProps += (prop.name) + "," + value + ","; - } else { - staticProps += "\"" + (prop.name) + "\":" + value + ","; - } - } - staticProps = "{" + (staticProps.slice(0, -1)) + "}"; - if (dynamicProps) { - return ("_d(" + staticProps + ",[" + (dynamicProps.slice(0, -1)) + "])") - } else { - return staticProps - } - } - - // #3895, #4268 - function transformSpecialNewlines (text) { - return text - .replace(/\u2028/g, '\\u2028') - .replace(/\u2029/g, '\\u2029') - } - - /* */ - - - - // these keywords should not appear inside expressions, but operators like - // typeof, instanceof and in are allowed - var prohibitedKeywordRE = new RegExp('\\b' + ( - 'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' + - 'super,throw,while,yield,delete,export,import,return,switch,default,' + - 'extends,finally,continue,debugger,function,arguments' - ).split(',').join('\\b|\\b') + '\\b'); - - // these unary operators should not be used as property/method names - var unaryOperatorsRE = new RegExp('\\b' + ( - 'delete,typeof,void' - ).split(',').join('\\s*\\([^\\)]*\\)|\\b') + '\\s*\\([^\\)]*\\)'); - - // strip strings in expressions - var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g; - - // detect problematic expressions in a template - function detectErrors (ast, warn) { - if (ast) { - checkNode(ast, warn); - } - } - - function checkNode (node, warn) { - if (node.type === 1) { - for (var name in node.attrsMap) { - if (dirRE.test(name)) { - var value = node.attrsMap[name]; - if (value) { - var range = node.rawAttrsMap[name]; - if (name === 'v-for') { - checkFor(node, ("v-for=\"" + value + "\""), warn, range); - } else if (onRE.test(name)) { - checkEvent(value, (name + "=\"" + value + "\""), warn, range); - } else { - checkExpression(value, (name + "=\"" + value + "\""), warn, range); - } - } - } - } - if (node.children) { - for (var i = 0; i < node.children.length; i++) { - checkNode(node.children[i], warn); - } - } - } else if (node.type === 2) { - checkExpression(node.expression, node.text, warn, node); - } - } - - function checkEvent (exp, text, warn, range) { - var stipped = exp.replace(stripStringRE, ''); - var keywordMatch = stipped.match(unaryOperatorsRE); - if (keywordMatch && stipped.charAt(keywordMatch.index - 1) !== '$') { - warn( - "avoid using JavaScript unary operator as property name: " + - "\"" + (keywordMatch[0]) + "\" in expression " + (text.trim()), - range - ); - } - checkExpression(exp, text, warn, range); - } - - function checkFor (node, text, warn, range) { - checkExpression(node.for || '', text, warn, range); - checkIdentifier(node.alias, 'v-for alias', text, warn, range); - checkIdentifier(node.iterator1, 'v-for iterator', text, warn, range); - checkIdentifier(node.iterator2, 'v-for iterator', text, warn, range); - } - - function checkIdentifier ( - ident, - type, - text, - warn, - range - ) { - if (typeof ident === 'string') { - try { - new Function(("var " + ident + "=_")); - } catch (e) { - warn(("invalid " + type + " \"" + ident + "\" in expression: " + (text.trim())), range); - } - } - } - - function checkExpression (exp, text, warn, range) { - try { - new Function(("return " + exp)); - } catch (e) { - var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE); - if (keywordMatch) { - warn( - "avoid using JavaScript keyword as property name: " + - "\"" + (keywordMatch[0]) + "\"\n Raw expression: " + (text.trim()), - range - ); - } else { - warn( - "invalid expression: " + (e.message) + " in\n\n" + - " " + exp + "\n\n" + - " Raw expression: " + (text.trim()) + "\n", - range - ); - } - } - } - - /* */ - - var range = 2; - - function generateCodeFrame ( - source, - start, - end - ) { - if ( start === void 0 ) start = 0; - if ( end === void 0 ) end = source.length; - - var lines = source.split(/\r?\n/); - var count = 0; - var res = []; - for (var i = 0; i < lines.length; i++) { - count += lines[i].length + 1; - if (count >= start) { - for (var j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) { continue } - res.push(("" + (j + 1) + (repeat$1(" ", 3 - String(j + 1).length)) + "| " + (lines[j]))); - var lineLength = lines[j].length; - if (j === i) { - // push underline - var pad = start - (count - lineLength) + 1; - var length = end > count ? lineLength - pad : end - start; - res.push(" | " + repeat$1(" ", pad) + repeat$1("^", length)); - } else if (j > i) { - if (end > count) { - var length$1 = Math.min(end - count, lineLength); - res.push(" | " + repeat$1("^", length$1)); - } - count += lineLength + 1; - } - } - break - } - } - return res.join('\n') - } - - function repeat$1 (str, n) { - var result = ''; - if (n > 0) { - while (true) { // eslint-disable-line - if (n & 1) { result += str; } - n >>>= 1; - if (n <= 0) { break } - str += str; - } - } - return result - } - - /* */ - - - - function createFunction (code, errors) { - try { - return new Function(code) - } catch (err) { - errors.push({ err: err, code: code }); - return noop - } - } - - function createCompileToFunctionFn (compile) { - var cache = Object.create(null); - - return function compileToFunctions ( - template, - options, - vm - ) { - options = extend({}, options); - var warn$$1 = options.warn || warn; - delete options.warn; - - /* istanbul ignore if */ - { - // detect possible CSP restriction - try { - new Function('return 1'); - } catch (e) { - if (e.toString().match(/unsafe-eval|CSP/)) { - warn$$1( - 'It seems you are using the standalone build of Vue.js in an ' + - 'environment with Content Security Policy that prohibits unsafe-eval. ' + - 'The template compiler cannot work in this environment. Consider ' + - 'relaxing the policy to allow unsafe-eval or pre-compiling your ' + - 'templates into render functions.' - ); - } - } - } - - // check cache - var key = options.delimiters - ? String(options.delimiters) + template - : template; - if (cache[key]) { - return cache[key] - } - - // compile - var compiled = compile(template, options); - - // check compilation errors/tips - { - if (compiled.errors && compiled.errors.length) { - if (options.outputSourceRange) { - compiled.errors.forEach(function (e) { - warn$$1( - "Error compiling template:\n\n" + (e.msg) + "\n\n" + - generateCodeFrame(template, e.start, e.end), - vm - ); - }); - } else { - warn$$1( - "Error compiling template:\n\n" + template + "\n\n" + - compiled.errors.map(function (e) { return ("- " + e); }).join('\n') + '\n', - vm - ); - } - } - if (compiled.tips && compiled.tips.length) { - if (options.outputSourceRange) { - compiled.tips.forEach(function (e) { return tip(e.msg, vm); }); - } else { - compiled.tips.forEach(function (msg) { return tip(msg, vm); }); - } - } - } - - // turn code into functions - var res = {}; - var fnGenErrors = []; - res.render = createFunction(compiled.render, fnGenErrors); - res.staticRenderFns = compiled.staticRenderFns.map(function (code) { - return createFunction(code, fnGenErrors) - }); - - // check function generation errors. - // this should only happen if there is a bug in the compiler itself. - // mostly for codegen development use - /* istanbul ignore if */ - { - if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) { - warn$$1( - "Failed to generate render function:\n\n" + - fnGenErrors.map(function (ref) { - var err = ref.err; - var code = ref.code; - - return ((err.toString()) + " in\n\n" + code + "\n"); - }).join('\n'), - vm - ); - } - } - - return (cache[key] = res) - } - } - - /* */ - - function createCompilerCreator (baseCompile) { - return function createCompiler (baseOptions) { - function compile ( - template, - options - ) { - var finalOptions = Object.create(baseOptions); - var errors = []; - var tips = []; - - var warn = function (msg, range, tip) { - (tip ? tips : errors).push(msg); - }; - - if (options) { - if (options.outputSourceRange) { - // $flow-disable-line - var leadingSpaceLength = template.match(/^\s*/)[0].length; - - warn = function (msg, range, tip) { - var data = { msg: msg }; - if (range) { - if (range.start != null) { - data.start = range.start + leadingSpaceLength; - } - if (range.end != null) { - data.end = range.end + leadingSpaceLength; - } - } - (tip ? tips : errors).push(data); - }; - } - // merge custom modules - if (options.modules) { - finalOptions.modules = - (baseOptions.modules || []).concat(options.modules); - } - // merge custom directives - if (options.directives) { - finalOptions.directives = extend( - Object.create(baseOptions.directives || null), - options.directives - ); - } - // copy other options - for (var key in options) { - if (key !== 'modules' && key !== 'directives') { - finalOptions[key] = options[key]; - } - } - } - - finalOptions.warn = warn; - - var compiled = baseCompile(template.trim(), finalOptions); - { - detectErrors(compiled.ast, warn); - } - compiled.errors = errors; - compiled.tips = tips; - return compiled - } - - return { - compile: compile, - compileToFunctions: createCompileToFunctionFn(compile) - } - } - } - - /* */ - - // `createCompilerCreator` allows creating compilers that use alternative - // parser/optimizer/codegen, e.g the SSR optimizing compiler. - // Here we just export a default compiler using the default parts. - var createCompiler = createCompilerCreator(function baseCompile ( - template, - options - ) { - var ast = parse(template.trim(), options); - if (options.optimize !== false) { - optimize(ast, options); - } - var code = generate(ast, options); - return { - ast: ast, - render: code.render, - staticRenderFns: code.staticRenderFns - } - }); - - /* */ - - var ref$1 = createCompiler(baseOptions); - var compile = ref$1.compile; - var compileToFunctions = ref$1.compileToFunctions; - - /* */ - - // check whether current browser encodes a char inside attribute values - var div; - function getShouldDecode (href) { - div = div || document.createElement('div'); - div.innerHTML = href ? "<a href=\"\n\"/>" : "<div a=\"\n\"/>"; - return div.innerHTML.indexOf(' ') > 0 - } - - // #3663: IE encodes newlines inside attribute values while other browsers don't - var shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false; - // #6828: chrome encodes content in a[href] - var shouldDecodeNewlinesForHref = inBrowser ? getShouldDecode(true) : false; - - /* */ - - var idToTemplate = cached(function (id) { - var el = query(id); - return el && el.innerHTML - }); - - var mount = Vue.prototype.$mount; - Vue.prototype.$mount = function ( - el, - hydrating - ) { - el = el && query(el); - - /* istanbul ignore if */ - if (el === document.body || el === document.documentElement) { - warn( - "Do not mount Vue to <html> or <body> - mount to normal elements instead." - ); - return this - } - - var options = this.$options; - // resolve template/el and convert to render function - if (!options.render) { - var template = options.template; - if (template) { - if (typeof template === 'string') { - if (template.charAt(0) === '#') { - template = idToTemplate(template); - /* istanbul ignore if */ - if (!template) { - warn( - ("Template element not found or is empty: " + (options.template)), - this - ); - } - } - } else if (template.nodeType) { - template = template.innerHTML; - } else { - { - warn('invalid template option:' + template, this); - } - return this - } - } else if (el) { - template = getOuterHTML(el); - } - if (template) { - /* istanbul ignore if */ - if (config.performance && mark) { - mark('compile'); - } - - var ref = compileToFunctions(template, { - outputSourceRange: "development" !== 'production', - shouldDecodeNewlines: shouldDecodeNewlines, - shouldDecodeNewlinesForHref: shouldDecodeNewlinesForHref, - delimiters: options.delimiters, - comments: options.comments - }, this); - var render = ref.render; - var staticRenderFns = ref.staticRenderFns; - options.render = render; - options.staticRenderFns = staticRenderFns; - - /* istanbul ignore if */ - if (config.performance && mark) { - mark('compile end'); - measure(("vue " + (this._name) + " compile"), 'compile', 'compile end'); - } - } - } - return mount.call(this, el, hydrating) - }; - - /** - * Get outerHTML of elements, taking care - * of SVG elements in IE as well. - */ - function getOuterHTML (el) { - if (el.outerHTML) { - return el.outerHTML - } else { - var container = document.createElement('div'); - container.appendChild(el.cloneNode(true)); - return container.innerHTML - } - } - - Vue.compile = compileToFunctions; - - return Vue; - -})); diff --git a/nz-admin/src/main/resources/statics/libs/vuelidate.min.js b/nz-admin/src/main/resources/statics/libs/vuelidate.min.js deleted file mode 100644 index a620db24..00000000 --- a/nz-admin/src/main/resources/statics/libs/vuelidate.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.vuelidate=e():t.vuelidate=e()}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=28)}({26:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.pushParams=a,e.popParams=l,e.withParams=function(t,e){if("object"===o(t)&&void 0!==e)return n=t,r=e,c(function(t){return function(){t(n);for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return r.apply(this,o)}});var n,r;return c(t)},e._setTarget=e.target=void 0;var i=[],u=null;e.target=u;function a(){null!==u&&i.push(u),e.target=u={}}function l(){var t=u,n=e.target=u=i.pop()||null;return n&&(Array.isArray(n.$sub)||(n.$sub=[]),n.$sub.push(t)),t}function s(t){if("object"!==o(t)||Array.isArray(t))throw new Error("params must be an object");e.target=u=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),o.forEach(function(e){r(t,e,n[e])})}return t}({},u,t)}function c(t){var e=t(s);return function(){a();try{for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(this,n)}finally{l()}}}e._setTarget=function(t){e.target=u=t}},27:function(t,e,n){"use strict";function r(t){return null===t||void 0===t}function o(t){return null!==t&&void 0!==t}function i(t,e){return e.tag===t.tag&&e.key===t.key}function u(t){var e=t.tag;t.vm=new e({data:t.args})}function a(t,e,n){var r,i,u={};for(r=e;r<=n;++r)o(i=t[r].key)&&(u[i]=r);return u}function l(t,e,n){for(;e<=n;++e)u(t[e])}function s(t,e,n){for(;e<=n;++e){var r=t[e];o(r)&&(r.vm.$destroy(),r.vm=null)}}function c(t,e){t!==e&&(e.vm=t.vm,function(t){for(var e=Object.keys(t.args),n=0;n<e.length;n++)e.forEach(function(e){t.vm[e]=t.args[e]})}(e))}Object.defineProperty(e,"__esModule",{value:!0}),e.patchChildren=function(t,e){o(t)&&o(e)?t!==e&&function(t,e){var n,f,d,h=0,y=0,v=t.length-1,p=t[0],m=t[v],b=e.length-1,g=e[0],M=e[b];for(;h<=v&&y<=b;)r(p)?p=t[++h]:r(m)?m=t[--v]:i(p,g)?(c(p,g),p=t[++h],g=e[++y]):i(m,M)?(c(m,M),m=t[--v],M=e[--b]):i(p,M)?(c(p,M),p=t[++h],M=e[--b]):i(m,g)?(c(m,g),m=t[--v],g=e[++y]):(r(n)&&(n=a(t,h,v)),r(f=o(g.key)?n[g.key]:null)?(u(g),g=e[++y]):i(d=t[f],g)?(c(d,g),t[f]=void 0,g=e[++y]):(u(g),g=e[++y]));h>v?l(e,y,b):y>b&&s(t,h,v)}(t,e):o(e)?l(e,0,e.length-1):o(t)&&s(t,0,t.length-1)},e.h=function(t,e,n){return{tag:t,key:e,args:n}}},28:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Vuelidate=O,Object.defineProperty(e,"withParams",{enumerable:!0,get:function(){return o.withParams}}),e.default=e.validationMixin=void 0;var r=n(27),o=n(26);function i(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){a(t,e,n[e])})}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=function(){return null},c=function(t,e,n){return t.reduce(function(t,r){return t[n?n(r):r]=e(r),t},{})};function f(t){return"function"==typeof t}function d(t){return null!==t&&("object"===l(t)||f(t))}var h=function(t,e,n,r){if("function"==typeof n)return n.call(t,e,r);n=Array.isArray(n)?n:n.split(".");for(var o=0;o<n.length;o++){if(!e||"object"!==l(e))return r;e=e[n[o]]}return void 0===e?r:e},y="__isVuelidateAsyncVm";var v={$invalid:function(){var t=this,e=this.proxy;return this.nestedKeys.some(function(e){return t.refProxy(e).$invalid})||this.ruleKeys.some(function(t){return!e[t]})},$dirty:function(){var t=this;return!!this.dirty||0!==this.nestedKeys.length&&this.nestedKeys.every(function(e){return t.refProxy(e).$dirty})},$anyDirty:function(){var t=this;return!!this.dirty||0!==this.nestedKeys.length&&this.nestedKeys.some(function(e){return t.refProxy(e).$anyDirty})},$error:function(){return this.$dirty&&!this.$pending&&this.$invalid},$anyError:function(){return this.$anyDirty&&!this.$pending&&this.$invalid},$pending:function(){var t=this;return this.ruleKeys.some(function(e){return t.getRef(e).$pending})||this.nestedKeys.some(function(e){return t.refProxy(e).$pending})},$params:function(){var t=this,e=this.validations;return u({},c(this.nestedKeys,function(t){return e[t]&&e[t].$params||null}),c(this.ruleKeys,function(e){return t.getRef(e).$params}))}};function p(t){this.dirty=t;var e=this.proxy,n=t?"$touch":"$reset";this.nestedKeys.forEach(function(t){e[t][n]()})}var m={$touch:function(){p.call(this,!0)},$reset:function(){p.call(this,!1)},$flattenParams:function(){var t=this.proxy,e=[];for(var n in this.$params)if(this.isNested(n)){for(var r=t[n].$flattenParams(),o=0;o<r.length;o++)r[o].path.unshift(n);e=e.concat(r)}else e.push({path:[],name:n,params:this.$params[n]});return e}},b=Object.keys(v),g=Object.keys(m),M=null,$=function(t){if(M)return M;var e=t.extend({computed:{refs:function(){var t=this._vval;this._vval=this.children,(0,r.patchChildren)(t,this._vval);var e={};return this._vval.forEach(function(t){e[t.key]=t.vm}),e}},beforeCreate:function(){this._vval=null},beforeDestroy:function(){this._vval&&((0,r.patchChildren)(this._vval),this._vval=null)},methods:{getModel:function(){return this.lazyModel?this.lazyModel(this.prop):this.model},getModelKey:function(t){var e=this.getModel();if(e)return e[t]},hasIter:function(){return!1}}}),n=e.extend({data:function(){return{rule:null,lazyModel:null,model:null,lazyParentModel:null,rootModel:null}},methods:{runRule:function(e){var n=this.getModel();(0,o.pushParams)();var r,i=this.rule.call(this.rootModel,n,e),u=d(r=i)&&f(r.then)?function(t,e){var n=new t({data:{p:!0,v:!1}});return e.then(function(t){n.p=!1,n.v=t},function(t){throw n.p=!1,n.v=!1,t}),n[y]=!0,n}(t,i):i,a=(0,o.popParams)();return{output:u,params:a&&a.$sub?a.$sub.length>1?a:a.$sub[0]:null}}},computed:{run:function(){var t=this,e=this.lazyParentModel();if(Array.isArray(e)&&e.__ob__){var n=e.__ob__.dep;n.depend();var r=n.constructor.target;if(!this._indirectWatcher){var o=r.constructor;this._indirectWatcher=new o(this,function(){return t.runRule(e)},null,{lazy:!0})}var i=this.getModel();if(!this._indirectWatcher.dirty&&this._lastModel===i)return this._indirectWatcher.depend(),r.value;this._lastModel=i,this._indirectWatcher.evaluate(),this._indirectWatcher.depend()}else this._indirectWatcher&&(this._indirectWatcher.teardown(),this._indirectWatcher=null);return this._indirectWatcher?this._indirectWatcher.value:this.runRule(e)},$params:function(){return this.run.params},proxy:function(){var t=this.run.output;return t[y]?!!t.v:!!t},$pending:function(){var t=this.run.output;return!!t[y]&&t.p}},destroyed:function(){this._indirectWatcher&&(this._indirectWatcher.teardown(),this._indirectWatcher=null)}}),a=e.extend({data:function(){return{dirty:!1,validations:null,lazyModel:null,model:null,prop:null,lazyParentModel:null,rootModel:null}},methods:u({},m,{refProxy:function(t){return this.getRef(t).proxy},getRef:function(t){return this.refs[t]},isNested:function(t){return"function"!=typeof this.validations[t]}}),computed:u({},v,{nestedKeys:function(){return this.keys.filter(this.isNested)},ruleKeys:function(){var t=this;return this.keys.filter(function(e){return!t.isNested(e)})},keys:function(){return Object.keys(this.validations).filter(function(t){return"$params"!==t})},proxy:function(){var t=this,e=c(this.keys,function(e){return{enumerable:!0,configurable:!0,get:function(){return t.refProxy(e)}}}),n=c(b,function(e){return{enumerable:!0,configurable:!0,get:function(){return t[e]}}}),r=c(g,function(e){return{enumerable:!1,configurable:!0,get:function(){return t[e]}}}),o=this.hasIter()?{$iter:{enumerable:!0,value:Object.defineProperties({},u({},e))}}:{};return Object.defineProperties({},u({},e,o,{$model:{enumerable:!0,get:function(){var e=t.lazyParentModel();return null!=e?e[t.prop]:null},set:function(e){var n=t.lazyParentModel();null!=n&&(n[t.prop]=e,t.$touch())}}},n,r))},children:function(){var t=this;return i(this.nestedKeys.map(function(e){return $(t,e)})).concat(i(this.ruleKeys.map(function(e){return _(t,e)}))).filter(Boolean)}})}),l=a.extend({methods:{isNested:function(t){return void 0!==this.validations[t]()},getRef:function(t){var e=this;return{get proxy(){return e.validations[t]()||!1}}}}}),p=a.extend({computed:{keys:function(){var t=this.getModel();return d(t)?Object.keys(t):[]},tracker:function(){var t=this,e=this.validations.$trackBy;return e?function(n){return"".concat(h(t.rootModel,t.getModelKey(n),e))}:function(t){return"".concat(t)}},getModelLazy:function(){var t=this;return function(){return t.getModel()}},children:function(){var t=this,e=this.validations,n=this.getModel(),o=u({},e);delete o.$trackBy;var i={};return this.keys.map(function(e){var u=t.tracker(e);return i.hasOwnProperty(u)?null:(i[u]=!0,(0,r.h)(a,u,{validations:o,prop:e,lazyParentModel:t.getModelLazy,model:n[e],rootModel:t.rootModel}))}).filter(Boolean)}},methods:{isNested:function(){return!0},getRef:function(t){return this.refs[this.tracker(t)]},hasIter:function(){return!0}}}),$=function(t,e){if("$each"===e)return(0,r.h)(p,e,{validations:t.validations[e],lazyParentModel:t.lazyParentModel,prop:e,lazyModel:t.getModel,rootModel:t.rootModel});var n=t.validations[e];if(Array.isArray(n)){var o=t.rootModel,i=c(n,function(t){return function(){return h(o,o.$v,t)}},function(t){return Array.isArray(t)?t.join("."):t});return(0,r.h)(l,e,{validations:i,lazyParentModel:s,prop:e,lazyModel:s,rootModel:o})}return(0,r.h)(a,e,{validations:n,lazyParentModel:t.getModel,prop:e,lazyModel:t.getModelKey,rootModel:t.rootModel})},_=function(t,e){return(0,r.h)(n,e,{rule:t.validations[e],lazyParentModel:t.lazyParentModel,lazyModel:t.getModel,rootModel:t.rootModel})};return M={VBase:e,Validation:a}},_=null;var P=function(t,e){var n=function(t){if(_)return _;for(var e=t.constructor;e.super;)e=e.super;return _=e,e}(t),o=$(n),i=o.Validation;return new(0,o.VBase)({computed:{children:function(){var n="function"==typeof e?e.call(t):e;return[(0,r.h)(i,"$v",{validations:n,lazyParentModel:s,prop:"$v",model:t,rootModel:t})]}}})},j={data:function(){var t=this.$options.validations;return t&&(this._vuelidate=P(this,t)),{}},beforeCreate:function(){var t=this.$options;t.validations&&(t.computed||(t.computed={}),t.computed.$v||(t.computed.$v=function(){return this._vuelidate?this._vuelidate.refs.$v.proxy:null}))},beforeDestroy:function(){this._vuelidate&&(this._vuelidate.$destroy(),this._vuelidate=null)}};function O(t){t.mixin(j)}e.validationMixin=j;var x=O;e.default=x}})});
\ No newline at end of file |
