diff --git a/assets/js/builder.js b/assets/js/builder.js index de02af8..dacaa6e 100644 --- a/assets/js/builder.js +++ b/assets/js/builder.js @@ -335,27 +335,27 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_n", function() { return _n; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_nx", function() { return _nx; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sprintf", function() { return sprintf; }); -/** - * External dependencies +/** + * External dependencies */ var i18n = {}; -/** - * Creates a new Jed instance with specified locale data configuration. - * - * @see http://messageformat.github.io/Jed/ - * - * @param {Object} data Locale data configuration. +/** + * Creates a new Jed instance with specified locale data configuration. + * + * @see http://messageformat.github.io/Jed/ + * + * @param {Object} data Locale data configuration. */ function setLocaleData(data) { var jed = new Jed(data); i18n[jed._textdomain] = jed; } -/** - * Returns the current Jed instance, initializing with a default configuration - * if not already assigned. - * - * @return {Jed} Jed instance. +/** + * Returns the current Jed instance, initializing with a default configuration + * if not already assigned. + * + * @return {Jed} Jed instance. */ function getI18n() { @@ -369,78 +369,78 @@ function getI18n() { return i18n[domain]; } -/** - * Retrieve the translation of text. - * - * @see https://developer.wordpress.org/reference/functions/__/ - * - * @param {string} text Text to translate. - * @param {string} domain Domain to retrieve the translated text. - * - * @return {string} Translated text. +/** + * Retrieve the translation of text. + * + * @see https://developer.wordpress.org/reference/functions/__/ + * + * @param {string} text Text to translate. + * @param {string} domain Domain to retrieve the translated text. + * + * @return {string} Translated text. */ function __(text, domain) { return getI18n(domain) ? getI18n(domain).dgettext(domain, text) : text; } -/** - * Retrieve translated string with gettext context. - * - * @see https://developer.wordpress.org/reference/functions/_x/ - * - * @param {string} text Text to translate. - * @param {string} context Context information for the translators. - * @param {string} domain Domain to retrieve the translated text. - * - * @return {string} Translated context string without pipe. +/** + * Retrieve translated string with gettext context. + * + * @see https://developer.wordpress.org/reference/functions/_x/ + * + * @param {string} text Text to translate. + * @param {string} context Context information for the translators. + * @param {string} domain Domain to retrieve the translated text. + * + * @return {string} Translated context string without pipe. */ function _x(text, context, domain) { return getI18n(domain).dpgettext(domain, context, text); } -/** - * Translates and retrieves the singular or plural form based on the supplied - * number. - * - * @see https://developer.wordpress.org/reference/functions/_n/ - * - * @param {string} single The text to be used if the number is singular. - * @param {string} plural The text to be used if the number is plural. - * @param {number} number The number to compare against to use either the - * singular or plural form. - * @param {string} domain Domain to retrieve the translated text. - * - * @return {string} The translated singular or plural form. +/** + * Translates and retrieves the singular or plural form based on the supplied + * number. + * + * @see https://developer.wordpress.org/reference/functions/_n/ + * + * @param {string} single The text to be used if the number is singular. + * @param {string} plural The text to be used if the number is plural. + * @param {number} number The number to compare against to use either the + * singular or plural form. + * @param {string} domain Domain to retrieve the translated text. + * + * @return {string} The translated singular or plural form. */ function _n(single, plural, number, domain) { return getI18n(domain).dngettext(domain, single, plural, number); } -/** - * Translates and retrieves the singular or plural form based on the supplied - * number, with gettext context. - * - * @see https://developer.wordpress.org/reference/functions/_nx/ - * - * @param {string} single The text to be used if the number is singular. - * @param {string} plural The text to be used if the number is plural. - * @param {number} number The number to compare against to use either the - * singular or plural form. - * @param {string} context Context information for the translators. - * @param {string} domain Domain to retrieve the translated text. - * - * @return {string} The translated singular or plural form. +/** + * Translates and retrieves the singular or plural form based on the supplied + * number, with gettext context. + * + * @see https://developer.wordpress.org/reference/functions/_nx/ + * + * @param {string} single The text to be used if the number is singular. + * @param {string} plural The text to be used if the number is plural. + * @param {number} number The number to compare against to use either the + * singular or plural form. + * @param {string} context Context information for the translators. + * @param {string} domain Domain to retrieve the translated text. + * + * @return {string} The translated singular or plural form. */ function _nx(single, plural, number, context, domain) { return getI18n(domain).dnpgettext(domain, context, single, plural, number); } -/** - * Returns a formatted string. - * - * @see http://www.diveintojavascript.com/projects/javascript-sprintf - * - * @type {string} +/** + * Returns a formatted string. + * + * @see http://www.diveintojavascript.com/projects/javascript-sprintf + * + * @type {string} */ var sprintf = Jed.sprintf; @@ -5863,7 +5863,7 @@ var render = function() { on: { click: function($event) { $event.preventDefault() - return _vm.cancelLoadSettings($event) + return _vm.cancelLoadSettings.apply(null, arguments) } } }, @@ -6683,7 +6683,7 @@ var render = function() { on: { click: function($event) { $event.preventDefault() - return _vm.saveFormSettings($event) + return _vm.saveFormSettings.apply(null, arguments) } } }, @@ -7138,8 +7138,8 @@ function normalizeComponent ( "use strict"; /* WEBPACK VAR INJECTION */(function(global, setImmediate) {/*! - * Vue.js v2.6.12 - * (c) 2014-2020 Evan You + * Vue.js v2.6.14 + * (c) 2014-2021 Evan You * Released under the MIT License. */ @@ -8839,13 +8839,14 @@ function assertProp ( type = [type]; } for (var i = 0; i < type.length && !valid; i++) { - var assertedType = assertType(value, type[i]); + var assertedType = assertType(value, type[i], vm); expectedTypes.push(assertedType.expectedType || ''); valid = assertedType.valid; } } - if (!valid) { + var haveExpectedTypes = expectedTypes.some(function (t) { return t; }); + if (!valid && haveExpectedTypes) { warn( getInvalidTypeMessage(name, value, expectedTypes), vm @@ -8863,9 +8864,9 @@ function assertProp ( } } -var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/; +var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/; -function assertType (value, type) { +function assertType (value, type, vm) { var valid; var expectedType = getType(type); if (simpleCheckRE.test(expectedType)) { @@ -8880,7 +8881,12 @@ function assertType (value, type) { } else if (expectedType === 'Array') { valid = Array.isArray(value); } else { - valid = value instanceof type; + try { + valid = value instanceof type; + } catch (e) { + warn('Invalid prop type: "' + String(type) + '" is not a constructor', vm); + valid = false; + } } return { valid: valid, @@ -8888,13 +8894,15 @@ function assertType (value, type) { } } +var functionTypeCheckRE = /^\s*function (\w+)/; + /** * 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+)/); + var match = fn && fn.toString().match(functionTypeCheckRE); return match ? match[1] : '' } @@ -8919,18 +8927,19 @@ function getInvalidTypeMessage (name, value, expectedTypes) { " 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; + if ( + expectedTypes.length === 1 && + isExplicable(expectedType) && + isExplicable(typeof value) && + !isBoolean(expectedType, receivedType) + ) { + message += " with value " + (styleValue(value, expectedType)); } message += ", got " + receivedType + " "; // check if we need to specify received value if (isExplicable(receivedType)) { - message += "with value " + receivedValue + "."; + message += "with value " + (styleValue(value, receivedType)) + "."; } return message } @@ -8945,9 +8954,9 @@ function styleValue (value, type) { } } +var EXPLICABLE_TYPES = ['string', 'number', 'boolean']; function isExplicable (value) { - var explicitTypes = ['string', 'number', 'boolean']; - return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; }) + return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; }) } function isBoolean () { @@ -9174,7 +9183,7 @@ 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,' + + 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' + 'require' // for Webpack/Browserify ); @@ -9677,6 +9686,12 @@ function isWhitespace (node) { /* */ +function isAsyncPlaceholder (node) { + return node.isComment && node.asyncFactory +} + +/* */ + function normalizeScopedSlots ( slots, normalSlots, @@ -9733,9 +9748,10 @@ function normalizeScopedSlot(normalSlots, key, fn) { res = res && typeof res === 'object' && !Array.isArray(res) ? [res] // single vnode : normalizeChildren(res); + var vnode = res && res[0]; return res && ( - res.length === 0 || - (res.length === 1 && res[0].isComment) // #9658 + !vnode || + (res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode)) // #9658, #10391 ) ? undefined : res }; @@ -9808,26 +9824,28 @@ function renderList ( */ function renderSlot ( name, - fallback, + fallbackRender, props, bindObject ) { var scopedSlotFn = this.$scopedSlots[name]; var nodes; - if (scopedSlotFn) { // scoped slot + if (scopedSlotFn) { + // scoped slot props = props || {}; if (bindObject) { if (!isObject(bindObject)) { - warn( - 'slot v-bind without argument expects an Object', - this - ); + warn('slot v-bind without argument expects an Object', this); } props = extend(extend({}, bindObject), props); } - nodes = scopedSlotFn(props) || fallback; + nodes = + scopedSlotFn(props) || + (typeof fallbackRender === 'function' ? fallbackRender() : fallbackRender); } else { - nodes = this.$slots[name] || fallback; + nodes = + this.$slots[name] || + (typeof fallbackRender === 'function' ? fallbackRender() : fallbackRender); } var target = props && props.slot; @@ -9877,6 +9895,7 @@ function checkKeyCodes ( } else if (eventKeyName) { return hyphenate(eventKeyName) !== key } + return eventKeyCode === undefined } /* */ @@ -10408,8 +10427,10 @@ function createComponent ( } function createComponentInstanceForVnode ( - vnode, // we know it's MountedComponentVNode but flow doesn't - parent // activeInstance in lifecycle state + // we know it's MountedComponentVNode but flow doesn't + vnode, + // activeInstance in lifecycle state + parent ) { var options = { _isComponent: true, @@ -10548,7 +10569,7 @@ function _createElement ( ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag); if (config.isReservedTag(tag)) { // platform built-in elements - if (isDef(data) && isDef(data.nativeOn)) { + if (isDef(data) && isDef(data.nativeOn) && data.tag !== 'component') { warn( ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."), context @@ -10874,12 +10895,6 @@ function resolveAsyncComponent ( /* */ -function isAsyncPlaceholder (node) { - return node.isComment && node.asyncFactory -} - -/* */ - function getFirstComponentChild (children) { if (Array.isArray(children)) { for (var i = 0; i < children.length; i++) { @@ -11246,7 +11261,8 @@ function updateChildComponent ( var hasDynamicScopedSlot = !!( (newScopedSlots && !newScopedSlots.$stable) || (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) || - (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) + (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) || + (!newScopedSlots && vm.$scopedSlots.$key) ); // Any static slot children from the parent may have changed during parent's @@ -11698,11 +11714,8 @@ Watcher.prototype.run = function run () { 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) + "\"")); - } + var info = "callback for watcher \"" + (this.expression) + "\""; + invokeWithErrorHandling(this.cb, this.vm, [value, oldValue], this.vm, info); } else { this.cb.call(this.vm, value, oldValue); } @@ -11924,6 +11937,8 @@ function initComputed (vm, computed) { 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); + } else if (vm.$options.methods && key in vm.$options.methods) { + warn(("The computed property \"" + key + "\" is already defined as a method."), vm); } } } @@ -12076,11 +12091,10 @@ function stateMixin (Vue) { 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) + "\"")); - } + var info = "callback for immediate watcher \"" + (watcher.expression) + "\""; + pushTarget(); + invokeWithErrorHandling(cb, vm, [watcher.value], vm, info); + popTarget(); } return function unwatchFn () { watcher.teardown(); @@ -12378,6 +12392,8 @@ function initAssetRegisters (Vue) { + + function getComponentName (opts) { return opts && (opts.Ctor.options.name || opts.tag) } @@ -12399,9 +12415,9 @@ function pruneCache (keepAliveInstance, filter) { var keys = keepAliveInstance.keys; var _vnode = keepAliveInstance._vnode; for (var key in cache) { - var cachedNode = cache[key]; - if (cachedNode) { - var name = getComponentName(cachedNode.componentOptions); + var entry = cache[key]; + if (entry) { + var name = entry.name; if (name && !filter(name)) { pruneCacheEntry(cache, key, keys, _vnode); } @@ -12415,9 +12431,9 @@ function pruneCacheEntry ( keys, current ) { - var cached$$1 = cache[key]; - if (cached$$1 && (!current || cached$$1.tag !== current.tag)) { - cached$$1.componentInstance.$destroy(); + var entry = cache[key]; + if (entry && (!current || entry.tag !== current.tag)) { + entry.componentInstance.$destroy(); } cache[key] = null; remove(keys, key); @@ -12435,6 +12451,32 @@ var KeepAlive = { max: [String, Number] }, + methods: { + cacheVNode: function cacheVNode() { + var ref = this; + var cache = ref.cache; + var keys = ref.keys; + var vnodeToCache = ref.vnodeToCache; + var keyToCache = ref.keyToCache; + if (vnodeToCache) { + var tag = vnodeToCache.tag; + var componentInstance = vnodeToCache.componentInstance; + var componentOptions = vnodeToCache.componentOptions; + cache[keyToCache] = { + name: getComponentName(componentOptions), + tag: tag, + componentInstance: componentInstance, + }; + keys.push(keyToCache); + // prune oldest entry + if (this.max && keys.length > parseInt(this.max)) { + pruneCacheEntry(cache, keys[0], keys, this._vnode); + } + this.vnodeToCache = null; + } + } + }, + created: function created () { this.cache = Object.create(null); this.keys = []; @@ -12449,6 +12491,7 @@ var KeepAlive = { mounted: function mounted () { var this$1 = this; + this.cacheVNode(); this.$watch('include', function (val) { pruneCache(this$1, function (name) { return matches(val, name); }); }); @@ -12457,6 +12500,10 @@ var KeepAlive = { }); }, + updated: function updated () { + this.cacheVNode(); + }, + render: function render () { var slot = this.$slots.default; var vnode = getFirstComponentChild(slot); @@ -12490,12 +12537,9 @@ var KeepAlive = { 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); - } + // delay setting the cache until update + this.vnodeToCache = vnode; + this.keyToCache = key; } vnode.data.keepAlive = true; @@ -12578,7 +12622,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', { value: FunctionalRenderContext }); -Vue.version = '2.6.12'; +Vue.version = '2.6.14'; /* */ @@ -12615,7 +12659,7 @@ var isBooleanAttr = makeMap( '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,' + + 'required,reversed,scoped,seamless,selected,sortable,' + 'truespeed,typemustmatch,visible' ); @@ -12739,7 +12783,7 @@ var isHTMLTag = makeMap( // 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,' + + 'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' + 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', true ); @@ -12944,7 +12988,8 @@ var hooks = ['create', 'activate', 'update', 'remove', 'destroy']; function sameVnode (a, b) { return ( - a.key === b.key && ( + a.key === b.key && + a.asyncFactory === b.asyncFactory && ( ( a.tag === b.tag && a.isComment === b.isComment && @@ -12952,7 +12997,6 @@ function sameVnode (a, b) { sameInputType(a, b) ) || ( isTrue(a.isAsyncPlaceholder) && - a.asyncFactory === b.asyncFactory && isUndef(b.asyncFactory.error) ) ) @@ -13840,7 +13884,7 @@ function updateAttrs (oldVnode, vnode) { cur = attrs[key]; old = oldAttrs[key]; if (old !== cur) { - setAttr(elm, key, cur); + setAttr(elm, key, cur, vnode.data.pre); } } // #4391: in IE9, setting type can reset value for input[type=radio] @@ -13860,8 +13904,8 @@ function updateAttrs (oldVnode, vnode) { } } -function setAttr (el, key, value) { - if (el.tagName.indexOf('-') > -1) { +function setAttr (el, key, value, isInPre) { + if (isInPre || el.tagName.indexOf('-') > -1) { baseSetAttr(el, key, value); } else if (isBooleanAttr(key)) { // set attribute for blank value @@ -16382,7 +16426,7 @@ var isNonPhrasingTag = makeMap( // Regular Expressions for parsing tags and attributes var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; -var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\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)); @@ -16687,7 +16731,7 @@ var modifierRE = /\.[^.\]]+(?=[^\]]*$)/g; var slotRE = /^v-slot(:|$)|^#/; var lineBreakRE = /[\r\n]/; -var whitespaceRE$1 = /\s+/g; +var whitespaceRE$1 = /[ \f\t\r\n]+/g; var invalidAttributeRE = /[\s"'<>\/=]/; @@ -16735,8 +16779,12 @@ function parse ( platformMustUseProp = options.mustUseProp || no; platformGetTagNamespace = options.getTagNamespace || no; var isReservedTag = options.isReservedTag || no; - maybeComponent = function (el) { return !!el.component || !isReservedTag(el.tag); }; - + maybeComponent = function (el) { return !!( + el.component || + el.attrsMap[':is'] || + el.attrsMap['v-bind:is'] || + !(el.attrsMap.is ? isReservedTag(el.attrsMap.is) : isReservedTag(el.tag)) + ); }; transforms = pluckModuleFunction(options.modules, 'transformNode'); preTransforms = pluckModuleFunction(options.modules, 'preTransformNode'); postTransforms = pluckModuleFunction(options.modules, 'postTransformNode'); @@ -17985,9 +18033,9 @@ function genHandler (handler) { code += genModifierCode; } var handlerCode = isMethodPath - ? ("return " + (handler.value) + "($event)") + ? ("return " + (handler.value) + ".apply(null, arguments)") : isFunctionExpression - ? ("return (" + (handler.value) + ")($event)") + ? ("return (" + (handler.value) + ").apply(null, arguments)") : isFunctionInvocation ? ("return " + (handler.value)) : handler.value; @@ -18073,7 +18121,8 @@ function generate ( options ) { var state = new CodegenState(options); - var code = ast ? genElement(ast, state) : '_c("div")'; + // fix #11483, Root level