vuex v3.1.0
(c) 2019 Evan You
@license MIT
555404
function applyMixin (Vue) {
  var version = Number(Vue.version.split('.')[0]);

  if (version >= 2) {
    Vue.mixin({ beforeCreate: vuexInit });
  } else {
    // override init and inject vuex init procedure
    // for 1.x backwards compatibility.
    var _init = Vue.prototype._init;
    Vue.prototype._init = function (options) {
      if ( options === void 0 ) options = {};

      options.init = options.init
        ? [vuexInit].concat(options.init)
        : vuexInit;
      _init.call(this, options);
    };
  }

  /**
   * Vuex init hook, injected into each instances init hooks list.
   */

  function vuexInit () {
    var options = this.$options;
    // store injection
    if (options.store) {
      this.$store = typeof options.store === 'function'
        ? options.store()
        : options.store;
    } else if (options.parent && options.parent.$store) {
      this.$store = options.parent.$store;
    }
  }
}
64034
function addVueSupport(env, webpackConfig) {
    // 找出内置的 babel-loader
    var babelLoader = webpackConfig.module.rules.filter(function(rule) {
        return rule.loader == 'babel-loader'
    })[0];

    // 找出内置的 css 文件关联的 rule, 这样做的好处是共用内置的配置
    var cssRule = webpackConfig.module.rules.filter(function(rule) {
        return rule.test.test('.css');
    })[0];
    // 找出内置的 css-loader, 这样便于共用配置
    var cssLoader = cssRule.use.filter(function(loader) {
        return loader.loader == 'css-loader';
    })[0];

    // 为了样式支持 HMR, 在开发环境下只使用 style-loader
    // XXX 目前发现 async import 即动态导入的模块 HMR 没有生效,
    // 即开启 HMR 的时候, 修改 async-component.vue 确实会重载模块, 但界面上没有效果
    var vueCssLoader = env.__mode__ == 'dev' ? [{
        loader: 'vue-style-loader'
    }, cssLoader] : ExtractTextPlugin.extract({
        fallback: 'vue-style-loader',
        use: [cssLoader]
    });

    // 添加 vue-loader 配置
    webpackConfig.module.rules.push({
        test: /\.vue$/,
        loader: 'vue-loader',
        options: {
            loaders: {
                // 需要在这里设置 babel-loader, 否则 ES2015 的语法不会转义,
                // 除非你统一使用了 .babelrc 配置文件
                js: [babelLoader],
                // 由于 vue-loader 默认的 extractCSS 配置没有对 css-loader 添加 importLoaders 设置,
                // 这会造成 @import 进去的样式没有经过 postcss-loader 的处理,
                // 所以我们需要自己来设置 css 的 loader 处理
                //
                // 但是不能在 options.loaders.css 中配置 postcss-loader
                // 否则会报错
                // Module build failed: TypeError: Cannot read property 'postcss' of null
                // 应该在 options.postcss 中配置
                // 不过为了统一 webpack 的配置, 我们使用共用的 postcss.config.js 来配置
                css: vueCssLoader
            }
        }
    });

    // 如果你不使用 Vue 的模板功能, 则可以直接使用默认的 vue.runtime 版
    // if (env.__mode__ == 'dev') {
    //     webpackConfig.resolve.alias['vue$'] = 'vue/dist/vue.js';
    // } else {
    //     webpackConfig.resolve.alias['vue$'] = 'vue/dist/vue.min.js';
    // }
}
208131
function DevAdapter (controller) {
    
    // Define or LEX/Bison grammar to handle device packet
    var grammar = {
    "lex": {
        "rules" : [ ["\\s+" , "/* skip whitespace */"]
            // Lex rules==> smallest token after big/generic ones ex: 'b,'/'b', [A,C]/[a-Z], etc ...
            ,['help\\b'             , "return 'HELP';"]
            ,['quit\\b'             , "return 'QUIT';"]
            ,['ctrl\\b'             , "return 'CTRL';"]
            ,['back\\b'             , "return 'BACK';"]
            
            ,['evt\\b'              , "return 'EVTS';"]
            ,['start\\b'            , "return 'STAR';"]
            ,['on\\b'               , "return 'STAR';"]
            ,['stop\\b'             , "return 'STOP';"]
            ,['off\\b'              , "return 'STOP';"]
            
            ,['dev\\b'              , "return 'DEV';"]
            ,['list\\b'             , "return 'LIS';"]
            ,['login\\b'            , "return 'LOG';" ]
            ,['logout\\b'           , "return 'OUT';" ]
            ,['track\\b'            , "return 'TRK';" ]
            ,['info\\b'             , "return 'INF';" ]
            ,['track\\b'            , "return 'TRK';" ]
            
            ,['snd\\b'              , "return 'SEND';"]
            ,['all\\b'              , "return 'ALL';" ]

            ,['db\\b'               , "return 'BASE';"]
            ,['create\\b'           , "return 'CREA';"]
            ,['remove\\b'           , "return 'DROP';"]
            ,['search\\b'           , "return 'SEAR';"]
            ,['show\\b'             , "return 'SEAR';"]
            ,['init\\b'             , "return 'INIT';"]

            ,['[\',\"]'             , "/* ignored */" ]
            ,['[^ ]+\\b'            , "return 'TXT';" ]
            ,['\\n'                 , "return 'EOL';" ]
            ,[';'                   , "return 'EOL';" ]
            ,['$'                   , "return 'EOL';" ]
        ]
    },  // end Lex rules
    
    "bnf": { // WARNING: only one space in between TOKEN ex: "STOP EOF"
        'data': [["EOL"        ,"this.cmd='EMPTY'; return (this);"]
            ,["QUIT EOL"   ,"this.cmd='QUIT'   ; return (this);"]
            ,["HELP EOL"   ,"this.cmd='HELP'   ; return (this);"]
            ,["CTRL EOL"   ,"this.cmd='CONTROL'; return (this);"]
            ,["BACK EOL"   ,"this.cmd='BACKEND'; return (this);"]
            ,["COMMD EOL"  ,"return (this);"]

            ,["DEV LIS EOL"  ,"this.cmd='DEVLIST' ; return (this);"]
            ,["DEV ALL EOL"  ,"this.cmd='DEVALL' ; return (this);"]
            ,["DEV LOG TXT EOL"   ,"this.cmd='DEVIN'  ; this.devid=$3; return (this);"]
            ,["DEV OUT TXT EOL"   ,"this.cmd='DEVOUT' ; this.devid=$3; return (this);"]
            ,["DEV OUT ALL EOL"   ,"this.cmd='DEVOUT' ; this.devid=0;  return (this);"]
            ,["DEV TRK TXT EOL"   ,"this.cmd='DEVTRCK'; this.devid=$3; return (this);"]
            ,["DEV TRK ALL EOL"   ,"this.cmd='DEVTRCK'; this.devid=0;  return (this);"]
            ,["DEV INF TXT EOL"   ,"this.cmd='DEVINFO'; this.devid=$3; return (this);"]

            ,["BASE INIT EOL"     ,"this.cmd='DBINIT' ;return (this);"]
            ,["BASE DROP TXT EOL" ,"this.cmd='DBDROP' ; this.devid=$3;return (this);"]
            ,["BASE SEAR TXT EOL" ,"this.cmd='DBSEAR' ; this.devid=$3; this.args=5; return (this);"]
            ,["BASE SEAR TXT TXT EOL" ,"this.cmd='DBSEAR' ; this.devid=$3; this.limit=parseInt($4); return (this);"]
            ,["BASE CREA TXT TXT TXT TXT TXT TXT TXT ARGS EOL","this.cmd='DBCREA' ; this.devid=$3; this.mmsi=$4; this.callsign=$5; this.cargo=$6; this.length=$7; this.width=$8; this.model=$9; return (this);"]

            ,["EVTS STAR EOL" ,"this.cmd='EVTSTART' ; return (this);"]
            ,["EVTS STOP EOL" ,"this.cmd='EVTSTOP'  ; return (this);"]
           ] 
        ,'COMMD':[
            ,["SEND TXT ALL ARGS"     , "this.cmd='SEND'; this.action=$2; this.devid=0;"]
            ,["SEND TXT TXT ARGS"     , "this.cmd='SEND'; this.action=$2; this.devid=$3;"]
            ,["SEND TXT ALL"          , "this.cmd='SEND'; this.action=$2; this.devid=0;"]
            ,["SEND TXT TXT"          , "this.cmd='SEND'; this.action=$2; this.devid=$3;"]
            ,["SEND HELP TXT"         , "this.cmd='SEND'; this.devid=$3; this.action='help';"]
        ]
        ,'ARGS':[
             ["TXT"                   , "this.args=[$1];"]
            ,["ARGS TXT"              , "this.args.push ($2);"]
        ]
    }};

    this.id        = controller.svc;
    this.uid       = "//" + controller.svcopts.adapter + "/" + controller.svc + ":" +  controller.svcopts.port;;
    this.control   = "tcpsock";
    this.info      = "Telnet";
    this.debug     = controller.svcopts.debug;  // inherit debug from controller
    this.Debug     (1,"uid=%s", this.uid);
    this.controller= controller;  // keep a link to device controller and TCP socket
    this.parser    = new Jison(grammar);
    this.request   = 0; // job request number for gateway queue
    try {
        this.prompt= controller.gateway.opts.name +"> ";
    } catch (err) {
        this.prompt= "GatewayTracker> ";
    }
}
200103
function(bb, v)
{
    var ix = Math.abs(bb.r - bb.l);
    var modx = (v.x - bb.l) % ix;
    var x = (modx > 0) ? modx : modx + ix;
    
    var iy = Math.abs(bb.t - bb.b);
    var mody = (v.y - bb.b) % iy;
    var y = (mody > 0) ? mody : mody + iy;
    
    return new Vect(x + bb.l, y + bb.b);
}
1357095
function ViewModel(options) {
    // inherit Compiler

    var vm = this
    var el = options.el
    var components = [gcomps, options.components || {}]
    var directives = allDirectives.concat([options.directives || {}])

    var _directives = [] // local refs for all directives instance of the vm    
    var _components = [] // local refs for all components    
    var NS = conf.namespace
    var componentProps = [NS + 'component', NS + 'data', NS + 'methods', NS + 'ref', NS + 'replace']
    var $childrens = options.$childrens

    // set $parent ref
    vm.$parent = options.$parent || null

    /**
     *  Mounted element detect
     */
    if (util.type(el) == 'string') {
        el = document.querySelector(el)
    } 
    if (el && options.template) {
        el.innerHTML = options.template
    } else if (options.template) {
        el = document.createElement('div')
        el.innerHTML = options.template
    } else if (!is.Element(el)) {
        throw new Error('Unmatch el option')
    }

    // replace "$NS-template" of actual instance's DOM  
    if (el.children.length == 1 && el.firstElementChild.tagName.toLowerCase() == (NS + 'template')) {
        var $holder = el.firstElementChild
        var childNodes = _slice($holder.childNodes)
        var attributes = _slice($holder.attributes)

        el.removeChild($holder)
        /**
         *  Migrate childNodes
         */
        $(childNodes).appendTo(el)
        /**
         *  Merge attributes
         */
        attributes.forEach(function (att) {
            var nv
            if (att.name == 'class') {
                nv = att.value + (el.className 
                                    ? ' ' + el.className 
                                    : '')

            } else if (!el.hasAttribute(att.name)) {
                nv = att.value
            } else {
                return
            }
            el.setAttribute(att.name, nv)
        })
    }
    // content insertion
    var points = _slice(el.querySelectorAll('content'))
    if (points) {
        var $con
        if ($childrens && $childrens.length) {
            $con = document.createDocumentFragment()
            _slice($childrens).forEach(function (n) {
                $con.appendChild(n)
            })
        }
        points.forEach(function (p) {
            if (!$childrens || !$childrens.length) {
                return $(p).remove()
            }
            var $p = $(p)
            var select = $p.attr('select')
            var tar
            var ind

            if (select 
                && (tar = $con.querySelector(select)) 
                && ~(ind = $childrens.indexOf(tar)) ) {

                $p.replace(tar)
                $childrens.splice(ind, 1)
            } else if (!select) {
                $p.replace($con)
                $childrens = null
            }
        })
    }

    /**
     * Replace external component element holder with internal child element
     */
    if (options.replace) {
        if (el.children.length !== 1) {
            console.warn('Can\'t using \'' + NS + 'replace=true\' for a component that has no or multiple child-elements.')
        } else if (el.parentNode) {
            var replacedEl = el.firstElementChild
            _cloneArributes(replacedEl, el)
            el.parentNode.replaceChild(replacedEl, el)
            el = replacedEl
        } else {
            el = el.firstElementChild
        }
    }

    vm.$el = el

    /**
     *  get component define by tagName
     */
    vm.$component = getComponent

    /**
     *  Component instance refs
     */
    vm.$refs = {}

    /**
     *  assign methods
     */
    var methods = {}
    util.objEach(options.methods, function(k, v) {
        if (util.type(v) !== 'function') return console.warn(k + ' is not a function.')
        vm[k] = methods[k] = util.bind(v, vm)
    })
    vm.$methods = methods

    var $data
    var dataOpt = {}

    Object.defineProperty(vm, '$data', {
        enumerable: true,
        get: function() {
            // $data will be undefined in created calling, so using dataOpt as temporary
            return $data || dataOpt
        },
        set: function(v) {
            if (!$data) return util.merge(dataOpt, v)

            $data.$set(v)
            return $data
        }
    })
    vm.$set = function () {
        $data.$set.apply($data, arguments)
    }
    vm.$get = function () {
        return $data.$get.apply($data, arguments)
    }
    vm.$watch = function (/*[ keypath ], fn*/) {
        return $data.$watch.apply($data, arguments)
    }
    vm.$unwatch = function (/*[ keypath ], fn*/) {
        return $data.$unwatch.apply($data, arguments)
    }

    var created = options.created
    if (options.$data) {
        $data = options.$data
        // if state model instance passsing, call after set
        created && created.call(vm)
    } else {
        util.merge(dataOpt, _funcOrObject(options, 'data'))
        // Call before vm-$data instance
        created && created.call(vm)
        // Instance observable state model
        var mopts = {
            props: dataOpt,
            computed: options.computed,
            computedContext: vm
        }
        $data = new Mux(mopts)
    }

    /**
     *  DOM Compile
     *  @TODO the unique interface for a compiled node($el, $remove)
     */
    vm.$compile = function (el, scope) {
        var compiler

        util.walk(el, function (node) {
            var isRoot = node === el
            var result = compile(node, scope, isRoot)
            if (isRoot) compiler = result.inst
            return result.into
        })
        return compiler
    }

    var beforeDestroy = options.destroy
    vm.$destroy = function () {
        if (vm.$destroyed) return
        beforeDestroy && beforeDestroy.call(vm)

        ;[_components, _directives].forEach(function (items) {
            items.forEach(function (inst) {
                inst.$destroy()
            })
        })

        $data.$destroy()

        // instance methods/properties
        vm.$el = null
        vm.$get = null
        vm.$set = null
        vm.$refs = null
        vm.$watch = null
        vm.$unwatch = null
        vm.$compile = null
        vm.$component = null

        // private vars
        directives = null
        components = null
        _directives = null
        _components = null

        // marked
        vm.$destroyed = true
    }
    vm.$compiler = vm.$compile(el)

    /**
     *  Call ready after compile
     */
    options.ready && options.ready.call(vm)

    function _getAllDirts () {
        var _dirts = {}
        directives.forEach(function(group) {
            util.objEach(group, function(id, def) {
                _dirts[NS + id] = def
            })
        })
        return _dirts
    }
    function _setBindings2Scope (scope, ref) {
        scope && scope.bindings && (scope.bindings.push(ref))
    }
    function compile (node, scope, isRoot) {
        /**
         *  1. ELEMENT_NODE; 
         *  2. ATTRIBUTE_NODE; 
         *  3. TEXT_NODE; 
         *  8. COMMENT_NODE; 
         *  9. DOCUMENT_NODE; 
         *  11. DOCUMENT_FRAGMENT;
         */
        var into = true
        var inst
        switch (node.nodeType) {
            case 1:
                /**
                 * static block no parsing
                 */
                if (node.hasAttribute(NS + 'static')) {
                    into = false
                    break
                }
                /**
                 * convert those $ns-if, $ns-repeat attribute to block element
                 */
                node = compilePseudoDirectiveElement(node)
                /**
                 *  scope syntax
                 */
                if (inst = compileElement(node, scope, isRoot)) {
                    into = false
                    break
                }
                /**
                 *  Attribute directive
                 */
                compileDirective(node, scope)
                /**
                 *  Compile custom-element
                 */
                if (inst = compileComponent(node, vm, scope, isRoot)) {
                    into = false
                    break
                }
                break
            case 3:
                // ignore whitespace
                if (node.nodeValue.trim()) inst = compileText(node, vm, scope, isRoot)
                into = false
                break
            case 11:
                // document fragment
                break
            default:
                into = false
        }
        return {
            into: !!into,
            inst: !inst && isRoot ? new Compiler(node) : inst
        }
    }

    function compilePseudoDirectiveElement (node) {
        var repeatAttName = NS + 'repeat'
        var ifAttName = NS + 'if'
        var valueAttName
        var matchedAttName

        if (node.hasAttribute(ifAttName)) {
            matchedAttName = ifAttName
            valueAttName = 'is'
        } else if (node.hasAttribute(repeatAttName)) {
            matchedAttName = repeatAttName
            valueAttName = 'items'
        } else {
            return node
        }
        var attValue = node.getAttribute(matchedAttName)
        var blockNode = document.createElement(matchedAttName)
        node.removeAttribute(matchedAttName)
        node.parentNode && node.parentNode.replaceChild(blockNode, node)
        blockNode.appendChild(node)
        blockNode.setAttribute(valueAttName, attValue)

        while(node.hasAttribute(ifAttName) || node.hasAttribute(repeatAttName)) {
            compilePseudoDirectiveElement(node)
        }
        return blockNode
    }

    /**
     *  Reverse component Constructor by tagName
     */
    function getComponent(tn) {
        var cid = tn.toLowerCase()
        var compDef
        components.some(function (comp) {
            if (comp.hasOwnProperty(cid)) {
                compDef = comp[cid]
                return true
            }
        })
        return compDef
    }
    /**
     *  Compile element for block syntax handling
     */
    function compileElement(node, scope, isRoot) {
        var tagName = node.tagName
        var inst
        switch(true) {
            /**
             *  <*-if></*-if>
             */
            case is.IfElement(tagName):
                var children = _slice(node.children)
                var exprs = [$(node).attr('is')]
                children.forEach(function(c) {
                    if (is.ElseElement(c)) {
                        exprs.push($(c).attr(conf.namespace + 'else') || '')
                    }
                })
                inst = new ElementDirective(
                        vm, 
                        scope,
                        node, 
                        elements['if'], 
                        NS + 'if', 
                        exprs
                )
                if (!isRoot) {
                    inst.$mount(node)
                }
                // save elements refs
                _directives.push(inst)
                // save bindins to scope
                _setBindings2Scope(scope, inst)
                return inst
            /**
             *  <*-repeat></*-repeat>
             */
            case is.RepeatElement(tagName):
                inst = new ElementDirective(
                        vm, 
                        scope,
                        node, 
                        elements.repeat,
                        NS + 'repeat', 
                        $(node).attr('items')
                )
                if (!isRoot) {
                    inst.$mount(node)
                }
                _directives.push(inst)
                _setBindings2Scope(scope, inst)
                return inst
        }
    }

    /**
     *  comment
     */
    function compileComponent (node, parentVM, scope) {
        var cAttName = NS + 'component'
        var CompName = node.getAttribute(cAttName)
        var tagName = node.tagName
        // filtrate most no-compoment element
        if (!CompName && (tagName == 'DIV' || tagName == 'SPAN' || tagName == 'A' || tagName == 'IMG')) return
        CompName = CompName || tagName
        var Comp = getComponent(CompName)

        /**
         *  Tag is not a custom component element
         */
        if (!Comp) return
        var $node = $(node)
        $node.removeAttr(cAttName)

        // don't need deep into self
        if (node === parentVM.$el) return
        // suport expression, TBD
        var refName = NS + 'ref'
        var dAttName = NS + 'data'
        var mAttName = NS + 'methods'
        var rAttName = NS + 'replace'

        var ref = $node.attr(refName)
        var dataExpr = $node.attr(dAttName)
        var methods = $node.attr(mAttName)
        var replace = $node.attr(rAttName)

        $node.removeAttr(refName)
             .removeAttr(dAttName)
             .removeAttr(mAttName)
             .removeAttr(rAttName)

        var _isDataExpr = _isExpr(dataExpr)
        var bindingData
        var bindingMethods
        /**
         *  Watch
         */
        var execLiteral = Expression.execLiteral
        var ast = {}
        var revealAst = {}
        var compVM

        function _parseExpr (exp) {
            var name
            exp = exp.replace(/^[^:]+:/, function (m) {
                            name = m.replace(/:$/, '').trim()
                            return ''
                        }).trim()
            return {
                name: name,
                expr: exp,
                vars: Expression.extract(exp)
            }
        }
        function _setBindingObj (expr) {
            var r = _parseExpr(expr)
            ast[r.name] = r
            ;(r.vars || []).forEach(function (v) {
                !revealAst[v] && (revealAst[v] = []);
                !~revealAst[v].indexOf(r.name) && revealAst[v].push(r.name)
            })
        }

        bindingData = execLiteral(dataExpr, parentVM, scope)
        bindingMethods = execLiteral(methods, parentVM, scope) // --> bindingMethods
        
        compVM = new Comp({
            el: node,
            data: bindingData,
            methods: bindingMethods,
            $parent: parentVM,
            $childrens: _slice(node.childNodes),
            replace: replace == 'true'
        })

        var plainDataExpr = _isDataExpr ? Expression.strip(dataExpr) : ''
        var sep = Expression.sep

        if (plainDataExpr) {
            if (plainDataExpr.match(sep)) {
                plainDataExpr.replace(new RegExp(sep + '\\s*$'), '') // trim last seperator
                       .split(sep)
                       .forEach(_setBindingObj)
            } else {
                _setBindingObj(plainDataExpr)
            }
        }
        // watch and binding
        if (_isDataExpr) {
            parentVM.$data.$watch(function (keyPath) {
                var nextState
                util.objEach(revealAst, function (varName, bindingNames) {
                    if (keyPath.indexOf(varName) === 0) {
                        ;!nextState && (nextState = {})
                        bindingNames.forEach(function (n) {
                            nextState[n] = execute(parentVM, scope, ast[n].expr)
                        })
                    }
                })
                nextState && compVM.$set(nextState)
            })
        }
        // set ref to parentVM
        ref && (parentVM.$refs[ref] = compVM)

        _components.push(compVM)
        _setBindings2Scope(scope, compVM)
        // TBM -- to be modify, instance method should not be attached here
        compVM.$update = function () {
            _isDataExpr && compVM.$set(execLiteral(dataExpr, parentVM, scope))
        }
        return compVM
    }
    /**
     *  Compile attributes to directive
     */
    function compileDirective (node, scope) {
        var ast = {
                attrs: {},
                dires: {}
            }
        var dirtDefs = _getAllDirts()
        /**
         *  attributes walk
         */
        _slice(node.attributes).forEach(function(att) {
            var aname = att.name
            var v = att.value
            // parse att
            if (~componentProps.indexOf(aname)) {
                return
            } else if (_isExpr(aname)) {
                // variable attribute name
                ast.attrs[aname] = v
            } else if (aname.indexOf(NS) === 0) {
                var def = dirtDefs[aname]
                if (def) {
                    // directive
                    ast.dires[aname] = {
                        def: def,
                        expr: v
                    }
                } else {
                    return
                }
            } else if (_isExpr(v.trim())) {
                // named attribute with expression
                ast.attrs[aname] = v
            } else {
                return
            }
            node.removeAttribute(aname)
        })

        /**
         *  Attributes binding
         */
        util.objEach(ast.attrs, function(name, value) {
            var attd = new AttributeDirective(vm, scope, node, name, value)
            _directives.push(attd)
            _setBindings2Scope(scope, attd)
        })

        /**
         *  Directives binding
         */
        util.objEach(ast.dires, function(dname, spec) {
            var def = spec.def
            var expr = spec.expr
            var sep = ';'
            var d
            // multiple defines expression parse
            if (def.multi && expr.match(sep)) {
                Expression.strip(expr)
                        .split(sep)
                        .forEach(function(item) {
                            // discard empty expression 
                            if (!item.trim()) return
                            
                            d = new Directive(vm, scope, node, def, dname, '{' + item + '}')
                            _directives.push(d)
                            _setBindings2Scope(scope, d)
                        })
            } else {
                d = new Directive(vm, scope, node, def, dname, expr)
                _directives.push(d)
                _setBindings2Scope(scope, d)
            }
        })
    }

    function compileText (node, vm, scope) {
        var originExpr = node.nodeValue
        var v = Expression.veil(originExpr)
        var exprReg = Expression.exprRegexp

        var parts = v.split(exprReg)
        var exprs = v.match(exprReg)

        var inst
        // expression match or not
        if (exprs && exprs.length) {
            inst = new TextDirective(vm, scope, node, originExpr, parts, exprs)
            _directives.push(inst)
            _setBindings2Scope(scope, inst)
        }
        return inst
    }
}
625765
function version () {
  const main = {
    elint: elintVersion
  }

  const dep = {
    eslint: eslintVersion,
    stylelint: stylelintVersion,
    commitlint: commitlintVersion,
    husky: huskyVersion
  }

  const preset = tryRequire(/elint-preset/)[0]
  if (preset) {
    // eslint-disable-next-line global-require
    const { version: presetVersion } = require(`${preset}/package.json`)
    main[preset] = presetVersion
  }

  const output = ['> elint version', '']

  const mainNameLength = Math.max(...Object.keys(main).map(k => k.length))

  // 兼容 node v6
  _.toPairs(main).forEach(([name, version]) => {
    output.push(`  ${padEnd(name, mainNameLength)} : ${version}`)
  })

  output.push('')
  output.push('  Dependencies:')

  const depNameLength = Math.max(...Object.keys(dep).map(k => k.length))

  // 兼容 node v6
  _.toPairs(dep).forEach(([name, version]) => {
    output.push(`    ${padEnd(name, depNameLength)} : ${version}`)
  })

  output.push('')

  console.log(output.join('\n'))
}
77411
function (v) {

/*Line 486 - 'AtomControl.js' */                var vm = this._localViewModel;
/*Line 487 - 'AtomControl.js' */                if (vm && vm.dispose) {
/*Line 488 - 'AtomControl.js' */                    vm.dispose();
/*Line 489 - 'AtomControl.js' */                }

/*Line 491 - 'AtomControl.js' */                this._localViewModel = v;

/*Line 493 - 'AtomControl.js' */                function propogate(e) {
/*Line 494 - 'AtomControl.js' */                    var ae = new ChildEnumerator(e);
/*Line 495 - 'AtomControl.js' */                    while (ae.next()) {
/*Line 496 - 'AtomControl.js' */                        var child = ae.current();
/*Line 497 - 'AtomControl.js' */                        if (child.atomControl && child.atomControl._created) {
/*Line 498 - 'AtomControl.js' */                            var ctrl = child.atomControl;
/*Line 499 - 'AtomControl.js' */                            if (ctrl._localViewModel !== undefined)
/*Line 500 - 'AtomControl.js' */                                continue;
/*Line 501 - 'AtomControl.js' */                            Atom.refresh(ctrl, "localViewModel");
/*Line 502 - 'AtomControl.js' */                        }
/*Line 503 - 'AtomControl.js' */                        propogate(child);
/*Line 504 - 'AtomControl.js' */                    }
/*Line 505 - 'AtomControl.js' */                };
/*Line 506 - 'AtomControl.js' */                propogate(this._element);
/*Line 507 - 'AtomControl.js' */            }
860917
function showVersion(){
  var jshint_proc = fork(__dirname + '/node_modules/jshint/bin/jshint', ['-v'], {silent: true});
  var ts = through(function write(chunk){
    this.queue("JSXHint v" + require('./package.json').version + " (" +
      chunk.toString().replace("\n", "") + ")\n");
  });
  jshint_proc.stderr.pipe(ts).pipe(process.stderr);
}
1346115
async function doRollup() {
  // Plugins
  const es5 = babel({ presets: ['@babel/preset-env'] });
  const min = minify({ comments: false });

  const output = format => file => ({
    format,
    file,
    name: MODULE_NAME
  });

  const umd = output('umd');
  const esm = output('es');

  const bundle = await rollup({ input: ROLLUP_INPUT_FILE });
  const bundleES5 = await rollup({ input: ROLLUP_INPUT_FILE, plugins: [es5] });
  const bundleES5Min = await rollup({
    input: ROLLUP_INPUT_FILE,
    plugins: [es5, min]
  });

  const baseName = `${DIST_PATH}/${MODULE_NAME}`;

  // UMD ES2018
  await bundle.write(umd(`${baseName}.js`));
  // ESM ES2018
  await bundle.write(esm(`${baseName}.esm.js`));
  // UMD ES5
  await bundleES5.write(umd(`${baseName}.es5.js`));
  // UMD ES5 min
  await bundleES5Min.write(umd(`${baseName}.es5.min.js`));
}
491311
function VK(options, redirectUri, code, token) {
    EventEmitter.call(self);
    self = this;
    if (options === undefined)
        throw 'No options passed to constructor';
    if (options.appID === undefined || options.appSecret === undefined)
        throw 'Wrong options';
    if (options.mode === 'undefined' || !(options.mode === 'oauth' || options.mode === 'sig'))
        options.mode = 'oauth';
    self.options = options;
    self.code = code || '';
    self.token = token || '';
    self.redirectUri = redirectUri || 'http://localhost';
    self.userId = 0;
}
491032
function verMatchVal(i) {
		var v = self.versionMatch[i];
		var vr = 0;
		var vl = self.prev.versionMatch && self.prev.versionMatch.length > i && self.prev.versionMatch[i] ? +self.prev.versionMatch[i]
				: vr;
		si++;
		// reset the last index so the tests will be accurate
		regexVerBump.lastIndex = 0;
		regexVerCurr.lastIndex = 0;
		if (v && regexVerBump.test(v)) {
			// increment the value for the given slot
			self.versionBumpedIndices.push(si);
			var bcnt = 0;
			v.replace(regexVerBump, function vBump(m) {
				bcnt += m.length;
			});
			vr = vl + bcnt;
		} else if (v && regexVerCurr.test(v)) {
			// use the last release value for the given slot
			self.versionPrevIndices.push(si);
			vr = vl;
		} else if (v) {
			// faster parseInt using unary operator
			vr = +v;
		}
		vt += vr;
		return vr;
	}
