UNPKG

j-vue

Version:

.vue single-file component back-end compiler. Belong to "Plan J"./.vue 单文件组件后端编译工具。从属于“简计划”。

1,366 lines (1,185 loc) 205 kB
/*!@preserve@license * 模块名称:j-vue * 模块功能:构建后的 .vue 文件的前端运行时依赖。从属于“简计划”。      The front-end runtime dependency for built .vue files. Belong to "Plan J". * 模块版本:26.1.0 * 许可条款:LGPL-3.0 * 所属作者:龙腾道 <LongTengDao@LongTengDao.com> (www.LongTengDao.com) * 问题反馈:https://GitHub.com/LongTengDao/j-vue/issues * 项目主页:https://GitHub.com/LongTengDao/j-vue/ */ var version = '26.1.0'; var test = RegExp.prototype.test; var join = Array.prototype.join; var unshift = Array.prototype.unshift; var object = { '0': '1', '1': '2', '2': '3', '3': '4', '4': '5', '5': '6', '6': '7', '7': '8', '8': '9', '9': 'a', a: 'b', b: 'c', c: 'd', d: 'e', e: 'f', f: 'g', g: 'h', h: 'i', i: 'j', j: 'k', k: 'l', l: 'm', m: 'n', n: 'o', o: 'p', p: 'q', q: 'r', r: 's', s: 't', t: 'u', u: 'v', v: 'w', w: 'x', x: 'y', y: 'z' } ; var lastItem = 'z'; var array = [ lastItem ]; var lastIndex = array.length - 1; var notKeyword = /*#__PURE__*/test.bind(/\d/); var toString = /*#__PURE__*/join.bind(array, ''); var prependA = /*#__PURE__*/unshift.bind(array, 'a'); function Identifier () { if ( lastItem==='9' ) { array[lastIndex] = 'a'; var string ; if ( notKeyword(string = toString()) ) { lastItem = 'a'; return string; } } else if ( lastItem!=='z' ) { lastItem = array[lastIndex] = object[lastItem]; return toString(); } lastItem = array[lastIndex] = '0'; for ( var index = lastIndex; index; array[index] = '0' ) { var item = array[--index] ; if ( item!=='z' ) { array[index] = object[item]; return toString(); } } lastIndex = prependA() - 1; return toString(); } var Error$1 = Error; var isArray = Array.isArray; var create = Object.create; var freeze = Object.freeze; var isPrototypeOf = Object.prototype.isPrototypeOf; var match = String.prototype.match; var undefined$1 = void null; var RegExp$1 = RegExp; var defineProperty = Object.defineProperty; var NULL = ( /*! j-globals: null.prototype (internal) */ Object.seal ? /*#__PURE__*/Object.preventExtensions(Object.create(null)) : null /*¡ j-globals: null.prototype (internal) */ ); var TypeError$1 = TypeError; var apply = typeof Reflect==='undefined' ? undefined$1 : Reflect.apply; var toStringTag = typeof Symbol==='undefined' ? undefined$1 : Symbol.toStringTag; var assign = Object.assign; var PROTO_BUG = Object.prototype; var hasOwnProperty = Object.prototype.hasOwnProperty; var propertyIsEnumerable = Object.prototype.propertyIsEnumerable; var hasOwn = /*#__PURE__*/function () { return hasOwnProperty.bind ? hasOwnProperty.call.bind(hasOwnProperty) : function (object, key) { return hasOwnProperty.call(object, key); }; }();// && object!=null var Default = ( /*! j-globals: default (internal) */ function Default (exports, addOnOrigin) { if ( !addOnOrigin ) { addOnOrigin = exports; exports = create(NULL); } if ( assign ) { assign(exports, addOnOrigin); } else { for ( var key in addOnOrigin ) { if ( hasOwn(addOnOrigin, key) ) { exports[key] = addOnOrigin[key]; } } } exports.default = exports; if ( toStringTag ) { var descriptor = create(NULL); descriptor.value = 'Module'; defineProperty(exports, toStringTag, descriptor); } typeof exports==='function' && exports.prototype && freeze(exports.prototype); return freeze(exports); } /*¡ j-globals: default (internal) */ ); /*!@preserve@license * 模块名称:j-regexp * 模块功能:可读性更好的正则表达式创建方式。从属于“简计划”。      More readable way for creating RegExp. Belong to "Plan J". * 模块版本:8.0.0 * 许可条款:LGPL-3.0 * 所属作者:龙腾道 <LongTengDao@LongTengDao.com> (www.LongTengDao.com) * 问题反馈:https://GitHub.com/LongTengDao/j-regexp/issues * 项目主页:https://GitHub.com/LongTengDao/j-regexp/ */ var NEED_TO_ESCAPE_IN_REGEXP = /^[$()*+\-.?[\\\]^{|]/; var SURROGATE_PAIR = /^[\uD800-\uDBFF][\uDC00-\uDFFF]/; var GROUP = /*#__PURE__*/create(NULL) ; function groupify (branches , uFlag , noEscape ) { var group = create(NULL) ; var appendBranch = uFlag ? appendPointBranch : appendCodeBranch; for ( var length = branches.length, index = 0; index<length; ++index ) { appendBranch(group, branches[index] ); } return sourcify(group, !noEscape); } function appendPointBranch (group , branch ) { if ( branch ) { var character = SURROGATE_PAIR.test(branch) ? branch.slice(0, 2) : branch.charAt(0); appendPointBranch(group[character] || ( group[character] = create(NULL) ), branch.slice(character.length)); } else { group[''] = GROUP; } } function appendCodeBranch (group , branch ) { if ( branch ) { var character = branch.charAt(0); appendCodeBranch(group[character] || ( group[character] = create(NULL) ), branch.slice(1)); } else { group[''] = GROUP; } } function sourcify (group , needEscape ) { var branches = []; var singleCharactersBranch = []; var noEmptyBranch = true; for ( var character in group ) { if ( character ) { var sub_branches = sourcify(group[character] , needEscape); if ( needEscape && NEED_TO_ESCAPE_IN_REGEXP.test(character) ) { character = '\\' + character; } sub_branches ? branches.push(character + sub_branches) : singleCharactersBranch.push(character); } else { noEmptyBranch = false; } } singleCharactersBranch.length && branches.unshift(singleCharactersBranch.length===1 ? singleCharactersBranch[0] : '[' + singleCharactersBranch.join('') + ']'); return branches.length===0 ? '' : ( branches.length===1 && ( singleCharactersBranch.length || noEmptyBranch ) ? branches[0] : '(?:' + branches.join('|') + ')' ) + ( noEmptyBranch ? '' : '?' ); } /*¡ j-regexp */ var Symbol$1 = typeof Symbol==='undefined' ? undefined$1 : Symbol; var document$1 = document; var head = document.head; var _ = Symbol$1 ? /*#__PURE__*/Symbol$1('_') : '_'; function $ ( css , media ) { var style = document$1.createElement('style'); if ( css ) { style.textContent = this[_](css); } if ( media!==undefined$1 ) { style.media = media; } head.appendChild(style); return this; } var prepare_ = typeof _==='symbol' ? null : /*#__PURE__*/function () { var _descriptor = create(NULL) ; _descriptor.value = null; _descriptor.writable = true; _descriptor.enumerable = true; _descriptor.configurable = true; return function $ (scope ) { defineProperty(scope, _, _descriptor); }; }(); function Search (keys ) { return RegExp$1('__' + groupify(keys, false, true) + '__', 'g'); } function Replacer (scope ) { return function replacer (__key__ ) { return scope[__key__.slice(2, -2)] ; }; } var StaticScope = function StaticScope ( keys ) { prepare_ && prepare_(this); this[_] = function _ (string ) { return string.replace(_search, _replacer); }; var _search = Search(keys); var _replacer = Replacer(this); for ( var index = keys.length; index; ) { this[keys[--index] ] = Identifier(); } } ; var SCOPE = StaticScope.prototype = /*#__PURE__*/freeze(create(null, { $: { value: $, writable: false, enumerable: false, configurable: false }, }) ); var InheritedStaticScope = /*#__PURE__*/function () { function InheritedStaticScope ( keys , proto ) { prepare_ && prepare_(this); this[_] = function _ (string ) { return string.replace(_search, _replacer); }; for ( var index = keys.length; index; ) { this[keys[--index] ] = Identifier(); } for ( var key in proto ) { /*key==='_' || key==='$' || ( */ keys[keys.length] = key/* )*/; } var _search = Search(keys); var _replacer = Replacer(this); } InheritedStaticScope.prototype = SCOPE; return InheritedStaticScope; }() ; var KEYS = /[^\x00-@[-`{-\x7F\s][^\x00-/:-@[-`{-\x7F\s]*(?:_[^\x00-/:-@[-`{-\x7F\s]+)*/g; var __KEY__ = RegExp$1('__' + KEYS.source + '__', 'g'); function get$1 (cache , key ) { return cache[key] || ( cache[key] = Identifier() ); } function scopify (value , cache ) { var keys , index , values , key ; if ( value ) { switch ( typeof value ) { case 'string': if ( value.indexOf(' ')<0 ) { return get$1(cache, value); } else { keys = ''; values = value.split(' '); for ( index = values.length; index; ) { key = value[--index] ; if ( key ) { keys = get$1(cache, key)+' '+keys; } } return keys && keys.slice(0, -1); } case 'object': keys = ''; if ( isArray(value) ) { for ( index = value.length; index; ) { key = scopify(value[--index], cache); if ( key ) { keys = key+' '+keys; } } return keys && keys.slice(0, -1); } else { for ( key in value ) { if ( ( value )[key] ) { keys += ' '+get$1(cache, key); } } return keys && keys.slice(1); } } } return ''; } function DynamicScope (cache ) { var scope = function scope (value ) { var length = arguments.length; if ( length>1 ) { value = [ value, arguments[1] ]; for ( var index = 2; index!==length; ++index ) { ( value )[index] = arguments[index]; } } return scopify(value, cache); } ; scope.prototype = cache; scope.$ = $; scope[_] = function _ (string ) { return string.replace(__KEY__, _replacer); }; function _replacer (__key__ ) { return get$1(cache, __key__.slice(2, -2)); } return scope; } function throwEmpty (keys ) { throw Error$1('Scope("' + keys + '")'); } var isStaticScope = /*#__PURE__*/isPrototypeOf.bind(SCOPE) ; var match_call = /*#__PURE__*/match.call.bind(match); function mix (protos ) { var scope = create(SCOPE); for ( var length = protos.length, index = 0; index<length; ++index ) { var proto = protos[index]; if ( typeof proto==='function' ) { proto = proto.prototype; } for ( var id in proto ) { scope[id] = proto[id]; } } return scope; } var Scope = /*#__PURE__*/function () { function Scope ( keys ) { if ( keys===undefined$1 ) { if ( this ) { if ( isArray(this) ) { return DynamicScope(mix(this )); } else if ( typeof this==='function' && isStaticScope(this.prototype) ) { return DynamicScope(create(this.prototype)); } else if ( isStaticScope(this) ) { return DynamicScope(create(this)); } } return DynamicScope(create(SCOPE)); } else { if ( this ) { if ( isArray(this) ) { var scope = new InheritedStaticScope(match_call(keys, KEYS) || throwEmpty(keys), InheritedStaticScope.prototype = mix(this )); } else if ( typeof this==='function' && isStaticScope(this.prototype) ) { scope = new InheritedStaticScope(match_call(keys, KEYS) || throwEmpty(keys), InheritedStaticScope.prototype = this.prototype); } else if ( isStaticScope(this) ) { scope = new InheritedStaticScope(match_call(keys, KEYS) || throwEmpty(keys), InheritedStaticScope.prototype = this); } else { return new StaticScope(match_call(keys, KEYS) || throwEmpty(keys)); } InheritedStaticScope.prototype = SCOPE; return scope; } else { return new StaticScope(match_call(keys, KEYS) || throwEmpty(keys)); } } } //@ts-ignore Scope.prototype = null; return freeze(Scope); }(); function Template (html , scope ) { return /*#__PURE__*/scope[_](html); } var Function$1 = Function; var IS_NOT_ES5 = /*#__PURE__*/test.bind(/^(cons|le)t /); function WithStripped (render ) { render._withStripped = true; return render; } function Render (code , scope ) { return code[0]==='(' ? /*#__PURE__*/Function$1('"use strict";return class Render extends null{constructor' + ( scope ? scope[_](code) : code ) + '};')() : /*#__PURE__*/WithStripped( /*#__PURE__*/Function$1(/*#__PURE__*/IS_NOT_ES5(code) ? '"use strict";return{render(){' + ( scope ? scope[_](code) : code ) + '}}.render;' : '"use strict";return function render(){' + ( scope ? scope[_](code) : code ) + '};' )() ); } function StaticRenderFns (codes , scope ) { var index = codes.length; var body = ']'; if ( scope ) { for ( var scope_ = scope[_]; index; ) { body = 'function(){' + scope_(codes[--index] ) + '},' + body; } } else { while ( index ) { body = 'function(){' + codes[--index] + '},' + body; } } return Function$1('"use strict";return[' + body)(); } function Style (css , scope ) { var style = document$1.createElement('style'); if ( css ) { style.textContent = scope ? scope[_](css) : css; } return head.appendChild(style); } function remove (style ) { head.removeChild(style); return remove; } var WeakMap$1 = typeof WeakMap==='undefined' ? undefined$1 : WeakMap; var from = Array.from; var getPrototypeOf$1 = typeof Reflect!=='undefined' ? Reflect.getPrototypeOf : /*#__PURE__*/ Object.getPrototypeOf; var setPrototypeOf = Object.setPrototypeOf; var getOwnPropertyNames = Object.getOwnPropertyNames; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var getOwnPropertySymbols = Object.getOwnPropertySymbols; var defineProperties = Object.defineProperties; var get = typeof Reflect==='undefined' ? undefined$1 : Reflect.get; var Keys = Object.keys; var OwnKeys = typeof Reflect==='undefined' ? undefined$1 : Reflect.ownKeys; var window$1 = window; var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors; var getPrototypeOf = Object.getPrototypeOf; var error = console.error; var that = null; var NAMES = assign && /*#__PURE__*/assign(create(null), { _: null, _c: null, _computedWatchers: null, _data: null, _directInactive: null, _events: null, _hasHookEvent: null, _hasMove: null, _inactive: null, _isBeingDestroyed: null, _isDestroyed: null, _isMounted: null, _isVue: null, _leaving: null, _name: null, _props: null, _provided: null, _reflow: null, _renderProxy: null, _self: null, _staticTrees: null, _uid: null, _update: null, _vnode: null, _watcher: null, _watchers: null, }); function proProto (self , protoDescriptors ) { var _ = self._; defineProperties(_ ? _.ctx : self, protoDescriptors); } function proConstructor (self , protoDescriptors , constructor , Vue3 ) { var _ = self._; var ctx = _ ? _.ctx : self; protoDescriptors && defineProperties(ctx, protoDescriptors); var previous = that; that = self; try { new constructor(Vue3); } finally { that = previous; } } function proNames (self , protoDescriptors , constructor , Vue3 , dataNames , shadowAssigner ) { var _ = self._; var ctx = _ ? _.ctx : self; protoDescriptors && defineProperties(ctx, protoDescriptors); var previous = that; that = self; try { new constructor(Vue3); } finally { that = previous; } var data = assign(create(NULL), dataNames) ; if ( _ ) { var accessCache = _.accessCache; for ( var name in dataNames ) { data[name] = ctx[name ]; if ( name in accessCache ) { accessCache[name ] = undefined$1; } } } else { for ( name in dataNames ) { data[name] = ctx[name ]; } } shadowAssigner && shadowAssigner(self, data); return data; } function proData (self , protoDescriptors , constructor , Vue3 , restNames , shadowAssigner ) { var _ = self._; var ctx = _ ? _.ctx : self; protoDescriptors && defineProperties(ctx, protoDescriptors); var previous = that; that = self; try { new constructor(Vue3); } finally { that = previous; } var data = create(NULL) ; if ( _ ) { var accessCache = _.accessCache; for ( var name in ctx ) { if ( !( name in restNames ) && name[0]!=='$' ) { data[name] = ctx[name ]; if ( name in accessCache ) { accessCache[name ] = undefined$1; } } } } else { var nowNames = Keys(ctx); var index = nowNames.length; while ( index ) { name = nowNames[--index] ; if ( !( name in restNames ) && name[0]!=='$' ) { data[name] = ctx[name ]; } } } shadowAssigner && shadowAssigner(self, data); return data; } function devData (self , protoDescriptors , constructor , Vue3 , skipData , dataNames , restNames , shadowAssigner , shadowChecker , skipConstructor , __dev__ ) { var _ = self._; var ctx = _ ? _.ctx : self; for ( var name in ctx ) { if ( name[0]==='_' && !( name in NAMES ) ) { error(Error$1('[jVue bug]: vm.' + name + ' is unknown but exists')); break; } } var oldDescriptors = assign(create(NULL), getOwnPropertyDescriptors(ctx), protoDescriptors); if ( protoDescriptors ) { for ( var $name in protoDescriptors ) { if ( $name in ctx ) { throw Error$1(__dev__.runtime_reserved); } } defineProperties(ctx, protoDescriptors); } var previous = that; that = self; try { new constructor(Vue3); } finally { that = previous; } OwnKeys(oldDescriptors).forEach(function (key) { var oldDescriptor = oldDescriptors[key] ; var newDescriptor = getOwnPropertyDescriptor(ctx, key ); if ( !newDescriptor || newDescriptor.configurable!==oldDescriptor.configurable || newDescriptor.enumerable!==oldDescriptor.enumerable || ( newDescriptor.hasOwnProperty('value') //@ts-ignore ? newDescriptor.value!==oldDescriptor.value || newDescriptor.writable!==oldDescriptor.writable //@ts-ignore : newDescriptor.get!==oldDescriptor.get || newDescriptor.set!==oldDescriptor.set ) ) { throw Error$1(__dev__.runtime_redefined); } }); var difKeys = OwnKeys(ctx).filter(function (key) { return !( key in oldDescriptors ); }); if ( skipConstructor ) { if ( difKeys.length ) { throw Error$1(__dev__.runtime_data); } } var difNames = difKeys.filter(function (key) { return typeof key==='string' && key[0]!=='$'; }); if ( skipData ) { if ( difNames.length ) { throw Error$1(__dev__.runtime_data); } } if ( dataNames ) { var count = 0; for ( name in dataNames ) { ++count; } if ( count!==difNames.length ) { throw Error$1(__dev__.runtime_data); } difNames.forEach(function (name) { if ( !( name in dataNames ) ) { throw Error$1(__dev__.runtime_data); } }); } difNames.forEach(function ( name) { if ( name in this && !( name in {} ) || name in restNames ) { throw Error$1(__dev__.runtime_redefined); } if ( name[0]==='_' ) { throw Error$1(__dev__.runtime_reserved); } if ( name==='constructor' ) { throw Error$1(__dev__.proto); } if ( !propertyIsEnumerable.call(ctx, name)) { throw Error$1(__dev__.runtime_enumerable); } }, getPrototypeOf(ctx)); var data = create(NULL) ; difNames.forEach(function (name) { ( data )[name] = ctx[name ]; if ( _ && name in _.accessCache ) { _.accessCache[name ] = undefined$1; } }); if ( shadowAssigner ) { shadowChecker (data); shadowAssigner(self, data); } return data; } var INIT = /*#__PURE__*/function () { var INIT = create(NULL) ; INIT.mode = 'open'; return INIT; }(); function attach ( el ) { return el && ( el.shadowRoot || el.attachShadow(INIT) ); } function ShadowAssigner ( along ) { var index = along.indexOf('.'); var names = index<0 ? null : along.slice(index + 1).split('.'); var toName = names ? along.slice(0, index) : along; if ( names ) { if ( names.length===1 ) { var name$get = names[0] + '$get'; var name$set = names[0] + '$set'; return function ( self , data ) { var all = data[toName] = create(NULL) ; all[name$set] = function ( el ) { self[toName] [name$get] = attach(el); }; all[name$get] = null; } ; } else { return function ( self , data ) { var all = data[toName] = create(NULL) ; names .forEach(function (name ) { all[name + '$set'] = function ( el ) { self[toName] [name] = attach(el); }; all[name += '$get'] = null; }); } ; } } else { var toName$get = toName + '$get'; var toName$set = toName + '$set'; return function ( self , data ) { data[toName$set] = function ( el ) { self[toName$get] = attach(el); }; data[toName$get] = null; } ; } } function ShadowChecker ( along , restNames , dataNames , shadowNames , __dev__ ) { if ( along[0]==='_' || along[0]==='$' ) { throw Error$1(__dev__.compile_shadow); } var index = along.indexOf('.'); if ( index<0 ) { var toName$get = along.slice(0, index) + '$get'; var toName$set = along.slice(0, index) + '$set'; if ( toName$get in restNames || toName$set in restNames ) { throw Error$1(__dev__.compile_shadow); } shadowNames[toName$get] = null; shadowNames[toName$set] = null; if ( dataNames ) { if ( toName$get in dataNames || toName$set in dataNames ) { throw Error$1(__dev__.compile_shadow); } return function () {}; } return function ( data ) { if ( toName$get in data || toName$set in data ) { throw Error$1(__dev__.runtime_shadow); } }; } else { if ( along==='constructor' ) { throw Error$1(__dev__.proto); } if ( along in restNames ) { throw Error$1(__dev__.compile_shadow); } shadowNames[along] = null; if ( dataNames ) { if ( along in dataNames ) { throw Error$1(__dev__.compile_shadow); } return function () {}; } return function ( data ) { if ( along in data ) { throw Error$1(__dev__.runtime_shadow); } }; } } var Component = /*#__PURE__*/freeze(/*#__PURE__*/defineProperties( function Component () { return that; }, { prototype: { configurable: false, enumerable: false, value: null, }, render: { enumerable: false, get: function render ( ) { throw TypeError$1('Component.render='); }, set: function render ( value ) { ( that ._ || that .$options ).render = value; }, }, _main: { enumerable: false, get: function _main ( ) { var Component = this; if ( !isComponentConstructor(Component) ) { throw TypeError$1('(!Component)._main'); } return function _main ( ) { if ( once ) { throw Error$1('Component._main()x2'); } if ( this!==Component && isComponentConstructor(this) ) { throw TypeError$1('(Component!this)._main()'); } var Vue = Function$1('return Vue')(); if ( typeof Vue==='object' ) { var dev = '__VUE__' in window$1 && '__VUE_HMR_RUNTIME__' in window$1 && isArray(( window$1 ).devtoolsFormatters); var app = Vue.createApp( ToOptions( Component, Vue, dev ? create(NULL) : undefined$1 ) ); app.config.isCustomElement = isCustomElement; if ( dev ) { app.config.performance = true; } app.mount(document$1.body); } else { new ( Vue.extend( ToOptions( Component, undefined$1, Vue.devtools ? ( Vue.config.ignoredElements.push(STARTS_WITH_LOWERCASE), Vue.config.performance = true, create(NULL) ) : undefined$1, FunctionalComponent2 ) ) )() .$mount(( document$1.body.innerHTML = '<br>', 'br' )); } once = true; }; }, set: undefined$1, }, _toOptions: { enumerable: false, value: function _toOptions ( Vue3 , __dev__ ) { if ( !isComponentConstructor(this) ) { throw TypeError$1('(!Component)._toOptions()'); } return ToOptions(this, Vue3, __dev__, Vue3 ? OPTIONS.fix.get(Vue3) || FunctionalComponentConstructor(Vue3) : FunctionalComponent2); }, }, } )); var once = false; function ToOptions ( constructor , Vue3 , __dev__ , FunctionalComponent ) { var DID_OPTIONS = OPTIONS.objects.into(__dev__ || OPTIONS ).into(FunctionalComponent || OPTIONS ); var TMP_OPTIONS = new OPTIONS.objectsTmp; var options = Options( constructor, Vue3 || undefined$1, __dev__ ? DEV.reduce(function Dev (dev, key) { dev[key] = __dev__ [key] || key; return dev; }, create(NULL) ) : null, DID_OPTIONS, TMP_OPTIONS, FunctionalComponent || null ); TMP_OPTIONS.forEach (function (optionsValue, constructorKey) { DID_OPTIONS.set(constructorKey, optionsValue); }); return options; } var _mixins = Symbol$1 && /*#__PURE__*/Symbol$1('_mixins') ; function __PURE__ ( Sub , mixins ) { Sub.prototype = null; Sub[_mixins] = mixins; return setPrototypeOf(Sub, Component); } function mixin ( ) { return arguments.length ? /*#__PURE__*/__PURE__(function () { return that; }, /*#__PURE__*/from(arguments)) : Component; } function Options (constructor , Vue3 , __dev__ , DID_OPTIONS , TMP_OPTIONS , FunctionalComponent ) { var options = DID_OPTIONS.get(constructor) || TMP_OPTIONS.get(constructor); if ( options ) { return options; } OPTIONS.constructor.set(options = create(NULL) , constructor); if ( isMixins(constructor) ) { var static_mixins = constructor[_mixins] ; var mixins = new OPTIONS.Set (); var index = 0; while ( index!==static_mixins.length ) { var mixin = static_mixins[index++] ; if ( isComponentConstructor(mixin) ) { var mixinOptions = Options(mixin, Vue3, __dev__, DID_OPTIONS, TMP_OPTIONS, FunctionalComponent); if ( isMixins(mixin) ) { var mixinMixins = mixinOptions.mixins ; var mixinIndex = 0; while ( mixinIndex!==mixinMixins.length ) { mixins.add(mixinMixins[mixinIndex++] ); } } else { mixins.add(mixinOptions); } } else { mixins.add(mixin ); } } options.mixins = from(mixins); __dev__ && check(options, __dev__); collectNames(options, constructor); TMP_OPTIONS.set(constructor, options); return options; } var prototype = constructor.prototype; var Super = OPTIONS.super.get(constructor); if ( !Super ) { OPTIONS.super.set(constructor, Super = getPrototypeOf$1(constructor)); Super===Component || isMixins(Super) || ( setPrototypeOf(constructor, Component), setPrototypeOf(prototype, null) ); } if ( Super!==Component ) { var SuperOptions = Options(Super, Vue3, __dev__, DID_OPTIONS, TMP_OPTIONS, FunctionalComponent); isMixins(Super) ? SuperOptions.mixins .length===1 ? options.extends = SuperOptions.mixins [0] : options.mixins = SuperOptions.mixins : options.extends = SuperOptions; } __dev__ && getOwnPropertySymbols(constructor).forEach(function (symbol) { if ( symbol!==_mixins && !( symbol in SYMBOLS ) ) { throw Error$1(__dev__.compile_symbol); } }); var set = __dev__ ? devSet.bind(__dev__) : proSet; var assertFunction = __dev__ ? devAssertFunction.bind(__dev__) : proAssertFunction; var staticNames = getOwnPropertyNames(constructor); index = staticNames.length; var shadowAssigner = null; var skipConstructor = false; while ( index ) { var staticName = staticNames[--index] ; if ( staticName==='Render' ) { var Render = constructor[staticName] ; } //@ts-ignore else if ( staticName==='name' || staticName==='length' ) { descriptor = getOwnPropertyDescriptor(constructor, staticName); if ( descriptor.hasOwnProperty('value') ) { descriptor.enumerable && set(options, staticName, descriptor.value); } else { set(options, staticName, apply(descriptor.get , constructor, ARGS)); } } else if ( staticName==='data' ) { if ( __dev__ ) { if ( constructor[staticName]!==undefined$1 ) { throw Error$1(isArray(constructor[staticName]) ? __dev__.compile_layer : __dev__.compile_type); } } skipConstructor = true; } else if ( staticName!=='prototype' ) { if ( __dev__ ) { if ( staticName[0]==='_' ) { throw Error$1(__dev__.compile_reserved); } if ( //@ts-ignore staticName==='setup' || staticName==='watch' || staticName==='methods' || staticName==='computed' || staticName==='extends' || staticName==='mixins' || //@ts-ignore staticName==='beforeCreated' || staticName==='created' || staticName==='beforeMount' || staticName==='mounted' || staticName==='beforeUpdate' || staticName==='updated' || staticName==='activated' || staticName==='deactivated' || staticName==='beforeUnmount' || staticName==='unmounted' || staticName==='beforeDestroy' || staticName==='destroyed' || //@ts-ignore staticName==='inject' || staticName==='props' || protoName1==='emits' ) { throw Error$1(__dev__.compile_layer); } } //@ts-ignore set(options, staticName==='displayName' ? 'name' : staticName, constructor[staticName]); } } var protoDescriptors = null; var protoNames = getOwnPropertyNames(prototype); index = protoNames.length; var watchers = []; var skipData = false; var dataNames = null; while ( index ) { var protoName = protoNames[--index] ; if ( protoName==='_data' ) { var _data = get(prototype, protoName, undefined$1); if ( _data ) { if ( __dev__ ) { if ( !isArray(_data) ) { throw Error$1(__dev__.compile_type); } _data.forEach(function (name) { if ( typeof name!=='string' ) { throw Error$1(__dev__.compile_type); } if ( name[0]==='_' || name[0]==='$' ) { throw Error$1(__dev__.compile_reserved); } }); if ( skipConstructor ) { throw Error$1(__dev__.compile_redefined); } } var length = _data.length; if ( length ) { dataNames = create(NULL) ; var i = 0; do { dataNames[_data[i]] = null; } while ( ++i!==length ); dataNames = assign(create(NULL), dataNames); __dev__ && OPTIONS.data.set(options, dataNames); } else { skipData = true; } } else { if ( __dev__ ) { if ( _data!==undefined$1 ) { throw Error$1(__dev__.compile_type); } if ( skipConstructor ) { throw Error$1(__dev__.compile_redefined); } } skipConstructor = true; } } else if ( protoName[0]==='_' && !( protoName.startsWith('_watch(') ) ) { if ( __dev__ ) { var protoName1 = protoName.slice(1); if ( protoName1[0]==='_' ) { throw Error$1(__dev__.compile_reserved); } if ( protoName1==='setup' || protoName1==='watch' || protoName1==='methods' || protoName1==='computed' || protoName1==='extends' || protoName1==='mixins' || protoName1==='components' || protoName1==='directives' || protoName1==='staticRenderFns' || protoName1==='template' || protoName1==='inheritAttrs' || protoName1==='name' || protoName1==='Render' || protoName1==='delimiters' || protoName1==='filters' || protoName1==='comments' || protoName1==='functional' || protoName1==='propsData' || protoName1==='model' ) { throw Error$1(__dev__.compile_layer); } } set(options, protoName.slice(1), get(prototype, protoName, undefined$1)); } else { var descriptor = getOwnPropertyDescriptor(prototype, protoName); if ( protoName[0]==='_' ) { var indexOfQ = protoName.lastIndexOf(')'); var watcher = watchers[watchers.length] = create(NULL) ; if ( descriptor.hasOwnProperty('value') ) { watcher.$ = protoName.slice(7, indexOfQ).trim(); watcher.handler = assertFunction(descriptor.value); } else { watcher.$ = assertFunction(descriptor.get); watcher.handler = assertFunction(descriptor.set); } if ( indexOfQ + 1!==protoName.length ) { indexOfQ += 2; do { var indexOfA = protoName.indexOf(';', indexOfQ); var pair = indexOfA<0 ? protoName.slice(indexOfQ) : protoName.slice(indexOfQ, indexOfA); indexOfQ = indexOfA + 1; if ( pair ) { var indexOfE = pair.indexOf('='); indexOfE<0 ? watcher[pair] = true : watcher[pair.slice(0, indexOfE)] = pair.slice(indexOfE + 1); } } while ( indexOfQ ); } } else if ( protoName[0]==='$' ) { ( protoDescriptors || ( protoDescriptors = create(NULL) ) )[protoName] = assign(create(NULL), descriptor); } else { if ( descriptor.hasOwnProperty('value') ) { if ( protoName!=='constructor' || descriptor.value!==constructor ) { ( options.methods || ( options.methods = create(NULL) ) )[protoName] = assertFunction(descriptor.value); } } else { ( options.computed || ( options.computed = create(NULL) ) )[protoName] = descriptor.set ? { get: descriptor.get, set: descriptor.set } : descriptor.get ; } } } } var protoSymbols = getOwnPropertySymbols(prototype) ; if ( ( index = protoSymbols.length ) ) { if ( !protoDescriptors ) { protoDescriptors = create(NULL) ; } do { var protoSymbol = protoSymbols[--index] ; protoDescriptors [protoSymbol] = assign(create(NULL), getOwnPropertyDescriptor(prototype, protoSymbol)); } while ( index ); } protoDescriptors && OPTIONS.proto.set(options, protoDescriptors = assign(create(NULL), protoDescriptors)); __dev__ && check(options, __dev__); var restNames = collectNames(options, constructor); if ( Render && Vue3 ) { var shadow = Render.shadow; if ( shadow ) { if ( __dev__ ) { if ( skipConstructor && skipData ) { throw Error$1(__dev__.compile_shadow); } var shadowNames = create(NULL) ; var shadowChecker = ShadowChecker(shadow, restNames, dataNames, shadowNames, __dev__); OPTIONS.shadow.set(options, shadowNames); } shadowAssigner = ShadowAssigner(shadow); } var sheet = Render.sheet; if ( sheet ) { var watchers2 = []; OwnKeys(sheet).forEach(function ( key, index) { var watcher = this[index] = create(NULL) ; watcher.$ = assertFunction(sheet [key]); watcher.handler = function ( css ) { ( this.$refs[key] ).textContent = css; }; watcher.immediate = true; watcher.flush = 'sync'; }, watchers2); watchers2.reverse(); var beforeMount = options.beforeMount; options.beforeMount = beforeMount ? function beforeBeforeMount () { $watch(this, watchers2); return apply(beforeMount , this, ARGS); } : function beforeBeforeMount () { $watch(this, watchers2); }; } options.render = assertFunction(new Render(Vue3 )); } if ( __dev__ ) { options.data = function (self ) { return devData(self , protoDescriptors, constructor, Vue3, skipData, dataNames, restNames, shadowAssigner, shadowChecker, skipConstructor, __dev__); }; } else if ( skipConstructor || skipData ) ; else if ( dataNames ) { options.data = function (self ) { return proNames(self , protoDescriptors, constructor, Vue3, dataNames , shadowAssigner); }; } else { options.data = function (self ) { return proData(self , protoDescriptors, constructor, Vue3, restNames, shadowAssigner); }; } if ( watchers.length || !__dev__ && ( skipConstructor && protoDescriptors || skipData ) ) { watchers.length && watchers.reverse(); var created = options.created; switch ( ( __dev__ ? ( skipConstructor ? 's' : 'n' ) : '_' ) + ( watchers.length ? 'w' : '_' ) + ( created ? 'c' : '_' ) ) { case 'swc': options.created = function beforeCreated ( ) { proProto(this , protoDescriptors ); $watch(this, watchers); return apply(created , this, ARGS); }; break; case 'sw_': options.created = function beforeCreated ( ) { proProto(this , protoDescriptors ); $watch(this, watchers); }; break; case 's_c': options.created = function beforeCreated ( ) { proProto(this , protoDescriptors ); return apply(created , this, ARGS); }; break; case 's__': options.created = function beforeCreated ( ) { proProto(this , protoDescriptors ); }; break; case 'nwc': options.created = function beforeCreated ( ) { proConstructor(this , protoDescriptors, constructor, Vue3); $watch(this, watchers); return apply(created , this, ARGS); }; break; case 'nw_': options.created = function beforeCreated ( ) { proConstructor(this , protoDescriptors, constructor, Vue3); $watch(this, watchers); }; break; case 'n_c': options.created = function beforeCreated ( ) { proConstructor(this , protoDescriptors, constructor, Vue3); return apply(created , this, ARGS); }; break; case 'n__': options.created = function beforeCreated ( ) { proConstructor(this , protoDescriptors, constructor, Vue3); }; break; case '_wc': options.created = function beforeCreated ( ) { $watch(this, watchers); return apply(created , this, ARGS); }; break; case '_w_': options.created = function beforeCreated ( ) { $watch(this, watchers); }; break; } } TMP_OPTIONS.set(constructor, options); //@ts-ignore if ( options.components || options.name ) { var components = options.components = assign(create(NULL), options.components); if ( __dev__ ) { for ( pascal in components ) { if ( !pascal || STARTS_WITH_LOWERCASE.test(pascal) ) { throw Error$1(__dev__.compile_name); } } if ( Vue3 && FunctionalComponent ) { if ( //@ts-ignore options.name && INCLUDES_UPPERCASE.test(options.name.slice(1)) ) { throw Error$1(__dev__.compile_name); } } } for ( var pascal in components ) { var value = components[pascal] ; if ( isComponentConstructor(value) ) { components[pascal] = Options(value, Vue3, __dev__, DID_OPTIONS, TMP_OPTIONS, FunctionalComponent); } } if ( FunctionalComponent ) { var cases = create(NULL) ; //@ts-ignore options.name && fixPascal(options.name, cases, FunctionalComponent); for ( pascal in components ) { fixPascal(pascal, cases, FunctionalComponent); } assign(components, assign(cases, components)); } } return options; } var OPTIONS = /*#__PURE__*/function () { try { return Function$1('"use strict";\ class EasyMap extends WeakMap{into(key){let sub=this.get(key);sub??this.set(key,sub=new EasyMap);return sub}}EasyMap.prototype.get=WeakMap.prototype.get;EasyMap.prototype.set=WeakMap.prototype.set;\ class StrongMap extends Map{}StrongMap.prototype.get=Map.prototype.get;StrongMap.prototype.set=Map.prototype.set;StrongMap.prototype.forEach=Map.prototype.forEach;\ class StrongSet extends Set{}StrongSet.prototype.add=Set.prototype.add;StrongSet.prototype[Symbol.iterator]=Set.prototype[Symbol.iterator];\ return{objects:new EasyMap,objectsTmp:StrongMap,super:new EasyMap,rest:new EasyMap,data:new EasyMap,proto:new EasyMap,constructor:new EasyMap,shadow:new EasyMap,fix:new EasyMap,Set:StrongSet}\ ')(); } catch (error) {} }() ; var isComponentConstructor = /*#__PURE__*/isPrototypeOf.bind(Component) ; var ARGS = [] ; var _MIXINS = [ _mixins ] ; function isMixins (constructor ) { return apply(hasOwnProperty, constructor, _MIXINS); } var SYMBOLS = /*#__PURE__*/getOwnPropertyNames(Symbol$1).reduce(function (SYMBOLS, name) { if ( typeof Symbol$1[name]==='symbol' ) { SYMBOLS[Symbol$1[name] ] = null; } return SYMBOLS; }, create(NULL) ); function $watch (that , watchers ) { var index = watchers.length; do { var watcher = watchers[--index]; that.$watch(watcher.$, watcher.handler, watcher); } while ( index ); } function collectNames (options , constructor ) { var restNames = OPTIONS.rest.get(options); if ( !restNames ) { if ( constructor ) { restNames = OPTIONS.rest.get(constructor); } if ( !restNames ) { restNames = create(NAMES); var extend = options.extends; extend && assign(restNames, collectNames(extend, null)); var mixins = options.mixins; if ( mixins ) { for ( var index = mixins.length; index; ) { assign(restNames, collectNames(mixins[--index] , null)); } } var props = options.props; var name ; if ( isArray(props) ) { for ( index = props.length; index; ) { restNames[props[--index] ] = null; } } else { for ( name in props ) { restNames[name] = null; } } props = options.inject; if ( isArray(props) ) { for ( index = props.length; index; ) { restNames[props[--index] ] = null; } } else { for ( name in props ) { restNames[name] = null; } } for ( name in options.methods ) { restNames[name] = null; } for ( name in options.computed ) { restNames[name] = null; } restNames = assign(create(NULL), restNames); } if ( constructor ) { OPTIONS.rest.set(constructor, restNames); } OPTIONS.rest.set(options, restNames); } return restNames; } function proSet (object , name , value ) { object[name] = value; } function devSet ( object , name , value ) { if ( name in object ) { throw Error$1(this.compile_redefined); } object[name] = value; } function proAssertFunction (fn ) { return fn ; } function devAssertFunction ( fn ) { if ( typeof fn!=='function' ) { throw TypeError$1(this.compile_type); } return fn ; } var INCLUDES_UPPERCASE = /[A-Z]/; var STARTS_WITH_LOWERCASE = /^[a-z]/; var CHECKED = WeakMap$1 && /*#__PURE__*/new WeakMap$1 (); function forKeys (option , callback ) { if ( isArray(option) ) { option.forEach(callback); } else { for ( var key in option ) { callback(key); } } } function check (options , __dev__ ) { var belong = OPTIONS.constructor.get(options) || options; var ownKeys = CHECKED.get(belong); if ( ownKeys ) { return ownKeys; } var allKeys = create(NULL) ; ( options.extends ? [ options.extends ] : [] ).concat(options.mixins || []).forEach(function (mixin) { var mixinNames = check(mixin, __dev__); for ( var name in mixinNames ) { if ( name in allKeys && mixinNames[name]!==allKeys[name] ) { throw Error$1(__dev__.compile_overwrite); } } assign(allKeys, mixinNames); }); ownKeys = create(NULL) ; var protoDescriptors = OPTIONS.proto.get(options); protoDescriptors && OwnKeys(protoDescriptors).forEach(function (key) { ownKeys [key] = belong; }); forKeys(options.props, function (name) { if ( typeof name!=='string' ) { throw Error$1(__dev__.compile_type); } if ( /-|^(?:key$|on|ref$)/.test(name) ) { throw Error$1(__dev__.compile_props); } if ( name in PROTO_BUG ) { throw Error$1(__dev__.proto); } if ( name[0]==='_' || name[0]==='$' ) { throw Error$1(__dev__.compile_reserved); } if ( name in ownKeys ) { throw Error$1(__dev__.compile_redefined); } ownKeys [name] = belong; }); forKeys(options.inject, function (name) { if ( typeof name!=='string' ) { throw Error$1(__dev__.compile_type); } if ( name[0]==='_' || name[0]==='$' ) { throw Error$1(__dev__.compile_reserved); } if ( name in ownKeys ) { throw Error$1(__dev__.compile_redefined); } ownKeys [name] = belong; }); var name ; for ( name in options.methods ) { if ( name[0]==='_' || name[0]==='$' ) { throw Error$1(__dev__.compile_reserved); } if ( name in ownKeys ) { throw Error$1(__dev__.compile_redefined); } ownKeys[name] = belong; } for ( name in options.computed ) { if ( name[0]==='_' || name[0]==='$' ) { throw Error$1(__dev__.compile_reserved); } if ( name in ownKeys ) { throw Error$1(__dev__.compile_redefined); } ownKeys[name] = belong; } for ( name in OPTIONS.data.get(options) ) { if ( name in ownKeys ) { throw Error$1(__dev__.compile_redefined); } ownKeys [name] = belong; } for ( name in OPTIONS.shadow.get(options) ) { if ( name in ownKeys ) { throw Error$1(__dev__.compile_redefined); } ownKeys [name] = belong; } if ( 'constructor' in ownKeys ) { throw Error$1(__dev__.proto); } OwnKeys(ownKeys).forEach(function (key) { if ( key in allKeys ) { throw Error$1(__dev__.compile_overwrite); } }); assign(allKeys, ownKeys); if ( typeof options==='object' ) { name = options.name; if ( typeof name==='string' ? !name || STARTS_WITH_LOWERCASE.test(name) || options.components && name in options.components && options.components[name]!==options : name!==undefined$1 ) { throw Error$1(__dev__.compile_name); } } options.emits && ( isArray(options.emits) ? options.emits : Keys(options.emits) ).forEach(function (event) { if ( typeof event!=='string' ) { throw Error$1(__dev__.compile_type); } if ( /(?:capture|once|passive)$/.test('on' + event.toLowerCase()) || /^-?[vV]node/.test(event) ) { throw Error$1(__dev__.compile_emits); } }); if ( options.directives && 'is' in options.directives// 2 ||//@ts-ignore options.props && ( isArray(options.props) ? options.props.includes('is') : 'is' in options.props )// 3 ) { throw Error$1(__dev__.compile_is); } CHECKED.set(belong, allKeys); return allKeys; } var UPPER = /[A-Z]/; function fixPascal (pascal , cases , FunctionalComponent ) { var First = pascal[0] ; var first = First.toLowerCase(); var rest = pascal.slice(1); FunctionalComponent(cases, first + rest); hyphenate(first, rest, cases, FunctionalComponent); first===First || hyphenate(First, rest, cases, FunctionalComponent); } function hyphenate (before , after , cases , FunctionalComponent ) { var index = after.search(UPPER); if ( index<0 ) { FunctionalComponent(cases, before + after); } else { if ( index ) { before += after.slice(0, index); } var char = after[index] ; after = after.slice(index + 1); hyphenate(before + '-' + char.toLowerCase(), after, cases, FunctionalComponent); hyphenate(before + '-' + char, after, cases, FunctionalComponent); before[before.length - 1]==='-' || hyphenate(before + char, after, cases, FunctionalComponent); } } function FunctionalComponentConstructor (Vue3 ) { var openBlock = Vue3.openBlock; var createBlock = Vue3.createBlock; var cache = create(NULL) ; function FunctionalComponent (cases , name ) { cases[name] = cache[name] || ( cache[name] = function (prop , context ) { openBlock(); return createBlock(name, context.attrs, context.slots); } ); } OPTIONS.fix.set(Vue3, FunctionalComponent); return FunctionalComponent; } function FunctionalComponent2 (case