1229590
function makeVirtual(src, target) {
  var this$1 = this;

  var head = createDOMPlaceholder(),
    tail = createDOMPlaceholder(),
    frag = createFrag(),
    sib, el;

  this.root.insertBefore(head, this.root.firstChild);
  this.root.appendChild(tail);

  this.__.head = el = head;
  this.__.tail = tail;

  while (el) {
    sib = el.nextSibling;
    frag.appendChild(el);
    this$1.__.virts.push(el); // hold for unmounting
    el = sib;
  }

  if (target)
    { src.insertBefore(frag, target.__.head); }
  else
    { src.appendChild(frag); }
}
1061804
function (v) {
/*Line 77 - 'AtomFormField.js' */                if (this._required) {
/*Line 78 - 'AtomFormField.js' */                    if (!v) {
/*Line 79 - 'AtomFormField.js' */                        AtomBinder.setValue(this, "error", this._requiredMessage);
/*Line 80 - 'AtomFormField.js' */                        this._isValid = false;
/*Line 81 - 'AtomFormField.js' */                        return;
/*Line 82 - 'AtomFormField.js' */                    }
/*Line 83 - 'AtomFormField.js' */                } else {
/*Line 84 - 'AtomFormField.js' */                    // if value is not required
/*Line 85 - 'AtomFormField.js' */                    // and if value is empty
/*Line 86 - 'AtomFormField.js' */                    // it is a valid value
/*Line 87 - 'AtomFormField.js' */                    if (!v) {
/*Line 88 - 'AtomFormField.js' */                        this._isValid = true;
/*Line 89 - 'AtomFormField.js' */                        return;
/*Line 90 - 'AtomFormField.js' */                    }
/*Line 91 - 'AtomFormField.js' */                }

/*Line 93 - 'AtomFormField.js' */                var re = null;

/*Line 95 - 'AtomFormField.js' */                if (/email/gi.test(this._dataType)) {
/*Line 96 - 'AtomFormField.js' */                    re = /^(([^<>()\[\]\\.,;:\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,}))$/;
/*Line 97 - 'AtomFormField.js' */                } else {
/*Line 98 - 'AtomFormField.js' */                    if (this._regex) {
/*Line 99 - 'AtomFormField.js' */                        re = eval("(" + this._regex + ")");
/*Line 100 - 'AtomFormField.js' */                    }
/*Line 101 - 'AtomFormField.js' */                }

/*Line 103 - 'AtomFormField.js' */                if (re) {
/*Line 104 - 'AtomFormField.js' */                    if (!re.test(v)) {
/*Line 105 - 'AtomFormField.js' */                        AtomBinder.setValue(this, "error", this._invalidMessage);
/*Line 106 - 'AtomFormField.js' */                        this._isValid = false;
/*Line 107 - 'AtomFormField.js' */                        return;
/*Line 108 - 'AtomFormField.js' */                    }
/*Line 109 - 'AtomFormField.js' */                }
/*Line 110 - 'AtomFormField.js' */            }
259845
function gulpLua2Js({ useFilenameAsName = true, ...options } = {}) {
  // creating a stream through which each file will pass
  return through.obj(function (file, enc, cb) {
    const newFile = file.clone();

    vinylToString(file, enc)
    .then(lua => {
      const dirname = path.dirname(file.path);
      const basename = path.basename(file.path, path.extname(file.path));

      if (!{}.hasOwnProperty.call(options, 'name') && useFilenameAsName) {
        options.name = basename;
      }

      const js = lua2js(lua, options);

      if (file.isBuffer()) {
        newFile.contents = new Buffer(js);
      } else if (file.isStream()) {
        // start the transformation
        newFile.contents = through();
        newFile.contents.end(js);
      } else {
        throw new PluginError(PLUGIN_NAME, 'Invalid file');
      }

      newFile.path = path.join(dirname, `${basename}.js`);
      // make sure the file goes through the next gulp plugin
      this.push(newFile);

      cb();
    });
  });
}
43257
function () {
        /* BACKWARD-COMPATIBILITY-BEGIN (GitHub #1397) */
        /**
         * <b>Deprecated, use aria.core.Browser.ua instead.</b>
         *
         * <p>
         * The user agent string.
         * </p>
         *
         * @type String
         * @deprecated use aria.core.Browser.ua instead
         */
        this.ua = null;
         */

        /**
         * Previous orientation value to check if event should be raised (value changed or not).
         * @type Boolean
         * @private
         */
        this._previousIsPortrait = this.isPortrait(true);

        /* BACKWARD-COMPATIBILITY-BEGIN (GitHub #1397) */
        this._deprecatedProperties = []; // for init to process well
         */

        /* BACKWARD-COMPATIBILITY-BEGIN (GitHub #1397) */
        var properties = [
            {
                name: "ua",
                alternative: "aria.core.Browser.ua"
            },

            {
                name: "isMobile",
                type: "method",
                underlying: "isPhone"
            },
            {
                name: "isPhoneGap",
                type: "method",
                underlying: {
                    name: "isPhoneGap",
                    container: ariaCoreBrowser,
                    containerName: "aria.core.Browser"
                }
            },
            {
                name: "is2DTransformCapable",
                type: "method",
                underlying: {
                    name: "is2DTransformCapable",
                    container: ariaCoreBrowser,
                    containerName: "aria.core.Browser"
                }
            },
            {
                name: "is3DTransformCapable",
                type: "method",
                underlying: {
                    name: "is3DTransformCapable",
                    container: ariaCoreBrowser,
                    containerName: "aria.core.Browser"
                }
            }
        ];

        var deprecatedProperties = [];
        var isString = ariaUtilsType.isString;
        ariaUtilsArray.forEach(properties, function(property) {
            // ------------------------------------------------ property factory

            if (ariaUtilsType.isString(property)) {
                property = {name: property};
            }

            // ------------------------------------------------------------ name

            var name = property.name;

            // ------------------------------------------------------------ type

            var type = property.type;

            if (type == null) {
                type = "attribute";
            }

            property.type = type;

            // ----------------------------------------------- underlying method

            var possibleAlternative;

            if (type == "method") {
                var underlying = property.underlying;

                if (isString(underlying)) {
                    underlying = {name: underlying};
                }

                var underlyingName = underlying.name;

                var underlyingContainer = underlying.container;
                if (underlyingContainer == null) {
                    underlyingContainer = this;
                }
                underlying.container = underlyingContainer;

                var underlyingContainerName = underlying.containerName;

                // -------------------------------------------------------------

                possibleAlternative = "";
                if (underlyingContainerName != null) {
                    possibleAlternative += underlyingContainerName + ".";
                }
                possibleAlternative += underlyingName;

                underlying = function() {
                    return underlyingContainer[underlyingName].apply(underlyingContainer, arguments);
                };

                property.underlying = underlying;
            }

            // ----------------------------------------------------- alternative

            var alternative = property.alternative;

            if (alternative == null && possibleAlternative != null) {
                alternative = possibleAlternative;
            }

            property.alternative = alternative;

            // --------------------------------------------------- extrapolation

            var loggingMessage;
            var loggingMessageArguments = [name];

            if (alternative != null) {
                loggingMessage = type == "attribute" ? "DEPRECATED_REPLACED_PROPERTY" : "DEPRECATED_REPLACED_METHOD";
                loggingMessageArguments.push(alternative);
            } else {
                loggingMessage = type == "attribute" ? "DEPRECATED_REMOVED_PROPERTY" : "DEPRECATED_REMOVED_METHOD";
            }

            property.loggingMessage = this[loggingMessage];
            property.loggingMessageArguments = loggingMessageArguments;

            // ---------------------------------------------------------- result

            deprecatedProperties.push(property);
        }, this);

        this._deprecatedProperties = deprecatedProperties;
        this.__deprecateProperties();
         */

        this.init();
    }
1014115
function buildUmdLib(dest, plugins = []) {
	return src.transform(rollup, {
		plugins: plugins,
		input: 'Ractive.js',
		output: {
			name: 'Ractive',
			format: 'umd',
			file: dest,
			sourcemap: true,
			banner: banner,
			noConflict: true
		},
		cache: false
	}).transform(transpile, { accept: ['.js'] }).transform(replacePlaceholders);
}
846515
function bundleRelease(minify) {
  var bundler = browserify({
    entries: ['./src/' + entryFileName],
    standalone: standaloneName,
    debug: !minify
  });

  if(minify) {
    bundler = bundler.plugin(collapse);
  }

  var stream = bundler.bundle()
    .on('error', logError);

  if(!minify) {
    stream = stream.pipe(exorcist('./dist/' + bundleFileName + '.map'));
  }

  stream = stream.pipe(source(bundleFileName))
    .pipe(buffer())
    .pipe(derequire())
    .pipe(strip());

  if(minify) {
    return stream.pipe(rename({extname: '.min.js'}))
      .pipe(uglify())
      .pipe(gulp.dest('./dist/'));
  } else {
    return stream.pipe(gulp.dest('./dist/'));
  }
}