diff --git a/README.md b/README.md index 1ea2f3c..5380964 100755 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ ### About shadow-widget Like 'react + reflux + react-router', but more simple and powerful, -suports visual progaming also. +suports visual progamming also. -Last stable version: v1.0 +Last stable version: v1.1 ### Install diff --git a/dist/shadow-widget.js b/dist/shadow-widget.js index 50c937f..fbbd3e6 100644 --- a/dist/shadow-widget.js +++ b/dist/shadow-widget.js @@ -3,11 +3,1198 @@ // package by: browserify -u react -u react-dom src/index_cdn.js -o src/bundle_cdn.js -t [ babelify --compact false --presets [ es2015 react ] ] (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;oHello World; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ + var ReactClassInterface = { + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: 'DEFINE_MANY', + + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: 'DEFINE_MANY', + + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: 'DEFINE_MANY', + + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: 'DEFINE_MANY', + + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: 'DEFINE_MANY', + + // ==== Definition methods ==== + + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: 'DEFINE_MANY_MERGED', + + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: 'DEFINE_MANY_MERGED', + + /** + * @return {object} + * @optional + */ + getChildContext: 'DEFINE_MANY_MERGED', + + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return
Hello, {name}!
; + * } + * + * @return {ReactComponent} + * @required + */ + render: 'DEFINE_ONCE', + + // ==== Delegate methods ==== + + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: 'DEFINE_MANY', + + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: 'DEFINE_MANY', + + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: 'DEFINE_MANY', + + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: 'DEFINE_ONCE', + + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: 'DEFINE_MANY', + + // ==== Advanced methods ==== + + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: 'OVERRIDE_BASE' + }; + + /** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ + var RESERVED_SPEC_KEYS = { + displayName: function(Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function(Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function(Constructor, childContextTypes) { + if (process.env.NODE_ENV !== 'production') { + validateTypeDef(Constructor, childContextTypes, 'childContext'); + } + Constructor.childContextTypes = _assign( + {}, + Constructor.childContextTypes, + childContextTypes + ); + }, + contextTypes: function(Constructor, contextTypes) { + if (process.env.NODE_ENV !== 'production') { + validateTypeDef(Constructor, contextTypes, 'context'); + } + Constructor.contextTypes = _assign( + {}, + Constructor.contextTypes, + contextTypes + ); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function(Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps + ); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function(Constructor, propTypes) { + if (process.env.NODE_ENV !== 'production') { + validateTypeDef(Constructor, propTypes, 'prop'); + } + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function(Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function() {} + }; + + function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an _invariant so components + // don't show up in prod but only in __DEV__ + if (process.env.NODE_ENV !== 'production') { + warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName + ); + } + } + } + } + + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) + ? ReactClassInterface[name] + : null; + + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + _invariant( + specPolicy === 'OVERRIDE_BASE', + 'ReactClassInterface: You are attempting to override ' + + '`%s` from your class specification. Ensure that your method names ' + + 'do not overlap with React methods.', + name + ); + } + + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + _invariant( + specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', + 'ReactClassInterface: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be due ' + + 'to a mixin.', + name + ); + } + } + + /** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. + */ + function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + if (process.env.NODE_ENV !== 'production') { + var typeofSpec = typeof spec; + var isMixinValid = typeofSpec === 'object' && spec !== null; + + if (process.env.NODE_ENV !== 'production') { + warning( + isMixinValid, + "%s: You're attempting to include a mixin that is either null " + + 'or not an object. Check the mixins included by the component, ' + + 'as well as any mixins they include themselves. ' + + 'Expected object but got %s.', + Constructor.displayName || 'ReactClass', + spec === null ? null : typeofSpec + ); + } + } + + return; + } + + _invariant( + typeof spec !== 'function', + "ReactClass: You're attempting to " + + 'use a component class or function as a mixin. Instead, just use a ' + + 'regular object.' + ); + _invariant( + !isValidElement(spec), + "ReactClass: You're attempting to " + + 'use a component as a mixin. Instead, just use a regular object.' + ); + + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; + + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } + + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } + + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above. + continue; + } + + var property = spec[name]; + var isAlreadyDefined = proto.hasOwnProperty(name); + validateMethodOverride(isAlreadyDefined, name); + + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); + var isFunction = typeof property === 'function'; + var shouldAutoBind = + isFunction && + !isReactClassMethod && + !isAlreadyDefined && + spec.autobind !== false; + + if (shouldAutoBind) { + autoBindPairs.push(name, property); + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; + + // These cases should already be caught by validateMethodOverride. + _invariant( + isReactClassMethod && + (specPolicy === 'DEFINE_MANY_MERGED' || + specPolicy === 'DEFINE_MANY'), + 'ReactClass: Unexpected spec policy %s for key %s ' + + 'when mixing in component specs.', + specPolicy, + name + ); + + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === 'DEFINE_MANY_MERGED') { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === 'DEFINE_MANY') { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if (process.env.NODE_ENV !== 'production') { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } + } + } + } + + function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } + + var isReserved = name in RESERVED_SPEC_KEYS; + _invariant( + !isReserved, + 'ReactClass: You are attempting to define a reserved ' + + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + + 'as an instance property instead; it will still be accessible on the ' + + 'constructor.', + name + ); + + var isInherited = name in Constructor; + _invariant( + !isInherited, + 'ReactClass: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be ' + + 'due to a mixin.', + name + ); + Constructor[name] = property; + } + } + + /** + * Merge two objects, but throw if both contain the same key. + * + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. + */ + function mergeIntoWithNoDuplicateKeys(one, two) { + _invariant( + one && two && typeof one === 'object' && typeof two === 'object', + 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' + ); + + for (var key in two) { + if (two.hasOwnProperty(key)) { + _invariant( + one[key] === undefined, + 'mergeIntoWithNoDuplicateKeys(): ' + + 'Tried to merge two objects with the same key: `%s`. This conflict ' + + 'may be due to a mixin; in particular, this may be caused by two ' + + 'getInitialState() or getDefaultProps() methods returning objects ' + + 'with clashing keys.', + key + ); + one[key] = two[key]; + } + } + return one; + } + + /** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; + } + + /** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; + } + + /** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if (process.env.NODE_ENV !== 'production') { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + boundMethod.bind = function(newThis) { + for ( + var _len = arguments.length, + args = Array(_len > 1 ? _len - 1 : 0), + _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + if (process.env.NODE_ENV !== 'production') { + warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName + ); + } + } else if (!args.length) { + if (process.env.NODE_ENV !== 'production') { + warning( + false, + 'bind(): You are binding a component method to the component. ' + + 'React does this for you automatically in a high-performance ' + + 'way, so you can safely remove this call. See %s', + componentName + ); + } + return boundMethod; + } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + }; + } + return boundMethod; + } + + /** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ + function bindAutoBindMethods(component) { + var pairs = component.__reactAutoBindPairs; + for (var i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i]; + var method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); + } + } + + var IsMountedPreMixin = { + componentDidMount: function() { + this.__isMounted = true; + } + }; + + var IsMountedPostMixin = { + componentWillUnmount: function() { + this.__isMounted = false; + } + }; + + /** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ + var ReactClassMixin = { + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function(newState, callback) { + this.updater.enqueueReplaceState(this, newState, callback); + }, + + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function() { + if (process.env.NODE_ENV !== 'production') { + warning( + this.__didWarnIsMounted, + '%s: isMounted is deprecated. Instead, make sure to clean up ' + + 'subscriptions and pending requests in componentWillUnmount to ' + + 'prevent memory leaks.', + (this.constructor && this.constructor.displayName) || + this.name || + 'Component' + ); + this.__didWarnIsMounted = true; + } + return !!this.__isMounted; + } + }; + + var ReactClassComponent = function() {}; + _assign( + ReactClassComponent.prototype, + ReactComponent.prototype, + ReactClassMixin + ); + + /** + * Creates a composite component class given a class specification. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + function createClass(spec) { + // To keep our warnings more understandable, we'll use a little hack here to + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't + // unnecessarily identify a class without displayName as 'Constructor'. + var Constructor = identity(function(props, context, updater) { + // This constructor gets overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. + + if (process.env.NODE_ENV !== 'production') { + warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: https://fb.me/react-legacyfactory' + ); + } + + // Wire up auto-binding + if (this.__reactAutoBindPairs.length) { + bindAutoBindMethods(this); + } + + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + + this.state = null; + + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. + + var initialState = this.getInitialState ? this.getInitialState() : null; + if (process.env.NODE_ENV !== 'production') { + // We allow auto-mocks to proceed as if they're returning null. + if ( + initialState === undefined && + this.getInitialState._isMockFunction + ) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + _invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent' + ); + + this.state = initialState; + }); + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + Constructor.prototype.__reactAutoBindPairs = []; + + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + + mixSpecIntoComponent(Constructor, IsMountedPreMixin); + mixSpecIntoComponent(Constructor, spec); + mixSpecIntoComponent(Constructor, IsMountedPostMixin); + + // Initialize the defaultProps property after all mixins have been merged. + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } + + if (process.env.NODE_ENV !== 'production') { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } + + _invariant( + Constructor.prototype.render, + 'createClass(...): Class specification must implement a `render` method.' + ); + + if (process.env.NODE_ENV !== 'production') { + warning( + !Constructor.prototype.componentShouldUpdate, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + spec.displayName || 'A component' + ); + warning( + !Constructor.prototype.componentWillRecieveProps, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + spec.displayName || 'A component' + ); + } + + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } + + return Constructor; + } + + return createClass; +} + +module.exports = factory; + +}).call(this,require('_process')) +},{"_process":11,"fbjs/lib/emptyObject":4,"fbjs/lib/invariant":5,"fbjs/lib/warning":6,"object-assign":7}],2:[function(require,module,exports){ +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +'use strict'; + +var React = require('react'); +var factory = require('./factory'); + +if (typeof React === 'undefined') { + throw Error( + 'create-react-class could not find the React object. If you are using script tags, ' + + 'make sure that React is being loaded before create-react-class.' + ); +} + +// Hack to grab NoopUpdateQueue from isomorphic React +var ReactNoopUpdateQueue = new React.Component().updater; + +module.exports = factory( + React.Component, + React.isValidElement, + ReactNoopUpdateQueue +); + +},{"./factory":1,"react":undefined}],3:[function(require,module,exports){ +"use strict"; + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + +function makeEmptyFunction(arg) { + return function () { + return arg; + }; +} + +/** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ +var emptyFunction = function emptyFunction() {}; + +emptyFunction.thatReturns = makeEmptyFunction; +emptyFunction.thatReturnsFalse = makeEmptyFunction(false); +emptyFunction.thatReturnsTrue = makeEmptyFunction(true); +emptyFunction.thatReturnsNull = makeEmptyFunction(null); +emptyFunction.thatReturnsThis = function () { + return this; +}; +emptyFunction.thatReturnsArgument = function (arg) { + return arg; +}; + +module.exports = emptyFunction; +},{}],4:[function(require,module,exports){ +(function (process){ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +'use strict'; + +var emptyObject = {}; + +if (process.env.NODE_ENV !== 'production') { + Object.freeze(emptyObject); +} + +module.exports = emptyObject; +}).call(this,require('_process')) +},{"_process":11}],5:[function(require,module,exports){ +(function (process){ +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +'use strict'; + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var validateFormat = function validateFormat(format) {}; + +if (process.env.NODE_ENV !== 'production') { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; +} + +function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + + if (!condition) { + var error; + if (format === undefined) { + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error(format.replace(/%s/g, function () { + return args[argIndex++]; + })); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +} + +module.exports = invariant; +}).call(this,require('_process')) +},{"_process":11}],6:[function(require,module,exports){ +(function (process){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +'use strict'; + +var emptyFunction = require('./emptyFunction'); + +/** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var warning = emptyFunction; + +if (process.env.NODE_ENV !== 'production') { + var printWarning = function printWarning(format) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; +} + +module.exports = warning; +}).call(this,require('_process')) +},{"./emptyFunction":3,"_process":11}],7:[function(require,module,exports){ +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + +'use strict'; +/* eslint-disable no-unused-vars */ +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; + +},{}],8:[function(require,module,exports){ 'use strict'; var React = window.React; var ReactDOM = window.ReactDOM; + var W = undefined, T = undefined; @@ -70,7 +1257,7 @@ if (typeof reactRequire_ == 'function' && reactModules_) { }, 300); } else console.log('fatal error: unknown package tool!'); -},{"./react_widget":2,"./template":3}],2:[function(require,module,exports){ +},{"./react_widget":9,"./template":10}],9:[function(require,module,exports){ (function (process){ 'use strict'; @@ -78,9 +1265,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol var React = window.React || require('react'); var ReactDOM = window.ReactDOM || require('react-dom'); - -var createClass_ = React.createClass; -if (!createClass_) console.log('fatal error: invalid React.createClass'); // before v15.5 +var createClass_ = window.createReactClass || require('create-react-class'); if (!Object.assign) { // polyfill function @@ -2152,7 +3337,8 @@ utils.bindMountData = function (data) { Object.defineProperty(idSetter, sKey, { enumerable: true, configurable: true, get: function get() { return wrapFn; - } }); + } // no 'set' + }); } }); @@ -2553,7 +3739,7 @@ utils.loadingEntry = function (require, module, exports) { module.exports = W; }).call(this,require('_process')) -},{"_process":4,"react":undefined,"react-dom":undefined}],3:[function(require,module,exports){ +},{"_process":11,"create-react-class":2,"react":undefined,"react-dom":undefined}],10:[function(require,module,exports){ 'use strict'; var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; @@ -2574,9 +3760,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope var React = window.React || require('react'); var ReactDOM = window.ReactDOM || require('react-dom'); - -var createClass_ = React.createClass; -if (!createClass_) console.log('fatal error: invalid React.createClass'); // before v15.5 +var createClass_ = window.createReactClass || require('create-react-class'); var W = require('./react_widget'); var T = W.$templates, @@ -2585,6 +3769,8 @@ var T = W.$templates, var idSetter = W.$idSetter, creator = W.$creator; +creator.createClass_ = createClass_; + (function (loc) { var b = loc.pathname.split('/'); if (!b[0]) b.shift(); @@ -2599,7 +3785,7 @@ var idSetter = W.$idSetter, })(window.location); utils.version = function () { - return '1.0.5'; + return '1.1.0'; }; var vendorId_ = function (sUA) { @@ -12734,7 +13920,8 @@ var TSpan_ = function (_TWidget_4) { key: '_getSchema', value: function _getSchema(self, iLevel) { return { key: [-1, 'string'], // -1 means at top - width: [], height: [] }; + width: [], height: [] // disable show width/height in prop-editor, default come from TWidget_ + }; } }, { key: 'getDefaultProps', @@ -16457,7 +17644,7 @@ T.MarkedTable = new TMarkedTable_(); module.exports = T; -},{"./react_widget":2,"react":undefined,"react-dom":undefined}],4:[function(require,module,exports){ +},{"./react_widget":9,"create-react-class":2,"react":undefined,"react-dom":undefined}],11:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -16619,4 +17806,4 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}]},{},[1]); +},{}]},{},[8]); diff --git a/dist/shadow-widget.min.js b/dist/shadow-widget.min.js index 0ef7991..5d11c85 100644 --- a/dist/shadow-widget.min.js +++ b/dist/shadow-widget.min.js @@ -1,2 +1,2 @@ -// shadow-widget cdn ver 1.0.5 -!function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var p=r[a]={exports:{}};t[a][0].call(p.exports,function(e){var r=t[a][1][e];return i(r||e)},p,p.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a=0.14 is required, current is "+n.version)}o=e("./react_widget"),e("./template")}else console.log("fatal error! React or ReactDom not found, cdn version of React library should be loaded first.");var s={react:n,"react-dom":i,"shadow-widget":o},l=arguments[3],u=arguments[4],p=arguments[5];if("function"==typeof l&&u)Object.keys(s).forEach(function(e){p[e]={exports:s[e]}}),u[9998]=[o.$utils.loadingEntry,u[1][1]],setTimeout(function(){o.$main.isStart||(o.$main.isStart=!0,l(u,p,[9998]))},300);else if("undefined"!=typeof __webpack_require__&&__webpack_require__.c){var c={exports:{},id:9998,loaded:!0};__webpack_require__.c[9998]=c,setTimeout(function(){o.$main.isStart||(o.$main.isStart=!0,o.$utils.loadingEntry(function(e){if("number"==typeof e)return __webpack_require__(e);var t=s[e];return t||console.log("can not find module: "+e),t},c,c.exports))},300)}else console.log("fatal error: unknown package tool!")},{"./react_widget":2,"./template":3}],2:[function(e,t,r){(function(r){"use strict";function n(e,t){var r=e[t];if(r)return r;for(var i in e)if("parent"!=i&&e.hasOwnProperty(i)){var o=e[i];if(Array.isArray(o)&&o.W&&(o=n(o,t)))return o}}function i(e){var t=void 0===e?"undefined":s(e);if("number"==t)return this.W?this[e]:d[e];if(!e)return""===e?d:o(i=new Array);if("object"==t){var r=e.constructor===Object,i=new Array;return i.$id=f++,i.component=e,r||(e.widget=i),o(i)}if("string"!=t)return d;var a=void 0,l=e.split("."),u=0;if(l[0]){var p=l.shift();u+=1,a=Array.isArray(this)&&this.W?this:d,a="-"==p[0]?0==(c=p.slice(1)).search(/^[0-9]+$/)?a[Math.max(0,a.length-parseInt(c))]:a===d?n(a,p):a[p]:0==p.search(/^[0-9]+$/)?a[parseInt(p)]:a===d?n(a,p):a[p]}for(;l.length;)if(u+=1,p=l.shift())if("-"==p[0]){var c=p.slice(1);if(0==c.search(/^[0-9]+$/)){if(!a)return a;a=a[Math.max(0,a.length-parseInt(c))]}else{if(!a)return a;a=a[p]}}else if(0==p.search(/^[0-9]+$/)){if(!a)return a;a=a[parseInt(p)]}else{if(!a)return a;a=a[p]}else{if(a||1!=u)return a;a=this.W?this:d}return a}function o(e){function t(e,t){return function(){return t.apply(e,arguments)}}function r(e,t){if(e.$id===t)return e;for(var n in e)if("parent"!=n&&e.hasOwnProperty(n)){var i=e[n];if(Array.isArray(i)&&i.W&&(i=r(i,t)))return i}}for(var n in h)e[n]=h[n];return d&&d.__debug__&&(e.queryById=function(e){return r(this,parseInt(e))},e.addShortcut=function(){var e=[],r=this.component;if(!r)return e;for(var n,i=0;n=arguments[i];i++){var o=r[n];"function"==typeof o?(this[n]=t(r,o),e.push(n)):o&&(this[n]=o)}return e}),e}function a(e){this.component=e}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=window.React||e("react"),u=window.ReactDOM||e("react-dom"),p=l.createClass;if(p||console.log("fatal error: invalid React.createClass"),Object.assign||(Object.assign=function(){var e=arguments.length;if(e<1)return{};var t=arguments[0];"object"!=(void 0===t?"undefined":s(t))&&(t={});for(var r=1;r>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=arguments[1],i=0;i=0?e[t]:void 0}}var f=0,h={W:i,$set:function(e,t){if(e||0===e)if(Array.isArray(t)&&t.W){r=this[e];this[e]=t,t.parent=this,Array.isArray(r)&&r.W&&delete r.parent}else if(!t){var r=this[e];delete this[e],Array.isArray(r)&&r.W&&delete r.parent}},$unhook:function(e,t){if(Array.isArray(e)&&e.W){var r=void 0===t?"undefined":s(t);if("string"==r||"number"==r)this[t]===e&&delete this[t];else for(var n,i=Object.keys(this),o=0;n=i[o];o+=1)if(e===this[n]){delete this[n];break}delete e.parent,delete e.$callspace}},getPath:function(e){var t=this.parent;if(t&&t.W&&t!==this){if(this.component){var r=this.component.$gui.keyid;if(r||0===r)return t.getPath("."+r+(e||""))}var n="";for(var i in t)if("parent"!=i&&t.hasOwnProperty(i)&&t[i]===this){n="."+i;break}return e&&(n+=e),t.getPath(n)}return e||""}},d=window.W;Array.isArray(d)?o(d):((d=new i).$modules=[],window.W=d),d.__debug__=0,d.$templates={},d.$css=[],d.$main={$$onLoad:[],$onReady:[],$onLoad:[],isReady:!1,inRunning:!1,inDesign:!1,isStart:!1},d.$idSetter={},d.$creator={},d.$svg={},d.$staticNodes=[],d.$creator.createEx=function(e){var t=new a(e);return"function"==typeof t.init&&t.init(),t};var g=d.$utils={instantShow:function(e){console.log("[MSG]",e)},widgetNum:function(e){return d.__design__&&"number"==typeof e&&(f=e),f},cssNamedColor:function(e){},gotoHash:function(e,t){t&&t("")}};d.$cachedClass={},d.$ex=new a,d.$ex.regist=function(e,t){e&&t&&(a.prototype[e]=t)};var v=function(){function e(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var r=Object(e),n=Object.prototype.hasOwnProperty,i=1;i/g,">").replace(/"/g,""").replace(/'/g,"'")}function o(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function a(e,t){return e=e.source,t=t||"",function r(n,i){return n?(i=i.source||i,i=i.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(n,i),r):new RegExp(e,t)}}function s(){}function l(e){for(var t,r,n=1;nAn error occured:

"+i(e.message+"",!0)+"
";throw e}}var p={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:s,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:s,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *(>|>|::)[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:s,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};p.bullet=/(?:[*+-]|\d+\.)/,p.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,p.item=a(p.item,"gm")(/bull/g,p.bullet)(),p.list=a(p.list)(/bull/g,p.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+p.def.source+")")(),p.blockquote=a(p.blockquote)("def",p.def)(),p._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",p.html=a(p.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,p._tag)(),p.paragraph=a(p.paragraph)("hr",p.hr)("heading",p.heading)("lheading",p.lheading)("blockquote",p.blockquote)("tag","<"+p._tag)("def",p.def)(),p.normal=l({},p),p.gfm=l({},p.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),p.gfm.paragraph=a(p.paragraph)("(?!","(?!"+p.gfm.fences.source.replace("\\1","\\2")+"|"+p.list.source.replace("\\1","\\3")+"|")(),p.tables=l({},p.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=p,e.lex=function(t,r){return new e(r).lex(t)},e.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},e.prototype.token=function(e,t,r){for(var n,i,o,a,s,l,u,c,f,e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},c=0;c|>|::) ?/gm,""),this.token(o,t,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),a=o[2],this.tokens.push({type:"list_start",ordered:a.length>1}),n=!1,f=(o=o[0].match(this.rules.item)).length,c=0;c1&&s.length>1||(e=o.slice(c+1).join("\n")+e,c=f-1)),i=n||/\n\n(?!\s*$)/.test(l),c!==f-1&&(n="\n"===l.charAt(l.length-1),i||(i=n)),this.tokens.push({type:i?"loose_item_start":"list_item_start"}),this.token(l,!1,r),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!r&&t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:s,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:s,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,c.link=a(c.link)("inside",c._inside)("href",c._href)(),c.reflink=a(c.reflink)("inside",c._inside)(),c.normal=l({},c),c.pedantic=l({},c.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),c.gfm=l({},c.normal,{escape:a(c.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:a(c.text)("]|","~]|")("|","|https?://|")()}),c.breaks=l({},c.gfm,{br:a(c.br)("{2,}","*")(),text:a(c.gfm.text)("{2,}","*")()}),t.rules=c,t.output=function(e,r,n){return new t(r,n).output(e)},t.prototype.output=function(e){for(var t,r,n,o,a="";e;)if(o=this.rules.escape.exec(e))e=e.substring(o[0].length),a+=o[1];else if(o=this.rules.autolink.exec(e))e=e.substring(o[0].length),"@"===o[2]?(r=":"===o[1].charAt(6)?this.mangle(o[1].substring(7)):this.mangle(o[1]),n=this.mangle("mailto:")+r):n=r=i(o[1]),a+=this.renderer.link(n,null,r);else if(this.inLink||!(o=this.rules.url.exec(e))){if(o=this.rules.tag.exec(e))!this.inLink&&/^/i.test(o[0])&&(this.inLink=!1),e=e.substring(o[0].length),a+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):i(o[0]):o[0];else if(o=this.rules.link.exec(e))e=e.substring(o[0].length),this.inLink=!0,a+=this.outputLink(o,{href:o[2],title:o[3]}),this.inLink=!1;else if((o=this.rules.reflink.exec(e))||(o=this.rules.nolink.exec(e))){if(e=e.substring(o[0].length),t=(o[2]||o[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){a+=o[0].charAt(0),e=o[0].substring(1)+e;continue}this.inLink=!0,a+=this.outputLink(o,t),this.inLink=!1}else if(o=this.rules.strong.exec(e))e=e.substring(o[0].length),a+=this.renderer.strong(this.output(o[2]||o[1]));else if(o=this.rules.em.exec(e))e=e.substring(o[0].length),a+=this.renderer.em(this.output(o[2]||o[1]));else if(o=this.rules.code.exec(e))e=e.substring(o[0].length),a+=this.renderer.codespan(i(o[2],!0));else if(o=this.rules.br.exec(e))e=e.substring(o[0].length),a+=this.renderer.br();else if(o=this.rules.del.exec(e))e=e.substring(o[0].length),a+=this.renderer.del(this.output(o[1]));else if(o=this.rules.text.exec(e))e=e.substring(o[0].length),a+=this.renderer.text(i(this.smartypants(o[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(o[0].length),n=r=i(o[1]),a+=this.renderer.link(n,null,r);return a},t.prototype.outputLink=function(e,t){var r=i(t.href),n=t.title?i(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(r,n,this.output(e[1])):this.renderer.image(r,n,i(e[1]))},t.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"").replace(/--/g,"").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1").replace(/'/g,"").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1").replace(/"/g,"").replace(/\.{3}/g,""):e},t.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,r="",n=e.length,i=0;i.5&&(t="x"+t.toString(16)),r+="&#"+t+";";return r},r.prototype.code=function(e,t,r){if(this.options.highlight){var n=this.options.highlight(e,t);null!=n&&n!==e&&(r=!0,e=n)}return t?'
'+(r?e:i(e,!0))+"\n
\n":"
"+(r?e:i(e,!0))+"\n
"},r.prototype.blockquote=function(e){return"
\n"+e+"
\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,r){return"'+e+"\n"},r.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},r.prototype.list=function(e,t){var r=t?"ol":"ul";return"<"+r+">\n"+e+"\n"},r.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},r.prototype.paragraph=function(e){return"

    "+e+"

    \n"},r.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},r.prototype.tablerow=function(e){return"\n"+e+"\n"},r.prototype.tablecell=function(e,t){var r=t.header?"th":"td";return(t.align?"<"+r+' style="text-align:'+t.align+'">':"<"+r+">")+e+"\n"},r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+""},r.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},r.prototype.del=function(e){return""+e+""},r.prototype.link=function(e,t,r){if(this.options.sanitize){try{var n=decodeURIComponent(o(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:"))return""}var i='
    "},r.prototype.image=function(e,t,r){var n=''+r+'":">"},r.prototype.text=function(e){return e},n.parse=function(e,t,r){return new n(t,r).parse(e)},n.prototype.parse=function(e){this.inline=new t(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var r="";this.next();)r+=this.tok();return r},n.prototype.next=function(){return this.token=this.tokens.pop()},n.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},n.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},n.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,r,n,i="",o="";for(r="",e=0;e':""}if(e&&e.highlight){var n=/\r\n|\r|\n/g,i=/^[0-9][0-9]+ /,o=/^~~+ /;g.marked.setOptions({highlight:function(i,o){var a=!1;o?0==o.search(y)?o="plain":0==o.search(_)&&(a=!0):o="plain","plain"!=o&&a||(i=i.replace(m,"<").replace(b,">").replace(w,"&"));var s=[],l=[];i=t(s,l,i),"plain"!=o&&(i=e.highlight(o,i,!0).value);var u=s.length;if(u){for(var p=i.split(n),c=p.length,f=0;f'+r(l.length,h.slice(0,-1))+p[f]+"":p[f]=r(l.length,h)+p[f])}return p.join("\n")}return i}})}}(window.hljs),function(){function e(){return++window.TRIGGER__.count}window.TRIGGER__||(window.TRIGGER__={count:0});var t={GET:1,POST:1,PUT:1,DELETE:1,HEAD:1};this.jsonp=function(t){var r=t.url,n=t.data,i=t.callback;if(!r||"string"!=typeof r)throw new Error("invalid URL");if(n&&"object"!=(void 0===n?"undefined":s(n)))throw new Error("invalid input argument (data)");if("function"!=typeof i)throw new Error("input argument (callback) should be a function");var o=e();r.indexOf("?")>0?r+="&":r+="?",r+="callback=TRIGGER__%5B"+o+"%5D",n&&Object.keys(n).forEach(function(e){var t=n[e];r+="&"+e+"="+encodeURIComponent(t+"")});var a=document.head||document.getElementsByTagName("head")[0]||document.documentElement,l=document.createElement("script");l.async="async",t.scriptCharset&&(l.charset=t.scriptCharset),l.src=r,l.onload=l.onreadystatechange=function(){l.readyState&&!/loaded|complete/.test(l.readyState)||(l.onload=l.onreadystatechange=null,a&&l.parentNode&&a.removeChild(l),l=void 0,setTimeout(function(){window.TRIGGER__[o]&&(delete window.TRIGGER__[o],t.notifyError&&i(null))},0))},a.insertBefore(l,a.firstChild),window.TRIGGER__[o]=function(e){window.TRIGGER__[o]&&(delete window.TRIGGER__[o],i(e))}};var r=/"{3}[^\\]*(?:\\[\S\s][^\\]*)*"{3}/gm,n=/^\s*\/\/.*$/gm;this.ajax=function(e){var i=e.url,o=(e.type||"GET").toUpperCase(),a=e.data;if(!i||"string"!=typeof i)throw new Error("invalid URL");if(a&&"object"!=(void 0===a?"undefined":s(a)))throw new Error("invalid input argument (data)");if(!(o in t))throw new Error("invalid request type ("+o+")");var l=e.timeout||6e4,u=i.indexOf("?")>0,p=e.dataType;void 0===p&&".json"==i.slice(-5)&&(p="json");var c=null;a&&("PUT"!=o&&"POST"!=o?Object.keys(a).forEach(function(e){var t=a[e];u?i+="&":(u=!0,i+="?"),i+=e+"="+encodeURIComponent(t+"")}):c=JSON.stringify(a));var f=null,h=!1;if(window.XMLHttpRequest?f=new XMLHttpRequest:window.ActiveXObject&&(f=new ActiveXObject("Microsoft.XMLHTTP")),!f)throw new Error("invalid XMLHttpRequest");f.onreadystatechange=function(){if(4==f.readyState){var t=f.responseText||"",i=f.statusText||"",o=f.status||(t?200:404);if(h);else if(o>=200&&o<300&&t){var a=!1;if("json"===p||"pre-json"===p&&(a=!0)){var s,l=!0;try{a&&(t=(t=t.replace(r,function(e){return'"'+e.slice(3,-3).replace(/\\/gm,"\\\\").replace(/\n/gm,"\\n").replace(/"/gm,'\\"')+'"'})).replace(n,"")),s=JSON.parse(t.replace(/[\cA-\cZ]/gi,"")),l=!1}catch(t){e.error&&(i="JSON format error",e.error(f,i))}!l&&e.success&&e.success(s,i,f)}else e.success&&e.success(t,i,f)}else e.error&&e.error(f,i);f=null,h=!0}};var d,g;if(e.username?f.open(o,i,!0,e.username,e.password):f.open(o,i,!0),g=e.headers)for(d in g)f.setRequestHeader(d,g[d]);c&&f.setRequestHeader("Content-Type","application/json"),f.send(c),"number"==typeof l&&setTimeout(function(){h||(h=!0,f.abort(),e.error&&e.error(f,"request timeout"),f=null)},l)}}.call(g),g.bindMountData=function(e){function t(e,t,r,n){return function(e,i,o){if(!n.call(this,e,i,o)&&2==e)for(var a,s=0;a=t[s];s++)this.duals[a]=r[a]}}if(e&&"object"==(void 0===e?"undefined":s(e))){var r=d.$idSetter;Object.keys(r).forEach(function(n){var i=r[n];if("function"==typeof i){var o=e[n];if(o&&"object"==(void 0===o?"undefined":s(o))){var a=Object.assign({},o),l=a.__attr__;delete a.__attr__,Array.isArray(l)||(l=Object.keys(a));var u=t(n,l,a,i);Object.defineProperty(r,n,{enumerable:!0,configurable:!0,get:function(){return u}})}}})}else console.log("error: invalid W.$dataSrc")},g.loadingEntry=function(e,t,r){function n(e,t,r){var n=[];e.forEach(function(e){e[0]==t&&n.push(e[1])});var i=n.length,o=0;i?n.forEach(function(e){var t=document.createElement("link");"onload"in t?(r&&(t.onload=function(e){(o+=1)>=i&&r()}),t.setAttribute("rel","stylesheet"),t.setAttribute("href",e),document.head.appendChild(t)):(t=document.createElement("img"),r&&(t.onerror=function(e){(o+=1)>=i&&r()}),t.setAttribute("src",e),document.body.appendChild(t))}):r&&r()}var i=document.getElementById("react-container");if(i){i.hasAttribute("__debug__")&&(d.__debug__=parseInt(i.getAttribute("__debug__")||0)),i.hasAttribute("__design__")&&(d.__design__=parseInt(i.getAttribute("__design__")||0)),i.hasAttribute("__nobinding__")&&(d.__nobinding__=parseInt(i.getAttribute("__nobinding__")||0));var o=d.__nobinding__||0;window.W!==d&&(window.W&&(d.$modules=window.W.$modules),window.W=d);var a=d.$modules;Array.isArray(a)&&(a.forEach(function(n){"function"==typeof n&&n.call(r,e,t,r)}),a.splice(0));for(var s,c=document.querySelectorAll('link[rel="stylesheet"]'),f=c.length-1;f>=0;f-=1){var h=(s=c[f]).getAttribute("shared");h&&"false"!=h&&"0"!=h&&d.$css.unshift(["pseudo",s.href])}n(d.$css,"basic",function(){function e(e,t,r,n){try{return JSON.parse(e)}catch(e){console.log("invalid JSON format: "+(r?r+"["+n+"].":"")+t)}}function t(e){return e.replace(c,"ms-").replace(f,function(e,t){return t.toUpperCase()})}function r(e){var r=[],n="",i={},o=!1;return e.replace(h,function(e,t){return r.push([t,e]),""}).split(";").forEach(function(e){var a=n.length;if(n+=e+" ",e){for(;r.length;){var s=r[0][0];if(!(s>=a&&s0){var c=u.slice(0,p).trim();c&&(i[t(c)]=u.slice(p+1).trim(),o=!0)}}}),o?i:null}function i(t,n,i){for(var o="",a=[],s="",l=t.attributes.length,u=!1,p=!1,c=0;c1&&w.indexOf(a[0])<0)for(o=a.shift();a.length;){var s=a.shift();s&&(o+=s[0].toUpperCase()+s.slice(1))}"className"!=o&&(r&&"{"==r[0]&&"}"==r[r.length-1]&&"$"!=o[0]?y[o]=e(r.slice(1,-1),o,n,i):y[o]=r)}),p){var m=t.innerHTML;t.children.length&&(t.innerHTML=""),m&&(y["html."]=m),y["isPre."]=!0}else 0==t.children.length&&(m=t.textContent)&&(y["html."]=m);return[o,y,[]]}return null}function a(e,t,r){var n=r&&!d.__design__,i=null;n&&((i=y[t])||(n=!1));var o=n?b[e]:m[e];if(!n){if(o)return o;if(o=b[e])return o=m[e]=p(o._extend())}if(!o){var a=e.split("."),s=a.shift();for(o=v[s];o&&(s=a.shift());)o=o[s];if(!o||!o._extend)return console.log("error: can not find template ("+e+")"),null;b[e]=o}return n?p(o._extend(i)):o=m[e]=p(o._extend())}function s(e,t){var r=e[0],n=e[3],i=!o&&!t&&n&&n.search(g)<0,u=a(r,n,i);if(!u)return null;var p=e[1],c=e[2],f=c.length;if(i&&_&&!d.__design__){var h=_[n];h&&Object.assign(p,h)}for(var v=[u,p],y=!1,m=!i,b=0;b=0;$--)if((O=x[$]).classList.contains("rewgt-static")){x.splice($,1);for(var P=O.childNodes.length-1;P>=0;P--)x.splice($,0,O.childNodes[P])}var S=d.$staticNodes.push(x)-1;v.push(l.createElement("div",{className:"rewgt-static",name:S+""})),y=!0}}return y&&(p["hasStatic."]=!0),l.createElement.apply(null,v)}n(d.$css,"lazy");var c=/^-ms-/,f=/-(.)/g,h=/(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*")/g,g=/\.[0-9]/,v=d.$templates,y=d.$main,_=(d.$utils,d.$dataSrc),m={},b={},w=["data","$data","dual","$dual","aria","$aria"];d.$creator.scanNodeAttr=i;var k=document.getElementById("react-container"),O=function(e){function t(e,r,o,a){for(var s,l=e[2],u=0;s=r.children[u];u++){var p=i(s,a,u);if(o){if(0==u&&(!p||"BodyPanel"!=p[0]))return console.log("error: root node of JSX should be BodyPanel"),!1;var c=p[1];if(c.hasOwnProperty("width")&&isNaN(c.width)&&(c.width=null),c.hasOwnProperty("height")&&isNaN(c.height)&&(c.height=null),u>0)return!0}if(p){l.push(p);var f=(p[1].key||u)+"";n.push(f),p[3]=n.join(".");var h=!1;if(t(p,s,!1,a?a+"["+u+"]."+p[0]:p[0])||(h=!0),n.pop(),h)return!1}else l.push(s)}return!0}if(!e)return null;var r=[null,null,[]],n=[""];return t(r,e,!0,"")?r[2][0]:null}(k);if(O){var x=s(O,!1);x&&(d.$cachedClass=m,u.render(x,k,function(){d.$dataSrc=null,k.style.visibility="visible",y.isReady=!0;var e=y.$$onLoad_;"function"==typeof e&&e()}))}})}},t.exports=d}).call(this,e("_process"))},{_process:4,react:void 0,"react-dom":void 0}],3:[function(e,t,r){"use strict";function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t=0)return!0}return!1}function h(e,t){for(var r=" "+(e||"")+" ",n=Array.isArray(t)?t:String(t).split(/ +/),i=n.length,o=0;o=0;i--){var o=n[i];o&&(r=r.replace(" "+o+" "," "))}return r.trim()}function g(e,t,r,n){for(var i=" "+e,o=i.length,a=i+" "+t+" ",s=Array.isArray(r)?r:String(r).split(/ +/),l=s.length-1;l>=0;l--){var u;if((f=s[l])&&(u=a.indexOf(" "+f+" "))>=0){if(u=0;i--){var o=t[i];if(o){var a=o.split("-"),s=a.length;if(s>1)for(var l=1;l=0&&bt.forEach(function(e,t){t!=p&&r.push(e)})}n.push(o)}}return[r,n]}function y(){for(var e=[],t=0;t=0;n--)(!(i=r[n])||t.indexOf(i)>=0)&&r.splice(n,1);else for(var n=r.length-1;n>=0;n--){var i=r[n];i&&!t[i]||r.splice(n,1)}return r.join(" ")}function m(e,t){if(Array.isArray(t)){var r,n=t.length;for(r=0;r=0;){if(0==i||" "==e[i-1]){var o=e[i+t.length];if(!o||" "==o)return!0}i=e.indexOf(t,i+t.length)}return!1}function b(e){var t=(e.key||"").replace(wt,"");return"."==t[0]?t.slice(1):t}function w(e){var t={};return Object.keys(e).forEach(function(r){yt[r]||(t[r]=e[r])}),e.width&&(t.width=e.width),e.height&&(t.height=e.height),t}function k(e,t){for(var r,n=c(e),i=e.state,o=e.$gui,a=o.tagAttrs,s=o.dataset2,l=Object.assign({style:t||i.style},o.eventset),u=0;f=a[u];u++)l[f]=i[f];var p=l.data;void 0!==p&&"string"!=typeof p&&delete l.data;for(var f,u=0;f=s[u];u++)l[f]=i[f];return n&&(l.className=n),Ue.__design__&&(r=i["data-group.opt"])&&(l["data-group.opt"]=r),l}function O(e,t){function r(e){function t(t,r){var n=void 0;r&&"object"==(void 0===r?"undefined":Fe(r))&&(n=r),setTimeout(function(){var r=t?oe(e,t):e;r?r!==e?r.props["isOption."]&&r.setChecked&&r.setChecked(null,n):console.log("warning: trigger can not fire widget itself."):console.log("warning: can not find target ("+t+")")},0)}var r=e.state.trigger;if(Array.isArray(r))for(var n=(r=r.slice(0)).shift();n;){var i,o=void 0===n?"undefined":Fe(n);if("string"==o)t(n,null);else{if("object"!=o)break;if(Array.isArray(n))!function(t,r,n){if("string"==typeof t&&r){var i=t?oe(e,t):e;i?vt.call(i.duals,n)&&setTimeout(function(){i.duals[n]=Ye.update(i.duals[n],r)},0):console.log("warning: can not find target ("+t+")")}}(n[0]||"",n[1],n[2]||"data");else{if("string"!=typeof(i=n.$trigger))break;var a=Object.assign({},n);delete a.$trigger,t(i,a)}}n=r.shift()}}if(arguments.length>=3){var n=arguments[2],i=!1;if(n){var o=void 0===n?"undefined":Fe(n);if("string"==o)n=[n],i=!0;else if("object"==o)if(Array.isArray(n)){var a;"string"==typeof n[0]&&"object"==Fe(a=n[1])&&"string"!=typeof a.$trigger&&(n=[n]),i=!0}else"string"==typeof n.$trigger&&(i=!0,n=[n])}if(!i)return void console.log("warning: invalid trigger data (key="+t.$gui.keyid+")");t.duals.trigger=n}else{var s=t.$gui,l=s.syncTrigger;if(l&&l>1)if(l=0||r%2&&1===p&&!u[0]){var c=l.pattern;c.lastIndex=i;var f=c.exec(o);if(f&&f.index===i){var h=e.push({result:f,action:l.action,length:f[0].length});for(l.global&&(t=h);--h>t;){var d=h-1;if(e[h].length>e[d].length){var g=e[h];e[h]=e[d],e[d]=g}}}}}return e}"function"!=typeof e&&(e=j.defunct);var r=[],n=[],i=0;this.state=0,this.index=0,this.input="",this.addRule=function(e,t,r){var i=e.global;if(!i){var o="g";e.multiline&&(o+="m"),e.ignoreCase&&(o+="i"),e=new RegExp(e.source,o)}return Array.isArray(r)||(r=[0]),n.push({pattern:e,global:i,action:t,start:r}),this},this.setInput=function(e){return i=0,this.state=0,this.index=0,r.length=0,this.input=e,this},this.lex=function(){if(r.length)return r.shift();for(this.reject=!0;this.index<=this.input.length;){for(var n=t.call(this).splice(i),o=this.index;n.length&&this.reject;){var a=n.shift(),s=a.result,l=a.length;this.index+=l,this.reject=!1,i++;var u=a.action.apply(this,s);if(this.reject)this.index=s.index;else if(void 0!==u)return Array.isArray(u)&&(r=u.slice(1),u=u[0]),l&&(i=0),u}var p=this.input;if(o=31&&l<=43)return i[2]=[34,[s,t,r],s[2]],void o.push(e)}o.push([34,[e,t,r],e[2]])}function n(e,t,n){if(e>=3){var i,a,s,l,u=o[e-1],p=o[e-2],c=o[e-3],f=u[0],h=p[0],d=c[0];if(e>=5&&(i=o[e-4],s=i[0],a=o[e-5],l=a[0],!n&&l>=31&&l<=43&&5==s&&d>=31&&d<=43&&6==h&&f>=31&&f<=43))return o.splice(e-5,5,[35,[a,i,c,p,u],a[2]]),!0;if(d>=31&&d<=43&&14==h&&f>=31&&f<=43)return o.splice(e-3,3),r(c,p,u,p[3]),!0;if(!n&&d>=51&&d<=52&&7==h&&f>=31&&f<=43)return o.splice(e-3,3,[52,[c,p,u],c[2]]),!0;if(!n&&d>=31&&d<=43&&6==h&&f>=31&&f<=43)return e>=5&&l>=61&&l<=62&&7==s?o.splice(e-5,5,[62,[a,i,c,p,u],a[2]]):o.splice(e-3,3,[61,[c,p,u],c[2]]),!0}return e>=1&&!t&&(f=(u=o[e-1])[0])>=31&&f<=43&&(o.splice(e-1,1,[51,[u],u[2]]),!0)}for(var i,o=[];i=e.shift();)1!=i[0]&&function(e){var t=e[0];3==t&&"in"==e[1]&&(t=e[0]=14,e[3]=11);var i=o.length;if(20==t)for(i>=2&&7==o[i-1][0]&&(i-=1,o.pop());n(i);)i=o.length;else if(2==t){if(i){var a=o[i-1];if(14==a[0]&&"-"==a[1]){var s=!1;if(1==i)s=!0;else{var l=o[i-2][0];$t.indexOf(l)<0&&(s=!0)}s&&(o.pop(),i-=1,e[1]="-"+e[1])}}o.push([31,[e],e[2]])}else if(3==t||4==t)o.push([29+t,[e],e[2]]);else if(7==t){for(;n(i);)i=o.length;o.push(e)}else if(6==t||8==t){for(;n(i,!0);)i=o.length;o.push(e)}else if(5==t||10==t||12==t||14==t){for(;n(i,!0,!0);)i=o.length;o.push(e)}else if(11==t){for(i>=2&&7==o[i-1][0]&&(i-=1,o.pop());n(i);)i=o.length;if(i>=3){var u=o[i-1],p=o[i-2],c=o[i-3],f=u[0],h=p[0];if((d=c[0])>=31&&d<=43&&10==h&&51==f)return p[0]=14,p[3]=18,u=u[1][0],o.splice(i-3,3),void r(c,p,u,18)}if(i>=2){var u=o[i-1],p=o[i-2],f=u[0];if(10==(h=p[0])){if(f>=31&&f<=43)return void o.splice(i-2,2,[39,[p,[51,[u],u[2]],e],p[2]]);if(f>=51&&f<=52)return void o.splice(i-2,2,[39,[p,u,e],p[2]])}}if(i>=1&&10==(f=(u=o[i-1])[0]))return void(o[i-1]=[38,[u,e],u[2]]);o.push(e)}else if(13==t){for(;n(i);)i=o.length;if(i>=3){var u=o[i-1],p=o[i-2],c=o[i-3],f=u[0],h=p[0],d=c[0];if(d>=31&&d<=43&&12==h&&f>=51&&f<=52)return p[0]=14,p[3]=17,o.splice(i-3,3),void r(c,p,u,17)}if(i>=2){var u=o[i-1],p=o[i-2],f=u[0];if((h=p[0])>=31&&h<=43&&12==f)return u[0]=14,u[3]=17,o.splice(i-2,2),void r(p,u,null,17);if(12==h&&f>=51&&f<=52)return void o.splice(i-2,2,[37,[p,u,e],p[2]])}o.push(e)}else if(9==t){for(i>=2&&7==o[i-1][0]&&(i-=1,o.pop());n(i,!0);)i=o.length;if(i>=2){var u=o[i-1],p=o[i-2],f=u[0];if(8==(h=p[0])&&f>=61&&f<=62)return void o.splice(i-2,2,[41,[p,u,e],p[2]])}if(i>=1&&8==(f=(u=o[i-1])[0]))return void(o[i-1]=[40,[u,e],u[2]]);o.push(e)}}(i);if(0==o.length)throw new Error("expression is empty");if(i=o[0],1==o.length){var a=i[0];if(a>=51&&a<=52)return i;if(61==a&&t)return i}if(i[0]<20)throw new Error("invalid operand ("+i[1]+") at offset ("+i[2]+")");for(var s=0,l=i[2];s52){l=u[2];break}}throw new Error("syntax error at offset ("+l+")")}function N(e,t){function r(e,n){var i=n[0],o=n[1];if(61==i){l=32==(s=(a=o[0])[0])?a[1][0][1]:N(a,t);e.push([l,N(o[2],t)])}else{if(62!=i)throw new Error("syntax error at offset ("+n[2]+")");r(e,o[0]);var a=o[2],s=a[0],l=32==s?a[1][0][1]:N(a,t);e.push([l,N(o[4],t)])}}function n(e,r){var i=r[0],o=r[1];51==i?e.push(N(o[0],t)):52==i?(n(e,o[0]),e.push(N(o[2],t))):e.push(N(r,t))}function i(e){var r=e[0],n=e[1];return 51==r?N(n[0],t):52==r?i(n[0],t):N(e,t)}function o(e){if(52==e[0]){var r=e[1];o(r[0],t),N(r[2],t)}}var a=e[0],s=e[1];if(31==a)return parseFloat(s[0][1]);if(32==a){var l=s[0][1];if("null"==l)return null;if("undefined"==l)return;if("true"==l)return!0;if("false"==l)return!1;if("NaN"==l)return NaN;if(void 0!==(p=t[l])||vt.call(t,l))return p;throw new Error("symbol ("+l+") not defined")}if(33==a){var u=s[0][1];return u?u.slice(1,-1):""}if(34!=a){if(35==a)return N((_=N(s[0],t))?s[2]:s[4],t);if(37==a)return n(m=[],s[1]),m[m.length-1];if(38==a)return[];if(39==a)return n(m=[],s[1]),m;if(40==a)return{};if(41==a){var p={};return r(m=[],s[1]),m.forEach(function(e){p[e[0]]=e[1]}),p}if(51==a)return N(s[0],t);if(52==a)return n(m=[],e),m[m.length-1];throw new Error("syntax error at offset ("+e[2]+")")}var c=s[0],f=s[1],h=s[2],d=f[1];if("."==d){if(32!=h[0])throw new Error("syntax error at offset ("+e[2]+"): invalid attribute name");var g=N(c,t),v=h[1][0][1];try{return g[v]}catch(e){return void console.log("error: get attribute ("+v+") failed")}}else{if("["!=d){if("("==d){if(32==c[0]&&"while"==c[1][0][1]){var y=0;if(!h)return y;for(var _=i(h);_;)y+=1,o(h),_=i(h);return y}var m=[];if(h&&n(m,h),34==c[0]){var b=c[1];if("."==b[1][1]){var w=b[2];if(32!=w[0])throw new Error("syntax error at offset ("+w[2]+"): invalid attribute name");var k=N(b[0],t);return k[w[1][0][1]].apply(k,m)}}return N(c,t).apply(null,m)}if("&&"==d)return(O=N(c,t))?N(h,t):O;if("||"==d)return(O=N(c,t))||N(h,t);var O=N(c,t),x=N(h,t);if("*"==d)return O*x;if("/"==d)return O/x;if("%"==d)return O%x;if("+"==d)return O+x;if("-"==d)return O-x;if("<<"==d)return O<>"==d)return O>>x;if(">>>"==d)return O>>>x;if("<"==d)return O"==d)return O>x;if(">="==d)return O>=x;if("in"==d)return O in x;if("=="==d)return O==x;if("!="==d)return O!=x;if("==="==d)return O===x;if("!=="==d)return O!==x;if("&"==d)return O&x;if("^"==d)return O^x;if("|"==d)return O|x;throw new Error("unknown operator: "+d)}var g=N(c,t),v=N(h,t);try{return g[v]}catch(e){return void console.log("error: get attribute (["+v+"]) failed")}}}function A(e,t,r){var n=null,i=!1;xt=[];try{for(Ot.setInput(e);Ot.lex(););i=!0}catch(e){Xe.instantShow("error: lexical analysis failed at "+(t?t.widget.getPath():"")+":"+r),console.log(e)}if(!i)return null;try{n=I(xt,!0)}catch(e){Xe.instantShow("error: yacc analysis failed at "+(t?t.widget.getPath():"")+":"+r),console.log(e)}return n}function T(e,t,r,n){var i=n||0,o=e.widget;if("number"==typeof t){for(var a=void 0;o;){var s=o.component,l=s&&s.props["for.index"];if(o.$callspace&&vt.call(o.$callspace,"flowFlag")){if(o.$callspace.forSpace){if(t>=-1)return-1==t?a="number"==typeof l?l:void 0:0==i&&(a="number"==typeof l?l:void 0),r&&(r.unshift(t>=0&&0!=i),r.unshift(o.$callspace),r.unshift(a)),o.component;t+=2}else{if(t>=0){var u=o.$callspace.flowFlag;if(("for"==u||"for0"==u)&&0==i){a="number"==typeof l?l:void 0,o=o.parent,i+=1;continue}return r&&(r.unshift(!1),r.unshift(o.$callspace),r.unshift(a)),o.component}t+=1}a="number"==typeof l?l:void 0}else void 0===a&&"number"==typeof l&&(a=l);o=o.parent,i+=1}return null}for(;o;){if(o.$callspace&&vt.call(o.$callspace,"flowFlag")&&(i>0||o.$callspace.forSpace))return oe(o.component,t);o=o.parent,i+=1}return null}function E(e,t,r){function n(r){return function(n){var o=n||0,a=void 0===o?"undefined":Fe(o);if("number"==a?o>0&&(o=0):"string"!=a&&(o=0),0===o)return t[r];var s=0;i!==e.index&&(s=1);var l=T(t,o,[],s);return l?l[r]:null}}e.ex=Je.createEx(t),e.Math=Math;var i=function(e,r){void 0===e?e=0:("number"!=typeof e||isNaN(e)||e>0)&&(console.log("warning: invalid expression: index("+e+")"),e=0);var n=[];return T(t,e,n,r)?n[0]:void 0};e.index=i,e.props=n("props"),e.state=n("state"),e.duals=n("duals"),e.typeof=function(e){return void 0===e?"undefined":Fe(e)},e.count=function(n){if(void 0===n?n=0:("number"!=typeof n||isNaN(n)||n>0)&&(console.log("warning: invalid expression: count("+n+")"),n=0),0===n&&r)throw new Error("invalid expression: count(0)");var o=0;i!==e.index&&(o=1);var a=[],s=T(t,n,a,o),l=a[1];return s&&l?((a[2]?l.forSpace:l)["data-for.path"]||[]).length:0},e.item=function(n){if(void 0===n?n=0:("number"!=typeof n||isNaN(n)||n>0)&&(console.log("warning: invalid expression: item("+n+")"),n=0),0===n&&r)throw new Error("invalid expression: item(0)");var o=0;i!==e.index&&(o=1);var a=[],s=T(t,n,a,o),l=a[1];if(s&&l){var u=o?e.index(n):a[0];if("number"==typeof u)return((a[2]?l.forSpace:l)["data-for.path"]||{})[u]}}}function C(e){var t=e.widget;if(!(t=t&&t.parent))return!1;var r=t.component;if(!r)return!1;var n=r.$gui.compIdx[e.$gui.keyid];if("number"!=typeof n)return!1;var i=!1,o=r.$gui.comps;for(n-=1;n>=0;){var a=o[n--],s=b(a);if(a=a&&s&&t[s],(a=a&&a.component)&&a.$gui.compState){var l=a.$gui.flowFlag;if("if"==l){a.state[l]&&(i=!0);break}if("elif"!=l)break;if(a.state[l]){i=!0;break}}}return i}function R(e,t,r){function n(e){if(32==e[0]){var t=e[1][0][1],r=St.indexOf(t);if(r>=0)return r+1}return 0}var i,o=e[0],a=e[1];if(o>=51)51==o?R(a[0],t):52==o?(R(a[0],t),R(a[2],t)):61==o?(R(a[0],t),R(a[2],t)):62==o&&(R(a[0],t),R(a[2],t),R(a[4],t));else if(o>=31)if(32==o){if(!r&&(i=n(e))){var s=e[2],l=e.slice(0);return e[0]=34,e[1]=[l,[14,"(",s,17],null],t.push([i,0])}}else if(34==o){var u=a[0],p=a[1],c=a[2],f=p[1];if("."==f)if(!r&&(i=n(u)))if(32==c[0]){h=c[1][0][1];t.push([i,0,h]);var s=u[2],l=u.slice(0);u[0]=34,u[1]=[l,[14,"(",s,17],null]}else R(c,t,!0);else{if(R(u,t,r)&&32==c[0]){var h=c[1][0][1];return(g=t[t.length-1]).push(h),0}R(c,t,!0)}else if("["==f)if(!r&&(i=n(u)))if(33==c[0]){d=c[1][0][1];t.push([i,0,d.slice(1,-1)]);var s=u[2],l=u.slice(0);u[0]=34,u[1]=[l,[14,"(",s,17],null]}else if(4==i&&31==c[0]){t.push([i,0]);var s=u[2],l=u.slice(0);u[0]=34,u[1]=[l,[14,"(",s,17],null]}else R(c,t);else{if(R(u,t,r)&&33==c[0]){var d=c[1][0][1],g=t[t.length-1];return g.push(d.slice(1,-1)),0}R(c,t)}else if("("==f)if(i=n(u)){if(null===c)return t.push([i,0]);if(51==c[0]){var v=c[1][0],y=v[0];if(31==y){var _=v[1][0][1];return t.push([i,parseFloat(_)])}if(33==y){d=v[1][0][1];return t.push([i,d.slice(1,-1)])}}R(c,t)}else R(u,t),null!==c&&R(c,t);else"in"==f?(32!=u[0]&&R(u,t),R(c,t)):(R(u,t),R(c,t))}else 35==o?(R(a[0],t),R(a[2],t),R(a[4],t)):37==o?R(a[1],t):39==o?R(a[1],t):41==o&&R(a[1],t);return 0}function H(e,t,r){var n=A(t,e,r);if(n){61==n[0]&&(n=n[1][2]),R(n,[]);var i=[],o=T(e,0,i,1),a=i[1];return o&&a?(i[2]&&(a=a.forSpace),function(e,t){var i=a.exprSpace,o=i.index;i.index=function(e){return void 0===e||0===e?t:o(e,1)},i.$info=[e,r,Ye.time()];try{return N(n,i)}finally{i.index=o}}):null}return null}function W(e,t,r,n){function i(e,t){var r=e.widget;if(!(r=r&&r.parent))return!1;var n=r.component;if(!n)return!1;var i=n.$gui.compIdx[e.$gui.keyid];if("number"!=typeof i)return!1;var o=!1,a=n.$gui.comps,s=[],l=!1;for(i-=1;i>=0;){var u=a[i--],p=b(u);if(u=u&&p&&r[p],(u=u&&u.component)&&u.$gui.compState){var c=u.$gui.flowFlag;if("if"!=c&&"elif"!=c)break;var f=u.$gui.flowExprId0;if(!l&&(u.$gui.flowExprId!==f||t>f)?s.unshift([c,u]):(l=!0,u.state[c]&&(o=!0)),"if"==c)break}}return s.length&&s.forEach(function(e){var t=e[0],r=e[1],n=r.$gui.exprAttrs[t];if(o||!n)r.state[t]&&setTimeout(function(){r.state[t]=!0;var e={};e[t]=!1,r.setState(e)},0),r.state[t]=!1,r.$gui.flowExprId0=r.$gui.flowExprId=Pt;else try{var i=r.state[t];n(r,1);var a=r.state[t];a&&(o=!0),!i!=!a&&setTimeout(function(){r.state[t]=i;var e={};e[t]=a,r.setState(e,function(){a&&r.props["hasStatic."]&&de(r,!0)})},0)}catch(e){console.log(e)}}),o}function o(e,t,r){var n=e.widget;if(n=n&&n.parent){var i=n.component;if(i){var o=i.$gui.compIdx[e.$gui.keyid],a=i.$gui.comps;if("number"==typeof o){for(var s=[],l=a.length,u=o+1;ud))break;if(s.push([h,f]),"else"==h)break}}s.forEach(function(e){var r=e[0],n=e[1],i="elif"==r?n.$gui.exprAttrs[r]:null;if(t||"elif"==r&&!i)n.$gui.flowExprId0=n.$gui.flowExprId=Pt,n.state[r]&&(n.state[r]=!1,setTimeout(function(){n.state[r]=!0;var e={};e[r]=!1,n.setState(e)},0));else if("elif"==r)try{var o=n.state[r];i(n,2);var a=n.state[r];a&&(t=!0),!o!=!a&&setTimeout(function(){n.state.elif=!a,n.setState({elif:a},function(){a&&n.props["hasStatic."]&&de(n,!0)})},0)}catch(e){console.log(e)}else n.$gui.flowExprId0=n.$gui.flowExprId=Pt,n.state.else||(n.state.else=!0,setTimeout(function(){n.state.else=!1,n.setState({else:!0},function(){n.props["hasStatic."]&&de(n,!0)})},0))})}}}}var a="any",s=A(r,e,t);if(s){61==s[0]&&(a=s[1][0],s=s[1][2],32==a[0]&&(a=a[1][0][1]),"all"!==a&&"strict"!==a&&(a="any"));var l=_t.indexOf(t);l>=0&&"any"!=a&&(console.log("error: invalid using '"+a+":' at "+e.widget.getPath()+":"+t),a="any");var u=[];if(R(s,u),"trigger"==t){var p=e.props.fireType||"auto";"onsite"===p?(u=[],e.$gui.syncTrigger=3):e.$gui.syncTrigger="none"===p?0:1}var c={},f=[];u.forEach(function(r){var n,i=r[0],o=r[1];if(i>=4&&"number"==typeof o)o<=0&&f.indexOf(o)<0&&f.push(o);else if(3==i&&void 0!==(n=r[2]))if("number"!=typeof o||o<=0){var a=c[o];if(a||(a=c[o]=[]),0==a.length){var s=T(e,o,[],0);s?a.push(s,n):console.log("error: can not find duals("+o+") at "+e.widget.getPath()+":"+t)}else a.indexOf(n,1)<0&&a.push(n)}else console.log("error: invalid using duals("+o+") at "+e.widget.getPath()+":"+t)}),f.sort(function(e,t){return e-t});var h={};Object.keys(c).forEach(function(r){var n=c[r],i=n&&n[0];if(i){var o=n.slice(1);"any"!=a&&o.forEach(function(e){h[r+":"+e]=!1}),i.listen(o,function(n,o,s){if(e.isHooked)if("any"==a)(f=e.state.exprAttrs.slice(0)).indexOf(t)<0&&f.push(t),_t.indexOf(t)>0&&(0==jt&&(jt=++Pt,setTimeout(function(){jt=0},0)),e.$gui.flowExprId=jt),e.setState({exprAttrs:f});else{var l=r+":"+s;if(vt.call(h,l)){"strict"==a&&h[l]&&console.log("error: conflict in strict mode, duals("+r+")."+s+" is fired more than one time."),h[l]=!0;for(var u=!0,p=Object.keys(h),c=p.length-1;c>=0;c--)if(!h[p[c]]){u=!1;break}if(u){for(c=p.length-1;c>=0;c--)h[p[c]]=!1;var f=e.state.exprAttrs.slice(0);f.indexOf(t)<0&&f.push(t),e.setState({exprAttrs:f})}}}else i.unlisten("*",e)})}}),f.length&&"any"==a&&function(e,t,r,n){var i=n[n.length-1],o=[],a=T(e,i,o,0);if(a){for(var s,l=a.widget,u=o[1],p=o[2],c=0;l&&u;){if(n.indexOf(i)>=0&&(s=l.component)&&(s.props.$for||s.props.$$for)&&(s.listen("for",function(r,n){if(e.isHooked){var i=e.state.exprAttrs.slice(0);i.indexOf(t)<0&&i.push(t),_t.indexOf(t)>0&&(0==jt&&(jt=++Pt,setTimeout(function(){jt=0},0)),e.$gui.flowExprId=jt),e.setState({exprAttrs:i})}else s.unlisten("*",e)}),c+=1),p)p=!1,i-=1;else for(l=l.parent;l;){if(u=l.$callspace){p=!!u.forSpace,i-=1;break}l=l.parent}if(i=1){var g=e.$gui.flowExprId;if(r=r||0,2==l){var b=!1,x=!1;if(g!==e.$gui.flowExprId0?x=!0:r&&Pt>e.$gui.flowExprId0&&(x=!0),e.$gui.flowExprId0=e.$gui.flowExprId=Pt,x){var $,P=e.state.elif;1!=r&&i(e,g)?(b=!0,$=e.state.elif=!1):b=!!($=e.state.elif=N(s,a)),$&&P!==$&&e.props["hasStatic."]&&setTimeout(function(){de(e,!0)},0)}else(e.state.elif||1!=r&&i(e,g))&&(b=!0);2!=r&&o(e,b,g)}else if(1==l){x=!1;if(g!==e.$gui.flowExprId0?x=!0:r&&Pt>e.$gui.flowExprId0&&(x=!0),e.$gui.flowExprId0=e.$gui.flowExprId=Pt,x){P=e.state.if;($=e.state.if=N(s,a))&&P!==$&&e.props["hasStatic."]&&setTimeout(function(){de(e,!0)},0)}2!=r&&o(e,!!e.state.if,g)}}else{if(n){var S=e.$gui.syncTrigger;if(S){var j=e.state.trigger;S<=2&&(e.duals[t]=N(s,a));var D=!1;1!==S&&(2===S?(D=!0,e.$gui.syncTrigger=3):e.$gui.syncTrigger=mt),D||O(j,e)}else e.duals[t]=N(s,a)}else e.state[t]=N(s,a);_&&(e.duals["html."]=e.state[t])}}finally{a.index=u}},a]}return[null,a]}function M(e,t,r,n){for(var i,o=0;i=e[o];o++)try{var a=i[0],s=i[1];i[2]?a&&(a.duals[s]=t):a?a[s]&&a[s](t,r,n):"function"==typeof s&&s(t,r,n)}catch(e){console.log(e)}}function L(e,t,r){var n=e.$gui,i=n.connectTo[t];i&&n.compState>=2&&setTimeout(function(){M(i,e.state[t],r,t)},0)}function z(e,t,r,n,i){var o=e.$gui,a="id__"==t;return a&&(i&&(i=void 0,console.log("error: can not apply base.setter to duals.id__")),r&&n&&(o.hasIdSetter=!0)),i&&(i.setter=r||function(r,n){e.state[t]=r}),[function(){return this.state[t]}.bind(e),function(s){if(this.state){var l,u;if(arguments.length>=2)l=arguments[1],u=!1;else{if((l=this.state[t])===s)return;u=!0}var p=!1;if(a&&s<=2)u&&(this.state.id__=o.id__=s),r&&r(s,l),n&&n(s,l,t),1==s&&(o.id2__=0),p=!r&&0!=s;else if(o.inSync){if(o.compState<=1)return void o.initDuals.push([t,s]);r?i||(u?this.state[t]=s:s=this.state[t],r(s,l)):(u&&!i?this.state[t]=s:s=this.state[t],p=!0),n&&n(s,l,t)}else{var c=o.duals_;c?c.push([t,s]):(2!=this.state.id__||a||(o.id2__=0),(c=o.duals_=this.state.duals.slice(0)).push([t,s]),e.setState({duals:c}))}if(p){var f=o.connectTo[t];f&&o.compState>=2&&setTimeout(function(){M(f,e.state[t],l,t)},0)}}else o.initDuals.push([t,s])}.bind(e)]}function F(e){function t(t,r){var i=n[r];if(i)try{var o=a.connectTo[r];if(o){var s=e.state[r];i(e);var l=e.state[r];l!==s&&t.push([o,l,s,r])}else i(e)}catch(e){console.log(e)}}function r(e){var t=e&&e.component;return!!t&&(!!t.props["isTemplate."]||r(e.parent))}var n,i=!1,o=!1,a=e.$gui,s=e.duals;a.inSync=!0;try{0==a.compState?(o=!0,a.compState=1):a.compState=2;var l=a.flowFlag,u=a.duals,c=e.state.duals;if(o){i=!0,a.hasIdSetter?s.id__=1:(e.state.id__=1,a.id__=1);var h={},d=[];Object.keys(s).forEach(function(t){var r=e.props[t];void 0!==r&&(u[t]=r,d.push([t,r])),h[t]=!0});var g=a.exprAttrs,v=Array.isArray(g);(v||l)&&Ue.__design__&&r(e.widget)&&(a.forExpr=0,l=a.flowFlag="",g.splice(0),e.state.exprAttrs=[]);var y=[],_=[],m=e.state.exprAttrs;n=a.exprAttrs={},v&&g.forEach(function(t,r){var n=e.props["$"+t],i=!1;if(n||"for"!=t||2!==a.forExpr||(n=e.props.$$for),n){if(0==t.indexOf("dual-")){var o=m.indexOf(t);o>=0&&m.splice(o,1);var s=t.slice(5).replace(Et,function(e,t){return t.toUpperCase()});if(!s)return;i=!0,t=s}var l=void 0!==e.props[t];if(!l||h[t]){if(i&&m.push(t),"data"!=t){var u=Tt[t];u&&5!=u&&!l&&a.tagAttrs.push(t)}y.push(t),_.push([t,n])}else console.log("warning: dual attribute ($"+t+") is confliction.")}else"for"!=t&&console.log("warning: invalid dual attribute ($"+t+").")});var b=a.initDuals0;for(a.initDuals0=[],P=0;X=b[P];P++)e.state[X[0]]=X[1];var w={},k=Object.keys(a.dualAttrs);if(u.children=e.props.children,y.length||k.length||a.tagAttrs.length||a.dataset.length){for(var O,x=-1,$=[y,k,a.tagAttrs,a.dataset],P=0;O=$[P];P++)O.forEach(function(t){if(0==P)h[t]=!0;else if(1==P){var r=!1;if(void 0!==e.props[t]?r=!0:h[t]&&void 0!==u[t]&&(r=!0),r)return void console.log("warning: dual attribute ("+t+") is confliction.");if(h[t]=!0,"data"!=t){var n=Tt[t];n&&5!=n&&a.tagAttrs.push(t)}i=u[t]=e.props[a.dualAttrs[t]];if(vt.call(s,t))return void d.push([t,i]);e.state[t]=i}else{if(h[t])return void(2==P&&"data"==t&&(x=a.tagAttrs.indexOf(t)));h[t]=!0;var i=u[t]=e.props[t];if(vt.call(s,t))return void d.push([t,i]);e.state[t]=i}if(Object.getOwnPropertyDescriptor(s,t))0==P&&(w[t]=!0);else{var o=z(e,t);Object.defineProperty(s,t,{enumerable:!0,configurable:!0,get:o[0],set:o[1]})}});x>=0&&a.tagAttrs.splice(x,1)}if(a.forExpr&&(K=e.widget)){var S;2==a.forExpr&&(K.$callspace={flowFlag:"ref",forSpace:null},K.$callspace["data-rfor.path"]="",E(S=K.$callspace.exprSpace={},e));var j={flowFlag:"for",exprSpace:S={}},D=e.props[2==a.forExpr?"$$for":"$for"],I=!0;if(K.$callspace?D?K.$callspace.forSpace=a.forExpr=j:(delete a.forExpr,I=!1):(K.$callspace=j,D?a.forExpr=j:(delete a.forExpr,j.flowFlag="for0")),I&&E(S,e,!D),a.forExpr){for(var N=a.comps2=a.comps,A=a.exprKeys=[],T=a.exprChild=[],P=N.length-1;P>=0;P-=1){var R=N[P];if(R){if(f(R.props.className,"rewgt-static")){A.unshift(null),T.unshift(null);continue}var L=R.props.$key,F=null;if(L&&"string"==typeof L?(F=H(e,L,"key"))||console.log("error: invalid '$key' expression: "+L):console.log("error: no '$key' defined for child element in '$for' loop."),F){A.unshift(F);var B=R.props.$children,q=null;B&&"string"==typeof B&&((q=H(e,B,"children"))||console.log("error: invalid '$children' expression: "+B)),T.unshift(q);continue}}N.splice(P,1)}a.comps=[],a.compIdx={}}}_.length&&(a.flowExprId0=0,a.flowExprId=1,_.forEach(function(t){var r=t[0],i=W(e,r,t[1],w[r]),o=i[0],s=i[1];if(o){if("any"!=s){var l=a.syncExpr;l||(l=a.syncExpr=[]),a.syncExpr.push([r,o])}else n[r]=o;0!=r.indexOf("data-")&&0!=r.indexOf("aria-")||a.dataset2.push(r)}else console.log("warning: compile expression ($"+r+") failed.")})),a.compState=1.5;var G=d.length;for(a.initDuals.forEach(function(e){var t=e[0],r=d.findIndex(function(e){return e[0]===t});r>=0&&r=0&&(X=m[Y],m.splice(Y,1),t(V,X),m=e.state.exprAttrs);X=m.shift();)t(V,X)}if(l||a.forExpr){var K,J=!0;if(l&&(J=e.state[l],"if"==l||"elif"==l?(!0,e["hide."]=!J):"else"==l&&(o&&(a.flowExprId0=a.flowExprId=Pt,J=e.state.else=!C(e)),!0,e["hide."]=!J)),a.forExpr&&(K=e.widget)){J=e.state.for,Array.isArray(J)&&0!=J.length||(J=[]),a.forExpr["data-for.path"]=J;var Z={},Q=[],N=a.comps2,A=a.exprKeys,T=a.exprChild,ee=!1,te=e.props["childInline."];J.forEach(function(t,r){for(var n,i=0;n=N[i];i+=1){var o=A[i];if(o){var a=n.props["childInline."];if(void 0!==a)if(te){if(!a)continue}else if(!f(n.props.className,["rewgt-panel","rewgt-unit"]))continue;if(n.props["isReference."])continue;var s=T[i],l=null;if(s)try{(l=s(e,r))?dt(l)||Array.isArray(l)||"string"==typeof l||(l=null):l=null}catch(e){console.log("error: caculate '$children' ("+(i+1)+" of "+N.length+") failed."),console.log(e)}var u=!1;try{"number"!=typeof(h=o(e,r))&&(h+=""),u=!0}catch(e){console.log("error: caculate '$key' ("+(i+1)+" of "+N.length+") failed."),console.log(e)}if(u){var p,c={"hookTo.":K,"keyid.":h,key:h+"","for.index":r};p=l?dt(l)||"string"==typeof l?ft(n,c,l):ft.apply(null,[n,c].concat(l)):ft(n,c),Z[h]=Q.push(p)-1}}else{ee=!0;var h="static-"+r,d=Object.assign({},n.props);d["keyid."]=h,d.key=h,Z[h]=Q.push(ht(te?"span":"div",d))-1}}}),ee&&setTimeout(function(){de(e,!0)},0),0==a.comps.length&&0==Q.length||(a.removeNum+=1),a.compIdx=Z,a.comps=Q}}if(V.length&&a.compState>=2&&setTimeout(function(){V.forEach(function(e){M(e[0],e[1],e[2],e[3])})},0),o&&Ue.__debug__&&"function"==typeof(F=e.props.setup__))try{F.apply(e)}catch(e){console.log(e)}if(a.id__===e.state.id__)0==a.id2__&&(s.id__=mt!==e.state.id__?mt:p());else{var re=e.state.id__;e.state.id__=re-1,s.id__=re}a.id2__=0,a.isChildExpr&&a.children2!==e.props.children&&(a.removeNum+=a.comps.length,a.children2=e.props.children,a.comps=gt(e.props.children)),s.childNumId=a.comps.length+(a.removeNum<<16)}catch(e){console.log(e)}return a.inSync=!1,i}function B(e,t){var r=null,n=(t.frame||{}).path;return n&&((r=(r=e.componentOf(n))&&r.fullClone())||(Ue.__design__||delete t.frame,console.log("warning: can not locate popup frame ("+n+")."))),r||null}function q(e){var t=e._;if(!t)return null;var r=t._statedProp||[],n=t._silentProp||[],i=t._htmlText,o=Object.assign({},e.props);if(r.forEach(function(t){vt.call(o,t)&&(o[t]=e.state[t])}),n.forEach(function(e){delete o[e]}),i){var a=e.state["html."];a&&"string"==typeof a?o["html."]=a:delete o["html."]}else delete o["html."];return delete o["data-unit.path"],delete o["data-span.path"],delete o.children,o}function G(e,t,r,n){var i=n.$gui,o=!!i.forExpr,a=o?i.comps2:i.comps,s=[],l=n.props["childInline."];return a.forEach(function(e){if(e)if(o||e.props["isReference."])s.push(e);else if(f(e.props.className,"rewgt-static")){delete(g=Object.assign({},e.props))["keyid."],delete g.key,delete g.onMouseDown,delete g.onDoubleClick;var t,i=g.name;if("number"==typeof(t=parseInt(i))&&t>=1048576){var a=n.$gui.statics;if(a=a&&a[i],Array.isArray(a)){var u=a.map(function(e){return e.cloneNode(!0)});t=Ue.$staticNodes.push(u)-1,g.name=t+""}}s.push(ht(l?"span":"div",g))}else{var p=b(e),c=p&&r[p],h=c&&c.component;if(h){if(h.props["isTemplate."]&&!Ue.__design__){var d=h.$gui.template;return d instanceof ae?ft(e,{template:d},null):void 0}var g=q(h);g&&s.push(G(e,g,c,h))}}}),0==s.length?ft(e,t,null):(s.unshift(t),s.unshift(e),ft.apply(null,s))}function U(e,t){var r;if(e===t)return!0;if(Array.isArray(e)){if(Array.isArray(t)&&(r=e.length)==t.length){for(o=0;o=1048576)c[o]=h;else{for(var v=p.comps.length,y=1048576+p.removeNum+v+"",g=0;g"Z"))return u=1,l;for(u=0,i=Ve[l];i&&(l=s.shift());)i=i[l];return i&&i._extend?o?i=Ge(i._extend(o)):n[e]=i=Ge(i._extend()):n[e]=i=null,i}function a(e,t,r){for(var n=t.length,i=r;i=1){var l,u,p=o[0],c=0,f=!1;Array.isArray(p)?(c=o.length-1,l=p[0],u=p[1]):(l=p,u=o[1]),u||(f=!0,u={});var h=!1,d=void 0===l?"undefined":Fe(l);if("string"==d){var g=l[0];if(g>="A"&&g<="Z"||l.indexOf(".")>=0){console.log("warning: unknown react class ("+l+")");continue}}else if(dt(l))h=!0;else if("function"!=d){console.log("warning: unknown react class");continue}if(c){var v=[];a(v,o,1),h?e.push(ft(l,u,v)):e.push(ht(l,u,v))}else h?e.push(f?l:ft(l,u)):e.push(ht(l,u))}}else e.push(ht(o));else e.push(o)}}}var s,l,u=0,p=t[0],c=0,f=!1;if(Array.isArray(p)?(c=t.length-1,s=p[0],l=p[1]):(s=p,l=t[1]),l||(f=!0,l={}),!s){var h=l.html||[];if(h.length>0){var d=document.createElement("div");d.innerHTML=h.join("");for(var g=[],v=r.push(g)-1,y=0;$=d.children[y];y+=1)g.push($);return e.push(ht("div",{className:"rewgt-static",name:v+""})),!0}return!1}var _="";i&&l.key&&(_=i+"."+l.key);var m="RefDiv"===s||"RefSpan"===s?s:"";if(m)return e.push(ht(o(m,_),l)),!1;var b=o(s,_);if(!b){var w="string"==typeof s?" ("+s+")":"";return console.log("warning: can not find template"+w),!1}if(u>0)if(c>0){var k=[];a(k,t,1),3==u?e.push(ft(b,l,e)):e.push(ht(b,l,k))}else 3==u?e.push(f?b:ft(b,l)):e.push(ht(b,l));else{var O=[b,l];if(c>0){for(var x,$,P=!1,y=1;$=t[y];y+=1)Array.isArray($)?Z(O,$,r,n,_)&&(P=!0):dt($)?O.push($):"string"==(x=void 0===$?"undefined":Fe($))?O.push(ht(yr,{"html.":$})):"function"==x&&O.push(ht($));P&&(O[1]=Object.assign({},l,{"hasStatic.":!0}))}e.push(ht.apply(null,O))}return!1}function Q(e,t){var r=e.widget;if(r){var n=e.$gui,i=n.cssWidth,o=n.cssHeight,a=!!t;if(("number"==typeof i||"number"==typeof o)&&(n.isPanel||!([].concat(e.state.margin,e.state.padding).indexOf(null)>=0))){var s=0;n.comps.forEach(function(e){if(e){var t=b(e),n=t&&r[t];if(n=n&&n.component){if(n.willResizing&&!n.willResizing(i,o,a))return;s||(s=p()),n.setState({parentWidth:i,parentHeight:o,id__:s})}}})}}}function ee(e,t,r){function n(){setTimeout(function(){ot=!1},300),r&&r()}if(Ue.__design__){var i=[],o=[],a={};if(Z(i,t,o,a),1==i.length){ot=!0;var s=i[0];qe.unmountComponentAtNode(e),e.style.visibility="hidden",e.innerHTML="",setTimeout(function(){Xe.widgetNum(0),nt=null,at=!1,it=!0,st=[],Ue.$cachedClass=a,Ue.$staticNodes=o,qe.render(s,e,function(){e.style.visibility="visible";var t=Ue.$main.$$onLoad_;"function"==typeof t&&t(n)})},0)}else r&&r()}else r&&r()}function te(e,t,r){function n(e){return e.replace(/&/g,"&").replace(/'/g,"'").replace(//g,">")}t=t||0;var i,o,a,s=e[0],l=0;Array.isArray(s)?(l=e.length-1,i=s[0],o=s[1],a=s[2]):(i=s,o=e[1],a=e[2]),"number"!=typeof a&&(a=1);var u=new Array(t+1).join(" "),p=u;if(!i){var c=o.html||[],f=r<=1?"
    ":"",h=r<=1?"
    ":"";return 0==c.length?p="":1==c.length?p+=f+c[0]+h+"\n":(p+=f+"\n",c.forEach(function(e){p+=u+" "+e+"\n"}),p+=u+h+"\n"),p}var d=!1;"RefDiv"==i?(!0,d=o["isPre."],l=0,p+=(d?"
    /g,">"));return d?p+="
    \n":3==a?y&&"\n"==y.slice(-1)?p+=u+"\n":p+="\n":v||"\n"!=p.slice(-1)?p+="\n":p+=u+"\n",p}function re(e,t){var r=e.component;if(!r)return null;for(var n in r.$gui.compIdx){var i=e[n],o=i&&i.component;if(o)if(o.props["isNavigator."]){var a=o.$gui.navItems,s=a&&a[t];if(s&&s.props["isPlayground."])return i}else if(!o.props["childInline."]&&(i=re(i,t)))return i}return null}function ne(e,t){if(!t)return[];var r=b(e),n=r&&t[r];if(n){var i=[];return(n=n.component)?(n.$gui.comps.forEach(function(e){e&&i.push(e)}),i):i}return gt(e.props.children)}function ie(e){var t=e,r=t.indexOf("./"),n=t[0],i=0,o=!1;if(0==r)i=1,t=t.slice(2);else if(1==r&&"."==n)for(i=2,t=t.slice(3);0==(r=t.indexOf("../"));)i+=1,t=t.slice(3);else if("."==n)i=-1,t=t.slice(1);else if("/"==n){if("/"===t[1])return[t.slice(2),-1,!0];i=-1,t=t.slice(1)}else o=!0;return t.indexOf("/")>=0?(Xe.instantShow("error: invalid reference path ("+e+")."),null):[t,i,o]}function oe(e,t){function r(e){return(e=e&&e.component)||(console.log("warning: can not find widget ("+t+")."),null)}var n=ie(t);if(!n)return null;var i=n[0],o=n[1];if(n[2]){var a=l=e.widget;if(o<0&&(a=l&&l.parent),a){for(var s=i.slice(0,2);"//"==s;){if(!(a=a.parent))return r(null);s=(i=i.slice(2)).slice(0,2)}return r(i?a.W(i):a)}}else if(-1==o){if(i)return r(Ue.W(i))}else{for(var l=e.widget;l&&o>0;){var u=l&&l.component;if(u&&u.props["isNavigator."]&&0==(o-=1))break;var p=l.parent;if(!p){o-=1,l=Ue;break}l=p}if(l&&0==o)return r(i?l.W(i):l)}return r(null)}function ae(e){this.comps={},this.element=e,this.pathSeg=""}function se(e,t,r){function n(e,t,r){var n=ie(t);if(!n)return i(null,t);var a=n[0],s=n[1],l=e instanceof ae;if(n[2]){if(l)return i(null,t);if(s<0&&(p=e.widget)){for(var u=a.slice(0,2);"//"==u;){if(!(p=p.parent))return i(null,t);u=(a=a.slice(2)).slice(0,2)}return void o(p,a,t,!1)}}else{if(-1==s)return void o(null,a,t,!1);var p=e;if(l){var c=(p=e.element).props["hookTo."],f=!1;for(c||(c=(c=p.widget)&&c.parent);p&&s>0&&c;){if(!(c instanceof ae)){if(Array.isArray(c)){if(r)return i(null,t);p=c.component,f=!0;break}return i(null,t)}if(r){if(!(n=c.comps[r]))return i(null,t);var h=n[0];if(4==h)(r=n[2])||(p=c.element,r=c.pathSeg,(c=p.props["hookTo."])||(c=(c=p.widget)&&c.parent));else{if(3!=h)return i(null,t);if(0==(s-=1))return void o(c,a,t,!0,r);r=n[2]}}else p=c.element,r=c.pathSeg,(c=p.props["hookTo."])||(c=(c=p.widget)&&c.parent)}if(!p||!c||!f)return i(null,t)}for(p=p.widget;p&&s>0;){var d=p&&p.component;if(d&&d.props["isNavigator."]&&0==(s-=1))break;var g=p.parent;if(!g){s-=1,p=Ue;break}p=g}if(p&&0==s)return void o(p,a,t,!1)}i(null,t)}function i(n,i){if(!n)return Xe.instantShow("error: can not find reference ("+i+")."),void r();s?n.props["childInline."]||Xe.instantShow("warning: reference target ("+i+") should be inline widget."):f(n.props.className,["rewgt-panel","rewgt-unit"])||Xe.instantShow("warning: reference target ("+i+") should be: panel, div, paragraph.");var o=e.$gui,a=t.slice(1),c=null,h=o.compIdx[t];if("number"==typeof h){c=o.comps[h];var d=o.compIdx[a];"number"!=typeof d?c&&(o.compIdx[a]=h,delete o.compIdx[t],o.removeNum+=1):(h=d,o.removeNum+=1)}if(!c)return Xe.instantShow("error: invalid linker ("+t+")."),void r();l.unshift(c.props);var g={},v={},y=0;n.props.style&&(Object.assign(v,n.props.style),y+=1);for(var _=l.pop();_;){var m=w(_);m.style&&(Object.assign(v,m.style),y+=1),Object.assign(g,m),_=l.pop()}y&&(g.style=v),g["hookTo."]=e.widget,s?g["data-span.path"]=u:g["data-unit.path"]=u;var b=c.props.styles;if(b&&(g.styles=b),Ue.__design__){var k={};g["link.props"]=Object.assign(k,w(c.props)),b&&(k.styles=b)}var O=parseInt(a),x=O+""===a?O:a;g.key=a,g["keyid."]=x,o.comps[h]=ft(n,g),e.setState({id__:p()},function(){var t=e.widget[x];(t=t&&t.component)&&de(t),r()})}function o(e,t,r,o,a){var u;if(e){if(!t){if(o)return i(e.element,r);var p=e.parent,c=e.component;return p=p&&p.component,p&&c&&"number"==typeof(w=p.$gui.compIdx[c.$gui.keyid])?i(c.fullClone(),r):i(null,r)}u=t.split(".")}else{if(!t||o)return i(null,r);if((u=t.split(".")).length<=1)return i(null,r);if(!(e=Ue[u.shift()]))return i(null,r)}for(;e&&u.length;){var f=u.shift();if(!f)return i(null,r);var h=null,d=null,g="";if(o){if(Ue.__design__)return i(null,r);d=e,a?(g=a,u.unshift(f)):g=f}else{if(!(h=e.component)&&(e===Ue&&((e=Ue[f])&&(h=e.component),f=u.shift()),!h||!f))return i(null,r);if((!Ue.__design__||h.isLibGui)&&h.props["isTemplate."]){if(!(d=h.$gui.template))return i(null,r);g=f,h=null}}if(d){for(var v=d.comps[g];v;){var y=v[0],_=v[1];if(2==y){if(0!=u.length)break;var m=2==(O=_.props)["isReference."],b=O.$;if(O["hookTo."]===d&&"string"==typeof b){if(!(b=b.trim()))return i(null,b);if(s!=m&&Xe.instantShow("warning: reference type ("+r+") mismatch."),"/"==b[0]&&"/"==b[1]){if(b.indexOf("/",2)>=0)return i(null,b);(u=g.split(".")).pop(),g=u.join("."),u=b.slice(2).split("."),g&&(g+="."),g+=u.shift(),v=d.comps[g],l.push(O);continue}return l.push(O),void n(d,b,v[2])}break}if(4==y&&(_=(d=_).element),0==u.length)return i(_,r);4==y?g=u.shift():g+="."+u.shift(),v=d.comps[g]}return i(null,r)}if(0==u.length){var w=h.$gui.compIdx[f];if("number"==typeof w){var k=e[f];return k=k&&k.component,k?i(k.fullClone(),r):i(null,r)}if("number"==typeof(w=h.$gui.compIdx["$"+f])&&(_=h.$gui.comps[w])&&_.props["isReference."]){var O=_.props,m=2==O["isReference."];if("string"==typeof(b=O.$))return(b=b.trim())?(s!=m&&Xe.instantShow("warning: reference type ("+r+") mismatch."),l.push(O),void n(h,b,"")):i(null,b)}return i(null,r)}e=e[f]}i(null,r)}var a,s=!1,l=[],u="",c=e.$gui.compIdx[t];if(e.widget&&"number"==typeof c&&"$"==t[0]&&(a=e.$gui.comps[c])&&a.props["isReference."]){var h=a.props;2==h["isReference."]&&(s=!0),"string"!=typeof(u=h.$)||0==(u=u.trim()).length?(""!==u&&console.log("warning: load reference ("+t+") failed: invalid path"),r()):u?n(e,u,""):i(null,u)}else console.log("warning: load reference ("+t+") failed."),r()}function le(e){function t(e){e.target.style.opacity="0.1"}function r(e){e.target.style.opacity="0"}var n=this.pageIndex=0,i=this.keys=[],o=this.namedPage={};e.forEach(function(e,t){i.push(e[0]+"");var r=e[1],a=t==n?"block":"none";r.state.style.display!==a&&(r.duals.style={display:a});var s=r.props.name;s&&"string"==typeof s&&(o[s]=t)});var a=window.innerWidth,s=Math.max(Math.floor(a/20),20),l=document.createElement("div");l.setAttribute("style","position:absolute; left:0px; top:0px; width:"+s+"px; height:100%; background-color:#000; opacity:0; z-index:3000;"),document.body.appendChild(l);var u=document.createElement("div");u.setAttribute("style","position:absolute; right:0px; top:0px; width:"+s+"px; height:100%; background-color:#000; opacity:0; z-index:3000;"),document.body.appendChild(u),this.leftPanel=l,this.rightPanel=u;var p=this;l.onclick=function(e){p.prevPage()},u.onclick=function(e){p.nextPage()},l.onmouseover=t,l.onmouseout=r,u.onmouseover=t,u.onmouseout=r}function ue(){var e=[],t=nt&&nt.component;return t&&(t.$gui.comps||[]).forEach(function(t){if(t){var r=b(t),n=r&&nt[r];(n=n&&n.component)&&n.props["isScenePage."]&&(!Ue.__design__&&n.props.noShow||e.push([r,n]))}}),e}function pe(e){if(!Array.isArray(e))return"number"==typeof e?[e,e,e,e]:[0,0,0,0];var t=e.length;if(0==t)return[0,0,0,0];if(1==t)return[r=parseFloat(e[0])||0,r,r,r];if(2==t)return[r=parseFloat(e[0])||0,n=parseFloat(e[1])||0,r,n];if(3==t)return[r=parseFloat(e[0])||0,n=parseFloat(e[1])||0,i=parseFloat(e[2])||0,n];var r=parseFloat(e[0])||0,n=parseFloat(e[1])||0,i=parseFloat(e[2])||0;return[r,n,i,parseFloat(e[3])||0]}function ce(e){if(!Array.isArray(e))return"number"==typeof e?[e,e,e,e]:null===e?[null,null,null,null]:[0,0,0,0];var t=e.length;if(0==t)return[0,0,0,0];if(1==t)return r=null===(r=e[0])?null:parseFloat(r)||0,[r,r,r,r];if(2==t){var r=e[0],n=e[1];return r=null===r?null:parseFloat(r)||0,n=null===n?null:parseFloat(n)||0,[r,n,r,n]}if(3==t){var r=e[0],n=e[1],i=e[2];return r=null===r?null:parseFloat(r)||0,n=null===n?null:parseFloat(n)||0,i=null===i?null:parseFloat(i)||0,[r,n,i,n]}var r=e[0],n=e[1],i=e[2],o=e[3];return r=null===r?null:parseFloat(r)||0,n=null===n?null:parseFloat(n)||0,i=null===i?null:parseFloat(i)||0,o=null===o?null:parseFloat(o)||0,[r,n,i,o]}function fe(e,t,r,n){if("number"!=typeof n)return null;var i,o,a=n,s=e.$gui;if(e.state?(i=e.state.sizes,o=parseFloat(e.state.cellSpacing)||0):(i=e.props.sizes,o=parseFloat(e.props.cellSpacing)||0),Array.isArray(i)){for(var l=i.length,u=0;u=0&&(a-=h>=1?h:h>=.9999?n:h*n)}return a-=o*l,a<0?null:a}for(var p=s.comps,l=p.length,u=0;u=0&&(a-=h>=1?h:h>=.9999?n:h*n),a-=r?(f[1]||0)+(f[3]||0):(f[0]||0)+(f[2]||0)}}return a<=0?null:a}function he(e){e.popDesigner=X,e.saveDesigner=Y,e.dumpTree=V,e.loadTree=ee,e.streamTree=te,e.listScenePage=ue,e.keyOfNode=function(e){return u(e)},e.splitterMouseDn=function(){return lt}}function de(e,t){var r=e.getHtmlNode();if(r){for(var n=[],i=r.querySelectorAll(".rewgt-static"),o=0;l=i[o];o++){for(var a=l.parentNode,s=!1;a&&a!==document;){if(a===r){s=!0;break}if(a.classList.contains("rewgt-static"))break;a=a.parentNode}if(s){p=(c=l.getAttribute("name")||void 0)&&parseInt(c);if(!isNaN(p)){if(l.children.length>0){if(!(t&&p>=1048576))continue;l.innerHTML=""}n.push([p,c,l])}}}for(var l,o=0;l=n[o];o++){var u,p=l[0],c=l[1],f=l[2],h=p>=1048576;if(h){var d=e.$gui.statics;u=d&&d[c]}else u=Ue.$staticNodes[p];if(Array.isArray(u))for(var g,v=0;g=u[v];v++)f.appendChild(h?g:g.cloneNode(!0))}}}function ge(e,t,r){function n(){r&&r()}var i=e.widget;if(!i)return n();var o=!1,a=e.$gui,s=a.cssWidth,l=a.cssHeight,u=a.useSparedX;if(u){var c=fe(e,i,!0,s);a.sparedX!==c?(a.sparedX=c,"number"==typeof c&&(o=!0)):t&&(o=!0)}else if(a.useSparedY){var f=fe(e,i,!1,l);a.sparedY!==f?(a.sparedY=f,"number"==typeof f&&(o=!0)):t&&(o=!0)}if(!o)return n();if("number"!=typeof s&&"number"!=typeof l)return n();var h=[];a.comps.forEach(function(e){if(e){var t=b(e);if(t){var r=i[t];if(r=r&&r.component){var n=u?r.state.width:r.state.height;"number"==typeof n&&n<0&&h.push(r)}}}}),h.length&&setTimeout(function(){var e=Xe.dragInfo.inDragging;h.forEach(function(t){t.willResizing&&!t.willResizing(s,l,e)||t.setState({parentWidth:s,parentHeight:l,id__:p()})})},0),n()}function ve(e,t){var r=!1;if(e){var n=void 0===e?"undefined":Fe(e);if("string"==n)e=[e],r=!0;else if("object"==n)if(Array.isArray(e)){var i;"string"==typeof e[0]&&"object"==Fe(i=e[1])&&"string"!=typeof i.$trigger&&(e=[e]),r=!0}else"string"==typeof e.$trigger&&(e=[e],r=!0)}if(!r)throw new Error("invalid trigger data (key="+this.$gui.keyid+")");this.state.trigger=e}function ye(e){var t=e.$gui;if(t.isPanel)return console.log("warning: panel not support virtual widget"),null;var r=t.comps,n=r.length,i=t.keyid+"",o=e.props["data-rewgt-owner"];o&&(i=o+"."+i);for(var a=0;a=0&&dt(i=r[o])){if(o>=1&&"foo"!==b(i))for(var s=o-1;s>=0;){var l=r[s];if(dt(l)&&"foo"===b(l)){var u=r.slice(0,s);(f=me(l,t))&&u.push(f);for(var p=s+1;p<=o;p++)u.push(r[p]);return n?(u.unshift(n,{}),ft.apply(null,u)):u}s-=1}var c=r.slice(0,-1),f=me(i,t);return f&&c.push(f),n?(c.unshift(n,{}),ft.apply(null,c)):c}return n?ft.apply(void 0,[n,{}].concat(a(t))):null}function be(e){return e.hasOwnProperty("prototype")}function we(e,t){Array.isArray(e)&&function(e,t,r){for(var n=[],i=[],o=t.length-1;o>=0;o--){var a=t[o];if(Array.isArray(a)){var s=a[0],l=a[1];if(s&&"string"==typeof s&&l)if("string"==typeof l)l=a[1]=ht(Jt,{key:s,"keyid.":s,"html.":l}),n.unshift(s),i.unshift(l);else if(dt(l))l.props["keyid."]!==s&&(l=a[1]=ft(l,{key:s,"keyid.":s})),n.unshift(s),i.unshift(l);else{if(Array.isArray(l)&&l[0]&&(l=Xe.loadElement(l))){l.props["keyid."]!==s&&(l=ft(l,{key:s,"keyid.":s})),a[1]=l,n.unshift(s),i.unshift(l);continue}t.splice(o,1)}else t.splice(o,1)}}if(!Ue.__design__){for(var u=[],o=r.length-1;o>=0;o--)s=(a=r[o])[0],n.indexOf(s)<0&&u.unshift("-"+s);(u=u.concat(i)).length&&setTimeout(function(){e.setChild.apply(e,u)},0)}}(this,e,t)}function ke(e,t,r){return function(e){function a(e,i){o(this,a);var s=n(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,e||t,i));return r&&(s._htmlText=!1),s}return i(a,e),ze(a,[{key:"getDefaultProps",value:function(){var e=Le(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"getDefaultProps",this).call(this);return e["tagName."]=t.toLowerCase(),e}}]),a}(e)}function Oe(e){e.stepPlay=function(e){if(this.isHooked){var t=this.getHtmlNode();if(t&&t.readyState>=2)return t.play(),!0}return!1},e.stepPause=function(e){if(this.isHooked){var t=this.getHtmlNode();if(t)return t.paused||t.pause(),!0}return!1},e.stepIsDone=function(){if(!this.isHooked)return!0;var e=this.getHtmlNode();return!e||e.readyState<2||e.paused}}function xe(e,t,r){function n(t,r){if(t||0===t){var n=e.widget;if(n=n&&n[t],(n=n&&n.component)&&n.navWillLeave){var i=n.navWillLeave();if(!i||"string"==typeof i&&!window.confirm(i))return!0}}return!1}function i(t,r){e.state.checkedId=r,L(e,"checkedId",t)}var o=e.$gui;if(t&&o.compState){var a=o.navSubkey,s=e.state.checkedId;if(o.navItems[t]){if(!n(s,t))return i(s,t),void e.reRender(r)}else if(a){var l=e.widget,u=l&&l[a];if((u=u&&u.component)&&u.props["isNavigator."]&&!n(s,t))return i(s,t),void u.fireChecked(t,r)}e.state.checkedId=t}r&&r()}function $e(e,t){if(F(e),e["hide."])return null;var r=e.state["tagName."];if(!r)return ye(e);var n=!1,i=void 0,o=e.parentOf(!0);o&&o.props["isNavigator."]&&(i=o.state.checkedId||"",n=!0);var a=e.prepareState(),s=Object.assign({},e.state.style);n&&(i&&i==e.$gui.keyid?s.display="block":s.display="none");var l=a.length,u=e.$gui.insertEle;u&&(a=me(u,a),l=!0),l||2!=t||(a=e.state["html."]||null);var p=k(e,s);return ht(r,p,a)}function Pe(e){var t=e.widget;for(t=t&&t.parent;t;){var r=t.component;if(!r)break;if(r.props["isNavigator."])return r;t=t.parent}return null}function Se(e,t,r,n){if("string"==typeof t.path&&(t.state||(t.state={opened:!1}),r?(delete r.state,t=Object.assign({},t,r)):t=Object.assign({},t),!t.state.opened)){var i=t.path;i||(i="./"+this.$gui.keyid);var o=e.componentOf(i);if(o=o&&o.fullClone())return void Xe.popWin.showWindow(o,t,function(){e.duals["data-checked"]="1",n(!0)},e);Xe.instantShow("warning: can not locate popup window ("+i+").")}n(!1)}function je(e,t){if(t||(t=e.findNavOwner()),t){var r=e.$gui.keyid;t.listOptComp().forEach(function(t){t!==e&&t.clearChecked&&t.$gui.keyid!==r&&t.clearChecked()})}}function De(e,t,r,n){function i(r){var n=r.shift();n?setTimeout(function(){e.state["data-checked"]?t():i(r)},n):t()}function o(){u&&(je(e,p),e.fireTrigger()),t&&t()}e.state.disabled&&!n&&t&&t();var a=e.state.recheckable,s=e.state["data-checked"],l=e.state.popOption;if(l){if(!l.state||!l.state.opened)return void(!a&&s||Se(e,l,r,function(e){t&&t()}));if(!n)return}if(!s)return e.duals["data-checked"]="1",void(t&&i([100,100,100]));a&&(e.state.recheckable=!1,setTimeout(function(){e.state.recheckable=!0},300));var u=!1,p=null;if(e.state.isolated)return(n||a)&&(u=!0),void o();if(p=e.findNavOwner()){var c=e.$gui.keyid+"";if((p.state.checkedId!==c||n||a)&&(!p.canNavigateTo||p.canNavigateTo(c)))return(n||a)&&(u=!0),void xe(p,c,o)}o()}function Ie(e,t){var r=s(e.props.$trigger||e.props.popOption);e.defineDual("isolated",function(e,t){this.state.isolated=s(e)}),void 0===e.props.isolated&&(e.duals.isolated=r),e.defineDual("recheckable",function(e,t){this.state.recheckable=s(e)}),void 0===e.props.recheckable&&(e.duals.recheckable=r),t.disabled="",e.defineDual("disabled",function(e,t){this.state.disabled=s(e)}),e.defineDual("popOption"),t["data-checked"]="",e.defineDual("data-checked",function(t,r){var n=s(r),i=s(t);n!=i?i?(e.state["data-checked"]=i,setTimeout(function(){e.setChecked(null,void 0,!0)},0)):e.state["data-checked"]=i:e.state["data-checked"]=n})}function Ne(e,t){return e["data-checked"]=[t+1,"string",["","1"]],e.isolated=[t+2,"string",["","1"]],e.disabled=[t+3,"string",["","1"]],e.recheckable=[t+4,"string",["","1"]],e.trigger=[t+5,"string",null,"[string]: [sPath,{trigger,pop_option},[sPath,modifier], ...]"],e.popOption=[t+6,"object",null,"[object]: {path:bodyElePath}"],e}function Ae(e,t){function r(e,t,n,i){var o=n[0],a=n[1],s=4==o?a.element.props.children:a.props.children;if(s){var l=i;3==o?l=t:4==o&&(e=a,l=t,t=""),Be.Children.forEach(s,function(n,i){var o=n.props["keyid."];if(!o&&0!==o){var a=b(n);if(a){var s=parseInt(a);o=s+""===a?s:a}else o=i}var u=o+"",p=1,c=ft(n,{"keyid.":o,key:u,"hookTo.":e}),f=t?t+"."+u:u;n.props["isTemplate."]?(p=4,(c=new ae(c)).pathSeg=f):n.props["isNavigator."]?p=3:n.props["isReference."]&&(p=2);var h=[p,c,l];e.comps[f]=h,2!=p&&r(e,f,h,l)})}}var n=b(t);if(!n)return!1;var i,o=parseInt(n),a=o+""===n?o:n,s=1;t.props["isReference."]?(s=2,"$"==n[0]&&(n=n.slice(1),(o=parseInt(n))+""==n&&(a=o)),i=ft(t,{"hookTo.":e,"keyid.":a,key:n})):(i=ft(t,{"hookTo.":e,"keyid.":a,key:n}),t.props["isTemplate."]?(s=4,(i=new ae(i)).pathSeg=n):t.props["isNavigator."]&&(s=3));var l=[s,i,""];return e.comps[n]=l,2!=s&&r(e,n,l,""),!0}function Te(e){var t=e.widget,r=null;if(t=t&&t.parent){var n=t.component;if(n){var i=n.$gui.compIdx[e.$gui.keyid];if("number"==typeof i){var o=n.$gui.comps[i];o&&(r=new ae(o))}}}if(!r)return!1;e.$gui.template=r;for(var a=e.$gui.comps,s=a.length,l=0;l=0&&e.exprAttrs.splice(r,1)}}function Ce(e,t){if(!t||"string"!=typeof t)return null;var r=t[0];if("."!=r&&"/"!=r){var n=e.$gui.template;if(!n)return null;for(var i=t.split("."),o=i.shift(),a=n.comps[o];a;){var s=a[0],l=a[1];if(2==s)return 0==i.length?l:null;if(4==s){if(0==i.length)return null;l=(n=l).element,o=i.shift(),a=n.comps[o]}else{if(0==i.length)return l;o+="."+i.shift(),a=n.comps[o]}}}else{var u=t.lastIndexOf("./");if(u>=0)return(c=e.componentOf(t.slice(0,u+2)))?c.elementOf(t.slice(u+2)):null;if("."==r){if((u=t.indexOf(".",1))>1){var p=Ue.W(t.slice(0,u)),c=p&&p.component;if(c)return c.elementOf(t.slice(u+1))}}else if("/"==r&&"/"==t[1]){var f=e.parentOf();return f?f.elementOf(t.slice(2)):null}}return null}function Re(e){e.stopPropagation()}function He(){function e(t,r){Object.keys(t).forEach(function(n){if(n&&"_"!=n[n.length-1]){var i=t[n];if("object"==(void 0===i?"undefined":Fe(i)))if(i.getDefaultProps){var o=i.getDefaultProps(),a=1;o["childInline."]&&(a=f(o.className||"","rewgt-unit")?2:3),3!=a&&(en[r+n]=a),o["isPre."]&&(tn[r+n]=!0)}else e(i,r+n+".")}})}return en||(en={},tn={},e(Ve,"")),[en,tn]}function We(e,t,r){for(var n,i=[],o=[],a=0;n=e.children[a];a++){var s=Je.scanNodeAttr(n,t,a);if(s){var l=s[0],u=s[1];if("RefDiv"==l)i.push(ht(Xr,u));else if("RefSpan"==l)i.push(ht(Kr,u));else{var p,c=l.split(".");if(1==c.length&&(p=l[0])>="a"&&p<="z"){var f=u["html."]||null;delete u["html."],delete u["isPre."],i.push(ht(h,u,f))}else{var h=P(l)[c.pop()],d=t+"["+a+"]."+l;if(!h){console.log("error: can not find WTC ("+d+")");continue}var g=n.nodeName,v=[];"DIV"!=g&&"SPAN"!=g||(v=We(n,d,r)),v.unshift(h,u),i.push(ht.apply(null,v))}}}else if(n.classList.contains("rewgt-static"))for(var y,_=0;y=n.childNodes[_];_++)o.push(y);else o.push(n)}if(0==i.length&&o.length){var m={className:"rewgt-static",name:Ue.$staticNodes.push(o)-1+""};r||(m["data-marked"]="1"),i.push(ht("div",m))}return i}function Me(e,t,r){function n(t){o.removeNum+=o.comps.length,o.compIdx={},o.comps=[],o.statics={},a&&(e.firstScan=!0,e.cellKeys={},e.cellStyles={});for(var n,s=[],l=[],u=0;n=t.children[u];u++){var c=n.getAttribute("$"),h=n.nodeName;if(!c||"PRE"!=h&&"DIV"!=h){if(!c)if(a)if(p.length&&(i(o,p),p=[]),"HR"==h){I=ht("hr",{"markedRow.":!0});o.comps.push(I),a&&(s.push(l),l=[])}else"P"==n.nodeName&&""===n.innerHTML||p.push(n);else p.push(n)}else{p.length&&(i(o,p),p=[]);var d=Je.scanNodeAttr(n,"",0),g=d&&d[0];if(!d||"RefSpan"===g){console.log("error: invalid node (<"+h+" $="+c+">)");continue}var v,y=d[1],_="RefDiv"!=g,m=!1,b=null,w=null;if(_){var k,O=g.split(".");if(1==O.length&&(k=g[0])>="a"&&k<="z")m=!0,v=g;else{if(!(v=P(g)[O.pop()])){console.log("error: can not find WTC ("+g+")");continue}v.defaultProps&&!f(v.defaultProps.className||"",["rewgt-panel","rewgt-unit"])&&(b=v,w=y,v=Jt,y={})}}else v=Xr;var x,$=o.comps.length,S=y.key,j="",D="";S&&"string"==typeof S&&0!=S.search(rn)?(j=D=S,_||"$"==S[0]||(S="$"+S),x=S):(D=x="auto"+($+o.removeNum),S=_?x:x="$"+x);var I;if(m){y.key=S;var N=y["html."]||null;delete y["html."],delete y["isPre."],I=ht(v,y,N)}else{Object.assign(y,{"hookTo.":e.widget,"keyid.":x,key:S}),_||(y.style?y.style.display="":y.style={display:""});var A=[];"DIV"==h&&(A=We(n,"["+u+"]."+g,!1)),b&&(A.unshift(b,w),A=[ht.apply(null,A)]),A.unshift(v,y),I=ht.apply(null,A)}o.compIdx[S]=$,o.comps.push(I),j&&(a?s[j]=I:l[j]=I),l.push([D,I]),it&&!_&&st.push([e,S])}}p.length&&i(o,p),a?l.length&&s.push(l):s=l,r&&setTimeout(function(){r(!0,s)},0)}function i(e,t){if(!s){var r=e.comps.length,n=1048576+e.removeNum+r+"",i=r+e.removeNum+"",o={className:"rewgt-static",name:n,key:i};e.compIdx[i]=r,e.comps.push(ht("div",o)),e.statics[n]=t}}var o=e.$gui,a=e.props["markedTable."],s=e.props.noShow;try{var l=Xe.marked(t),u=document.createElement("div"),p=[];u.innerHTML=l;var c=[];o.comps.forEach(function(e){if(e&&e.props["hookTo."]){var t=b(e);t&&c.push("-"+t)}}),c.length&&e.isHooked?e.setChild(c,function(){n(u)}):n(u)}catch(e){console.log(e),r&&r(!1)}}var Le=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(n)},ze=function(){function e(e,t){for(var r=0;r0,Je.appBase=function(){return"/app/files/rewgt/web"}}(window.location),Xe.version=function(){return"1.0.5"};var Ze=function(e){var t=e.match(/trident.*rv[ :]*([\d.]+)/);if(t){if(parseFloat(t[1])>=11)return["ie",t[1]]}else{if(t=e.match(/firefox\/([\d.]+)/))return["firefox",t[1]];if(t=e.match(/chrome\/([\d.]+)/))return["chrome",t[1]];if(t=e.match(/opera.([\d.]+)/))return["opera",t[1]];if(t=e.match(/safari\/([\d.]+)/))return["safari",t[1]];if(t=e.match(/webkit\/([\d.]+)/))return["webkit",t[1]]}return e.match(/msie ([\d.]+)/)?["ie",""]:["",""]}(window.navigator.userAgent.toLowerCase());Xe.vendorId=Ze;var Qe=/[^A-Za-z0-9\+\/\=]/g,et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",tt=Xe.Base64={encode:function(e){var t,r,n,i,o,a,s,l="",u=0;for(e=tt._utf8_encode(e);u>2,o=(3&t)<<4|(r=e.charCodeAt(u++))>>4,a=(15&r)<<2|(n=e.charCodeAt(u++))>>6,s=63&n,isNaN(r)?a=s=64:isNaN(n)&&(s=64),l=l+et.charAt(i)+et.charAt(o)+et.charAt(a)+et.charAt(s);return l},decode:function(e){var t,r,n,i,o,a,s="",l=0;for(e=e.replace(Qe,"");l>4,r=(15&i)<<4|(o=et.indexOf(e.charAt(l++)))>>2,n=(3&o)<<6|(a=et.indexOf(e.charAt(l++))),s+=String.fromCharCode(t),64!=o&&(s+=String.fromCharCode(r)),64!=a&&(s+=String.fromCharCode(n));return s=tt._utf8_decode(s)},_utf8_encode:function(e){for(var t="",r=0;r127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t},_utf8_decode:function(e){for(var t,r,n,i=0,o="";i191&&t<224?(r=e.charCodeAt(i+1),o+=String.fromCharCode((31&t)<<6|63&r),i+=2):(r=e.charCodeAt(i+1),n=e.charCodeAt(i+2),o+=String.fromCharCode((15&t)<<12|(63&r)<<6|63&n),i+=3);return o}},rt=null,nt=null,it=!0,ot=!1,at=!1,st=[],lt=!1,ut="",pt=null,ct=qe.findDOMNode,ft=Be.cloneElement,ht=Be.createElement,dt=Be.isValidElement,gt=Be.Children.toArray,vt=tt.hasOwnProperty,yt={$:!0,styles:!0,"tagName.":!0,"isReference.":!0,"hookTo.":!0,width:!0,height:!0,className:!0,"childInline.":!0},_t=["for","if","elif","else"];Xe.isUnderBody=l,Xe.keyOfNode=function(e){return u(e)},Xe.dragInfo={inDragging:!1,justResized:!1};var mt=4;Xe.identicalId=p,Xe.classNameOf=c,Xe.hasClass=function(e,t){return f(c(e),t)},Xe.addClass=function(e,t){for(var r=e.state.klass||"",n=" "+(e.$gui.className||"")+" "+r+" ",i="",o=Array.isArray(t)?t:String(t).split(/ +/),a=o.length,s=0;s=0;o--){var a=r[o];if(a){var s=a[0];"-"==s?n.unshift(a.slice(1)):"+"==s?i.unshift(a.slice(1)):i.unshift(a)}}return Xe.removeClass(e,n,i)};var bt=["S1","S2","S3","S4","S5","S6"];Je.mergeClass=function(e,t,r){var n=v(r);return g(e,t,n[0],n[1])},Xe.mergeClass=function(e,t){var r=v(t),n=r[0],i=r[1];return Xe.removeClass(e,n,i)},Xe.klassNames=y,Xe.clearKlass=_,Xe.setupKlass=function(e,t){for(var r=[_(e,t)],n=arguments.length,i=2;i=2?O(void 0,e,arguments[1]):O(void 0,e)},Xe.setChildren=function(e,t,r,n){"function"==typeof r&&(n=r,r=void 0);var i=e.$gui;if(t||(t=i.comps),r&&(i.isPanel||e.widget===nt?(console.log("error: invalid argument (insertEle) for panel"),r=void 0):Array.isArray(r)?0==r.length&&(r=null):dt(r)&&void 0===r.props["childInline."]||(console.log("error: invalid argument (insertEle)"),r=null)),Array.isArray(t))if((r||null===r)&&(i.insertEle=r),t!==i.comps){for(var o=[],a=t.length,s=0;s=1.5?e.setState({id__:x(e.state.id__)},n):setTimeout(function(){e.setState({id__:x(e.state.id__)},n)},0)}else n&&(i.inSync?setTimeout(function(){n()},0):n())},Xe.getWTC=P;var kt={ie:"ms",firefox:"Moz",opera:"O",chrome:"Webkit",safari:"Webkit",webkit:"Webkit"};Ye.regist("vendor",function(){return kt[Ze[0]]||""}),Ye.regist("vendorId",function(){return"-"+(kt[Ze[0]]||"").toLowerCase()+"-"}),Ye.regist("__design__",function(){return parseInt(Ue.__design__||0)}),Ye.regist("__debug__",function(){return parseInt(Ue.__debug__||0)}),Ye.regist("time",function(e){return(e?new Date(e):new Date).valueOf()}),Ye.regist("isFalse",function(e){return!e}),Ye.regist("isTrue",function(e){return!!e}),Ye.regist("parseInt",function(e){return parseInt(e)}),Ye.regist("parseFloat",function(e){return parseFloat(e)}),Ye.regist("escape",function(e){return escape(e)}),Ye.regist("unescape",function(e){return unescape(e)}),Ye.regist("evalInfo",function(){var e=void 0,t=this.component;if(!t)return e;var r=t.widget,n=r&&r.$callspace;if(n&&(e=n.exprSpace.$info,n.forSpace)){var i=n.forSpace.exprSpace.$info;e?i&&i[2]>=e[2]&&(e=i):e=i}return e}),Ye.regist("tagValue",function(e){if("object"!=(void 0===e?"undefined":Fe(e)))return e;var t,r=Object.assign({},e),n=r.$set;if(n){if("object"!=(void 0===n?"undefined":Fe(n)))return e;n=r.$set=Object.assign({},n)}else{if(!(n=r.$merge))return t=Ye.time(),Object.keys(r).forEach(function(e){if("$"!=e[0]){var n=r[e];if("object"==(void 0===n?"undefined":Fe(n))){var i=(n=r[e]=Object.assign({},n)).$set;if(i){if("object"!=(void 0===i?"undefined":Fe(i)))return;(i=n.$set=Object.assign({},i)).time=t}else if(i=n.$merge){if("object"!=(void 0===i?"undefined":Fe(i)))return;(i=n.$merge=Object.assign({},i)).time=t}else vt.call(n,"value")&&(n.time={$set:t})}}}),r;if("object"!=(void 0===n?"undefined":Fe(n)))return e;n=r.$merge=Object.assign({},n)}return t=Ye.time(),Object.keys(n).forEach(function(e){if("$"!=e[0]){var r=n[e];"object"==(void 0===r?"undefined":Fe(r))&&(r.time=t)}}),r}),Ye.regist("tagFired",function(){var e=arguments.length;if(e<2)return"";var t,r=arguments[0];for(t=1;t":"ex>",o<=0)t&&console.log(i);else{for(var a=0;a=2&&("number"==typeof(r=arguments[i-1])?(r<0&&(o=!1),i-=1):2==i&&Array.isArray(r)&&(i=(n=r).length)>=1&&"number"==typeof(r=n[i-1])&&(r<0&&(o=!1),i-=1));var a=[];if(n)for(s=0;sl?o?1:-1:o?-1:1}return 0}):u.sort(function(e,t){return o?e===t?0:e>t?1:-1:e===t?0:e>t?-1:1})}),Ye.regist("jsonp",function(e,t){var r=this.evalInfo(),n=null,i="";return r&&(n=r[0],i=r[1],t&&n&&vt.call(n.duals,i)&&void 0===n.state[i]&&(n.duals[i]=t)),e=Object.assign({},e),e.callback=function(e){n&&i&&vt.call(n.duals,i)&&(n.duals[i]=e)},Xe.jsonp(e),n&&i?n.state[i]:void 0}),Ye.regist("ajax",function(e,t){var r=this.evalInfo(),n=null,i="";return r&&(n=r[0],i=r[1],t&&n&&i&&vt.call(n.duals,i)&&void 0===n.state[i]&&(n.duals[i]=t)),e.success=function(e){n&&i&&vt.call(n.duals,i)&&(n.duals[i]={status:"success",data:e})},e.error=function(e,t){n&&i&&vt.call(n.duals,i)&&(n.duals[i]={status:t||"error",data:null})},Xe.ajax(e),n?n.state[i]:void 0}),j.defunct=function(e){throw new Error("Unexpected character ("+e+") at offset ("+(this.index-1)+")")};var Ot=new j,xt=[];Ot.addRule(/\s+/,function(e){return D(e,1,-1)}).addRule(/[0-9]+(?:\.[0-9]+)?\b/,function(e){return D(e,2,-1)}).addRule(/[_$A-Za-z](?:[_$A-Za-z0-9]+)?/,function(e){return D(e,3,-1)}).addRule(/(?:"((?:\\.|[^"])*)"|'((?:\\.|[^'])*)')/,function(e){return D(e,4,-1)}).addRule(/[?]/,function(e){return D(e,5,4)}).addRule(/[:]/,function(e){return D(e,6,-1)}).addRule(/[,]/,function(e){return D(e,7,-1)}).addRule(/[{]/,function(e){return D(e,8,-1)}).addRule(/[}]/,function(e){return D(e,9,-1)}).addRule(/[\[]/,function(e){return D(e,10,-1)}).addRule(/[\]]/,function(e){return D(e,11,-1)}).addRule(/[(]/,function(e){return D(e,12,-1)}).addRule(/[)]/,function(e){return D(e,13,-1)}).addRule(/[.]/,function(e){return D(e,14,18)}).addRule(/[*]/,function(e){return D(e,14,14)}).addRule(/[/]/,function(e){return D(e,14,14)}).addRule(/[%]/,function(e){return D(e,14,14)}).addRule(/[+]/,function(e){return D(e,14,13)}).addRule(/[-]/,function(e){return D(e,14,13)}).addRule(/[>]{3}/,function(e){return D(e,14,12)}).addRule(/[>]{2}/,function(e){return D(e,14,12)}).addRule(/[<]{2}/,function(e){return D(e,14,12)}).addRule(/[<][=]/,function(e){return D(e,14,11)}).addRule(/[<]/,function(e){return D(e,14,11)}).addRule(/[>][=]/,function(e){return D(e,14,11)}).addRule(/[>]/,function(e){return D(e,14,11)}).addRule(/[=]{3}/,function(e){return D(e,14,10)}).addRule(/[!][=]{2}/,function(e){return D(e,14,10)}).addRule(/[=]{2}/,function(e){return D(e,14,10)}).addRule(/[!][=]/,function(e){return D(e,14,10)}).addRule(/[&]{2}/,function(e){return D(e,14,6)}).addRule(/[&]/,function(e){return D(e,14,9)}).addRule(/[\^]/,function(e){return D(e,14,8)}).addRule(/[|]{2}/,function(e){return D(e,14,5)}).addRule(/[|]/,function(e){return D(e,14,7)}).addRule(/$/,function(e){return D(e,20,-1)});var $t=[2,3,4,9,11,13,31,32,33,34,35,36,37,38,39,40,41,42,43],Pt=1,St=["props","state","duals","item","count","index"],jt=0;Xe.triggerDual=L,Xe.popWin={showWindow:function(e,t,r,n){if(Ue.__design__&&(it||ot))r&&r();else{var i=nt&&nt.$pop,o=i&&i.component;if(o&&e)if(f(e.props.className,["rewgt-panel","rewgt-unit"])){var a=t.frameElement||null;!a&&n&&(a=B(n,t));var s=void 0;n&&n.props["isOption."]&&vt.call(n.state,"data-checked")&&(s=n.state["data-checked"]),o.setChild(ht(Qr,{popOption:t,popFrame:a},e),function(){Ue.__design__&&(rt&&rt.setDesignModal&&rt.setDesignModal(!0),void 0!==s&&n&&setTimeout(function(){n.state["data-checked"]=s},300)),r&&r()})}else Xe.instantShow("error: only panel, div, paragraph can use as popup window.")}},listWindow:function(){var e=nt&&nt.$pop,t=e&&e.component;if(!t)return[];var r=[];return t.$gui.comps.forEach(function(e){if(e){var t=b(e);if(t){var n=parseInt(t);n+""===t&&(t=n),r.push([t,e.props.popOption])}}}),r},closeAll:function(e){function t(){e&&e()}var r=nt&&nt.$pop,n=r&&r.component;if(!n)return t();var i=[];n.$gui.comps.length;if(n.$gui.comps.forEach(function(e){if(e){var t=b(e);t&&i.unshift("-"+t)}}),!i.length)return t();i.push(t),n.setChild.apply(n,i)},popWindow:function(e){var t=nt&&nt.$pop,r=t&&t.component;if(r){for(var n=null,i=r.$gui.comps,o=i.length-1;o>=0;){var a=i[o],s=a&&b(a);if(s&&(a=t[s])&&(n=a.component))break;o-=1}if(n){n.props.optPath;var l=n.$gui.keyid,u=n.state.popOption;if(0==arguments.length){var p=u&&u.beforeClose;"function"==typeof p&&(e=p())}var c=u&&u.callback;r.setChild("-"+l,function(){"function"==typeof c&&c(e)})}}}},Je.getCompRenewProp=q,Je.deepCloneReactEle=G;var Dt=null,It=0;Je.staticMouseDown=K,Je.staticDbClick=J,Xe.loadElement=function(){var e=[],t=arguments.length;if(1==t)return Z(e,arguments[0],Ue.$staticNodes,Ue.$cachedClass),1==e.length?e[0]:null;if(0==t)return null;for(var r=0;r0&&(i=e.slice(s),e=e.slice(0,s));var l=parseInt(e);l+""==e&&(e=l,a="number")}if("string"==a&&e){var u=this.namedPage[e];if("number"!=typeof u)return i="",r();e=u}else if("number"!=a)return i="",r();var p=this.keys.length;if(!p)return r();e>=p&&(e=p-1),e<0&&(e=0);var c=this.gotoPage_(this.keys,e);n=c[0],(o=c[1])||(i=""),r()}else t&&t("")},prevPage:function(){return this.gotoPage(this.pageIndex-1)},nextPage:function(){return this.gotoPage(this.pageIndex+1)},renewPages:function(e){var t=[],r={};e.forEach(function(e){var n=e[0];parseInt(n)+""!==n&&(r[n]=t.length),t.push(n)});var n=this.keys[this.pageIndex],i=!0;if("string"==typeof n){var o=t.indexOf(n);o>=0&&(this.pageIndex=o,i=!0)}this.keys=t,this.namedPage=r,i||(t.length?this.gotoPage(0):this.pageIndex=0)},setDisplay:function(e){function t(e){return(e=Math.max(e||0,0))<.9999?e*=window.innerWidth:e<1&&(e=window.innerWidth),e}vt.call(e,"leftCtrlWidth")&&(this.leftPanel.style.width=t(e.leftCtrlWidth)+"px"),vt.call(e,"rightCtrlWidth")&&(this.rightPanel.style.width=t(e.rightCtrlWidth)+"px")},destory:function(){this.leftPanel&&(this.leftPanel.parentNode.removeChild(this.leftPanel),this.leftPanel=null),this.rightPanel&&(this.rightPanel.parentNode.removeChild(this.rightPanel),this.rightPanel=null)}},Je.pageCtrl_=le,Ue.$main.$$onLoad_=function(e){function t(e){var r=st.shift();r?se(r[0],r[1],function(){t(e)}):e()}function r(){var i=n.shift();i?i(r):t(function(){if(at=!1,it=!1,!Ue.__design__&&rt&&!Xe.pageCtrl){var t=ue();t.length&&(Xe.pageCtrl=new le(t))}setTimeout(function(){if(Ue.__design__)Ue.$main.$onLoad=[],Ue.$main.inRunning=!0,e&&e();else{var t,r=Ue.$main.$onReady;if(Array.isArray(r))for(;t=r.shift();)t();else"function"==typeof r&&r();var n=Ue.$main.$onLoad;if(Array.isArray(n))for(;t=n.shift();)t();Ue.$main.inRunning=!0;var i=window.location.hash;i&&setTimeout(function(){Xe.gotoHash(i)},300)}},0)})}at=!0;var n=Ue.$main.$$onLoading=(Ue.$main.$$onLoad||[]).slice(0);r()};var At=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({onCopy:!0,onCut:!0,onPaste:!0,onCompositionEnd:!0,onCompositionStart:!0,onCompositionUpdate:!0,onKeyDown:!0,onKeyPress:!0,onKeyUp:!0,onFocus:!0,onBlur:!0,onChange:!0,onInput:!0,onSubmit:!0,onClick:!0,onContextMenu:!0,onDoubleClick:!0,onDrag:!0,onDragEnd:!0,onDragEnter:!0,onDragExit:!0,onDragLeave:!0,onDragOver:!0,onDragStart:!0,onDrop:!0,onMouseDown:!0,onMouseEnter:!0,onMouseLeave:!0,onMouseMove:!0,onMouseOut:!0,onMouseOver:!0,onMouseUp:!0,onSelect:!0,onTouchCancel:!0,onTouchEnd:!0,onTouchMove:!0,onTouchStart:!0,onScroll:!0,onWheel:!0,onAbort:!0,onCanPlay:!0,onCanPlayThrough:!0,onDurationChange:!0,onEmptied:!0,onEncrypted:!0,onEnded:!0,onError:!0,onLoadedData:!0,onLoadedMetadata:!0,onLoadStart:!0,onPause:!0,onPlay:!0,onPlaying:!0,onProgress:!0,onRateChange:!0,onSeeked:!0,onSeeking:!0,onStalled:!0,onSuspend:!0,onTimeUpdate:!0,onVolumeChange:!0,onWaiting:!0,onLoad:!0},"onError",!0),Tt={accept:1,acceptCharset:1,accessKey:1,action:1,allowFullScreen:1,allowTransparency:1,alt:1,async:1,autoComplete:1,autoFocus:1,autoPlay:1,capture:1,cellPadding:1,cellSpacing:1,challenge:1,charSet:1,checked:1,cite:1,classID:1,colSpan:1,cols:1,content:1,contentEditable:1,contextMenu:1,controls:1,coords:1,crossOrigin:1,data:1,dateTime:1,default:1,defer:1,dir:1,disabled:1,download:1,draggable:1,encType:1,form:1,formAction:1,formEncType:1,formMethod:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:1,hidden:1,high:1,href:1,hrefLang:1,htmlFor:1,httpEquiv:1,icon:1,id:1,inputMode:1,integrity:1,is:1,keyParams:1,keyType:1,kind:1,label:1,lang:1,list:1,loop:1,low:1,manifest:1,marginHeight:1,marginWidth:1,max:1,maxLength:1,media:1,mediaGroup:1,method:1,min:1,minLength:1,multiple:1,muted:1,name:1,noValidate:1,nonce:1,open:1,optimum:1,pattern:1,placeholder:1,poster:1,preload:1,profile:1,radioGroup:1,readOnly:1,rel:1,required:1,reversed:1,role:1,rowSpan:1,rows:1,sandbox:1,scope:1,scoped:1,scrolling:1,seamless:1,selected:1,shape:1,size:1,sizes:1,span:1,spellCheck:1,src:1,srcDoc:1,srcLang:1,srcSet:1,start:1,step:1,summary:1,tabIndex:1,target:1,title:1,type:1,useMap:1,value:1,wmode:1,wrap:1,about:2,datatype:2,inlist:2,prefix:2,property:2,resource:2,typeof:2,vocab:2,autoCapitalize:3,autoCorrect:3,color:3,itemProp:3,itemScope:3,itemType:3,itemRef:3,itemID:3,security:3,unselectable:3,results:3,autoSave:3,dangerouslySetInnerHTML:4,className:5,style:5,width:5,height:5};Je.renewWidgetSpared=ge;var Et=/-(.)/g,Ct=["Top","Right","Bottom","Left"],Rt=function(){function e(t,r){o(this,e),this._className=t,this._classDesc=r||"",this._statedProp=["width","height","left","top"],this._silentProp=["className","hookTo.","keyid.","childInline.","tagName."],this._defaultProp={width:.9999,height:.9999,left:0,top:0},this._htmlText=!1,this._docUrl="doc"}return ze(e,[{key:"_desc",value:function(){return this._classDesc?"<"+this._className+":"+this._classDesc+">":"<"+this._className+">"}},{key:"_extend",value:function(e){if("string"==typeof e){if(Ue.__design__)return null;(e=Ue.$main[e])||console.log("warning: _extend('"+e+"') load nothing!")}var t=this._methods;if(!t){var r={},n={};t=this._methods={$eventset:[r,n]};for(var i={},o=Object.getPrototypeOf(this);o;){var a=Object.getPrototypeOf(o);if(!a)break;Object.getOwnPropertyNames(o).forEach(function(e){"_"!=e[0]&&(i[e]=!0)}),o=a}for(f in i)if("constructor"!=f){var s=this[f];if("function"==typeof s){if("$"==f[0]){var l=!1,u="$"==f[1]?(l=!0,f.slice(2)):f.slice(1);At[u]&&(l?n[u]=!0:r[u]=!0)}t[f]=s}}t.getShadowTemplate=function(e){return function(){return e}}(this)}var p=Object.assign({},t),c=p.$eventset,r=Object.assign({},c[0]),n=Object.assign({},c[1]);p.$eventset=[r,n,this._className],e||(e={});for(var f,h=Object.keys(e),d=0;f=h[d];d++){var g=e[f];if("$"==f[0]&&"function"==typeof g){var l=!1,u="$"==f[1]?(l=!0,f.slice(2)):f.slice(1);At[u]&&(l?n[u]=!0:r[u]=!0)}var v=p[f];"function"==typeof v&&"_"!=f[0]&&(p["_"+f]=function(e){return function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i=2)return console.log("error: can not define duals."+e+" after first render"),this;if(!s||!l)return this;void 0!==r&&l.initDuals0.push([e,r]);var u,p=Object.getOwnPropertyDescriptor(s,e),c=!1;if(p)t?(u=z(this,e,p.set,t.bind(this),n),Object.defineProperty(s,e,{enumerable:!0,configurable:!0,get:p.get,set:u[1]})):n&&(c=!0);else{t?u=z(this,e,null,t.bind(this),n):(n&&(c=!0),u=z(this,e,null)),Object.defineProperty(s,e,{enumerable:!0,configurable:!0,get:u[0],set:u[1]});var f=Tt[e];f&&5!=f&&l.tagAttrs.push(e)}return c&&console.log("warning: base.setter should use with setter."),this}},{key:"undefineDual",value:function(e){if(Array.isArray(e)){var t=e.length;for(s=0;s=2)return console.log("error: undefineDual("+e+") only can be called before first render"),this;if(!i||!n)return this;for(var o,a=[n.initDuals,n.initDuals0],s=0;o=a[s];s++)for(var l=o.length-1;l>=0;)o[l][0]===e&&o.splice(l,1),l-=1;delete i[e];var u=n.tagAttrs.indexOf(e);return u>=0&&n.tagAttrs.splice(u,1),this}},{key:"setEvent",value:function(e){var t,r=this.$gui;if(r&&(t=r.eventset)){if(r.compState>=2)console.log("error: can not call setEvent() after first render.");else for(var n,i=Object.keys(e),o=0;n=i[o];o++)if("$"==n[0]){var a=n.slice(1);if("$"!=a[0]){var s=e[n];"function"==typeof s&&(this[n]=t[a]=function(e,t,r){return function(){e.apply(r,arguments),t&&t.apply(r,arguments)}}(s,t[a],this))}}}else console.log("error: invalid state for setEvent().")}},{key:"getInitialState",value:function(){var e=this.getShadowTemplate();Object.defineProperty(this,"_",{enumerable:!1,configurable:!1,writable:!1,value:e}),this.isHooked=!1,this["hide."]=!1,this.duals={};var t=0==Xe.widgetNum(),r={inSync:!1,removeNum:0,className:this.props.className||"",compState:0,duals:{},initDuals:[],initDuals0:[],connectTo:{},connectBy:{},id__:0,id2__:0,sparedX:null,sparedY:null},n=r.eventset={},i=r.tagAttrs=[],o=r.dualAttrs={},a=r.dataset=[],s=r.exprAttrs=[],l="",u="",c="";r.forExpr=!1,r.hasIdSetter=!1;for(var h={},g=this.$eventset||[{},{}],v=g[0],y=g[1],_=null,m=Object.keys(this.props),w=0;C=m[w];w++)if(0==C.indexOf("data-"))"data-unit.path"!=C&&"data-span.path"!=C||(l=C,u=this.props[C]),a.push(C);else if(0==C.indexOf("dual-")){var k=C.slice(5).replace(Et,function(e,t){return t.toUpperCase()});k&&(o[k]=C)}else if(0==C.indexOf("aria-"))a.push(C);else if("$"==C[0]&&C.length>1){var O=this.props[C],x=void 0===O?"undefined":Fe(O);if("string"==x){if("$id__"!=C){var $=!1;"$for"==(C=C.slice(1))&&(C="for",$=!0),_t.indexOf(C)>=0?"for"==C?(r.forExpr?console.log("warning: reduplicate property ($for)"):(r.forExpr=$?2:1,s.push(C)),t&&console.log("error: can not use '$for' in topmost widget")):c?console.log("error: property ($"+C+") conflict with previous ($"+c+")"):(c=C,"else"!=C&&s.push(C)):"children"==C?vt.call(this.props,"for.index")&&(r.isChildExpr=!0,r.children2=this.props.children):"key"!=C&&s.push(C);continue}x=void 0===(O=Ke[O])?"undefined":Fe(O)}if("function"==x){if("$"==C[1]){console.log("warning: invalid using props."+C);continue}var P=C.slice(1);"id__"==P?_=O:this[C]=h[P]=be(O)?O.bind(this):O}}else{var S=Tt[C];S&&5!=S&&i.push(C)}r.flowFlag=c,r.dataset2=a.slice(0);var j=this.props["keyid."];if(t&&!j&&(j="body"),j){var D=void 0===j?"undefined":Fe(j);"string"!=D&&"number"!=D&&(j=void 0)}var I=this.props["hookTo."];t&&!I&&(I=Ue),"string"==typeof I&&(I=Ue.W(I)),Array.isArray(I)&&I.W&&(void 0!==j?I.$set(j,I.W(this)):j=I.push(I.W(this))-1,r.keyid=j);var N=this.props["data-rewgt-owner"];if(N){var A,T=r.eventset2={};if(I&&(A=I.component))for(var C,m=Object.keys(A.$gui.eventset),w=0;C=m[w];w++)n[C]=_e(this,C,N),T[C]=!0}var R=Object.assign({},v,h);for(var H in R)n[H]=_e(this,H,N);for(var H in y)n[H]=this["$$"+H];t&&(r.className=d(r.className,["rewgt-panel","row-reverse","reverse-row","col-reverse","reverse-col"])),Object.defineProperty(this,"$gui",{enumerable:!1,configurable:!1,writable:!1,value:r});var W={id__:0,childNumId:0,duals:[],"tagName.":this.props["tagName."],exprAttrs:s.slice(0)};if(Ue.__design__){var L=e._getGroupOpt(this);W["data-group.opt"]=L.type+"/"+L.editable}Object.assign(W,{left:0,top:0,width:null,height:null,minWidth:0,maxWidth:0,minHeight:0,maxHeight:0,borderWidth:[0,0,0,0],padding:[0,0,0,0],margin:[0,0,0,0],klass:"",style:{}});var z=r.isPanel=f(r.className,"rewgt-panel"),F=!1,B=!1,q=this.props["childInline."];if(q||t||!z||(f(r.className+" "+this.props.klass,["col-reverse","reverse-col"])?B=!0:F=!0),r.useSparedX=!1,r.useSparedY=!1,r.respared=!1,r.sparedTotal=0,r.compIdx={},r.comps=gt(this.props.children),Object.defineProperty(this.duals,"keyid",{enumerable:!0,configurable:!0,get:function(){return this.$gui.keyid}.bind(this),set:function(e,t){throw new Error("property (keyid) is readonly")}}),this.defineDual("klass",function(e,t){this.state.klass=e||""}),this.defineDual("style",function(e,t){if(this.state["tagName."])this.state.style=Object.assign({},t,e);else{var r=Xe.eachComponent(this)[0];r&&(r.duals.style=e)}}),this.defineDual("left",function(e,t){this.state.left=isNaN(e)?null:e}),this.defineDual("top",function(e,t){this.state.top=isNaN(e)?null:e}),this.defineDual("width",function(e,t){var r,n=!1;if(isNaN(e)?r=null:(r=e,null!==e&&(n=!0)),this.state.width=r,n){var i=this.parentOf(!0);i&&i.$gui.useSparedX&&ge(i,!1)}}),this.defineDual("height",function(e,t){var r,n=!1;if(isNaN(e)?r=null:(r=e,null!==e&&(n=!0)),this.state.height=r,n){var i=this.parentOf(!0);i&&i.$gui.useSparedY&&ge(i,!1)}}),this.defineDual("minWidth",function(e,t){var r=e||0;r>0&&this.state.maxWidth>0&&this.state.maxWidth0&&this.state.minWidth>0&&this.state.minWidth>r?console.log("warning: invalid widget minWidth or maxWidth"):this.state.maxWidth=r}),this.defineDual("minHeight",function(e,t){var r=e||0;r>0&&this.state.maxHeight>0&&this.state.maxHeight0&&this.state.minHeight>0&&this.state.minHeight>r?console.log("warning: invalid widget minHeight or maxHeight"):this.state.maxHeight=r}),this.defineDual("borderWidth",function(e,t){var n=t||[0,0,0,0],i=this.state.borderWidth=r.isPanel?pe(e):ce(e),o=!1;this.$gui.useSparedX?n[1]===i[1]&&n[3]===i[3]||(o=!0):this.$gui.useSparedY&&(n[0]===i[0]&&n[2]===i[2]||(o=!0)),o&&ge(this,!1)}),this.defineDual("padding",function(e,t){var n,i=this.state.padding=r.isPanel?pe(e):ce(e);if((n=this.$gui.useSparedX)||this.$gui.useSparedX){var o=!1,a=t||[0,0,0,0];n?a[1]===i[1]&&a[3]===i[3]||(o=!0):a[0]===i[0]&&a[2]===i[2]||(o=!0),o&&ge(this,!1)}}),this.defineDual("margin",function(e,t){this.state.margin=r.isPanel?pe(e):ce(e)}),this.defineDual("id__",function(e,t){this.state.id__=e,r.id__=r.id2__=e}),_&&this.defineDual("id__",_),this.defineDual("trigger",ve),this.defineDual("cellSpacing"),this.defineDual("sizes"),I){var G=I&&I.component;G&&(G.props["isTableRow."]&&(this.props.tdStyle&&this.defineDual("tdStyle",function(e,t){this.state.tdStyle=Object.assign({},t,e),setTimeout(function(){G.reRender()},0)},this.props.tdStyle),this.props.colSpan&&this.defineDual("colSpan",function(e,t){this.state.colSpan=e,setTimeout(function(){G.reRender()},0)},this.props.colSpan),this.props.rowSpan&&this.defineDual("rowSpan",function(e,t){this.state.rowSpan=e,setTimeout(function(){G.reRender()},0)},this.props.rowSpan)),G.props["isScenePage."]&&(r.inScene=!0))}r.cssWidth=null,r.cssHeight=null;var U=null,V=null,X=this.widget;if(I&&X)if(l&&(X.$callspace={flowFlag:"ref",forSpace:null},X.$callspace[l]=u,E(X.$callspace.exprSpace={},this)),t&&(nt=Je.topmostWidget_=X,(rt=Je.containNode_=document.getElementById("react-container"))||console.log("fatal error: can not find 'react-container' node.")),t&&rt){Ue.__design__&&(rt.style.zIndex="3000",this.duals.style={zIndex:"-1000",overflow:"hidden"});var Y=rt.frameInfo;Y||(Y=rt.frameInfo={topHi:0,leftWd:0,rightWd:0,bottomHi:0}),Y.rootName="."+j;var Z=function(){var e=Math.max(100,window.innerWidth-Y.leftWd-Y.rightWd),t=Math.max(100,window.innerHeight-Y.topHi-Y.bottomHi),n=this.state.innerSize,i=[e,t],o={left:Y.leftWd,top:Y.topHi,parentWidth:e,parentHeight:t,innerSize:i};if(Xe.dragInfo.justResized&&(o.id__=p()),this.setState(o),vt.call(this.duals,"innerSize")){var a=r.connectTo.innerSize;a&&r.compState>=2&&setTimeout(function(){M(a,i,n,"innerSize")},0)}}.bind(this);rt.refreshFrame=Z,he(rt);var Q=function(){Xe.dragInfo.inDragging=!1,Xe.dragInfo.justResized=!0,setTimeout(function(){Xe.dragInfo.justResized=!1},1200),Z()},ee=0;r.onWinResize=function(e){Xe.dragInfo.inDragging=!0,ee&&clearTimeout(ee),ee=setTimeout(Q,500),Z()},this.duals.style=Object.assign({},this.props.style,{position:"absolute"}),this.duals.left=Y.leftWd,this.duals.top=Y.topHi,U=Math.max(100,window.innerWidth-Y.leftWd-Y.rightWd),V=Math.max(100,window.innerHeight-Y.topHi-Y.bottomHi)}else{var te=I.component;te&&(U=te.$gui.cssWidth,V=te.$gui.cssHeight)}return W.parentWidth=U,W.parentHeight=V,this.defineDual("childNumId",function(e,n){var i=this,o=i.widget;if(o){var a=i.state.sizes,s=Array.isArray(a),l=r.compIdx,u=r.comps,p=i.props["isScenePage."],c=!1,h=!1,d=0,g=!1;u.forEach(function(e,n){if("string"==typeof e){if(0==n&&1==u.length&&vt.call(i.duals,"html."))return setTimeout(function(){i.duals["html."]=e},0),void(g=!0);if(!q)return u[n]=void 0,void console.log("warning: can not add text element to panel ("+o.getPath()+")");e=u[n]=ht(yr,{"html.":e})}else if(!e)return;var a,s=b(e),v=!1;if(s){var y=parseInt(s);a=y+""===s?y:s,"number"==typeof l[s]&&(v=!0)}else s=(a=n+r.removeNum)+"";if(f(e.props.className,"rewgt-static")){if(v)return void(l[a]=n);if(z)u[n]=void 0,console.log("warning: can not add rewgt-static to panel ("+o.getPath()+") directly.");else{var _=Object.assign({},e.props);_.key=s,!Ue.__design__||i.props.$for||i.props.$$for||(_.onMouseDown=K,_.onDoubleClick=J.bind(i)),l[a]=n,u[n]=q?ht("span",_):ht("div",_)}}else{var m=e.props["childInline."];if(void 0===m)return l[a]=n,void(v||(u[n]=ft(e,{key:s})));if(q){if(!m)return console.log("error: can not add panel or div ("+s+") to paragraph ("+o.getPath()+")."),void(u[n]=void 0)}else if(!f(e.props.className,["rewgt-panel","rewgt-unit"]))return u[n]=void 0,void console.log("error: only panel, div, paragraph ("+a+") can add to panel or div ("+o.getPath()+").");var w=!1;e.props["isReference."]&&(w=!0,v||("$"!=s[0]&&(s=a="$"+s),it&&st.push([i,a])));var k=e.props.width,O=e.props.height,x="number"!=typeof k,$="number"!=typeof O;if(F)x?c=!0:k<0&&!w&&(h=!0,d+=-k);else if(B)$?c=!0:O<0&&!w&&(h=!0,d+=-O);else{var P="";!x&&k<0?P="width":!$&&O<0&&(P="height"),P&&console.log("error: can not use negative "+P+" under widget ("+o.getPath()+")")}if(v&&e.props["hookTo."]!==o&&(v=!1),v)l[a]=n;else{var S={"hookTo.":o,key:s,"keyid.":a};if(q){var j=f(e.props.className,"rewgt-unit");if(!x&&k>=0){var D=k>=1?k+"px":k>=.9999?"100%":100*k+"%";S.style=Object.assign({},e.props.style,{width:D}),j&&(S.width=k)}else j&&(S.width=null);if(!$&&O>=0){var I=O>=1?O+"px":O>=.9999?"100%":100*O+"%";S.style=Object.assign({},e.props.style,{height:I}),j&&(S.height=O)}else j&&(S.height=null)}else S.width=x?null:k,S.height=$?null:O,t&&e.props["isScenePage."]&&e.props.noShow&&!Ue.__design__&&(S["isTemplate."]=!0);if(p){var N=Object.assign({},e.props.style),A=(parseInt(N.zIndex)||0)+"";"0"!==A&&(N.zIndex=A),S.style=N}else Ue.__debug__&&!t&&r.isPanel&&"absolute"==(S.style||{}).display&&console.log("warning: can not use 'display:absolute' under a panel");l[a]=n,u[n]=ft(e,S)}}}),g&&u.splice(0),s||(h&&!c?((d>0||r.useSparedX!=F||r.useSparedY!=B)&&(r.respared=!0),r.sparedTotal=d,r.useSparedX=F,r.useSparedY=B):(r.sparedTotal=0,r.useSparedX=!1,r.useSparedY=!1)),t&&0==n&&(l.$pop=u.length+r.removeNum,u.push(ht(Ge(Ve.Panel._extend()),{"hookTo.":o,key:"$pop","keyid.":"$pop",left:0,top:0,width:0,height:0,style:{position:"absolute",zIndex:3016,overflow:"visible"}})))}}),W}},{key:"shouldComponentUpdate",value:function(e,t){var r=Xe.shouldUpdate(this,e,t);if(r&&this.props.children!==e.children&&!this.props["marked."]){var n=this.$gui,i=n.duals.children=e.children;n.comps=gt(i),n.removeNum+=1}return r}},{key:"componentWillReceiveProps",value:function(e){for(var t,r=this.$gui,n=this.duals,i=r.duals,o=Object.keys(n),a=0;t=o[a];a++){var s=e[t];if(void 0===s){var l=r.dualAttrs[t];if(!l)continue;if(void 0===(s=e[l]))continue}s!==i[t]&&(n[t]=i[t]=s)}}},{key:"componentDidMount",value:function(){this.isHooked=!!this.widget,this.props["hasStatic."]&&de(this);var e=this.$gui;if(e.syncExpr){for(var t;t=e.syncExpr.shift();)e.exprAttrs[t[0]]=t[1];delete e.syncExpr}var r=this.props.styles;if(r&&(this.props["data-span.path"]||this.props["data-unit.path"])){var n=this;Object.keys(r).forEach(function(e){var t=r[e];if("object"==(void 0===t?"undefined":Fe(t))&&e){var i=n.componentOf(e);i&&(i.duals.style=t)}})}e.hasIdSetter&&(this.duals.id__=2)}},{key:"componentWillUnmount",value:function(){if(Ue.__debug__){var e=this.props.teardown__;if("function"==typeof e)try{e.apply(this)}catch(e){console.log(e)}}var t=this.$gui;t.hasIdSetter&&(this.duals.id__=0);for(var r,n=Object.keys(t.connectBy),i=[],o=0;r=n[o];o++)(a=t.connectBy[r][0])!==this&&i.indexOf(a)<0&&i.push(a);for(var a,o=0;a=i[o];o++)a.unlisten("*",this);if(t.connectTo={},t.connectBy={},t.compState=0,Array.isArray(this.widget)){var s=this.widget.parent;if(Array.isArray(s)){var l=t.keyid,u=s.component;if(u){var p=u.$gui;if(!p.flowFlag&&!p.forExpr){var c=p.compIdx[l];"number"==typeof c&&(delete p.comps[c],delete p.compIdx[l])}}s.$unhook(this.widget,l)}delete this.widget.component,delete this.widget}t.eventset={},this.isHooked=!1}},{key:"reRender",value:function(e,t){if(this.isHooked)if(this.$gui.inSync){var r=this;setTimeout(function(){var n=x(r.state.id__),i=Object.assign({},t,{id__:n});r.setState(i,e)},0)}else{var n=x(this.state.id__),i=Object.assign({},t,{id__:n});this.setState(i,e)}else this.state.id__>1&&(Ue.__design__||Ue.__debug__)&&console.log("warning: reRender() failed when component unhooked."),e&&e()}},{key:"listen",value:function(e,t,r){function n(e){if(Object.getOwnPropertyDescriptor(o.duals,e))return!0;if(o.props["$"+e])return _t.indexOf(e)>0&&console.log("warning: '"+e+"' is not listenable."),!0;if(i.dataset.indexOf(e)>=0||i.tagAttrs.indexOf(e)>=0||vt.call(i.dualAttrs,e)){var t=z(o,e);return Object.defineProperty(o.duals,e,{enumerable:!0,configurable:!0,get:t[0],set:t[1]}),!0}return!1}var i=this.$gui,o=this;if("function"==typeof t){if(Array.isArray(e))p=e;else{if("string"!=typeof e||!e)return console.log("warning: invalid listen source."),this;p=[e]}for(var a,s=0;a=p[s];s++)if(n(a)){var l=i.connectTo[a];l||(l=i.connectTo[a]=[]),l.push([null,t,!1])}else console.log("warning: listen source ("+a+") inexistent.");return this}if(!t||!t.$gui)return console.log("warning: invalid listen target."),this;var u,p=[];if(Array.isArray(e))e.forEach(function(e){var t=("on-"+e).replace(Et,function(e,t){return t.toUpperCase()});p.push([e,t])});else if("string"==(u=void 0===e?"undefined":Fe(e)))r&&"string"==typeof r?p.push([e,r,r]):(r=("on-"+e).replace(Et,function(e,t){return t.toUpperCase()}),p.push([e,r]));else{if(!action||"object"!=u)return this;Object.keys(e).forEach(function(t){p.push([t,e[t]])})}return p.forEach(function(e){var r=e[0],a=e[1],s=!1;if(r&&n(r)){if("function"!=typeof t[a]){var l=e[2];if(!l||!vt.call(t.duals,l))return void console.log("warning: invalid listen target ("+a+").");if(l===r&&t===o)return void console.log("warning: can not connect dual ("+r+") to self.");s=!0,a=l}var u=t.$gui.connectBy,p=-1,c=u[a];c?(p=c.findIndex(function(e){return e[0]===o&&e[1]===r}))>=0&&(c[p][2]=s):c=u[a]=[],p<0&&c.push([o,r,s]),p=-1,(c=i.connectTo[r])?(p=c.findIndex(function(e){return e[0]===t&&e[1]===a}))>=0&&(c[p][2]=s):c=i.connectTo[r]=[],p<0&&c.push([t,a,s])}else console.log("warning: listen source ("+r+") inexistent.")}),this}},{key:"unlisten",value:function(e,t,r){if("function"==typeof t){if("string"!=typeof e||!e)return console.log("warning: invalid unlisten source."),this;if(u=(a=this.$gui).connectTo[e]){var n=u.findIndex(function(e){return null===e[0]&&e[1]===t});n>=0&&(u.splice(n,1),0==u.length&&delete a.connectTo[e])}return this}if(!t||!t.$gui)return console.log("warning: invalid unlisten target."),this;var i,o=[],a=this.$gui;if(Array.isArray(e))e.forEach(function(e){var t=("on-"+e).replace(Et,function(e,t){return t.toUpperCase()});o.push([e,t])});else if("string"==(i=void 0===e?"undefined":Fe(e))){if("*"==e){var s=a.connectTo;return Object.keys(s).forEach(function(e){var r,n=s[e];if(n&&(r=n.length)>0){for(;--r>=0;)n[r][0]===t&&n.splice(r,1);0==n.length&&delete s[e]}}),this}if(r&&"string"==typeof r){if("*"==r){var l,u=(s=a.connectTo)[e];if(u&&(l=u.length)>0){for(;--l>=0;)u[l][0]===t&&u.splice(l,1);0==u.length&&delete s[e]}return this}}else r=("on-"+e).replace(Et,function(e,t){return t.toUpperCase()});o.push([e,r])}else{if(!action||"object"!=i)return this;Object.keys(e).forEach(function(t){o.push([t,e[t]])})}return o.forEach(function(e){var r=e[0],n=e[1],i=a.connectTo[r];if(i){var o=i.findIndex(function(e){return e[0]===t&&e[1]===n});o>=0&&(i.splice(o,1),0==i.length&&delete a.connectTo[r])}}),this}},{key:"getHtmlNode",value:function(e){if(this.state["tagName."]||e)return ct(e||this);var t=this.widget;if(t){for(var r=Object.keys(t),n=r.length,i=null,o=0;o=l)return null;s+=1,n=a,a=(o=o.parent)&&o.component}else for(;t&&a&&a.state.role!==t;)a=(o=o.parent)&&o.component;return a||null}},{key:"childOf",value:function(e,t){var r,n=this,i=n.widget;if(t)for(;i;){var o=n.$gui.comps,a=o.length;for(r=0;r=a)return null}else if(e){var u=i[e];return u&&u.component||null}return null}},{key:"componentOf",value:function(e){var t=void 0===e?"undefined":Fe(e);if("number"==t){var r=[],n=T(this,e,r,0);return n&&r[1]?n:(console.log("warning: locate callspace ("+e+") failed."),null)}if("string"!=t)return null;var i=e[0];if("."!=i&&"/"!=i){var o=this.widget,a=o&&o.W(e);return a&&a.component||null}return oe(this,e)}},{key:"elementOf",value:function(e){var t,r=null,n="",i=void 0===e?"undefined":Fe(e);if("number"==i)r=(r=this.componentOf(e))&&r.widget;else if(e){if("string"!=i)return null;if("."!=(t=e[0])&&"/"!=t)r=this.widget,n=e;else{var o=e.lastIndexOf("./");if(o>=0){if(!(f=this.componentOf(e.slice(0,o+2))))return null;r=f.widget,n=e.slice(o+2)}else{if("."!=t)return"/"==t&&"/"==e[1]&&(h=this.parentOf())?h.elementOf(e.slice(2)):null;if(r=Ue,!(n=e.slice(1)))return null}}}else r=this.widget;if(!r)return null;if(!n){if(f=r.component){var a=r.parent;if((h=a&&a.component)&&"number"==typeof(d=h.$gui.compIdx[f.$gui.keyid]))return h.$gui.comps[d]}return null}if(n.indexOf("/")>=0)return null;for(var s,l=n.split("."),u=l.length-1,p=0;s=l[p];p++){var c=r[s];if(!Array.isArray(c)||!c.W){var f=r.component;return f&&f.props["isTemplate."]?f.elementOf(l.slice(p).join(".")):null}if(!(p=0;o--){var a=n.comps[o];if(a){var s=b(a);return a=s&&e[s],a?a.component:void 0}}}}},{key:"nextSibling",value:function(){var e=this.widget,t=this.$gui.keyid,r=(e=e&&e.parent)&&e.component;if(r&&(t||0===t)){var n=r.$gui,i=n.compIdx[t];if("number"==typeof i)for(var o=n.comps.length,a=i+1;an)&&(Xe.instantShow("warning: invalid keyid ("+t+")"),t=n),[i&&t==n,t]}var r=void 0,n=!1,i=arguments.length;i>0&&("function"!=typeof(r=arguments[i-1])?r=void 0:i-=1);var o=this.widget,a=o===nt,s=this.$gui;if(!o)return Xe.instantShow("warning: invalid target widget in setChild()."),e();if(!this.isHooked)return Xe.instantShow("warning: can not add child to unhooked widget."),e();if(this.props["isTemplate."])if(at){for(var l=s.template,u=0;u=0;v--){var y,_=g[v],m=_&&b(_);m?(d.unshift(m),f(_.props.className,"rewgt-static")?g[v]=ft(_,{key:m}):(y=(S=parseInt(m))+""===m?S:m)!==_.props["keyid."]&&(g[v]=ft(_,{"keyid.":y,key:m}))):(g.splice(v,1),h+=1,n=!0)}for(var w=void 0,k="",O=0;O=0&&(d.splice(R,1),g.splice(R,1),h+=1,n=!0),k="",w=void 0):"+"==k&&(R=d.indexOf($))<0&&(k="")}else if($&&dt($)){if(f($.props.className,"rewgt-static")){console.log("warning: setChild() not support rewgt-static."),k="",w=void 0;continue}var j=!0,D=$.props["childInline."];void 0===D||(1==p||2==p?f($.props.className,["rewgt-panel","rewgt-unit"])||(j=!1):D||(j=!1));var I=void 0,N=!0;"+"==k&&void 0!==w?I=w:N=!1;var A,T=!1;if("+"!=k&&void 0!==w)A=w;else{var E=t($);T=E[0],A=E[1]}if(j){$.props["isReference."]&&("string"==typeof A?"$"!=A[0]&&(A="$"+A):A="$"+A,it&&st.push([this,A]));var C=T||N?-1:d.indexOf(A+"");if(C>=0)g[C]=[A,$];else{var R=N?d.indexOf(I+""):-1;if(R>=0?(g.splice(R,0,[A,$]),d.splice(R,0,A+"")):(g.push([A,$]),d.push(A+"")),N&&!T){var H=d.indexOf(A+"");H>=0&&H==R&&R>=0&&(H=d.indexOf(A+"",R+1)),H>=0&&(g.splice(H,1),d.splice(H,1),h+=1)}}n=!0}else Xe.instantShow("error: display type of child widget ("+A+") mismatch to owner ("+o.getPath()+").");k="",w=void 0}else if(Array.isArray($))for(var W=$.length,M="",L=void 0,z=0;z=0&&(d.splice(Z,1),g.splice(Z,1),h+=1,n=!0),M="",L=void 0):"+"==M&&(Z=d.indexOf(F))<0&&(M="")}else if(F&&dt(F)){if(f(F.props.className,"rewgt-static")){console.log("warning: setChild() not support rewgt-static."),M="",L=void 0;continue}var G=!0,U=F.props["childInline."];void 0===U||(1==p||2==p?f(F.props.className,["rewgt-panel","rewgt-unit"])||(G=!1):U||(G=!1));var V=!0;"+"==M&&void 0!==L?L:"+"==k&&void 0!==w?insBefor2=w:V=!1;var X,Y=!1;if("+"!=M&&void 0!==L)X=L;else{var K=t(F);Y=K[0],X=K[1]}if(G){F.props["isReference."]&&("string"==typeof X?"$"!=X[0]&&(X="$"+X):X="$"+X,it&&st.push([this,X]));var J=Y||V?-1:d.indexOf(X+"");if(J>=0)g[J]=[X,F];else{var Z=V?d.indexOf(insBefor2+""):-1;if(Z>=0?(g.splice(Z,0,[X,F]),d.splice(Z,0,X+"")):(g.push([X,F]),d.push(X+"")),V&&!Y){var Q=d.indexOf(X+"");Q>=0&&Q==Z&&Z>=0&&(Q=d.indexOf(X+"",Z+1)),Q>=0&&(g.splice(Q,1),d.splice(Q,1),h+=1)}}n=!0}else Xe.instantShow("error: display type of child widget ("+X+") mismatch to owner ("+o.getPath()+").");M="",L=void 0}}}if(n){var ee=!1;!a&&s.isPanel&&(f(this.props.className+" "+this.props.klass,["col-reverse","reverse-col"])?ee=!0:!0);var te=null,re=0,ne=0;s.isPanel&&Array.isArray(this.props.sizes)&&(te=this.state.sizes,Array.isArray(te)&&(ee?ne=te.length:re=te.length));for(var ie=g.length,oe=[],ae={},v=0;v=1||0==n?n:n<=-1?r?0:n:"number"!=typeof e?null:n>=.9999?e:n>=0?n*e:r?0:n>-.9999?n*e:-e}function t(e,t,r){return null===e?"":e>=1?e+"px":0==e||r&&e<0?"0":e<=-1?e+"px":t?"0":e>=.9999?"100%":e<=-.9999?"-100%":100*e+"%"}function r(e,t,r,n){return null===t||t>=1?t:0==t||n&&t<0?0:t<=-1?t:"number"!=typeof e?null:r?0:t>=.9999?e:t<=-.9999?-e:t*e}var n=this.state.parentWidth,i=this.state.parentHeight,o="number"!=typeof n,a="number"!=typeof i,s=this.state.padding,l=this.state.borderWidth,u=this.state.margin,p=null,c=null;"number"==typeof this.state.left&&(p=e(n,this.state.left,!1)),"number"==typeof this.state.top&&(c=e(i,this.state.top,!1));var f=[0,0,0,0],h=[0,0,0,0],d=[0,0,0,0],g={};o?(s.forEach(function(e,r){g["padding"+Ct[r]]=t(e,!1,!0)}),l.forEach(function(e,r){g["border"+Ct[r]+"Width"]=t(e,!0,!0)}),u.forEach(function(e,r){g["margin"+Ct[r]]=t(e,!1,!1)})):(s.forEach(function(e,t){var i=r(n,e,!1,!0);g["padding"+Ct[t]]=null===i?"":i+"px",f[t]=i||0}),l.forEach(function(e,t){var i=r(n,e,!0,!0);g["border"+Ct[t]+"Width"]=null===i?"":i+"px",h[t]=i||0}),u.forEach(function(e,t){var i=r(n,e,!1,!1);g["margin"+Ct[t]]=null===i?"":i+"px",d[t]=i||0}));var v=this.widget,y=this.$gui,_=null,m=this.state.minWidth,b=this.state.maxWidth,w=this.state.minHeight,k=this.state.maxHeight,O=this.state.width,x=this.state.height,$=null,P="number"!=typeof O||!(O>=1||0==O)&&o,S=null,j="number"!=typeof x||!(x>=1||0==O)&&a,D=!1,I=!1;if(!P){var N=null;O<0?(_=this.parentOf(!0))?"number"==typeof(T=_.$gui.sparedX)&&(N=T*(0-O)):_=void 0:N=e(n,O,!0),"number"!=typeof N?P=!0:(m&&Nb&&(N=b),($=N-f[3]-f[1]-h[3]-h[1])<0?$=null:y.cssWidth!==$&&(D=!0))}if(!j){var A=null;if(x<0)if(null===_&&(_=this.parentOf(!0)),_){var T=_.$gui.sparedY;"number"==typeof T&&(A=T*(0-x))}else _=void 0;else A=e(i,x,!0);"number"!=typeof A?j=!0:(w&&Ak&&(A=k),(S=A-f[0]-f[2]-h[0]-h[2])<0?S=null:y.cssHeight!==S&&(I=!0))}m&&(m=Math.max(0,m-f[3]-f[1]-h[3]-h[1])),b&&(b=Math.max(0,b-f[3]-f[1]-h[3]-h[1])),w&&(w=Math.max(0,w-f[0]-f[2]-h[0]-h[2])),k&&(k=Math.max(0,k-f[0]-f[2]-h[0]-h[2])),y.cssWidth=$,y.cssHeight=S;var E=y.respared;if(y.respared=!1,v&&(y.isPanel||v===nt)&&(D||I||E||Xe.dragInfo.justResized)&&(y.useSparedX?(D||E)&&(y.sparedX=fe(this,v,!0,$),E=!0):y.useSparedY&&(I||E)&&(y.sparedY=fe(this,v,!1,S),E=!0),this.isHooked||E)){var C=this;setTimeout(function(){C.isHooked&&Q(C,Xe.dragInfo.inDragging)},0)}var R=Object.assign({},this.state.style,g);"number"!=typeof p?delete R.left:R.left=p+"px","number"!=typeof c?delete R.top:R.top=c+"px",P?delete R.width:R.width=$+f[3]+f[1]+h[3]+h[1]+"px",j?delete R.height:R.height=S+f[0]+f[2]+h[0]+h[2]+"px",m?R.minWidth=m+"px":delete R.minWidth,b?R.maxWidth=b+"px":delete R.maxWidth,w?R.minHeight=w+"px":delete R.minHeight,k?R.maxHeight=k+"px":delete R.maxHeight,this.state.style=R;var H=[];return y.comps.forEach(function(e){e&&H.push(e)}),H}},{key:"render",value:function(){if(F(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var t=this.prepareState(),r=k(this),n=this.$gui.insertEle;return n&&(t=me(n,t)),ht(e,r,t)}}]),e}();Ve.Widget_=Rt;var Ht=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"BodyPanel",r))}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.className="rewgt-unit",e["keyid."]="body",e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return this.defineDual("innerSize",function(e,t){throw new Error("duals.innerSize is readonly")},[e.parentWidth,e.parentHeight]),this.defineDual("nodes",we,[]),e}},{key:"renewPages",value:function(){if(!Ue.__design__&&this.isHooked&&Xe.pageCtrl){var e=this.$gui.comps,t=this.widget,r=[];e.forEach(function(e){if(e&&e.props["isScenePage."]&&!e.props.noShow){var n=b(e),i=n&&t[n];(i=i&&i.component)&&r.push([n,i])}});var n=!1,i=Xe.pageCtrl.keys;if(i.length!=r.length)n=!0;else for(var o,a=0;o=i[a];a++)if(o!==r[a][0]){n=!0;break}n&&setTimeout(function(){Xe.pageCtrl.renewPages(r)},0)}}},{key:"componentDidMount",value:function(){Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this);var e=this.$gui;e.onWinResize&&window.addEventListener("resize",e.onWinResize,!1);var r=ct(this);r&&u(r)}},{key:"componentWillUnmount",value:function(){var e=this.$gui;e.onWinResize&&(window.removeEventListener("resize",e.onWinResize,!1),e.onWinResize=null),Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this).call(this)}},{key:"render",value:function(){return this.widget!==nt&&console.log("warning: BodyPanel only can be topmost widget."),Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this)}}]),t}(Rt);Ve.BodyPanel_=Ht,Ve.BodyPanel=new Ht;var Wt=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Panel",r))}return i(t,e),ze(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200),i="[any]: null for auto, 0~1 for percent, 0.9999 for 100%, N pixels, -0.xx for spared percent",o=n.width,a=n.height;return o&&(o[3]=i),a&&(a[3]=i),n}},{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.className="rewgt-panel",e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return this.defineDual("nodes",we,[]),e}},{key:"isRow",value:function(){return!f(this.props.className+" "+this.state.klass,["col-reverse","reverse-col"])}},{key:"isReverse",value:function(){return f(this.props.className+" "+this.state.klass,["reverse-row","reverse-col"])}},{key:"render",value:function(){return this.state["tagName."]||console.log("warning: Panel can not be virtual widget."),Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this)}}]),t}(Rt);Ve.Panel_=Wt,Ve.Panel=new Wt;var Mt=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Unit",r))}return i(t,e),ze(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200),i="[any]: null for auto, 0~1 for percent, 0.9999 for 100%, N pixels, -0.xx for spared percent",o=n.width,a=n.height;return o&&(o[3]=i),a&&(a[3]=i),n}},{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.className="rewgt-unit",e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return l(this)&&(this.duals.style=Object.assign({},this.props.style,{position:"absolute"})),e}}]),t}(Rt);Ve.Unit_=Mt,Ve.Unit=new Mt;var Lt=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"SplitDiv",r));return i._defaultProp.width=4,i._defaultProp.height=4,i}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.width=4,e.height=4,e}},{key:"_getSchema",value:function(e,r){r=r||1200;var n=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200),i="[number]: 0~1 for percent, 0.9999 for 100%, N pixels";return n.width=[r+1,"number",null,i],n.height=[r+2,"number",null,i],n}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);this.$gui.comps=[];var r=this.parentOf(!0),n=this.widget;if(!r)return Xe.instantShow("error: no owner widget for SplitDiv"),e;if(!f(r.props.className,"rewgt-panel"))return Xe.instantShow("error: owner of widget ("+n.getPath()+") is not rewgt-panel"),e;var i=!0;return f(r.props.className+" "+r.props.klass,["col-reverse","reverse-col"])&&(i=!1),Object.assign(this.$gui,{inRow:i,reversed:!1,inDrag:!1,dragStartX:0,dragStartY:0,resizeOwner:void 0,resizeTarg:void 0,sizingFunc:null}),this.defineDual("id__",function(e,t){if(1==t){var r=this.state;i?(("number"!=typeof r.width||r.width<1)&&(r.width=4),r.width>=1&&(r.minWidth=r.width,r.maxWidth=r.width),this.props.height>=1&&this.props.height<=4&&(r.height=.9999),void 0===this.props.minHeight&&(r.minHeight=10)):(("number"!=typeof r.height||r.height<1)&&(r.height=4),r.height>=1&&(r.minHeight=r.height,r.maxHeight=r.height),this.props.width>=1&&this.props.width<=4&&(r.width=.9999),void 0===this.props.minWidth&&(r.minWidth=10));var n={cursor:i?"ew-resize":"ns-resize"},o=!1;for(var a in r.style)if(0==a.indexOf("background")){o=!0;break}o||(n.backgroundColor="#ddd"),r.style=Object.assign({},r.style,n)}}),e}},{key:"$$onMouseDown",value:function(e){function t(e,t){var r=o.resizeOwner,n=o.resizeTarg;if(r&&n){var i=!1,a=-1,s=-1;if(o.inRow){a=n.state.width;var l=e-o.dragStartX;if(0!=l){var u=n.state.minWidth,p=n.state.maxWidth,c=a<1?a*n.state.parentWidth:a;if(a=o.reversed?c-l:c+l,u&&ap&&(a=p),a<1&&(a=1),a!=c){v=a-c;o.reversed&&(v=-v),v!=l&&(e+=v-l),o.dragStartX=e,o.dragStartY=t,o.sizingFunc?o.sizingFunc(n,a,s,!o.inDrag):(n.state.width=a,ge(r,!o.inDrag,function(){n.reRender()})),i=!0}}}else{s=n.state.height;var f=t-o.dragStartY;if(0!=f){var h=n.state.minHeight,d=n.state.maxHeight,g=s<1?s*n.state.parentHeight:s;if(s=o.reversed?g-f:g+f,h&&sd&&(s=d),s<1&&(s=1),s!=g){var v=s-g;o.reversed&&(v=-v),v!=f&&(t+=v-f),o.dragStartX=e,o.dragStartY=t,o.sizingFunc?o.sizingFunc(n,a,s,!o.inDrag):(n.state.height=s,ge(r,!o.inDrag,function(){n.reRender()})),i=!0}}}i||o.inDrag||!(a>=1||s>=1)||(o.sizingFunc?o.sizingFunc(n,a,s,!0):ge(r,!0,function(){n.reRender()}))}}function r(e){if(!o.inDrag){var r=i.parentOf(!0);if(!r||!r.$gui.isPanel)return;if(Array.isArray(r.props.sizes))return;var n=!1,a=o.inRow;if(a?Math.abs(e.clientX-o.dragStartX)>=4&&(n=!0):Math.abs(e.clientY-o.dragStartY)>=4&&(n=!0),n){for(var s=i.prevSibling();s;){var l=a?s.state.width:s.state.height,u=a?s.state.minWidth:s.state.minHeight,p=a?s.state.maxWidth:s.state.maxHeight;if("number"==typeof l&&l>0&&(0==u||0==p||u!=p)){o.reversed=f(r.props.className+" "+r.state.klass,["reverse-row","reverse-col"]),o.resizeOwner=r,o.resizeTarg=s,o.inDrag=!0,Xe.dragInfo.inDragging=!0;break}s=s.prevSibling()}var c;if(!o.inDrag&&!i.nextSibling()&&(c=r.parentOf(!0))&&r.$gui.sparedTotal>.989&&r.$gui.sparedTotal<=1.01){var l=a?r.state.width:r.state.height,u=a?r.state.minWidth:r.state.minHeight,p=a?r.state.maxWidth:r.state.maxHeight;if("number"==typeof l&&l>0&&.9999!=l&&(0==u||0==p||u!=p)&&(o.reversed=f(c.props.className+" "+c.state.klass,["reverse-row","reverse-col"]),o.resizeOwner=c,o.resizeTarg=r,o.inDrag=!0,Xe.dragInfo.inDragging=!0),!o.inDrag&&"number"==typeof l&&l>0&&c.$gui.sparedTotal>.989&&c.$gui.sparedTotal<=1.01){var h=c.parentOf(!0);if(h){var l=a?c.state.width:c.state.height,u=a?c.state.minWidth:c.state.minHeight,p=a?c.state.maxWidth:c.state.maxHeight;"number"==typeof l&&l>0&&.9999!=l&&(0==u||0==p||u!=p)&&(o.reversed=f(h.props.className+" "+h.state.klass,["reverse-row","reverse-col"]),o.resizeOwner=h,o.resizeTarg=c,o.inDrag=!0,Xe.dragInfo.inDragging=!0)}}if(o.inDrag){var d=o.resizeOwner.$gui.onCellSizing;d&&(o.sizingFunc=d)}}}}o.inDrag&&(e.stopPropagation(),t(e.clientX,e.clientY))}function n(e){Xe.dragInfo.inDragging=!1,o.inDrag=!1,setTimeout(function(){lt=!1},300),document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n),e.stopPropagation(),t(e.clientX,e.clientY),o.resizeOwner=null,o.resizeTarg=null,o.sizingFunc=null}var i=this,o=this.$gui;o.dragStartX=e.clientX,o.dragStartY=e.clientY,o.inDrag=!1,lt=!0,document.addEventListener("mouseup",n,!1),document.addEventListener("mousemove",r,!1),e.stopPropagation(),this.$onMouseDown&&this.$onMouseDown(e)}},{key:"$onClick",value:function(e){e.stopPropagation()}}]),t}(Mt);Ve.SplitDiv_=Lt,Ve.SplitDiv=new Lt;var zt=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"GridPanel",r))}return i(t,e),ze(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return n.sizes=[r+1,"any",null,"[any]: [0.2,0.3,-0.4,-0.6], negative value stand for left space"],n.cellSpacing=[r+2,"number",null,"[number]: 0,1,2,..."],n}},{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.sizes=[.3,.3,-1],e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);if(!Array.isArray(this.props.sizes))return e;var r=this.$gui;return r.inRow=!f(r.className+" "+this.props.klass,["col-reverse","reverse-col"]),this.defineDual("cellSpacing",function(e,t){r.comps.length&&(r.useSparedX||r.useSparedY)&&(r.respared=!0)}),e.sizes=null,this.defineDual("sizes",function(e,t){if(Array.isArray(e)){e=this.state.sizes=e.slice(0);var n=!1,i=!1,o=0,a=this.widget===nt;!a&&r.isPanel||(e.splice(0),n=!0,a&&console.log("error: only none-topmost panel can use props.sizes"));for(var s=e.length-1;s>=0;s--){var l=e[s];"number"!=typeof l||isNaN(l)?(e[s]=null,n=!0):l<0&&(i=!0,o+=-l)}var u=!1,p=!1;f(this.props.className+" "+this.state.klass,["col-reverse","reverse-col"])?p=!0:u=!0;var c=!U(e,t);if(!n&&i&&(u||p)){r.sparedTotal=o;var h=r.useSparedX,d=r.useSparedY;u?r.useSparedX=!0:r.useSparedY=!0,c||h==r.useSparedX&&d==r.useSparedY||(c=!0)}else r.sparedTotal=0,r.useSparedX=!1,r.useSparedY=!1;c&&(r.comps.length&&(r.removeNum+=1),r.respared=!0,this.reRender())}else this.state.sizes=null,r.sparedTotal=0,r.useSparedX=!1,r.useSparedY=!1,Array.isArray(t)&&(r.comps.length&&(r.removeNum+=1),this.reRender())}),this.defineDual("childNumId",function(e,t){var n=this.state.sizes;if(Array.isArray(n)){var i=0,o=n.length;r.comps.forEach(function(e,t){if(e)if(f(e.props.className,"rewgt-static"))i++;else if(e.props["isReference."])i++;else if(void 0!==e.props["childInline."]){var a=n[i++%o];r.inRow?e.props.width!==a&&(r.comps[t]=ft(e,{width:a})):e.props.height!==a&&(r.comps[t]=ft(e,{height:a}))}else i++})}}),r.onCellSizing=function(e,t,r,n){var i=e.$gui.keyid,o=this.state.sizes;if(Array.isArray(o)){var a=this.$gui,s=a.compIdx[i],l=null,u=this.widget;if("number"==typeof s&&s>=0&&(l=a.comps[s]),l&&u){var p=o.length;if(a.inRow){if("number"==typeof t&&t>=0){t<1&&("number"!=typeof a.cssWidth?t=null:t*=a.cssWidth),o[v=s%p]=t;g=[];for(var c in a.compIdx)"number"==typeof(_=a.compIdx[c])&&_>=0&&_%p==v&&(m=(m=u[c])&&m.component)&&(m.state.width=t,g.push(m));ge(this,n,function(){for(var e,t=0;e=g[t];t++)e.reRender()})}else if("number"==typeof r&&r>=0){y=(v=Math.floor(s/p))+p;for(var c in a.compIdx)if("number"==typeof(_=a.compIdx[c])&&_>=v&&_=0){var f=m.state.minHeight,h=m.state.maxHeight,d=r;"number"==typeof r&&r<1&&(d="number"!=typeof a.cssHeight?null:r*a.cssHeight),f&&("number"!=typeof d||dh)&&(d=h),b!==d&&m.setState({height:d})}}}else if("number"==typeof r&&r>=0){r<1&&("number"!=typeof a.cssHeight?r=null:r*=a.cssHeight),o[v=s%p]=r;var g=[];for(var c in a.compIdx)"number"==typeof(_=a.compIdx[c])&&_>=0&&_%p==v&&(m=(m=u[c])&&m.component)&&(m.state.height=r,g.push(m));ge(this,n,function(){for(var e,t=0;e=g[t];t++)e.reRender()})}else if("number"==typeof t&&t>=0){var v=Math.floor(s/p),y=v+p;for(var c in a.compIdx){var _=a.compIdx[c];if("number"==typeof _&&_>=v&&_=0){var f=m.state.minWidth,h=m.state.maxWidth,d=t;"number"==typeof t&&t<1&&(d="number"!=typeof a.cssWidth?null:t*a.cssWidth),f&&("number"!=typeof d||dh)&&(d=h),b!==d&&m.setState({width:d})}}}}}}}}.bind(this),e}},{key:"render",value:function(){if(F(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var t=this.prepareState();Ue.__design__&&t.push(ht("div",{key:"$end",title:"end of GridPanel",style:{width:"100%",height:"10px",backgroundColor:"#eee"}}));var r=k(this),n=this.$gui.insertEle;return n&&(t=me(n,t)),ht(e,r,t)}}]),t}(Wt);Ve.GridPanel_=zt,Ve.GridPanel=new zt;var Ft=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"TableRow",r));return i._silentProp.push("isTableRow."),i._defaultProp.height=null,i}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="tr",e["isTableRow."]=!0,e.height=null,e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);if(Ue.__design__){var r=this;this.defineDual("childNumId",function(e,t){var n=r.parentOf(!0);n&&setTimeout(function(){n.reRender()},0)})}return e}},{key:"render",value:function(){var e=this.$gui,t=e.cssWidth,r=e.cssHeight;if(F(this),this["hide."])return null;var n=this.state["tagName."];if(!n)return ye(this);var i=e.cssWidth=this.state.parentWidth,o="number"!=typeof i||i<0,a=this.state.parentHeight,s=this.state.height,l="number"!=typeof s||s<0;l?a=e.cssHeight=null:s>=1?a=e.cssHeight=s:"number"==typeof a?s>=.9999?(e.cssHeight=a,("number"!=typeof a||a<0)&&(l=!0)):a=e.cssHeight=a*s:(a=e.cssHeight=null,l=!0);var u=t!==i,p=this.widget,c=[];if(this.$gui.comps.forEach(function(e){if(e){var t=b(e);if(t){var r,n,i,o,a,s=p&&p[t];(s=s&&s.component)?(r=s.state.width,n=s.state.height,i=s.state.colSpan,o=s.state.rowSpan,a=s.state.tdStyle):(r=e.props.width,n=e.props.height,i=e.props.colSpan,o=e.props.rowSpan,a=e.props.tdStyle);var f=t,h=parseInt(t);h+""===t&&(f=h);var d={key:t,"keyid.":f};i=parseInt(i),o=parseInt(o),i&&(d.colSpan=i+""),o&&(d.rowSpan=o+"");var g=null,v=null,y=!1;"number"==typeof r&&r>=0&&(g=r,d.style={width:r>=1?r+"px":r>=.9999?"100%":100*r+"%"}),"object"==(void 0===a?"undefined":Fe(a))&&(d.style=Object.assign(d.style||{},a)),"number"==typeof n&&n>=0?n>=1?(v=n,!1):l?y=!0:v=n:!0,(u&&null!==g||y)&&(e=ft(e,{width:g,height:v})),c.push(ht("td",d,e))}}}),this.isHooked&&(!o&&t!==i||!l&&r!==a||Xe.dragInfo.justResized)){var f=this;setTimeout(function(){Q(f,Xe.dragInfo.inDragging)},0)}var h=Object.assign({},this.state.style);!l&&a>=0?h.height=a+"px":delete h.height;var d=k(this,h),g=e.insertEle;return g&&(c=me(g,c)),ht(n,d,c)}}]),t}(Mt);Ve.TableRow_=Ft,Ve.TableRow=new Ft;var Bt=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"TablePanel",r));return i._defaultProp.height=null,i}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="table",e.className="rewgt-unit rewgt-table",e.height=null,e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this),r=this;return this.defineDual("childNumId",function(e,t){r.$gui.respared=!0}),e}},{key:"render",value:function(){var e=this.$gui,t=e.cssWidth,r=e.cssHeight;if(F(this),this["hide."])return null;var n=this.state["tagName."];if(!n)return ye(this);var i=this.prepareState();if(this.isHooked&&("number"==typeof e.cssWidth&&t!==e.cssWidth||"number"==typeof e.cssHeight&&r!==e.cssHeight||Xe.dragInfo.justResized)){var o=this;setTimeout(function(){Q(o,Xe.dragInfo.inDragging)},0)}var a=this.widget;if(Ue.__design__&&a){var s=2,l=[];i.forEach(function(e){if(e){var t=0,r=0,n=!1;ne(e,a).forEach(function(e){for(var i=l[t]||0;i>=2;)l[t++]=i-1,r+=1,i=l[t]||0;var o=parseInt(e.props.rowSpan||0),a=parseInt(e.props.colSpan||0);if(a>=2)for(;a>=2;){a-=1;var s=Math.max(0,(l[t]||0)-1);l[t++]=Math.max(s,o),r+=1}var u=e.props.width;("number"!=typeof u||u<0)&&(n=!0),l[t++]=o,r+=1}),l.splice(t),n||(r+=1),r>s&&(s=r)}});for(var u={style:{margin:"10px"}},p={style:{margin:"2px"}},c=[],f=0;f1){var w=this.props[A],k=void 0===w?"undefined":Fe(w);if("string"==k){if("$id__"!=A){var O=!1;"$for"==(A=A.slice(1))&&(A="for",O=!0),_t.indexOf(A)>=0?"for"==A?t.forExpr?console.log("warning: reduplicate property ($for)"):(t.forExpr=O?2:1,a.push(A)):u?console.log("error: property ($"+A+") conflict with previous ($"+u+")"):(u=A,"else"!=A&&a.push(A)):"children"==A?vt.call(this.props,"for.index")&&(t.isChildExpr=!0,t.children2=this.props.children):"key"!=A&&a.push(A);continue}k=void 0===(w=Ke[w])?"undefined":Fe(w)}if("function"==k){if("$"==A[1]){console.log("warning: invalid using props."+A);continue}var x=A.slice(1);"id__"==x?v=w:this[A]=p[x]=be(w)?w.bind(this):w}}else{var $=Tt[A];$&&5!=$&&n.push(A)}t.flowFlag=u,t.dataset2=o.slice(0);var P=this.props["keyid."];if(P){var S=void 0===P?"undefined":Fe(P);"string"!=S&&"number"!=S&&(P=void 0)}var j=this.props["hookTo."];"string"==typeof j&&(j=Ue.W(j)),Array.isArray(j)&&j.W&&(void 0!==P?j.$set(P,j.W(this)):P=j.push(j.W(this))-1,t.keyid=P);var D=this.props["data-rewgt-owner"];if(D){var I,N=t.eventset2={};if(j&&(I=j.component))for(var A,y=Object.keys(I.$gui.eventset),_=0;A=y[_];_++)r[A]=_e(this,A,D),N[A]=!0}var T=Object.assign({},d,p);for(var C in T)r[C]=_e(this,C,D);for(var C in g)r[C]=this["$$"+C];Object.defineProperty(this,"$gui",{enumerable:!1,configurable:!1,writable:!1,value:t}),Ue.__design__&&(t.className=h(t.className,"rewgt-inline"));Object.assign({},this.props.style);var R={id__:0,childNumId:0,duals:[],"tagName.":this.props["tagName."],exprAttrs:a.slice(0),klass:"",style:{},"html.":null};if(Ue.__design__){var H=e._getGroupOpt(this);R["data-group.opt"]=H.type+"/"+H.editable}t.compIdx={},t.comps=gt(this.props.children),Object.defineProperty(this.duals,"keyid",{enumerable:!0,configurable:!0,get:function(){return this.$gui.keyid}.bind(this),set:function(e,t){throw new Error("property (keyid) is readonly")}}),this.defineDual("klass",function(e,t){this.state.klass=e||""}),this.defineDual("style",function(e,t){if(this.state["tagName."])this.state.style=Object.assign({},t,e);else{var r=Xe.eachComponent(this)[0];r&&(r.duals.style=e)}}),this.defineDual("html.",function(e,t){this.state["html."]=e||null}),this.defineDual("id__",function(e,r){this.state.id__=e,t.id__=t.id2__=e}),v&&this.defineDual("id__",v),this.defineDual("trigger",ve);var W=this.widget;return j&&W&&s&&(W.$callspace={flowFlag:"ref",forSpace:null},W.$callspace[s]=l,E(W.$callspace.exprSpace={},this)),this.defineDual("childNumId",function(e,r){var n=this,i=this.widget;if(i){0==r&&i.parent===nt&&console.log("warning: can not hook inline widget to topmost directly.");var o=t.compIdx,a=t.comps,s=!1;a.forEach(function(e,r){if("string"==typeof e){if(0==r&&1==a.length&&vt.call(n.duals,"html."))return setTimeout(function(){n.duals["html."]=e},0),void(s=!0);e=a[r]=ht(yr,{"html.":e})}else if(!e)return;var l,u=b(e),p=!1;if(u){var c=parseInt(u);l=c+""===u?c:u,"number"==typeof o[u]&&(p=!0)}else u=(l=r+t.removeNum)+"";if(f(e.props.className,"rewgt-static")){if(p)return void(o[l]=r);var h=Object.assign({},e.props);return h.key=u,!Ue.__design__||n.props.$for||n.props.$$for||(h.onMouseDown=K,h.onDoubleClick=J.bind(n)),o[l]=r,void(a[r]=ht("span",h))}var d=e.props["childInline."];return void 0===d?(o[l]=r,void(p||(a[r]=ft(e,{key:u})))):d?(!p&&e.props["isReference."]&&("$"!=u[0]&&(u=l="$"+u),it&&st.push([n,l])),p&&i!==e.props["hookTo."]&&(p=!1),o[l]=r,void(p||(a[r]=ft(e,{"hookTo.":i,key:u,"keyid.":l})))):(a[r]=void 0,void console.log("warning: widget ("+i.getPath()+"."+u+") can not be panel"))}),s&&a.splice(0)}}),R}},{key:"willResizing",value:function(e,t,r){return!1}},{key:"prepareState",value:function(){console.log("warning: inline widget not support prepareState()")}},{key:"render",value:function(){if(F(this),this["hide."])return ht("span",gr);var e=this.state["tagName."];if(!e)return ye(this);var t=k(this),r=this.$gui.comps,n=r.length,i=this.$gui.insertEle;return i&&(r=me(i,r),n=!0),ht(e,t,n?r:this.state["html."])}}]),t}(Rt);Ve.Span_=vr,Ve.Span=new vr;var yr=Ve.Span._createClass(null),_r=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"VirtualSpan",r))}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="",e}}]),t}(vr);Ve.VirtualSpan_=_r,Ve.VirtualSpan=new _r;var mr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"HiddenSpan",r))}return i(t,e),ze(t,[{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return Ue.__design__||(this.duals.style={display:"none"}),e}}]),t}(vr);Ve.HiddenSpan_=mr,Ve.HiddenSpan=new mr;var br=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Br",r));return i._htmlText=!1,i}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="br",e}}]),t}(vr);Ve.Br_=br,Ve.Br=new br;var wr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"A",r))}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="a",e}},{key:"$$onClick",value:function(e){Ue.__design__&&e.preventDefault(),this.$onClick&&this.$onClick(e)}}]),t}(vr);Ve.A_=wr,Ve.A=new wr,Ve.Q_=ke(vr,"Q"),Ve.Q=new Ve.Q_,Ve.Abbr_=ke(vr,"Abbr"),Ve.Abbr=new Ve.Abbr_;var kr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Audio",r))}return i(t,e),ze(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return n.src=[r+1,"string",null],n.autoPlay=[r+2,"string",["","1"]],n.controls=[r+3,"string",["","1"]],n.loop=[r+4,"string",["","1"]],n.muted=[r+5,"string",["","1"]],n.preload=[r+6,"string",["auto","meta","none"]],n}},{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="audio",e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return Oe(this),e}}]),t}(vr);Ve.Audio_=kr,Ve.Audio=new kr,Ve.Source_=ke(vr,"Source"),Ve.Source=new Ve.Source_,Ve.Track_=ke(vr,"Track"),Ve.Track=new Ve.Track_,Ve.Bdi_=ke(vr,"Bdi"),Ve.Bdi=new Ve.Bdi_,Ve.Bdo_=ke(vr,"Bdo"),Ve.Bdo=new Ve.Bdo_,Ve.Data_=ke(vr,"Data"),Ve.Data=new Ve.Data_,Ve.Mark_=ke(vr,"Mark"),Ve.Mark=new Ve.Mark_,Ve.Wbr_=ke(vr,"Wbr"),Ve.Wbr=new Ve.Wbr_,Ve.Button_=ke(vr,"Button"),Ve.Button=new Ve.Button_;var Or=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Textarea",r))}return i(t,e),ze(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return n.disabled=[r+1,"string",["","1"]],n.readonly=[r+2,"string",["","1"]],n.placeholder=[r+3,"string"],n}},{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="textarea",e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this),r=void 0!==this.props.value?this.props.value||"":this.props.defaultValue||"";return this.defineDual("value",null,r),e}},{key:"$$onChange",value:function(e){this.duals.value=e.target.value,this.$onChange&&this.$onChange(e)}}]),t}(vr);Ve.Textarea_=Or,Ve.Textarea=new Or;var xr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Progress",r))}return i(t,e),ze(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return n.value=[r+1,"string"],n.max=[r+2,"string"],n}},{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="progress",e}}]),t}(vr);Ve.Progress_=xr,Ve.Progress=new xr;var $r=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Img",r));return i._htmlText=!1,i}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="img",e}},{key:"$$onDragStart",value:function(e){Ue.__design__?e.preventDefault():this.$onDragStart&&this.$onDragStart(e)}}]),t}(vr);Ve.Img_=$r,Ve.Img=new $r;var Pr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Video",r))}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="video",e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return Oe(this),e}}]),t}(vr);Ve.Video_=Pr,Ve.Video=new Pr,Ve.Canvas_=ke(vr,"Canvas"),Ve.Canvas=new Ve.Canvas_,Ve.Picture_=ke(vr,"Picture"),Ve.Picture=new Ve.Picture_,Ve.Map_=ke(vr,"Map"),Ve.Map=new Ve.Map_,Ve.Area_=ke(vr,"Area"),Ve.Area=new Ve.Area_,Ve.Time_=ke(vr,"Time"),Ve.Time=new Ve.Time_,Ve.Output_=ke(vr,"Output"),Ve.Output=new Ve.Output_;var Sr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Input",r));return i._htmlText=!1,i}return i(t,e),ze(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return Object.assign(n,{type:[r+1,"string",["text","button","checkbox","file","hidden","image","password","radio","reset","submit","color","date","datetime","datetime-local","email","month","number","range","search","tel","time","url","week"]],checked:[r+2,"string",["","1"]],disabled:[r+3,"string",["","1"]],readonly:[r+4,"string",["","1"]],value:[r+5,"string"],placeholder:[r+6,"string"],min:[r+7,"string"],max:[r+8,"string"],step:[r+9,"string"],pattern:[r+10,"string"],src:[r+11,"string"],defaultValue:[r+12,"string"],defaultChecked:[r+13,"string"],required:[r+14,"string",["","required"]]}),n}},{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="input",e.type="text",e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this),r=this.props.type;if("checkbox"===r||"radio"===r){var n=s(void 0!==this.props.checked?this.props.checked:this.props.defaultChecked);this.defineDual("checked",null,n)}else if("select"==r&&this.props.multiple){i=this.props.value||this.props.defaultValue;Array.isArray(i)||(i=[]),this.defineDual("value",null,i)}else{var i=void 0!==this.props.value?this.props.value||"":this.props.defaultValue||"";this.defineDual("value",null,i)}return e}},{key:"$$onChange",value:function(e){var t=this.props.type,r=e.target;if("checkbox"===t||"radio"===t)this.duals.checked=r.checked;else if("select"==t&&this.props.multiple){for(var n=[],i=r.options,o=i&&i.length||0,a=0;a=0;o--){var p=r.navOrder[o];p[1]?e(p[0])<0&&i.splice(u,0,p):(s=e(p[0]))<0?r.navOrder.splice(o,1):u=s}r.navOrder=i},this.defineDual("childNumId",function(e,t){r.updateNavItems()}),e}},{key:"listOptComp",value:function(e){function t(n){var i=n.component;if(i)if(i.props["isOption."])if(e){if(e===i.$gui.keyid)return r.push(i),!0}else r.push(i);else{if(i.props["isNavigator."])return!1;for(var o=i.$gui.comps,a=o.length,s=0;s=0;)(s=t[i]).props["isPlayground."]&&(n&&n==b(s)?o=!0:t.splice(i,1)),i-=1;if(!o&&n){var a=this.$gui,s=a.navItems[n];if(s){var l=a.navOrder.findIndex(function(e){return e[0]===n});if(l<0)t.push(s);else{for(var u,p,c=a.navOrder.slice(l+1),f=0,h=!1;(u=c.findIndex(function(e,t){return t>=f&&!e[1]}))>=0;){if((p=function(e,t){for(var r,n=0;r=e[n];n++)if(t==b(r))return n;return-1}(t,c[u][0]))>=0){h=!0;break}f=u}h?t.splice(p,0,s):t.push(s)}}}}var d=k(this),g=this.$gui.insertEle;return g&&(t=me(g,t)),ht(e,d,t)}}]),t}(Wt);Ve.NavPanel_=Ar,Ve.NavPanel=new Ar;var Tr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"NavDiv",r));return i._defaultProp.height=null,i._defaultProp.minHeight=20,i}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.className="rewgt-unit",e["isNavigator."]=2,e.height=null,e.minHeight=20,e}}]),t}(Ar);Ve.NavDiv_=Tr,Ve.NavDiv=new Tr;var Er=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"GroundPanel",r));return i._silentProp.push("isPlayground."),i._defaultProp.height=null,i._defaultProp.minHeight=20,i}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["isPlayground."]=1,e.width=.9999,e.height=null,e.minHeight=20,e}},{key:"render",value:function(){return Ue.__design__?$e(this,1):Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this)}}]),t}(Wt);Ve.GroundPanel_=Er,Ve.GroundPanel=new Er;var Cr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"GroundDiv",r));return i._silentProp.push("isPlayground."),i._defaultProp.height=null,i._defaultProp.minHeight=20,i._htmlText=!0,i}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.width=.9999,e.height=null,e.minHeight=20,e["isPlayground."]=2,e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return e["html."]=null,this.defineDual("html.",function(e,t){this.state["html."]=e||null}),e}},{key:"render",value:function(){if(Ue.__design__)return $e(this,2);if(F(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var t=this.prepareState(),r=t.length,n=k(this),i=this.$gui.insertEle;return i&&(t=me(i,t),r=!0),ht(e,n,r?t:this.state["html."])}}]),t}(Mt);Ve.GroundDiv_=Cr,Ve.GroundDiv=new Cr;var Rr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptSpan",r));return i._statedProp.push("data-checked"),i._silentProp.push("isOption."),i._defaultProp["data-checked"]="",i}return i(t,e),ze(t,[{key:"_getSchema",value:function(e,r){return r=r||1200,Ne(Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200),r)}},{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["data-checked"]="",e["isOption."]=!0,e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return Ie(this,e),e}},{key:"findNavOwner",value:function(){return Pe(this)}},{key:"fireTrigger",value:function(){O(void 0,this)}},{key:"clearChecked",value:function(){this.state["data-checked"]&&(this.duals["data-checked"]="")}},{key:"setChecked",value:function(e,t,r){De(this,e,t,r)}},{key:"$$onClick",value:function(e){Ue.__design__&&e.stopPropagation(),this.state.disabled||(this.setChecked(null),this.$onClick&&this.$onClick(e))}}]),t}(vr);Ve.OptSpan_=Rr,Ve.OptSpan=new Rr;var Hr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptA",r))}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="a",e}},{key:"$$onClick",value:function(e){Ue.__design__&&e.preventDefault(),Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"$$onClick",this).call(this,e)}}]),t}(Rr);Ve.OptA_=Hr,Ve.OptA=new Hr;var Wr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptImg",r));return i._htmlText=!1,i}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="img",e}}]),t}(Rr);Ve.OptImg_=Wr,Ve.OptImg=new Wr;var Mr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptButton",r))}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="button",e}}]),t}(Rr);Ve.OptButton_=Mr,Ve.OptButton=new Mr;var Lr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptOption",r));return i._silentProp.push("selected"),i}return i(t,e),ze(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return n.value=[r+1,"string"],n.label=[r+2,"string"],n}},{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="option",e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this),r=(this.$gui,this.parentOf(!0));return r&&("optgroup"==r.props["tagName."]&&(r=r.parentOf(!0)),r&&"select"==r.props["tagName."]?r.props.multiple?(console.log('error: can not use OptOption in multiple "select"'),r=null):r.listen("value",function(e,t){this.isHooked&&this.$gui.syncSelect()}.bind(this)):r=null),this.$gui.syncSelect=function(){if(r&&!this.state.disabled){var e=this.state.value;e&&(this.duals["data-checked"]=s(e===r.state.value))}}.bind(this),this.defineDual("data-checked",function(e,t){var n=s(e);vt.call(this.props,"selected")&&(this.state.selected=n);var i=this;setTimeout(function(){var e=i.getHtmlNode();if(e&&(e.selected=!!n,n&&r)){var t=i.state.value;t&&(r.duals.value=t)}},0)}),e}},{key:"componentDidMount",value:function(){Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this),this.$gui.syncSelect()}},{key:"$$onClick",value:function(e){this.$onClick&&this.$onClick(e)}}]),t}(Rr);Ve.OptOption_=Lr,Ve.OptOption=new Lr;var zr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptDiv",r));return i._statedProp.push("data-checked"),i._silentProp.push("isOption."),i._defaultProp["data-checked"]="",i}return i(t,e),ze(t,[{key:"_getSchema",value:function(e,r){return r=r||1200,Ne(Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200),r)}},{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["data-checked"]="",e["isOption."]=!0,e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return Ie(this,e),e}},{key:"findNavOwner",value:function(){return Pe(this)}},{key:"fireTrigger",value:function(){O(void 0,this)}},{key:"clearChecked",value:function(){this.state["data-checked"]&&(this.duals["data-checked"]="")}},{key:"setChecked",value:function(e,t,r){De(this,e,t,r)}},{key:"$$onClick",value:function(e){Ue.__design__&&e.stopPropagation(),this.state.disabled||(this.setChecked(null),this.$onClick&&this.$onClick(e))}}]),t}(qt);Ve.OptDiv_=zr,Ve.OptDiv=new zr;var Fr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptLi",r));return i._statedProp.push("data-checked"),i._silentProp.push("isOption."),i._defaultProp["data-checked"]="",i}return i(t,e),ze(t,[{key:"_getSchema",value:function(e,r){return r=r||1200,Ne(Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200),r)}},{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="li",e["data-checked"]="",e["isOption."]=!0,e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return Ie(this,e),e}},{key:"findNavOwner",value:function(){return Pe(this)}},{key:"fireTrigger",value:function(){O(void 0,this)}},{key:"clearChecked",value:function(){this.state["data-checked"]&&(this.duals["data-checked"]="")}},{key:"setChecked",value:function(e,t,r){De(this,e,t,r)}},{key:"$$onClick",value:function(e){Ue.__design__&&e.stopPropagation(),this.state.disabled||(this.setChecked(null),this.$onClick&&this.$onClick(e))}}]),t}(Kt);Ve.OptLi_=Fr,Ve.OptLi=new Fr;var Br=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptInput",r));return i._htmlText=!1,i}return i(t,e),ze(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return n.type=[r+1,"string",["checkbox","radio","button","image"]],n.value=[r+2,"string"],n.src=[r+3,"string"],n}},{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="input",e.type="checkbox",e.checked="",e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this),r=this.props.type;if("checkbox"===r||"radio"===r)void 0===this.props.checked&&this.$gui.tagAttrs.push("checked");else{var n=void 0!==this.props.value?this.props.value||"":this.props.defaultValue||"";this.defineDual("value",null,n)}return this.defineDual("data-checked",function(e,t){this.state.checked=s(e)}),e}},{key:"clearChecked",value:function(e){e||(e=this.getHtmlNode()),e&&(e.checked&&(e.checked=!1),this.state["data-checked"]&&(this.duals["data-checked"]=""))}},{key:"$$onChange",value:function(e){Ue.__design__&&e.stopPropagation();var t=this.state.type,r=e.target;"checkbox"===t||"radio"===t?r.checked?this.setChecked(null):this.clearChecked(r):this.duals.value=r.value,this.$onChange&&this.$onChange(e)}},{key:"$$onClick",value:function(e){if(Ue.__design__&&e.stopPropagation(),!this.state.disabled){var t=this.state.type;"checkbox"!==t&&"radio"!==t&&this.setChecked(null),this.$onClick&&this.$onClick(e)}}}]),t}(Rr);Ve.OptInput_=Br,Ve.OptInput=new Br;var qr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"TempPanel",r));return i._silentProp.push("isTemplate.","data-temp.type"),i}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["isTemplate."]=1,Ue.__design__?e["data-temp.type"]=1:(e.width=0,e.height=0),e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);Ee(this.$gui),this.isLibGui=!1;var r=this.props.style;if(l(this)&&(this.duals.style=r=Object.assign({},r,{position:"absolute"}),0==(this.$gui.keyid+"").indexOf("$$")&&(this.isLibGui=!0)),Ue.__design__&&!this.isLibGui)this.duals.style=Object.assign({},r,{display:"none"}),Te(this);else{var n=this.props.template;n instanceof ae?this.$gui.template=n:Te(this),this.$gui.compIndex={},this.$gui.comps=[]}return e}},{key:"elementOf",value:function(e){return Ce(this,e)}},{key:"render",value:function(){if(Ue.__design__&&!this.isLibGui)return Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this);if(F(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var r=k(this,Object.assign({},this.state.style,{width:"0px",height:"0px",display:"none"}));return ht(e,r)}}]),t}(Wt);Ve.TempPanel_=qr,Ve.TempPanel=new qr;var Gr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"TempDiv",r));return i._silentProp.push("isTemplate.","data-temp.type"),i._htmlText=!0,i}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["isTemplate."]=2,Ue.__design__?e["data-temp.type"]=2:(e.width=0,e.height=0),e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);Ee(this.$gui),this.isLibGui=!1;var r=this.props.style;if(l(this)&&(this.duals.style=r=Object.assign({},r,{position:"absolute"}),0==(this.$gui.keyid+"").indexOf("$$")&&(this.isLibGui=!0)),Ue.__design__&&!this.isLibGui)this.duals.style=Object.assign({},r,{display:"none"}),Te(this);else{var n=this.props.template;n instanceof ae?this.$gui.template=n:Te(this),this.$gui.compIndex={},this.$gui.comps=[]}return e}},{key:"elementOf",value:function(e){return Ce(this,e)}},{key:"render",value:function(){if(Ue.__design__&&!this.isLibGui)return Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this);if(F(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var r=k(this,Object.assign({},this.state.style,{width:"0px",height:"0px",display:"none"}));return ht(e,r)}}]),t}(Mt);Ve.TempDiv_=Gr,Ve.TempDiv=new Gr;var Ur=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"TempSpan",r));return i._silentProp.push("isTemplate.","data-temp.type"),i}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["isTemplate."]=3,Ue.__design__&&(e["data-temp.type"]=3),e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);if(Ee(this.$gui),this.isLibGui=!1,Ue.__design__)this.duals.style=Object.assign({},this.props.style,{display:"none"}),Te(this);else{var r=this.props.template;r instanceof ae?this.$gui.template=r:Te(this),this.$gui.compIndex={},this.$gui.comps=[]}return e}},{key:"elementOf",value:function(e){return Ce(this,e)}},{key:"render",value:function(){if(Ue.__design__)return Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this);if(F(this),this["hide."])return ht("span",gr);var e=this.state["tagName."];if(!e)return ye(this);var r=k(this,Object.assign({},this.state.style,{width:"0px",height:"0px",display:"none"}));return ht(e,r)}}]),t}(vr);Ve.TempSpan_=Ur,Ve.TempSpan=new Ur;var Vr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"RefDiv",r));return i._silentProp.push("isReference."),i._htmlText=!0,i}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.width=0,e.height=0,e["isReference."]=1,e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return l(this)&&Xe.instantShow("warning: can not add RefDiv to topmost widget."),e}},{key:"componentDidMount",value:function(){Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this);var e;if(!it&&(e=this.widget)){var r=(e=e.parent)&&e.component;r&&se(r,this.$gui.keyid+"",function(){})}}},{key:"render",value:function(){var e=c(this),t={style:{width:"0px",height:"0px"}};return e&&(t.className=e),ht("div",t)}}]),t}(Mt);Ve.RefDiv_=Vr,Ve.RefDiv=new Vr;var Xr=Ve.RefDiv._createClass(null),Yr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"RefSpan",r));return i._silentProp.push("isReference."),i}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["isReference."]=2,e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return l(this)&&Xe.instantShow("error: can not hook RefSpan to topmost widget."),e}},{key:"componentDidMount",value:function(){Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this);var e;if(!it&&(e=this.widget)){var r=(e=e.parent)&&e.component;r&&se(r,this.$gui.keyid+"",function(){})}}},{key:"render",value:function(){var e=c(this),t={style:{width:"0px",height:"0px"}};return e&&(t.className=e),ht("span",t)}}]),t}(vr);Ve.RefSpan_=Yr,Ve.RefSpan=new Yr;var Kr=Ve.RefSpan._createClass(null),Jr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"ScenePage",r));return i._silentProp.push("isScenePage.","isTemplate."),i._defaultProp.noShow="",i}return i(t,e),ze(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);n.noShow=[r+1,"string",["","1"],"[string]: disable show content"];var i="[number]: 0~1 for percent, 0.9999 for 100%, N pixels",o=n.width,a=n.height;return o&&(o[1]="number",o[3]=i),a&&(a[1]="number",a[3]=i),n}},{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.noShow="",e["tagName."]="article",e["isScenePage."]=1,e.className="rewgt-panel rewgt-scene",e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);l(this)||Xe.instantShow("error: ScenePage only hook to topmost widget.");var r=Object.assign({},this.props.style,{position:"absolute",display:"none"});r.zIndex||(r.zIndex="0"),this.duals.style=r;var n=this.props.width,i=this.props.height;if("number"==typeof n&&n>0||console.log("warning: invalid width of ScenePage ("+this.$gui.keyid+")"),"number"==typeof i&&i>0||console.log("warning: invalid height of ScenePage ("+this.$gui.keyid+")"),Ue.__design__)this.$gui.currSelected="";else if(this.props["isTemplate."]){Ee(this.$gui),this.isLibGui=!1;var o=this.props.template;o instanceof ae?this.$gui.template=o:Te(this),this.$gui.compIndex={},this.$gui.comps=[]}return e}},{key:"elementOf",value:function(e){return this.props["isTemplate."]?Ce(this,e):Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"elementOf",this).call(this,e)}},{key:"setSelected",value:function(e){function t(e,t){var n=r&&r[e];if(n=n&&n.component){var i=parseInt(n.state.style.zIndex)||0;t?i>=-997&&i<=999&&n.setState({style:Object.assign({},n.state.style,{zIndex:i+2e3})}):i>=1e3&&i<=2999&&n.setState({style:Object.assign({},n.state.style,{zIndex:i-2e3})})}}if(Ue.__design__){var r=this.widget,n=this.$gui;if(n.currSelected){if(e==n.currSelected)return;t(n.currSelected,!1),n.currSelected=""}e&&(t(e,!0),n.currSelected=e)}}},{key:"render",value:function(){if(F(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);if(this.props["isTemplate."]){o=k(this,r=Object.assign({},this.state.style,{width:"0px",height:"0px",display:"none"}));return ht("div",o)}var t=this.prepareState(),r=void 0;this.props.noShow&&!Ue.__design__&&((r=Object.assign({},this.state.style)).display="none");var n=this.$gui.insertEle;n&&(t=me(n,t));var i=ht("div",{className:"rewgt-center"},t),o=k(this,r);return ht(e,o,i)}}]),t}(Wt);Ve.ScenePage_=Jr,Ve.ScenePage=new Jr;Ve.ScenePage._createClass(null);var Zr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"MaskPanel",r))}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.klass="noselect-txt",e}},{key:"getInitialState",value:function(){function e(e,t,r){return e<1&&(e>=.9999?e=t:e>0?e*=t:e=r),e}function r(e,t,r){return"number"!=typeof e?e=(t-r)/2:e<1&&(e*=t),e<0&&(e=0),e}var n=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return this.defineDual("popOption"),this.defineDual("id__",function(t,n){if(1===n){var i,o=null,a=null,s=this.$gui,l=this.props.popOption;l&&((i=l.frame)?(a=this.props.popFrame)&&!a.props&&(a=null):i={},this.props.children&&(o=gt(this.props.children)[0]),s.compIdx={},s.comps=[]);var u=this.widget;if(o&&u&&rt){var p=rt.frameInfo,c=window.innerWidth,f=window.innerHeight;this.state.left=0,this.state.top=0,this.state.width=c-p.leftWd-p.rightWd,this.state.height=f-p.topHi-p.bottomHi,this.state.style=Object.assign({},this.state.style,{position:"absolute",zIndex:"auto",backgroundColor:l.maskColor||"rgba(238,238,238,0.84)"});var h=this.state.width,d=this.state.height;if(a){var g=e(i.width||.9,h,4),v=e(i.height||.9,d,4),y=r(i.left,h,g),_=r(i.top,d,v),m={"hookTo.":u,"keyid.":"",key:"",style:Object.assign({},a.props.style,{position:"absolute",zIndex:"auto"}),left:y,top:_,width:g,height:v};s.compIdx[0]=0,s.comps.push(ft(a,m))}var w=e(l.width||.8,h,6),k=e(l.height||.8,d,6),O=r(l.left,h,w),x=r(l.top,d,k);!a&&O>0&&x>0&&O+w24||(n.isHooked?Me(n,e,function(e,t){e&&(n.props.noShow&&(n.$gui.compIdx={},n.$gui.comps=[]),n.reRender(function(){de(n,!0);var e=null;0==n.state.nodes.length?t&&t.length&&(e=t):e=t||[],e&&setTimeout(function(){n.duals.nodes=e},10)}))}):i.delayTid=setTimeout(function(){r()},100))}if(this.widget&&"string"==typeof e){var o=0;r()}}),r.nodes=[],this.defineDual("nodes"),r}},{key:"willResizing",value:function(e,t,r){if(!r&&this.isHooked){var n=this;setTimeout(function(){Q(n,!1)},0)}return!0}},{key:"render",value:function(){if(F(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var t=this.prepareState(),r=k(this),n=this.$gui.insertEle;return n&&(t=me(n,t)),ht(e,r,t)}}]),t}(qt);Ve.MarkedDiv_=nn,Ve.MarkedDiv=new nn;var on=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"MarkedTable",r));return i._silentProp.push("markedTable."),i}return i(t,e),ze(t,[{key:"getDefaultProps",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["markedTable."]=!0,e["tagName."]="table",e}},{key:"getInitialState",value:function(){var e=Le(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return this.firstScan=!0,this.cellKeys={},this.cellStyles={},e}},{key:"render",value:function(){if(F(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var t=this.prepareState(),r=k(this);if(this.props.noShow)return ht("div",r);0==t.length&&t.push(ht(Jt,{"html.":" "}));var n=["tbody",null],i=null,o=this,a=this.firstScan;this.firstScan=!1,t.forEach(function(e){if(e.props["markedRow."])i&&n.push(ht.apply(null,i)),i=["tr",null];else{i||(i=["tr",null]);var t=e.props["keyid."],r=void 0,s=void 0,l=null;if(void 0!==t&&(t+=""),t&&e.props["marked."])if(a){var u,p;(u=e.props.rowSpan)&&!isNaN(p=parseInt(u))&&(r=p+""),(u=e.props.colSpan)&&!isNaN(p=parseInt(u))&&(s=p+""),o.cellKeys[t]=[r,s],l=o.cellStyles[t]=e.props.tdStyle}else{var c=o.cellKeys[t];Array.isArray(c)&&(r=c[0],s=c[1]),l=o.cellStyles[t]}var f=null;t&&(f={key:t,rowSpan:r,colSpan:s},l&&(f.style=l)),i.push(ht("td",f,e))}}),i&&n.push(ht.apply(null,i));var s=ht.apply(null,n);return ht(e,r,s)}}]),t}(nn);Ve.MarkedTable_=on,Ve.MarkedTable=new on,t.exports=Ve},{"./react_widget":2,react:void 0,"react-dom":void 0}],4:[function(e,t,r){function n(e){if(u===setTimeout)return setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function i(e){if(p===clearTimeout)return clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function o(){d&&f&&(d=!1,f.length?h=f.concat(h):g=-1,h.length&&a())}function a(){if(!d){var e=n(o);d=!0;for(var t=h.length;t;){for(f=h,h=[];++g1)for(var r=1;r1?l-1:0),p=1;p1?t-1:0),n=1;n2?r-2:0),o=2;o=0.14 is required, current is "+n.version)}o=e("./react_widget"),e("./template")}else console.log("fatal error! React or ReactDom not found, cdn version of React library should be loaded first.");var s={react:n,"react-dom":i,"shadow-widget":o},l=arguments[3],u=arguments[4],p=arguments[5];if("function"==typeof l&&u)Object.keys(s).forEach(function(e){p[e]={exports:s[e]}}),u[9998]=[o.$utils.loadingEntry,u[1][1]],setTimeout(function(){o.$main.isStart||(o.$main.isStart=!0,l(u,p,[9998]))},300);else if("undefined"!=typeof __webpack_require__&&__webpack_require__.c){var c={exports:{},id:9998,loaded:!0};__webpack_require__.c[9998]=c,setTimeout(function(){o.$main.isStart||(o.$main.isStart=!0,o.$utils.loadingEntry(function(e){if("number"==typeof e)return __webpack_require__(e);var t=s[e];return t||console.log("can not find module: "+e),t},c,c.exports))},300)}else console.log("fatal error: unknown package tool!")},{"./react_widget":9,"./template":10}],9:[function(e,t,r){(function(r){"use strict";function n(e,t){var r=e[t];if(r)return r;for(var i in e)if("parent"!=i&&e.hasOwnProperty(i)){var o=e[i];if(Array.isArray(o)&&o.W&&(o=n(o,t)))return o}}function i(e){var t=void 0===e?"undefined":s(e);if("number"==t)return this.W?this[e]:d[e];if(!e)return""===e?d:o(i=new Array);if("object"==t){var r=e.constructor===Object,i=new Array;return i.$id=f++,i.component=e,r||(e.widget=i),o(i)}if("string"!=t)return d;var a=void 0,l=e.split("."),u=0;if(l[0]){var p=l.shift();u+=1,a=Array.isArray(this)&&this.W?this:d,a="-"==p[0]?0==(c=p.slice(1)).search(/^[0-9]+$/)?a[Math.max(0,a.length-parseInt(c))]:a===d?n(a,p):a[p]:0==p.search(/^[0-9]+$/)?a[parseInt(p)]:a===d?n(a,p):a[p]}for(;l.length;)if(u+=1,p=l.shift())if("-"==p[0]){var c=p.slice(1);if(0==c.search(/^[0-9]+$/)){if(!a)return a;a=a[Math.max(0,a.length-parseInt(c))]}else{if(!a)return a;a=a[p]}}else if(0==p.search(/^[0-9]+$/)){if(!a)return a;a=a[parseInt(p)]}else{if(!a)return a;a=a[p]}else{if(a||1!=u)return a;a=this.W?this:d}return a}function o(e){function t(e,t){return function(){return t.apply(e,arguments)}}function r(e,t){if(e.$id===t)return e;for(var n in e)if("parent"!=n&&e.hasOwnProperty(n)){var i=e[n];if(Array.isArray(i)&&i.W&&(i=r(i,t)))return i}}for(var n in h)e[n]=h[n];return d&&d.__debug__&&(e.queryById=function(e){return r(this,parseInt(e))},e.addShortcut=function(){var e=[],r=this.component;if(!r)return e;for(var n,i=0;n=arguments[i];i++){var o=r[n];"function"==typeof o?(this[n]=t(r,o),e.push(n)):o&&(this[n]=o)}return e}),e}function a(e){this.component=e}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=window.React||e("react"),u=window.ReactDOM||e("react-dom"),p=window.createReactClass||e("create-react-class");if(Object.assign||(Object.assign=function(){var e=arguments.length;if(e<1)return{};var t=arguments[0];"object"!=(void 0===t?"undefined":s(t))&&(t={});for(var r=1;r>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=arguments[1],i=0;i=0?e[t]:void 0}}var f=0,h={W:i,$set:function(e,t){if(e||0===e)if(Array.isArray(t)&&t.W){r=this[e];this[e]=t,t.parent=this,Array.isArray(r)&&r.W&&delete r.parent}else if(!t){var r=this[e];delete this[e],Array.isArray(r)&&r.W&&delete r.parent}},$unhook:function(e,t){if(Array.isArray(e)&&e.W){var r=void 0===t?"undefined":s(t);if("string"==r||"number"==r)this[t]===e&&delete this[t];else for(var n,i=Object.keys(this),o=0;n=i[o];o+=1)if(e===this[n]){delete this[n];break}delete e.parent,delete e.$callspace}},getPath:function(e){var t=this.parent;if(t&&t.W&&t!==this){if(this.component){var r=this.component.$gui.keyid;if(r||0===r)return t.getPath("."+r+(e||""))}var n="";for(var i in t)if("parent"!=i&&t.hasOwnProperty(i)&&t[i]===this){n="."+i;break}return e&&(n+=e),t.getPath(n)}return e||""}},d=window.W;Array.isArray(d)?o(d):((d=new i).$modules=[],window.W=d),d.__debug__=0,d.$templates={},d.$css=[],d.$main={$$onLoad:[],$onReady:[],$onLoad:[],isReady:!1,inRunning:!1,inDesign:!1,isStart:!1},d.$idSetter={},d.$creator={},d.$svg={},d.$staticNodes=[],d.$creator.createEx=function(e){var t=new a(e);return"function"==typeof t.init&&t.init(),t};var g=d.$utils={instantShow:function(e){console.log("[MSG]",e)},widgetNum:function(e){return d.__design__&&"number"==typeof e&&(f=e),f},cssNamedColor:function(e){},gotoHash:function(e,t){t&&t("")}};d.$cachedClass={},d.$ex=new a,d.$ex.regist=function(e,t){e&&t&&(a.prototype[e]=t)};var v=function(){function e(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var r=Object(e),n=Object.prototype.hasOwnProperty,i=1;i/g,">").replace(/"/g,""").replace(/'/g,"'")}function o(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function a(e,t){return e=e.source,t=t||"",function r(n,i){return n?(i=i.source||i,i=i.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(n,i),r):new RegExp(e,t)}}function s(){}function l(e){for(var t,r,n=1;nAn error occured:

    "+i(e.message+"",!0)+"
    ";throw e}}var p={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:s,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:s,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *(>|>|::)[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:s,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};p.bullet=/(?:[*+-]|\d+\.)/,p.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,p.item=a(p.item,"gm")(/bull/g,p.bullet)(),p.list=a(p.list)(/bull/g,p.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+p.def.source+")")(),p.blockquote=a(p.blockquote)("def",p.def)(),p._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",p.html=a(p.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,p._tag)(),p.paragraph=a(p.paragraph)("hr",p.hr)("heading",p.heading)("lheading",p.lheading)("blockquote",p.blockquote)("tag","<"+p._tag)("def",p.def)(),p.normal=l({},p),p.gfm=l({},p.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),p.gfm.paragraph=a(p.paragraph)("(?!","(?!"+p.gfm.fences.source.replace("\\1","\\2")+"|"+p.list.source.replace("\\1","\\3")+"|")(),p.tables=l({},p.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=p,e.lex=function(t,r){return new e(r).lex(t)},e.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},e.prototype.token=function(e,t,r){for(var n,i,o,a,s,l,u,c,f,e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},c=0;c|>|::) ?/gm,""),this.token(o,t,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),a=o[2],this.tokens.push({type:"list_start",ordered:a.length>1}),n=!1,f=(o=o[0].match(this.rules.item)).length,c=0;c1&&s.length>1||(e=o.slice(c+1).join("\n")+e,c=f-1)),i=n||/\n\n(?!\s*$)/.test(l),c!==f-1&&(n="\n"===l.charAt(l.length-1),i||(i=n)),this.tokens.push({type:i?"loose_item_start":"list_item_start"}),this.token(l,!1,r),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!r&&t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:s,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:s,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,c.link=a(c.link)("inside",c._inside)("href",c._href)(),c.reflink=a(c.reflink)("inside",c._inside)(),c.normal=l({},c),c.pedantic=l({},c.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),c.gfm=l({},c.normal,{escape:a(c.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:a(c.text)("]|","~]|")("|","|https?://|")()}),c.breaks=l({},c.gfm,{br:a(c.br)("{2,}","*")(),text:a(c.gfm.text)("{2,}","*")()}),t.rules=c,t.output=function(e,r,n){return new t(r,n).output(e)},t.prototype.output=function(e){for(var t,r,n,o,a="";e;)if(o=this.rules.escape.exec(e))e=e.substring(o[0].length),a+=o[1];else if(o=this.rules.autolink.exec(e))e=e.substring(o[0].length),"@"===o[2]?(r=":"===o[1].charAt(6)?this.mangle(o[1].substring(7)):this.mangle(o[1]),n=this.mangle("mailto:")+r):n=r=i(o[1]),a+=this.renderer.link(n,null,r);else if(this.inLink||!(o=this.rules.url.exec(e))){if(o=this.rules.tag.exec(e))!this.inLink&&/^
    /i.test(o[0])&&(this.inLink=!1),e=e.substring(o[0].length),a+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):i(o[0]):o[0];else if(o=this.rules.link.exec(e))e=e.substring(o[0].length),this.inLink=!0,a+=this.outputLink(o,{href:o[2],title:o[3]}),this.inLink=!1;else if((o=this.rules.reflink.exec(e))||(o=this.rules.nolink.exec(e))){if(e=e.substring(o[0].length),t=(o[2]||o[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){a+=o[0].charAt(0),e=o[0].substring(1)+e;continue}this.inLink=!0,a+=this.outputLink(o,t),this.inLink=!1}else if(o=this.rules.strong.exec(e))e=e.substring(o[0].length),a+=this.renderer.strong(this.output(o[2]||o[1]));else if(o=this.rules.em.exec(e))e=e.substring(o[0].length),a+=this.renderer.em(this.output(o[2]||o[1]));else if(o=this.rules.code.exec(e))e=e.substring(o[0].length),a+=this.renderer.codespan(i(o[2],!0));else if(o=this.rules.br.exec(e))e=e.substring(o[0].length),a+=this.renderer.br();else if(o=this.rules.del.exec(e))e=e.substring(o[0].length),a+=this.renderer.del(this.output(o[1]));else if(o=this.rules.text.exec(e))e=e.substring(o[0].length),a+=this.renderer.text(i(this.smartypants(o[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(o[0].length),n=r=i(o[1]),a+=this.renderer.link(n,null,r);return a},t.prototype.outputLink=function(e,t){var r=i(t.href),n=t.title?i(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(r,n,this.output(e[1])):this.renderer.image(r,n,i(e[1]))},t.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"").replace(/--/g,"").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1").replace(/'/g,"").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1").replace(/"/g,"").replace(/\.{3}/g,""):e},t.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,r="",n=e.length,i=0;i.5&&(t="x"+t.toString(16)),r+="&#"+t+";";return r},r.prototype.code=function(e,t,r){if(this.options.highlight){var n=this.options.highlight(e,t);null!=n&&n!==e&&(r=!0,e=n)}return t?'
    '+(r?e:i(e,!0))+"\n
    \n":"
    "+(r?e:i(e,!0))+"\n
    "},r.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,r){return"'+e+"\n"},r.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},r.prototype.list=function(e,t){var r=t?"ol":"ul";return"<"+r+">\n"+e+"\n"},r.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},r.prototype.paragraph=function(e){return"

    "+e+"

    \n"},r.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},r.prototype.tablerow=function(e){return"\n"+e+"\n"},r.prototype.tablecell=function(e,t){var r=t.header?"th":"td";return(t.align?"<"+r+' style="text-align:'+t.align+'">':"<"+r+">")+e+"\n"},r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+""},r.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},r.prototype.del=function(e){return""+e+""},r.prototype.link=function(e,t,r){if(this.options.sanitize){try{var n=decodeURIComponent(o(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:"))return""}var i='
    "},r.prototype.image=function(e,t,r){var n=''+r+'":">"},r.prototype.text=function(e){return e},n.parse=function(e,t,r){return new n(t,r).parse(e)},n.prototype.parse=function(e){this.inline=new t(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var r="";this.next();)r+=this.tok();return r},n.prototype.next=function(){return this.token=this.tokens.pop()},n.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},n.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},n.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,r,n,i="",o="";for(r="",e=0;e':""}if(e&&e.highlight){var n=/\r\n|\r|\n/g,i=/^[0-9][0-9]+ /,o=/^~~+ /;g.marked.setOptions({highlight:function(i,o){var a=!1;o?0==o.search(y)?o="plain":0==o.search(_)&&(a=!0):o="plain","plain"!=o&&a||(i=i.replace(m,"<").replace(b,">").replace(w,"&"));var s=[],l=[];i=t(s,l,i),"plain"!=o&&(i=e.highlight(o,i,!0).value);var u=s.length;if(u){for(var p=i.split(n),c=p.length,f=0;f'+r(l.length,h.slice(0,-1))+p[f]+"":p[f]=r(l.length,h)+p[f])}return p.join("\n")}return i}})}}(window.hljs),function(){function e(){return++window.TRIGGER__.count}window.TRIGGER__||(window.TRIGGER__={count:0});var t={GET:1,POST:1,PUT:1,DELETE:1,HEAD:1};this.jsonp=function(t){var r=t.url,n=t.data,i=t.callback;if(!r||"string"!=typeof r)throw new Error("invalid URL");if(n&&"object"!=(void 0===n?"undefined":s(n)))throw new Error("invalid input argument (data)");if("function"!=typeof i)throw new Error("input argument (callback) should be a function");var o=e();r.indexOf("?")>0?r+="&":r+="?",r+="callback=TRIGGER__%5B"+o+"%5D",n&&Object.keys(n).forEach(function(e){var t=n[e];r+="&"+e+"="+encodeURIComponent(t+"")});var a=document.head||document.getElementsByTagName("head")[0]||document.documentElement,l=document.createElement("script");l.async="async",t.scriptCharset&&(l.charset=t.scriptCharset),l.src=r,l.onload=l.onreadystatechange=function(){l.readyState&&!/loaded|complete/.test(l.readyState)||(l.onload=l.onreadystatechange=null,a&&l.parentNode&&a.removeChild(l),l=void 0,setTimeout(function(){window.TRIGGER__[o]&&(delete window.TRIGGER__[o],t.notifyError&&i(null))},0))},a.insertBefore(l,a.firstChild),window.TRIGGER__[o]=function(e){window.TRIGGER__[o]&&(delete window.TRIGGER__[o],i(e))}};var r=/"{3}[^\\]*(?:\\[\S\s][^\\]*)*"{3}/gm,n=/^\s*\/\/.*$/gm;this.ajax=function(e){var i=e.url,o=(e.type||"GET").toUpperCase(),a=e.data;if(!i||"string"!=typeof i)throw new Error("invalid URL");if(a&&"object"!=(void 0===a?"undefined":s(a)))throw new Error("invalid input argument (data)");if(!(o in t))throw new Error("invalid request type ("+o+")");var l=e.timeout||6e4,u=i.indexOf("?")>0,p=e.dataType;void 0===p&&".json"==i.slice(-5)&&(p="json");var c=null;a&&("PUT"!=o&&"POST"!=o?Object.keys(a).forEach(function(e){var t=a[e];u?i+="&":(u=!0,i+="?"),i+=e+"="+encodeURIComponent(t+"")}):c=JSON.stringify(a));var f=null,h=!1;if(window.XMLHttpRequest?f=new XMLHttpRequest:window.ActiveXObject&&(f=new ActiveXObject("Microsoft.XMLHTTP")),!f)throw new Error("invalid XMLHttpRequest");f.onreadystatechange=function(){if(4==f.readyState){var t=f.responseText||"",i=f.statusText||"",o=f.status||(t?200:404);if(h);else if(o>=200&&o<300&&t){var a=!1;if("json"===p||"pre-json"===p&&(a=!0)){var s,l=!0;try{a&&(t=(t=t.replace(r,function(e){return'"'+e.slice(3,-3).replace(/\\/gm,"\\\\").replace(/\n/gm,"\\n").replace(/"/gm,'\\"')+'"'})).replace(n,"")),s=JSON.parse(t.replace(/[\cA-\cZ]/gi,"")),l=!1}catch(t){e.error&&(i="JSON format error",e.error(f,i))}!l&&e.success&&e.success(s,i,f)}else e.success&&e.success(t,i,f)}else e.error&&e.error(f,i);f=null,h=!0}};var d,g;if(e.username?f.open(o,i,!0,e.username,e.password):f.open(o,i,!0),g=e.headers)for(d in g)f.setRequestHeader(d,g[d]);c&&f.setRequestHeader("Content-Type","application/json"),f.send(c),"number"==typeof l&&setTimeout(function(){h||(h=!0,f.abort(),e.error&&e.error(f,"request timeout"),f=null)},l)}}.call(g),g.bindMountData=function(e){function t(e,t,r,n){return function(e,i,o){if(!n.call(this,e,i,o)&&2==e)for(var a,s=0;a=t[s];s++)this.duals[a]=r[a]}}if(e&&"object"==(void 0===e?"undefined":s(e))){var r=d.$idSetter;Object.keys(r).forEach(function(n){var i=r[n];if("function"==typeof i){var o=e[n];if(o&&"object"==(void 0===o?"undefined":s(o))){var a=Object.assign({},o),l=a.__attr__;delete a.__attr__,Array.isArray(l)||(l=Object.keys(a));var u=t(n,l,a,i);Object.defineProperty(r,n,{enumerable:!0,configurable:!0,get:function(){return u}})}}})}else console.log("error: invalid W.$dataSrc")},g.loadingEntry=function(e,t,r){function n(e,t,r){var n=[];e.forEach(function(e){e[0]==t&&n.push(e[1])});var i=n.length,o=0;i?n.forEach(function(e){var t=document.createElement("link");"onload"in t?(r&&(t.onload=function(e){(o+=1)>=i&&r()}),t.setAttribute("rel","stylesheet"),t.setAttribute("href",e),document.head.appendChild(t)):(t=document.createElement("img"),r&&(t.onerror=function(e){(o+=1)>=i&&r()}),t.setAttribute("src",e),document.body.appendChild(t))}):r&&r()}var i=document.getElementById("react-container");if(i){i.hasAttribute("__debug__")&&(d.__debug__=parseInt(i.getAttribute("__debug__")||0)),i.hasAttribute("__design__")&&(d.__design__=parseInt(i.getAttribute("__design__")||0)),i.hasAttribute("__nobinding__")&&(d.__nobinding__=parseInt(i.getAttribute("__nobinding__")||0));var o=d.__nobinding__||0;window.W!==d&&(window.W&&(d.$modules=window.W.$modules),window.W=d);var a=d.$modules;Array.isArray(a)&&(a.forEach(function(n){"function"==typeof n&&n.call(r,e,t,r)}),a.splice(0));for(var s,c=document.querySelectorAll('link[rel="stylesheet"]'),f=c.length-1;f>=0;f-=1){var h=(s=c[f]).getAttribute("shared");h&&"false"!=h&&"0"!=h&&d.$css.unshift(["pseudo",s.href])}n(d.$css,"basic",function(){function e(e,t,r,n){try{return JSON.parse(e)}catch(e){console.log("invalid JSON format: "+(r?r+"["+n+"].":"")+t)}}function t(e){return e.replace(c,"ms-").replace(f,function(e,t){return t.toUpperCase()})}function r(e){var r=[],n="",i={},o=!1;return e.replace(h,function(e,t){return r.push([t,e]),""}).split(";").forEach(function(e){var a=n.length;if(n+=e+" ",e){for(;r.length;){var s=r[0][0];if(!(s>=a&&s0){var c=u.slice(0,p).trim();c&&(i[t(c)]=u.slice(p+1).trim(),o=!0)}}}),o?i:null}function i(t,n,i){for(var o="",a=[],s="",l=t.attributes.length,u=!1,p=!1,c=0;c1&&w.indexOf(a[0])<0)for(o=a.shift();a.length;){var s=a.shift();s&&(o+=s[0].toUpperCase()+s.slice(1))}"className"!=o&&(r&&"{"==r[0]&&"}"==r[r.length-1]&&"$"!=o[0]?y[o]=e(r.slice(1,-1),o,n,i):y[o]=r)}),p){var m=t.innerHTML;t.children.length&&(t.innerHTML=""),m&&(y["html."]=m),y["isPre."]=!0}else 0==t.children.length&&(m=t.textContent)&&(y["html."]=m);return[o,y,[]]}return null}function a(e,t,r){var n=r&&!d.__design__,i=null;n&&((i=y[t])||(n=!1));var o=n?b[e]:m[e];if(!n){if(o)return o;if(o=b[e])return o=m[e]=p(o._extend())}if(!o){var a=e.split("."),s=a.shift();for(o=v[s];o&&(s=a.shift());)o=o[s];if(!o||!o._extend)return console.log("error: can not find template ("+e+")"),null;b[e]=o}return n?p(o._extend(i)):o=m[e]=p(o._extend())}function s(e,t){var r=e[0],n=e[3],i=!o&&!t&&n&&n.search(g)<0,u=a(r,n,i);if(!u)return null;var p=e[1],c=e[2],f=c.length;if(i&&_&&!d.__design__){var h=_[n];h&&Object.assign(p,h)}for(var v=[u,p],y=!1,m=!i,b=0;b=0;P--)if((O=x[P]).classList.contains("rewgt-static")){x.splice(P,1);for(var S=O.childNodes.length-1;S>=0;S--)x.splice(P,0,O.childNodes[S])}var $=d.$staticNodes.push(x)-1;v.push(l.createElement("div",{className:"rewgt-static",name:$+""})),y=!0}}return y&&(p["hasStatic."]=!0),l.createElement.apply(null,v)}n(d.$css,"lazy");var c=/^-ms-/,f=/-(.)/g,h=/(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*")/g,g=/\.[0-9]/,v=d.$templates,y=d.$main,_=(d.$utils,d.$dataSrc),m={},b={},w=["data","$data","dual","$dual","aria","$aria"];d.$creator.scanNodeAttr=i;var k=document.getElementById("react-container"),O=function(e){function t(e,r,o,a){for(var s,l=e[2],u=0;s=r.children[u];u++){var p=i(s,a,u);if(o){if(0==u&&(!p||"BodyPanel"!=p[0]))return console.log("error: root node of JSX should be BodyPanel"),!1;var c=p[1];if(c.hasOwnProperty("width")&&isNaN(c.width)&&(c.width=null),c.hasOwnProperty("height")&&isNaN(c.height)&&(c.height=null),u>0)return!0}if(p){l.push(p);var f=(p[1].key||u)+"";n.push(f),p[3]=n.join(".");var h=!1;if(t(p,s,!1,a?a+"["+u+"]."+p[0]:p[0])||(h=!0),n.pop(),h)return!1}else l.push(s)}return!0}if(!e)return null;var r=[null,null,[]],n=[""];return t(r,e,!0,"")?r[2][0]:null}(k);if(O){var x=s(O,!1);x&&(d.$cachedClass=m,u.render(x,k,function(){d.$dataSrc=null,k.style.visibility="visible",y.isReady=!0;var e=y.$$onLoad_;"function"==typeof e&&e()}))}})}},t.exports=d}).call(this,e("_process"))},{_process:11,"create-react-class":2,react:void 0,"react-dom":void 0}],10:[function(e,t,r){"use strict";function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t=0)return!0}return!1}function h(e,t){for(var r=" "+(e||"")+" ",n=Array.isArray(t)?t:String(t).split(/ +/),i=n.length,o=0;o=0;i--){var o=n[i];o&&(r=r.replace(" "+o+" "," "))}return r.trim()}function g(e,t,r,n){for(var i=" "+e,o=i.length,a=i+" "+t+" ",s=Array.isArray(r)?r:String(r).split(/ +/),l=s.length-1;l>=0;l--){var u;if((f=s[l])&&(u=a.indexOf(" "+f+" "))>=0){if(u=0;i--){var o=t[i];if(o){var a=o.split("-"),s=a.length;if(s>1)for(var l=1;l=0&&bt.forEach(function(e,t){t!=p&&r.push(e)})}n.push(o)}}return[r,n]}function y(){for(var e=[],t=0;t=0;n--)(!(i=r[n])||t.indexOf(i)>=0)&&r.splice(n,1);else for(var n=r.length-1;n>=0;n--){var i=r[n];i&&!t[i]||r.splice(n,1)}return r.join(" ")}function m(e,t){if(Array.isArray(t)){var r,n=t.length;for(r=0;r=0;){if(0==i||" "==e[i-1]){var o=e[i+t.length];if(!o||" "==o)return!0}i=e.indexOf(t,i+t.length)}return!1}function b(e){var t=(e.key||"").replace(wt,"");return"."==t[0]?t.slice(1):t}function w(e){var t={};return Object.keys(e).forEach(function(r){yt[r]||(t[r]=e[r])}),e.width&&(t.width=e.width),e.height&&(t.height=e.height),t}function k(e,t){for(var r,n=c(e),i=e.state,o=e.$gui,a=o.tagAttrs,s=o.dataset2,l=Object.assign({style:t||i.style},o.eventset),u=0;f=a[u];u++)l[f]=i[f];var p=l.data;void 0!==p&&"string"!=typeof p&&delete l.data;for(var f,u=0;f=s[u];u++)l[f]=i[f];return n&&(l.className=n),qe.__design__&&(r=i["data-group.opt"])&&(l["data-group.opt"]=r),l}function O(e,t){function r(e){function t(t,r){var n=void 0;r&&"object"==(void 0===r?"undefined":ze(r))&&(n=r),setTimeout(function(){var r=t?oe(e,t):e;r?r!==e?r.props["isOption."]&&r.setChecked&&r.setChecked(null,n):console.log("warning: trigger can not fire widget itself."):console.log("warning: can not find target ("+t+")")},0)}var r=e.state.trigger;if(Array.isArray(r))for(var n=(r=r.slice(0)).shift();n;){var i,o=void 0===n?"undefined":ze(n);if("string"==o)t(n,null);else{if("object"!=o)break;if(Array.isArray(n))!function(t,r,n){if("string"==typeof t&&r){var i=t?oe(e,t):e;i?vt.call(i.duals,n)&&setTimeout(function(){i.duals[n]=Xe.update(i.duals[n],r)},0):console.log("warning: can not find target ("+t+")")}}(n[0]||"",n[1],n[2]||"data");else{if("string"!=typeof(i=n.$trigger))break;var a=Object.assign({},n);delete a.$trigger,t(i,a)}}n=r.shift()}}if(arguments.length>=3){var n=arguments[2],i=!1;if(n){var o=void 0===n?"undefined":ze(n);if("string"==o)n=[n],i=!0;else if("object"==o)if(Array.isArray(n)){var a;"string"==typeof n[0]&&"object"==ze(a=n[1])&&"string"!=typeof a.$trigger&&(n=[n]),i=!0}else"string"==typeof n.$trigger&&(i=!0,n=[n])}if(!i)return void console.log("warning: invalid trigger data (key="+t.$gui.keyid+")");t.duals.trigger=n}else{var s=t.$gui,l=s.syncTrigger;if(l&&l>1)if(l=0||r%2&&1===p&&!u[0]){var c=l.pattern;c.lastIndex=i;var f=c.exec(o);if(f&&f.index===i){var h=e.push({result:f,action:l.action,length:f[0].length});for(l.global&&(t=h);--h>t;){var d=h-1;if(e[h].length>e[d].length){var g=e[h];e[h]=e[d],e[d]=g}}}}}return e}"function"!=typeof e&&(e=j.defunct);var r=[],n=[],i=0;this.state=0,this.index=0,this.input="",this.addRule=function(e,t,r){var i=e.global;if(!i){var o="g";e.multiline&&(o+="m"),e.ignoreCase&&(o+="i"),e=new RegExp(e.source,o)}return Array.isArray(r)||(r=[0]),n.push({pattern:e,global:i,action:t,start:r}),this},this.setInput=function(e){return i=0,this.state=0,this.index=0,r.length=0,this.input=e,this},this.lex=function(){if(r.length)return r.shift();for(this.reject=!0;this.index<=this.input.length;){for(var n=t.call(this).splice(i),o=this.index;n.length&&this.reject;){var a=n.shift(),s=a.result,l=a.length;this.index+=l,this.reject=!1,i++;var u=a.action.apply(this,s);if(this.reject)this.index=s.index;else if(void 0!==u)return Array.isArray(u)&&(r=u.slice(1),u=u[0]),l&&(i=0),u}var p=this.input;if(o=31&&l<=43)return i[2]=[34,[s,t,r],s[2]],void o.push(e)}o.push([34,[e,t,r],e[2]])}function n(e,t,n){if(e>=3){var i,a,s,l,u=o[e-1],p=o[e-2],c=o[e-3],f=u[0],h=p[0],d=c[0];if(e>=5&&(i=o[e-4],s=i[0],a=o[e-5],l=a[0],!n&&l>=31&&l<=43&&5==s&&d>=31&&d<=43&&6==h&&f>=31&&f<=43))return o.splice(e-5,5,[35,[a,i,c,p,u],a[2]]),!0;if(d>=31&&d<=43&&14==h&&f>=31&&f<=43)return o.splice(e-3,3),r(c,p,u,p[3]),!0;if(!n&&d>=51&&d<=52&&7==h&&f>=31&&f<=43)return o.splice(e-3,3,[52,[c,p,u],c[2]]),!0;if(!n&&d>=31&&d<=43&&6==h&&f>=31&&f<=43)return e>=5&&l>=61&&l<=62&&7==s?o.splice(e-5,5,[62,[a,i,c,p,u],a[2]]):o.splice(e-3,3,[61,[c,p,u],c[2]]),!0}return e>=1&&!t&&(f=(u=o[e-1])[0])>=31&&f<=43&&(o.splice(e-1,1,[51,[u],u[2]]),!0)}for(var i,o=[];i=e.shift();)1!=i[0]&&function(e){var t=e[0];3==t&&"in"==e[1]&&(t=e[0]=14,e[3]=11);var i=o.length;if(20==t)for(i>=2&&7==o[i-1][0]&&(i-=1,o.pop());n(i);)i=o.length;else if(2==t){if(i){var a=o[i-1];if(14==a[0]&&"-"==a[1]){var s=!1;if(1==i)s=!0;else{var l=o[i-2][0];Pt.indexOf(l)<0&&(s=!0)}s&&(o.pop(),i-=1,e[1]="-"+e[1])}}o.push([31,[e],e[2]])}else if(3==t||4==t)o.push([29+t,[e],e[2]]);else if(7==t){for(;n(i);)i=o.length;o.push(e)}else if(6==t||8==t){for(;n(i,!0);)i=o.length;o.push(e)}else if(5==t||10==t||12==t||14==t){for(;n(i,!0,!0);)i=o.length;o.push(e)}else if(11==t){for(i>=2&&7==o[i-1][0]&&(i-=1,o.pop());n(i);)i=o.length;if(i>=3){var u=o[i-1],p=o[i-2],c=o[i-3],f=u[0],h=p[0];if((d=c[0])>=31&&d<=43&&10==h&&51==f)return p[0]=14,p[3]=18,u=u[1][0],o.splice(i-3,3),void r(c,p,u,18)}if(i>=2){var u=o[i-1],p=o[i-2],f=u[0];if(10==(h=p[0])){if(f>=31&&f<=43)return void o.splice(i-2,2,[39,[p,[51,[u],u[2]],e],p[2]]);if(f>=51&&f<=52)return void o.splice(i-2,2,[39,[p,u,e],p[2]])}}if(i>=1&&10==(f=(u=o[i-1])[0]))return void(o[i-1]=[38,[u,e],u[2]]);o.push(e)}else if(13==t){for(;n(i);)i=o.length;if(i>=3){var u=o[i-1],p=o[i-2],c=o[i-3],f=u[0],h=p[0],d=c[0];if(d>=31&&d<=43&&12==h&&f>=51&&f<=52)return p[0]=14,p[3]=17,o.splice(i-3,3),void r(c,p,u,17)}if(i>=2){var u=o[i-1],p=o[i-2],f=u[0];if((h=p[0])>=31&&h<=43&&12==f)return u[0]=14,u[3]=17,o.splice(i-2,2),void r(p,u,null,17);if(12==h&&f>=51&&f<=52)return void o.splice(i-2,2,[37,[p,u,e],p[2]])}o.push(e)}else if(9==t){for(i>=2&&7==o[i-1][0]&&(i-=1,o.pop());n(i,!0);)i=o.length;if(i>=2){var u=o[i-1],p=o[i-2],f=u[0];if(8==(h=p[0])&&f>=61&&f<=62)return void o.splice(i-2,2,[41,[p,u,e],p[2]])}if(i>=1&&8==(f=(u=o[i-1])[0]))return void(o[i-1]=[40,[u,e],u[2]]);o.push(e)}}(i);if(0==o.length)throw new Error("expression is empty");if(i=o[0],1==o.length){var a=i[0];if(a>=51&&a<=52)return i;if(61==a&&t)return i}if(i[0]<20)throw new Error("invalid operand ("+i[1]+") at offset ("+i[2]+")");for(var s=0,l=i[2];s52){l=u[2];break}}throw new Error("syntax error at offset ("+l+")")}function E(e,t){function r(e,n){var i=n[0],o=n[1];if(61==i){l=32==(s=(a=o[0])[0])?a[1][0][1]:E(a,t);e.push([l,E(o[2],t)])}else{if(62!=i)throw new Error("syntax error at offset ("+n[2]+")");r(e,o[0]);var a=o[2],s=a[0],l=32==s?a[1][0][1]:E(a,t);e.push([l,E(o[4],t)])}}function n(e,r){var i=r[0],o=r[1];51==i?e.push(E(o[0],t)):52==i?(n(e,o[0]),e.push(E(o[2],t))):e.push(E(r,t))}function i(e){var r=e[0],n=e[1];return 51==r?E(n[0],t):52==r?i(n[0],t):E(e,t)}function o(e){if(52==e[0]){var r=e[1];o(r[0],t),E(r[2],t)}}var a=e[0],s=e[1];if(31==a)return parseFloat(s[0][1]);if(32==a){var l=s[0][1];if("null"==l)return null;if("undefined"==l)return;if("true"==l)return!0;if("false"==l)return!1;if("NaN"==l)return NaN;if(void 0!==(p=t[l])||vt.call(t,l))return p;throw new Error("symbol ("+l+") not defined")}if(33==a){var u=s[0][1];return u?u.slice(1,-1):""}if(34!=a){if(35==a)return E((_=E(s[0],t))?s[2]:s[4],t);if(37==a)return n(m=[],s[1]),m[m.length-1];if(38==a)return[];if(39==a)return n(m=[],s[1]),m;if(40==a)return{};if(41==a){var p={};return r(m=[],s[1]),m.forEach(function(e){p[e[0]]=e[1]}),p}if(51==a)return E(s[0],t);if(52==a)return n(m=[],e),m[m.length-1];throw new Error("syntax error at offset ("+e[2]+")")}var c=s[0],f=s[1],h=s[2],d=f[1];if("."==d){if(32!=h[0])throw new Error("syntax error at offset ("+e[2]+"): invalid attribute name");var g=E(c,t),v=h[1][0][1];try{return g[v]}catch(e){return void console.log("error: get attribute ("+v+") failed")}}else{if("["!=d){if("("==d){if(32==c[0]&&"while"==c[1][0][1]){var y=0;if(!h)return y;for(var _=i(h);_;)y+=1,o(h),_=i(h);return y}var m=[];if(h&&n(m,h),34==c[0]){var b=c[1];if("."==b[1][1]){var w=b[2];if(32!=w[0])throw new Error("syntax error at offset ("+w[2]+"): invalid attribute name");var k=E(b[0],t);return k[w[1][0][1]].apply(k,m)}}return E(c,t).apply(null,m)}if("&&"==d)return(O=E(c,t))?E(h,t):O;if("||"==d)return(O=E(c,t))||E(h,t);var O=E(c,t),x=E(h,t);if("*"==d)return O*x;if("/"==d)return O/x;if("%"==d)return O%x;if("+"==d)return O+x;if("-"==d)return O-x;if("<<"==d)return O<>"==d)return O>>x;if(">>>"==d)return O>>>x;if("<"==d)return O"==d)return O>x;if(">="==d)return O>=x;if("in"==d)return O in x;if("=="==d)return O==x;if("!="==d)return O!=x;if("==="==d)return O===x;if("!=="==d)return O!==x;if("&"==d)return O&x;if("^"==d)return O^x;if("|"==d)return O|x;throw new Error("unknown operator: "+d)}var g=E(c,t),v=E(h,t);try{return g[v]}catch(e){return void console.log("error: get attribute (["+v+"]) failed")}}}function I(e,t,r){var n=null,i=!1;xt=[];try{for(Ot.setInput(e);Ot.lex(););i=!0}catch(e){Ge.instantShow("error: lexical analysis failed at "+(t?t.widget.getPath():"")+":"+r),console.log(e)}if(!i)return null;try{n=N(xt,!0)}catch(e){Ge.instantShow("error: yacc analysis failed at "+(t?t.widget.getPath():"")+":"+r),console.log(e)}return n}function A(e,t,r,n){var i=n||0,o=e.widget;if("number"==typeof t){for(var a=void 0;o;){var s=o.component,l=s&&s.props["for.index"];if(o.$callspace&&vt.call(o.$callspace,"flowFlag")){if(o.$callspace.forSpace){if(t>=-1)return-1==t?a="number"==typeof l?l:void 0:0==i&&(a="number"==typeof l?l:void 0),r&&(r.unshift(t>=0&&0!=i),r.unshift(o.$callspace),r.unshift(a)),o.component;t+=2}else{if(t>=0){var u=o.$callspace.flowFlag;if(("for"==u||"for0"==u)&&0==i){a="number"==typeof l?l:void 0,o=o.parent,i+=1;continue}return r&&(r.unshift(!1),r.unshift(o.$callspace),r.unshift(a)),o.component}t+=1}a="number"==typeof l?l:void 0}else void 0===a&&"number"==typeof l&&(a=l);o=o.parent,i+=1}return null}for(;o;){if(o.$callspace&&vt.call(o.$callspace,"flowFlag")&&(i>0||o.$callspace.forSpace))return oe(o.component,t);o=o.parent,i+=1}return null}function T(e,t,r){function n(r){return function(n){var o=n||0,a=void 0===o?"undefined":ze(o);if("number"==a?o>0&&(o=0):"string"!=a&&(o=0),0===o)return t[r];var s=0;i!==e.index&&(s=1);var l=A(t,o,[],s);return l?l[r]:null}}e.ex=Je.createEx(t),e.Math=Math;var i=function(e,r){void 0===e?e=0:("number"!=typeof e||isNaN(e)||e>0)&&(console.log("warning: invalid expression: index("+e+")"),e=0);var n=[];return A(t,e,n,r)?n[0]:void 0};e.index=i,e.props=n("props"),e.state=n("state"),e.duals=n("duals"),e.typeof=function(e){return void 0===e?"undefined":ze(e)},e.count=function(n){if(void 0===n?n=0:("number"!=typeof n||isNaN(n)||n>0)&&(console.log("warning: invalid expression: count("+n+")"),n=0),0===n&&r)throw new Error("invalid expression: count(0)");var o=0;i!==e.index&&(o=1);var a=[],s=A(t,n,a,o),l=a[1];return s&&l?((a[2]?l.forSpace:l)["data-for.path"]||[]).length:0},e.item=function(n){if(void 0===n?n=0:("number"!=typeof n||isNaN(n)||n>0)&&(console.log("warning: invalid expression: item("+n+")"),n=0),0===n&&r)throw new Error("invalid expression: item(0)");var o=0;i!==e.index&&(o=1);var a=[],s=A(t,n,a,o),l=a[1];if(s&&l){var u=o?e.index(n):a[0];if("number"==typeof u)return((a[2]?l.forSpace:l)["data-for.path"]||{})[u]}}}function C(e){var t=e.widget;if(!(t=t&&t.parent))return!1;var r=t.component;if(!r)return!1;var n=r.$gui.compIdx[e.$gui.keyid];if("number"!=typeof n)return!1;var i=!1,o=r.$gui.comps;for(n-=1;n>=0;){var a=o[n--],s=b(a);if(a=a&&s&&t[s],(a=a&&a.component)&&a.$gui.compState){var l=a.$gui.flowFlag;if("if"==l){a.state[l]&&(i=!0);break}if("elif"!=l)break;if(a.state[l]){i=!0;break}}}return i}function R(e,t,r){function n(e){if(32==e[0]){var t=e[1][0][1],r=$t.indexOf(t);if(r>=0)return r+1}return 0}var i,o=e[0],a=e[1];if(o>=51)51==o?R(a[0],t):52==o?(R(a[0],t),R(a[2],t)):61==o?(R(a[0],t),R(a[2],t)):62==o&&(R(a[0],t),R(a[2],t),R(a[4],t));else if(o>=31)if(32==o){if(!r&&(i=n(e))){var s=e[2],l=e.slice(0);return e[0]=34,e[1]=[l,[14,"(",s,17],null],t.push([i,0])}}else if(34==o){var u=a[0],p=a[1],c=a[2],f=p[1];if("."==f)if(!r&&(i=n(u)))if(32==c[0]){h=c[1][0][1];t.push([i,0,h]);var s=u[2],l=u.slice(0);u[0]=34,u[1]=[l,[14,"(",s,17],null]}else R(c,t,!0);else{if(R(u,t,r)&&32==c[0]){var h=c[1][0][1];return(g=t[t.length-1]).push(h),0}R(c,t,!0)}else if("["==f)if(!r&&(i=n(u)))if(33==c[0]){d=c[1][0][1];t.push([i,0,d.slice(1,-1)]);var s=u[2],l=u.slice(0);u[0]=34,u[1]=[l,[14,"(",s,17],null]}else if(4==i&&31==c[0]){t.push([i,0]);var s=u[2],l=u.slice(0);u[0]=34,u[1]=[l,[14,"(",s,17],null]}else R(c,t);else{if(R(u,t,r)&&33==c[0]){var d=c[1][0][1],g=t[t.length-1];return g.push(d.slice(1,-1)),0}R(c,t)}else if("("==f)if(i=n(u)){if(null===c)return t.push([i,0]);if(51==c[0]){var v=c[1][0],y=v[0];if(31==y){var _=v[1][0][1];return t.push([i,parseFloat(_)])}if(33==y){d=v[1][0][1];return t.push([i,d.slice(1,-1)])}}R(c,t)}else R(u,t),null!==c&&R(c,t);else"in"==f?(32!=u[0]&&R(u,t),R(c,t)):(R(u,t),R(c,t))}else 35==o?(R(a[0],t),R(a[2],t),R(a[4],t)):37==o?R(a[1],t):39==o?R(a[1],t):41==o&&R(a[1],t);return 0}function H(e,t,r){var n=I(t,e,r);if(n){61==n[0]&&(n=n[1][2]),R(n,[]);var i=[],o=A(e,0,i,1),a=i[1];return o&&a?(i[2]&&(a=a.forSpace),function(e,t){var i=a.exprSpace,o=i.index;i.index=function(e){return void 0===e||0===e?t:o(e,1)},i.$info=[e,r,Xe.time()];try{return E(n,i)}finally{i.index=o}}):null}return null}function W(e,t,r,n){function i(e,t){var r=e.widget;if(!(r=r&&r.parent))return!1;var n=r.component;if(!n)return!1;var i=n.$gui.compIdx[e.$gui.keyid];if("number"!=typeof i)return!1;var o=!1,a=n.$gui.comps,s=[],l=!1;for(i-=1;i>=0;){var u=a[i--],p=b(u);if(u=u&&p&&r[p],(u=u&&u.component)&&u.$gui.compState){var c=u.$gui.flowFlag;if("if"!=c&&"elif"!=c)break;var f=u.$gui.flowExprId0;if(!l&&(u.$gui.flowExprId!==f||t>f)?s.unshift([c,u]):(l=!0,u.state[c]&&(o=!0)),"if"==c)break}}return s.length&&s.forEach(function(e){var t=e[0],r=e[1],n=r.$gui.exprAttrs[t];if(o||!n)r.state[t]&&setTimeout(function(){r.state[t]=!0;var e={};e[t]=!1,r.setState(e)},0),r.state[t]=!1,r.$gui.flowExprId0=r.$gui.flowExprId=St;else try{var i=r.state[t];n(r,1);var a=r.state[t];a&&(o=!0),!i!=!a&&setTimeout(function(){r.state[t]=i;var e={};e[t]=a,r.setState(e,function(){a&&r.props["hasStatic."]&&de(r,!0)})},0)}catch(e){console.log(e)}}),o}function o(e,t,r){var n=e.widget;if(n=n&&n.parent){var i=n.component;if(i){var o=i.$gui.compIdx[e.$gui.keyid],a=i.$gui.comps;if("number"==typeof o){for(var s=[],l=a.length,u=o+1;ud))break;if(s.push([h,f]),"else"==h)break}}s.forEach(function(e){var r=e[0],n=e[1],i="elif"==r?n.$gui.exprAttrs[r]:null;if(t||"elif"==r&&!i)n.$gui.flowExprId0=n.$gui.flowExprId=St,n.state[r]&&(n.state[r]=!1,setTimeout(function(){n.state[r]=!0;var e={};e[r]=!1,n.setState(e)},0));else if("elif"==r)try{var o=n.state[r];i(n,2);var a=n.state[r];a&&(t=!0),!o!=!a&&setTimeout(function(){n.state.elif=!a,n.setState({elif:a},function(){a&&n.props["hasStatic."]&&de(n,!0)})},0)}catch(e){console.log(e)}else n.$gui.flowExprId0=n.$gui.flowExprId=St,n.state.else||(n.state.else=!0,setTimeout(function(){n.state.else=!1,n.setState({else:!0},function(){n.props["hasStatic."]&&de(n,!0)})},0))})}}}}var a="any",s=I(r,e,t);if(s){61==s[0]&&(a=s[1][0],s=s[1][2],32==a[0]&&(a=a[1][0][1]),"all"!==a&&"strict"!==a&&(a="any"));var l=_t.indexOf(t);l>=0&&"any"!=a&&(console.log("error: invalid using '"+a+":' at "+e.widget.getPath()+":"+t),a="any");var u=[];if(R(s,u),"trigger"==t){var p=e.props.fireType||"auto";"onsite"===p?(u=[],e.$gui.syncTrigger=3):e.$gui.syncTrigger="none"===p?0:1}var c={},f=[];u.forEach(function(r){var n,i=r[0],o=r[1];if(i>=4&&"number"==typeof o)o<=0&&f.indexOf(o)<0&&f.push(o);else if(3==i&&void 0!==(n=r[2]))if("number"!=typeof o||o<=0){var a=c[o];if(a||(a=c[o]=[]),0==a.length){var s=A(e,o,[],0);s?a.push(s,n):console.log("error: can not find duals("+o+") at "+e.widget.getPath()+":"+t)}else a.indexOf(n,1)<0&&a.push(n)}else console.log("error: invalid using duals("+o+") at "+e.widget.getPath()+":"+t)}),f.sort(function(e,t){return e-t});var h={};Object.keys(c).forEach(function(r){var n=c[r],i=n&&n[0];if(i){var o=n.slice(1);"any"!=a&&o.forEach(function(e){h[r+":"+e]=!1}),i.listen(o,function(n,o,s){if(e.isHooked)if("any"==a)(f=e.state.exprAttrs.slice(0)).indexOf(t)<0&&f.push(t),_t.indexOf(t)>0&&(0==jt&&(jt=++St,setTimeout(function(){jt=0},0)),e.$gui.flowExprId=jt),e.setState({exprAttrs:f});else{var l=r+":"+s;if(vt.call(h,l)){"strict"==a&&h[l]&&console.log("error: conflict in strict mode, duals("+r+")."+s+" is fired more than one time."),h[l]=!0;for(var u=!0,p=Object.keys(h),c=p.length-1;c>=0;c--)if(!h[p[c]]){u=!1;break}if(u){for(c=p.length-1;c>=0;c--)h[p[c]]=!1;var f=e.state.exprAttrs.slice(0);f.indexOf(t)<0&&f.push(t),e.setState({exprAttrs:f})}}}else i.unlisten("*",e)})}}),f.length&&"any"==a&&function(e,t,r,n){var i=n[n.length-1],o=[],a=A(e,i,o,0);if(a){for(var s,l=a.widget,u=o[1],p=o[2],c=0;l&&u;){if(n.indexOf(i)>=0&&(s=l.component)&&(s.props.$for||s.props.$$for)&&(s.listen("for",function(r,n){if(e.isHooked){var i=e.state.exprAttrs.slice(0);i.indexOf(t)<0&&i.push(t),_t.indexOf(t)>0&&(0==jt&&(jt=++St,setTimeout(function(){jt=0},0)),e.$gui.flowExprId=jt),e.setState({exprAttrs:i})}else s.unlisten("*",e)}),c+=1),p)p=!1,i-=1;else for(l=l.parent;l;){if(u=l.$callspace){p=!!u.forSpace,i-=1;break}l=l.parent}if(i=1){var g=e.$gui.flowExprId;if(r=r||0,2==l){var b=!1,x=!1;if(g!==e.$gui.flowExprId0?x=!0:r&&St>e.$gui.flowExprId0&&(x=!0),e.$gui.flowExprId0=e.$gui.flowExprId=St,x){var P,S=e.state.elif;1!=r&&i(e,g)?(b=!0,P=e.state.elif=!1):b=!!(P=e.state.elif=E(s,a)),P&&S!==P&&e.props["hasStatic."]&&setTimeout(function(){de(e,!0)},0)}else(e.state.elif||1!=r&&i(e,g))&&(b=!0);2!=r&&o(e,b,g)}else if(1==l){x=!1;if(g!==e.$gui.flowExprId0?x=!0:r&&St>e.$gui.flowExprId0&&(x=!0),e.$gui.flowExprId0=e.$gui.flowExprId=St,x){S=e.state.if;(P=e.state.if=E(s,a))&&S!==P&&e.props["hasStatic."]&&setTimeout(function(){de(e,!0)},0)}2!=r&&o(e,!!e.state.if,g)}}else{if(n){var $=e.$gui.syncTrigger;if($){var j=e.state.trigger;$<=2&&(e.duals[t]=E(s,a));var D=!1;1!==$&&(2===$?(D=!0,e.$gui.syncTrigger=3):e.$gui.syncTrigger=mt),D||O(j,e)}else e.duals[t]=E(s,a)}else e.state[t]=E(s,a);_&&(e.duals["html."]=e.state[t])}}finally{a.index=u}},a]}return[null,a]}function M(e,t,r,n){for(var i,o=0;i=e[o];o++)try{var a=i[0],s=i[1];i[2]?a&&(a.duals[s]=t):a?a[s]&&a[s](t,r,n):"function"==typeof s&&s(t,r,n)}catch(e){console.log(e)}}function F(e,t,r){var n=e.$gui,i=n.connectTo[t];i&&n.compState>=2&&setTimeout(function(){M(i,e.state[t],r,t)},0)}function L(e,t,r,n,i){var o=e.$gui,a="id__"==t;return a&&(i&&(i=void 0,console.log("error: can not apply base.setter to duals.id__")),r&&n&&(o.hasIdSetter=!0)),i&&(i.setter=r||function(r,n){e.state[t]=r}),[function(){return this.state[t]}.bind(e),function(s){if(this.state){var l,u;if(arguments.length>=2)l=arguments[1],u=!1;else{if((l=this.state[t])===s)return;u=!0}var p=!1;if(a&&s<=2)u&&(this.state.id__=o.id__=s),r&&r(s,l),n&&n(s,l,t),1==s&&(o.id2__=0),p=!r&&0!=s;else if(o.inSync){if(o.compState<=1)return void o.initDuals.push([t,s]);r?i||(u?this.state[t]=s:s=this.state[t],r(s,l)):(u&&!i?this.state[t]=s:s=this.state[t],p=!0),n&&n(s,l,t)}else{var c=o.duals_;c?c.push([t,s]):(2!=this.state.id__||a||(o.id2__=0),(c=o.duals_=this.state.duals.slice(0)).push([t,s]),e.setState({duals:c}))}if(p){var f=o.connectTo[t];f&&o.compState>=2&&setTimeout(function(){M(f,e.state[t],l,t)},0)}}else o.initDuals.push([t,s])}.bind(e)]}function z(e){function t(t,r){var i=n[r];if(i)try{var o=a.connectTo[r];if(o){var s=e.state[r];i(e);var l=e.state[r];l!==s&&t.push([o,l,s,r])}else i(e)}catch(e){console.log(e)}}function r(e){var t=e&&e.component;return!!t&&(!!t.props["isTemplate."]||r(e.parent))}var n,i=!1,o=!1,a=e.$gui,s=e.duals;a.inSync=!0;try{0==a.compState?(o=!0,a.compState=1):a.compState=2;var l=a.flowFlag,u=a.duals,c=e.state.duals;if(o){i=!0,a.hasIdSetter?s.id__=1:(e.state.id__=1,a.id__=1);var h={},d=[];Object.keys(s).forEach(function(t){var r=e.props[t];void 0!==r&&(u[t]=r,d.push([t,r])),h[t]=!0});var g=a.exprAttrs,v=Array.isArray(g);(v||l)&&qe.__design__&&r(e.widget)&&(a.forExpr=0,l=a.flowFlag="",g.splice(0),e.state.exprAttrs=[]);var y=[],_=[],m=e.state.exprAttrs;n=a.exprAttrs={},v&&g.forEach(function(t,r){var n=e.props["$"+t],i=!1;if(n||"for"!=t||2!==a.forExpr||(n=e.props.$$for),n){if(0==t.indexOf("dual-")){var o=m.indexOf(t);o>=0&&m.splice(o,1);var s=t.slice(5).replace(Tt,function(e,t){return t.toUpperCase()});if(!s)return;i=!0,t=s}var l=void 0!==e.props[t];if(!l||h[t]){if(i&&m.push(t),"data"!=t){var u=At[t];u&&5!=u&&!l&&a.tagAttrs.push(t)}y.push(t),_.push([t,n])}else console.log("warning: dual attribute ($"+t+") is confliction.")}else"for"!=t&&console.log("warning: invalid dual attribute ($"+t+").")});var b=a.initDuals0;for(a.initDuals0=[],S=0;G=b[S];S++)e.state[G[0]]=G[1];var w={},k=Object.keys(a.dualAttrs);if(u.children=e.props.children,y.length||k.length||a.tagAttrs.length||a.dataset.length){for(var O,x=-1,P=[y,k,a.tagAttrs,a.dataset],S=0;O=P[S];S++)O.forEach(function(t){if(0==S)h[t]=!0;else if(1==S){var r=!1;if(void 0!==e.props[t]?r=!0:h[t]&&void 0!==u[t]&&(r=!0),r)return void console.log("warning: dual attribute ("+t+") is confliction.");if(h[t]=!0,"data"!=t){var n=At[t];n&&5!=n&&a.tagAttrs.push(t)}i=u[t]=e.props[a.dualAttrs[t]];if(vt.call(s,t))return void d.push([t,i]);e.state[t]=i}else{if(h[t])return void(2==S&&"data"==t&&(x=a.tagAttrs.indexOf(t)));h[t]=!0;var i=u[t]=e.props[t];if(vt.call(s,t))return void d.push([t,i]);e.state[t]=i}if(Object.getOwnPropertyDescriptor(s,t))0==S&&(w[t]=!0);else{var o=L(e,t);Object.defineProperty(s,t,{enumerable:!0,configurable:!0,get:o[0],set:o[1]})}});x>=0&&a.tagAttrs.splice(x,1)}if(a.forExpr&&(K=e.widget)){var $;2==a.forExpr&&(K.$callspace={flowFlag:"ref",forSpace:null},K.$callspace["data-rfor.path"]="",T($=K.$callspace.exprSpace={},e));var j={flowFlag:"for",exprSpace:$={}},D=e.props[2==a.forExpr?"$$for":"$for"],N=!0;if(K.$callspace?D?K.$callspace.forSpace=a.forExpr=j:(delete a.forExpr,N=!1):(K.$callspace=j,D?a.forExpr=j:(delete a.forExpr,j.flowFlag="for0")),N&&T($,e,!D),a.forExpr){for(var E=a.comps2=a.comps,I=a.exprKeys=[],A=a.exprChild=[],S=E.length-1;S>=0;S-=1){var R=E[S];if(R){if(f(R.props.className,"rewgt-static")){I.unshift(null),A.unshift(null);continue}var F=R.props.$key,z=null;if(F&&"string"==typeof F?(z=H(e,F,"key"))||console.log("error: invalid '$key' expression: "+F):console.log("error: no '$key' defined for child element in '$for' loop."),z){I.unshift(z);var B=R.props.$children,V=null;B&&"string"==typeof B&&((V=H(e,B,"children"))||console.log("error: invalid '$children' expression: "+B)),A.unshift(V);continue}}E.splice(S,1)}a.comps=[],a.compIdx={}}}_.length&&(a.flowExprId0=0,a.flowExprId=1,_.forEach(function(t){var r=t[0],i=W(e,r,t[1],w[r]),o=i[0],s=i[1];if(o){if("any"!=s){var l=a.syncExpr;l||(l=a.syncExpr=[]),a.syncExpr.push([r,o])}else n[r]=o;0!=r.indexOf("data-")&&0!=r.indexOf("aria-")||a.dataset2.push(r)}else console.log("warning: compile expression ($"+r+") failed.")})),a.compState=1.5;var U=d.length;for(a.initDuals.forEach(function(e){var t=e[0],r=d.findIndex(function(e){return e[0]===t});r>=0&&r=0&&(G=m[X],m.splice(X,1),t(Y,G),m=e.state.exprAttrs);G=m.shift();)t(Y,G)}if(l||a.forExpr){var K,J=!0;if(l&&(J=e.state[l],"if"==l||"elif"==l?(!0,e["hide."]=!J):"else"==l&&(o&&(a.flowExprId0=a.flowExprId=St,J=e.state.else=!C(e)),!0,e["hide."]=!J)),a.forExpr&&(K=e.widget)){J=e.state.for,Array.isArray(J)&&0!=J.length||(J=[]),a.forExpr["data-for.path"]=J;var Z={},Q=[],E=a.comps2,I=a.exprKeys,A=a.exprChild,ee=!1,te=e.props["childInline."];J.forEach(function(t,r){for(var n,i=0;n=E[i];i+=1){var o=I[i];if(o){var a=n.props["childInline."];if(void 0!==a)if(te){if(!a)continue}else if(!f(n.props.className,["rewgt-panel","rewgt-unit"]))continue;if(n.props["isReference."])continue;var s=A[i],l=null;if(s)try{(l=s(e,r))?dt(l)||Array.isArray(l)||"string"==typeof l||(l=null):l=null}catch(e){console.log("error: caculate '$children' ("+(i+1)+" of "+E.length+") failed."),console.log(e)}var u=!1;try{"number"!=typeof(h=o(e,r))&&(h+=""),u=!0}catch(e){console.log("error: caculate '$key' ("+(i+1)+" of "+E.length+") failed."),console.log(e)}if(u){var p,c={"hookTo.":K,"keyid.":h,key:h+"","for.index":r};p=l?dt(l)||"string"==typeof l?ft(n,c,l):ft.apply(null,[n,c].concat(l)):ft(n,c),Z[h]=Q.push(p)-1}}else{ee=!0;var h="static-"+r,d=Object.assign({},n.props);d["keyid."]=h,d.key=h,Z[h]=Q.push(ht(te?"span":"div",d))-1}}}),ee&&setTimeout(function(){de(e,!0)},0),0==a.comps.length&&0==Q.length||(a.removeNum+=1),a.compIdx=Z,a.comps=Q}}if(Y.length&&a.compState>=2&&setTimeout(function(){Y.forEach(function(e){M(e[0],e[1],e[2],e[3])})},0),o&&qe.__debug__&&"function"==typeof(z=e.props.setup__))try{z.apply(e)}catch(e){console.log(e)}if(a.id__===e.state.id__)0==a.id2__&&(s.id__=mt!==e.state.id__?mt:p());else{var re=e.state.id__;e.state.id__=re-1,s.id__=re}a.id2__=0,a.isChildExpr&&a.children2!==e.props.children&&(a.removeNum+=a.comps.length,a.children2=e.props.children,a.comps=gt(e.props.children)),s.childNumId=a.comps.length+(a.removeNum<<16)}catch(e){console.log(e)}return a.inSync=!1,i}function B(e,t){var r=null,n=(t.frame||{}).path;return n&&((r=(r=e.componentOf(n))&&r.fullClone())||(qe.__design__||delete t.frame,console.log("warning: can not locate popup frame ("+n+")."))),r||null}function V(e){var t=e._;if(!t)return null;var r=t._statedProp||[],n=t._silentProp||[],i=t._htmlText,o=Object.assign({},e.props);if(r.forEach(function(t){vt.call(o,t)&&(o[t]=e.state[t])}),n.forEach(function(e){delete o[e]}),i){var a=e.state["html."];a&&"string"==typeof a?o["html."]=a:delete o["html."]}else delete o["html."];return delete o["data-unit.path"],delete o["data-span.path"],delete o.children,o}function U(e,t,r,n){var i=n.$gui,o=!!i.forExpr,a=o?i.comps2:i.comps,s=[],l=n.props["childInline."];return a.forEach(function(e){if(e)if(o||e.props["isReference."])s.push(e);else if(f(e.props.className,"rewgt-static")){delete(g=Object.assign({},e.props))["keyid."],delete g.key,delete g.onMouseDown,delete g.onDoubleClick;var t,i=g.name;if("number"==typeof(t=parseInt(i))&&t>=1048576){var a=n.$gui.statics;if(a=a&&a[i],Array.isArray(a)){var u=a.map(function(e){return e.cloneNode(!0)});t=qe.$staticNodes.push(u)-1,g.name=t+""}}s.push(ht(l?"span":"div",g))}else{var p=b(e),c=p&&r[p],h=c&&c.component;if(h){if(h.props["isTemplate."]&&!qe.__design__){var d=h.$gui.template;return d instanceof ae?ft(e,{template:d},null):void 0}var g=V(h);g&&s.push(U(e,g,c,h))}}}),0==s.length?ft(e,t,null):(s.unshift(t),s.unshift(e),ft.apply(null,s))}function q(e,t){var r;if(e===t)return!0;if(Array.isArray(e)){if(Array.isArray(t)&&(r=e.length)==t.length){for(o=0;o=1048576)c[o]=h;else{for(var v=p.comps.length,y=1048576+p.removeNum+v+"",g=0;g"Z"))return u=1,l;for(u=0,i=Ye[l];i&&(l=s.shift());)i=i[l];return i&&i._extend?o?i=Ue(i._extend(o)):n[e]=i=Ue(i._extend()):n[e]=i=null,i}function a(e,t,r){for(var n=t.length,i=r;i=1){var l,u,p=o[0],c=0,f=!1;Array.isArray(p)?(c=o.length-1,l=p[0],u=p[1]):(l=p,u=o[1]),u||(f=!0,u={});var h=!1,d=void 0===l?"undefined":ze(l);if("string"==d){var g=l[0];if(g>="A"&&g<="Z"||l.indexOf(".")>=0){console.log("warning: unknown react class ("+l+")");continue}}else if(dt(l))h=!0;else if("function"!=d){console.log("warning: unknown react class");continue}if(c){var v=[];a(v,o,1),h?e.push(ft(l,u,v)):e.push(ht(l,u,v))}else h?e.push(f?l:ft(l,u)):e.push(ht(l,u))}}else e.push(ht(o));else e.push(o)}}}var s,l,u=0,p=t[0],c=0,f=!1;if(Array.isArray(p)?(c=t.length-1,s=p[0],l=p[1]):(s=p,l=t[1]),l||(f=!0,l={}),!s){var h=l.html||[];if(h.length>0){var d=document.createElement("div");d.innerHTML=h.join("");for(var g=[],v=r.push(g)-1,y=0;P=d.children[y];y+=1)g.push(P);return e.push(ht("div",{className:"rewgt-static",name:v+""})),!0}return!1}var _="";i&&l.key&&(_=i+"."+l.key);var m="RefDiv"===s||"RefSpan"===s?s:"";if(m)return e.push(ht(o(m,_),l)),!1;var b=o(s,_);if(!b){var w="string"==typeof s?" ("+s+")":"";return console.log("warning: can not find template"+w),!1}if(u>0)if(c>0){var k=[];a(k,t,1),3==u?e.push(ft(b,l,e)):e.push(ht(b,l,k))}else 3==u?e.push(f?b:ft(b,l)):e.push(ht(b,l));else{var O=[b,l];if(c>0){for(var x,P,S=!1,y=1;P=t[y];y+=1)Array.isArray(P)?Z(O,P,r,n,_)&&(S=!0):dt(P)?O.push(P):"string"==(x=void 0===P?"undefined":ze(P))?O.push(ht(yr,{"html.":P})):"function"==x&&O.push(ht(P));S&&(O[1]=Object.assign({},l,{"hasStatic.":!0}))}e.push(ht.apply(null,O))}return!1}function Q(e,t){var r=e.widget;if(r){var n=e.$gui,i=n.cssWidth,o=n.cssHeight,a=!!t;if(("number"==typeof i||"number"==typeof o)&&(n.isPanel||!([].concat(e.state.margin,e.state.padding).indexOf(null)>=0))){var s=0;n.comps.forEach(function(e){if(e){var t=b(e),n=t&&r[t];if(n=n&&n.component){if(n.willResizing&&!n.willResizing(i,o,a))return;s||(s=p()),n.setState({parentWidth:i,parentHeight:o,id__:s})}}})}}}function ee(e,t,r){function n(){setTimeout(function(){ot=!1},300),r&&r()}if(qe.__design__){var i=[],o=[],a={};if(Z(i,t,o,a),1==i.length){ot=!0;var s=i[0];Ve.unmountComponentAtNode(e),e.style.visibility="hidden",e.innerHTML="",setTimeout(function(){Ge.widgetNum(0),nt=null,at=!1,it=!0,st=[],qe.$cachedClass=a,qe.$staticNodes=o,Ve.render(s,e,function(){e.style.visibility="visible";var t=qe.$main.$$onLoad_;"function"==typeof t&&t(n)})},0)}else r&&r()}else r&&r()}function te(e,t,r){function n(e){return e.replace(/&/g,"&").replace(/'/g,"'").replace(//g,">")}t=t||0;var i,o,a,s=e[0],l=0;Array.isArray(s)?(l=e.length-1,i=s[0],o=s[1],a=s[2]):(i=s,o=e[1],a=e[2]),"number"!=typeof a&&(a=1);var u=new Array(t+1).join(" "),p=u;if(!i){var c=o.html||[],f=r<=1?"
    ":"",h=r<=1?"
    ":"";return 0==c.length?p="":1==c.length?p+=f+c[0]+h+"\n":(p+=f+"\n",c.forEach(function(e){p+=u+" "+e+"\n"}),p+=u+h+"\n"),p}var d=!1;"RefDiv"==i?(!0,d=o["isPre."],l=0,p+=(d?"
    /g,">"));return d?p+="
    \n":3==a?y&&"\n"==y.slice(-1)?p+=u+"\n":p+="\n":v||"\n"!=p.slice(-1)?p+="\n":p+=u+"\n",p}function re(e,t){var r=e.component;if(!r)return null;for(var n in r.$gui.compIdx){var i=e[n],o=i&&i.component;if(o)if(o.props["isNavigator."]){var a=o.$gui.navItems,s=a&&a[t];if(s&&s.props["isPlayground."])return i}else if(!o.props["childInline."]&&(i=re(i,t)))return i}return null}function ne(e,t){if(!t)return[];var r=b(e),n=r&&t[r];if(n){var i=[];return(n=n.component)?(n.$gui.comps.forEach(function(e){e&&i.push(e)}),i):i}return gt(e.props.children)}function ie(e){var t=e,r=t.indexOf("./"),n=t[0],i=0,o=!1;if(0==r)i=1,t=t.slice(2);else if(1==r&&"."==n)for(i=2,t=t.slice(3);0==(r=t.indexOf("../"));)i+=1,t=t.slice(3);else if("."==n)i=-1,t=t.slice(1);else if("/"==n){if("/"===t[1])return[t.slice(2),-1,!0];i=-1,t=t.slice(1)}else o=!0;return t.indexOf("/")>=0?(Ge.instantShow("error: invalid reference path ("+e+")."),null):[t,i,o]}function oe(e,t){function r(e){return(e=e&&e.component)||(console.log("warning: can not find widget ("+t+")."),null)}var n=ie(t);if(!n)return null;var i=n[0],o=n[1];if(n[2]){var a=l=e.widget;if(o<0&&(a=l&&l.parent),a){for(var s=i.slice(0,2);"//"==s;){if(!(a=a.parent))return r(null);s=(i=i.slice(2)).slice(0,2)}return r(i?a.W(i):a)}}else if(-1==o){if(i)return r(qe.W(i))}else{for(var l=e.widget;l&&o>0;){var u=l&&l.component;if(u&&u.props["isNavigator."]&&0==(o-=1))break;var p=l.parent;if(!p){o-=1,l=qe;break}l=p}if(l&&0==o)return r(i?l.W(i):l)}return r(null)}function ae(e){this.comps={},this.element=e,this.pathSeg=""}function se(e,t,r){function n(e,t,r){var n=ie(t);if(!n)return i(null,t);var a=n[0],s=n[1],l=e instanceof ae;if(n[2]){if(l)return i(null,t);if(s<0&&(p=e.widget)){for(var u=a.slice(0,2);"//"==u;){if(!(p=p.parent))return i(null,t);u=(a=a.slice(2)).slice(0,2)}return void o(p,a,t,!1)}}else{if(-1==s)return void o(null,a,t,!1);var p=e;if(l){var c=(p=e.element).props["hookTo."],f=!1;for(c||(c=(c=p.widget)&&c.parent);p&&s>0&&c;){if(!(c instanceof ae)){if(Array.isArray(c)){if(r)return i(null,t);p=c.component,f=!0;break}return i(null,t)}if(r){if(!(n=c.comps[r]))return i(null,t);var h=n[0];if(4==h)(r=n[2])||(p=c.element,r=c.pathSeg,(c=p.props["hookTo."])||(c=(c=p.widget)&&c.parent));else{if(3!=h)return i(null,t);if(0==(s-=1))return void o(c,a,t,!0,r);r=n[2]}}else p=c.element,r=c.pathSeg,(c=p.props["hookTo."])||(c=(c=p.widget)&&c.parent)}if(!p||!c||!f)return i(null,t)}for(p=p.widget;p&&s>0;){var d=p&&p.component;if(d&&d.props["isNavigator."]&&0==(s-=1))break;var g=p.parent;if(!g){s-=1,p=qe;break}p=g}if(p&&0==s)return void o(p,a,t,!1)}i(null,t)}function i(n,i){if(!n)return Ge.instantShow("error: can not find reference ("+i+")."),void r();s?n.props["childInline."]||Ge.instantShow("warning: reference target ("+i+") should be inline widget."):f(n.props.className,["rewgt-panel","rewgt-unit"])||Ge.instantShow("warning: reference target ("+i+") should be: panel, div, paragraph.");var o=e.$gui,a=t.slice(1),c=null,h=o.compIdx[t];if("number"==typeof h){c=o.comps[h];var d=o.compIdx[a];"number"!=typeof d?c&&(o.compIdx[a]=h,delete o.compIdx[t],o.removeNum+=1):(h=d,o.removeNum+=1)}if(!c)return Ge.instantShow("error: invalid linker ("+t+")."),void r();l.unshift(c.props);var g={},v={},y=0;n.props.style&&(Object.assign(v,n.props.style),y+=1);for(var _=l.pop();_;){var m=w(_);m.style&&(Object.assign(v,m.style),y+=1),Object.assign(g,m),_=l.pop()}y&&(g.style=v),g["hookTo."]=e.widget,s?g["data-span.path"]=u:g["data-unit.path"]=u;var b=c.props.styles;if(b&&(g.styles=b),qe.__design__){var k={};g["link.props"]=Object.assign(k,w(c.props)),b&&(k.styles=b)}var O=parseInt(a),x=O+""===a?O:a;g.key=a,g["keyid."]=x,o.comps[h]=ft(n,g),e.setState({id__:p()},function(){var t=e.widget[x];(t=t&&t.component)&&de(t),r()})}function o(e,t,r,o,a){var u;if(e){if(!t){if(o)return i(e.element,r);var p=e.parent,c=e.component;return p=p&&p.component,p&&c&&"number"==typeof(w=p.$gui.compIdx[c.$gui.keyid])?i(c.fullClone(),r):i(null,r)}u=t.split(".")}else{if(!t||o)return i(null,r);if((u=t.split(".")).length<=1)return i(null,r);if(!(e=qe[u.shift()]))return i(null,r)}for(;e&&u.length;){var f=u.shift();if(!f)return i(null,r);var h=null,d=null,g="";if(o){if(qe.__design__)return i(null,r);d=e,a?(g=a,u.unshift(f)):g=f}else{if(!(h=e.component)&&(e===qe&&((e=qe[f])&&(h=e.component),f=u.shift()),!h||!f))return i(null,r);if((!qe.__design__||h.isLibGui)&&h.props["isTemplate."]){if(!(d=h.$gui.template))return i(null,r);g=f,h=null}}if(d){for(var v=d.comps[g];v;){var y=v[0],_=v[1];if(2==y){if(0!=u.length)break;var m=2==(O=_.props)["isReference."],b=O.$;if(O["hookTo."]===d&&"string"==typeof b){if(!(b=b.trim()))return i(null,b);if(s!=m&&Ge.instantShow("warning: reference type ("+r+") mismatch."),"/"==b[0]&&"/"==b[1]){if(b.indexOf("/",2)>=0)return i(null,b);(u=g.split(".")).pop(),g=u.join("."),u=b.slice(2).split("."),g&&(g+="."),g+=u.shift(),v=d.comps[g],l.push(O);continue}return l.push(O),void n(d,b,v[2])}break}if(4==y&&(_=(d=_).element),0==u.length)return i(_,r);4==y?g=u.shift():g+="."+u.shift(),v=d.comps[g]}return i(null,r)}if(0==u.length){var w=h.$gui.compIdx[f];if("number"==typeof w){var k=e[f];return k=k&&k.component,k?i(k.fullClone(),r):i(null,r)}if("number"==typeof(w=h.$gui.compIdx["$"+f])&&(_=h.$gui.comps[w])&&_.props["isReference."]){var O=_.props,m=2==O["isReference."];if("string"==typeof(b=O.$))return(b=b.trim())?(s!=m&&Ge.instantShow("warning: reference type ("+r+") mismatch."),l.push(O),void n(h,b,"")):i(null,b)}return i(null,r)}e=e[f]}i(null,r)}var a,s=!1,l=[],u="",c=e.$gui.compIdx[t];if(e.widget&&"number"==typeof c&&"$"==t[0]&&(a=e.$gui.comps[c])&&a.props["isReference."]){var h=a.props;2==h["isReference."]&&(s=!0),"string"!=typeof(u=h.$)||0==(u=u.trim()).length?(""!==u&&console.log("warning: load reference ("+t+") failed: invalid path"),r()):u?n(e,u,""):i(null,u)}else console.log("warning: load reference ("+t+") failed."),r()}function le(e){function t(e){e.target.style.opacity="0.1"}function r(e){e.target.style.opacity="0"}var n=this.pageIndex=0,i=this.keys=[],o=this.namedPage={};e.forEach(function(e,t){i.push(e[0]+"");var r=e[1],a=t==n?"block":"none";r.state.style.display!==a&&(r.duals.style={display:a});var s=r.props.name;s&&"string"==typeof s&&(o[s]=t)});var a=window.innerWidth,s=Math.max(Math.floor(a/20),20),l=document.createElement("div");l.setAttribute("style","position:absolute; left:0px; top:0px; width:"+s+"px; height:100%; background-color:#000; opacity:0; z-index:3000;"),document.body.appendChild(l);var u=document.createElement("div");u.setAttribute("style","position:absolute; right:0px; top:0px; width:"+s+"px; height:100%; background-color:#000; opacity:0; z-index:3000;"),document.body.appendChild(u),this.leftPanel=l,this.rightPanel=u;var p=this;l.onclick=function(e){p.prevPage()},u.onclick=function(e){p.nextPage()},l.onmouseover=t,l.onmouseout=r,u.onmouseover=t,u.onmouseout=r}function ue(){var e=[],t=nt&&nt.component;return t&&(t.$gui.comps||[]).forEach(function(t){if(t){var r=b(t),n=r&&nt[r];(n=n&&n.component)&&n.props["isScenePage."]&&(!qe.__design__&&n.props.noShow||e.push([r,n]))}}),e}function pe(e){if(!Array.isArray(e))return"number"==typeof e?[e,e,e,e]:[0,0,0,0];var t=e.length;if(0==t)return[0,0,0,0];if(1==t)return[r=parseFloat(e[0])||0,r,r,r];if(2==t)return[r=parseFloat(e[0])||0,n=parseFloat(e[1])||0,r,n];if(3==t)return[r=parseFloat(e[0])||0,n=parseFloat(e[1])||0,i=parseFloat(e[2])||0,n];var r=parseFloat(e[0])||0,n=parseFloat(e[1])||0,i=parseFloat(e[2])||0;return[r,n,i,parseFloat(e[3])||0]}function ce(e){if(!Array.isArray(e))return"number"==typeof e?[e,e,e,e]:null===e?[null,null,null,null]:[0,0,0,0];var t=e.length;if(0==t)return[0,0,0,0];if(1==t)return r=null===(r=e[0])?null:parseFloat(r)||0,[r,r,r,r];if(2==t){var r=e[0],n=e[1];return r=null===r?null:parseFloat(r)||0,n=null===n?null:parseFloat(n)||0,[r,n,r,n]}if(3==t){var r=e[0],n=e[1],i=e[2];return r=null===r?null:parseFloat(r)||0,n=null===n?null:parseFloat(n)||0,i=null===i?null:parseFloat(i)||0,[r,n,i,n]}var r=e[0],n=e[1],i=e[2],o=e[3];return r=null===r?null:parseFloat(r)||0,n=null===n?null:parseFloat(n)||0,i=null===i?null:parseFloat(i)||0,o=null===o?null:parseFloat(o)||0,[r,n,i,o]}function fe(e,t,r,n){if("number"!=typeof n)return null;var i,o,a=n,s=e.$gui;if(e.state?(i=e.state.sizes,o=parseFloat(e.state.cellSpacing)||0):(i=e.props.sizes,o=parseFloat(e.props.cellSpacing)||0),Array.isArray(i)){for(var l=i.length,u=0;u=0&&(a-=h>=1?h:h>=.9999?n:h*n)}return a-=o*l,a<0?null:a}for(var p=s.comps,l=p.length,u=0;u=0&&(a-=h>=1?h:h>=.9999?n:h*n),a-=r?(f[1]||0)+(f[3]||0):(f[0]||0)+(f[2]||0)}}return a<=0?null:a}function he(e){e.popDesigner=G,e.saveDesigner=X,e.dumpTree=Y,e.loadTree=ee,e.streamTree=te,e.listScenePage=ue,e.keyOfNode=function(e){return u(e)},e.splitterMouseDn=function(){return lt}}function de(e,t){var r=e.getHtmlNode();if(r){for(var n=[],i=r.querySelectorAll(".rewgt-static"),o=0;l=i[o];o++){for(var a=l.parentNode,s=!1;a&&a!==document;){if(a===r){s=!0;break}if(a.classList.contains("rewgt-static"))break;a=a.parentNode}if(s){p=(c=l.getAttribute("name")||void 0)&&parseInt(c);if(!isNaN(p)){if(l.children.length>0){if(!(t&&p>=1048576))continue;l.innerHTML=""}n.push([p,c,l])}}}for(var l,o=0;l=n[o];o++){var u,p=l[0],c=l[1],f=l[2],h=p>=1048576;if(h){var d=e.$gui.statics;u=d&&d[c]}else u=qe.$staticNodes[p];if(Array.isArray(u))for(var g,v=0;g=u[v];v++)f.appendChild(h?g:g.cloneNode(!0))}}}function ge(e,t,r){function n(){r&&r()}var i=e.widget;if(!i)return n();var o=!1,a=e.$gui,s=a.cssWidth,l=a.cssHeight,u=a.useSparedX;if(u){var c=fe(e,i,!0,s);a.sparedX!==c?(a.sparedX=c,"number"==typeof c&&(o=!0)):t&&(o=!0)}else if(a.useSparedY){var f=fe(e,i,!1,l);a.sparedY!==f?(a.sparedY=f,"number"==typeof f&&(o=!0)):t&&(o=!0)}if(!o)return n();if("number"!=typeof s&&"number"!=typeof l)return n();var h=[];a.comps.forEach(function(e){if(e){var t=b(e);if(t){var r=i[t];if(r=r&&r.component){var n=u?r.state.width:r.state.height;"number"==typeof n&&n<0&&h.push(r)}}}}),h.length&&setTimeout(function(){var e=Ge.dragInfo.inDragging;h.forEach(function(t){t.willResizing&&!t.willResizing(s,l,e)||t.setState({parentWidth:s,parentHeight:l,id__:p()})})},0),n()}function ve(e,t){var r=!1;if(e){var n=void 0===e?"undefined":ze(e);if("string"==n)e=[e],r=!0;else if("object"==n)if(Array.isArray(e)){var i;"string"==typeof e[0]&&"object"==ze(i=e[1])&&"string"!=typeof i.$trigger&&(e=[e]),r=!0}else"string"==typeof e.$trigger&&(e=[e],r=!0)}if(!r)throw new Error("invalid trigger data (key="+this.$gui.keyid+")");this.state.trigger=e}function ye(e){var t=e.$gui;if(t.isPanel)return console.log("warning: panel not support virtual widget"),null;var r=t.comps,n=r.length,i=t.keyid+"",o=e.props["data-rewgt-owner"];o&&(i=o+"."+i);for(var a=0;a=0&&dt(i=r[o])){if(o>=1&&"foo"!==b(i))for(var s=o-1;s>=0;){var l=r[s];if(dt(l)&&"foo"===b(l)){var u=r.slice(0,s);(f=me(l,t))&&u.push(f);for(var p=s+1;p<=o;p++)u.push(r[p]);return n?(u.unshift(n,{}),ft.apply(null,u)):u}s-=1}var c=r.slice(0,-1),f=me(i,t);return f&&c.push(f),n?(c.unshift(n,{}),ft.apply(null,c)):c}return n?ft.apply(void 0,[n,{}].concat(a(t))):null}function be(e){return e.hasOwnProperty("prototype")}function we(e,t){Array.isArray(e)&&function(e,t,r){for(var n=[],i=[],o=t.length-1;o>=0;o--){var a=t[o];if(Array.isArray(a)){var s=a[0],l=a[1];if(s&&"string"==typeof s&&l)if("string"==typeof l)l=a[1]=ht(Jt,{key:s,"keyid.":s,"html.":l}),n.unshift(s),i.unshift(l);else if(dt(l))l.props["keyid."]!==s&&(l=a[1]=ft(l,{key:s,"keyid.":s})),n.unshift(s),i.unshift(l);else{if(Array.isArray(l)&&l[0]&&(l=Ge.loadElement(l))){l.props["keyid."]!==s&&(l=ft(l,{key:s,"keyid.":s})),a[1]=l,n.unshift(s),i.unshift(l);continue}t.splice(o,1)}else t.splice(o,1)}}if(!qe.__design__){for(var u=[],o=r.length-1;o>=0;o--)s=(a=r[o])[0],n.indexOf(s)<0&&u.unshift("-"+s);(u=u.concat(i)).length&&setTimeout(function(){e.setChild.apply(e,u)},0)}}(this,e,t)}function ke(e,t,r){return function(e){function a(e,i){o(this,a);var s=n(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,e||t,i));return r&&(s._htmlText=!1),s}return i(a,e),Le(a,[{key:"getDefaultProps",value:function(){var e=Fe(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"getDefaultProps",this).call(this);return e["tagName."]=t.toLowerCase(),e}}]),a}(e)}function Oe(e){e.stepPlay=function(e){if(this.isHooked){var t=this.getHtmlNode();if(t&&t.readyState>=2)return t.play(),!0}return!1},e.stepPause=function(e){if(this.isHooked){var t=this.getHtmlNode();if(t)return t.paused||t.pause(),!0}return!1},e.stepIsDone=function(){if(!this.isHooked)return!0;var e=this.getHtmlNode();return!e||e.readyState<2||e.paused}}function xe(e,t,r){function n(t,r){if(t||0===t){var n=e.widget;if(n=n&&n[t],(n=n&&n.component)&&n.navWillLeave){var i=n.navWillLeave();if(!i||"string"==typeof i&&!window.confirm(i))return!0}}return!1}function i(t,r){e.state.checkedId=r,F(e,"checkedId",t)}var o=e.$gui;if(t&&o.compState){var a=o.navSubkey,s=e.state.checkedId;if(o.navItems[t]){if(!n(s,t))return i(s,t),void e.reRender(r)}else if(a){var l=e.widget,u=l&&l[a];if((u=u&&u.component)&&u.props["isNavigator."]&&!n(s,t))return i(s,t),void u.fireChecked(t,r)}e.state.checkedId=t}r&&r()}function Pe(e,t){if(z(e),e["hide."])return null;var r=e.state["tagName."];if(!r)return ye(e);var n=!1,i=void 0,o=e.parentOf(!0);o&&o.props["isNavigator."]&&(i=o.state.checkedId||"",n=!0);var a=e.prepareState(),s=Object.assign({},e.state.style);n&&(i&&i==e.$gui.keyid?s.display="block":s.display="none");var l=a.length,u=e.$gui.insertEle;u&&(a=me(u,a),l=!0),l||2!=t||(a=e.state["html."]||null);var p=k(e,s);return ht(r,p,a)}function Se(e){var t=e.widget;for(t=t&&t.parent;t;){var r=t.component;if(!r)break;if(r.props["isNavigator."])return r;t=t.parent}return null}function $e(e,t,r,n){if("string"==typeof t.path&&(t.state||(t.state={opened:!1}),r?(delete r.state,t=Object.assign({},t,r)):t=Object.assign({},t),!t.state.opened)){var i=t.path;i||(i="./"+this.$gui.keyid);var o=e.componentOf(i);if(o=o&&o.fullClone())return void Ge.popWin.showWindow(o,t,function(){e.duals["data-checked"]="1",n(!0)},e);Ge.instantShow("warning: can not locate popup window ("+i+").")}n(!1)}function je(e,t){if(t||(t=e.findNavOwner()),t){var r=e.$gui.keyid;t.listOptComp().forEach(function(t){t!==e&&t.clearChecked&&t.$gui.keyid!==r&&t.clearChecked()})}}function De(e,t,r,n){function i(r){var n=r.shift();n?setTimeout(function(){e.state["data-checked"]?t():i(r)},n):t()}function o(){u&&(je(e,p),e.fireTrigger()),t&&t()}e.state.disabled&&!n&&t&&t();var a=e.state.recheckable,s=e.state["data-checked"],l=e.state.popOption;if(l){if(!l.state||!l.state.opened)return void(!a&&s||$e(e,l,r,function(e){t&&t()}));if(!n)return}if(!s)return e.duals["data-checked"]="1",void(t&&i([100,100,100]));a&&(e.state.recheckable=!1,setTimeout(function(){e.state.recheckable=!0},300));var u=!1,p=null;if(e.state.isolated)return(n||a)&&(u=!0),void o();if(p=e.findNavOwner()){var c=e.$gui.keyid+"";if((p.state.checkedId!==c||n||a)&&(!p.canNavigateTo||p.canNavigateTo(c)))return(n||a)&&(u=!0),void xe(p,c,o)}o()}function Ne(e,t){var r=s(e.props.$trigger||e.props.popOption);e.defineDual("isolated",function(e,t){this.state.isolated=s(e)}),void 0===e.props.isolated&&(e.duals.isolated=r),e.defineDual("recheckable",function(e,t){this.state.recheckable=s(e)}),void 0===e.props.recheckable&&(e.duals.recheckable=r),t.disabled="",e.defineDual("disabled",function(e,t){this.state.disabled=s(e)}),e.defineDual("popOption"),t["data-checked"]="",e.defineDual("data-checked",function(t,r){var n=s(r),i=s(t);n!=i?i?(e.state["data-checked"]=i,setTimeout(function(){e.setChecked(null,void 0,!0)},0)):e.state["data-checked"]=i:e.state["data-checked"]=n})}function Ee(e,t){return e["data-checked"]=[t+1,"string",["","1"]],e.isolated=[t+2,"string",["","1"]],e.disabled=[t+3,"string",["","1"]],e.recheckable=[t+4,"string",["","1"]],e.trigger=[t+5,"string",null,"[string]: [sPath,{trigger,pop_option},[sPath,modifier], ...]"],e.popOption=[t+6,"object",null,"[object]: {path:bodyElePath}"],e}function Ie(e,t){function r(e,t,n,i){var o=n[0],a=n[1],s=4==o?a.element.props.children:a.props.children;if(s){var l=i;3==o?l=t:4==o&&(e=a,l=t,t=""),Be.Children.forEach(s,function(n,i){var o=n.props["keyid."];if(!o&&0!==o){var a=b(n);if(a){var s=parseInt(a);o=s+""===a?s:a}else o=i}var u=o+"",p=1,c=ft(n,{"keyid.":o,key:u,"hookTo.":e}),f=t?t+"."+u:u;n.props["isTemplate."]?(p=4,(c=new ae(c)).pathSeg=f):n.props["isNavigator."]?p=3:n.props["isReference."]&&(p=2);var h=[p,c,l];e.comps[f]=h,2!=p&&r(e,f,h,l)})}}var n=b(t);if(!n)return!1;var i,o=parseInt(n),a=o+""===n?o:n,s=1;t.props["isReference."]?(s=2,"$"==n[0]&&(n=n.slice(1),(o=parseInt(n))+""==n&&(a=o)),i=ft(t,{"hookTo.":e,"keyid.":a,key:n})):(i=ft(t,{"hookTo.":e,"keyid.":a,key:n}),t.props["isTemplate."]?(s=4,(i=new ae(i)).pathSeg=n):t.props["isNavigator."]&&(s=3));var l=[s,i,""];return e.comps[n]=l,2!=s&&r(e,n,l,""),!0}function Ae(e){var t=e.widget,r=null;if(t=t&&t.parent){var n=t.component;if(n){var i=n.$gui.compIdx[e.$gui.keyid];if("number"==typeof i){var o=n.$gui.comps[i];o&&(r=new ae(o))}}}if(!r)return!1;e.$gui.template=r;for(var a=e.$gui.comps,s=a.length,l=0;l=0&&e.exprAttrs.splice(r,1)}}function Ce(e,t){if(!t||"string"!=typeof t)return null;var r=t[0];if("."!=r&&"/"!=r){var n=e.$gui.template;if(!n)return null;for(var i=t.split("."),o=i.shift(),a=n.comps[o];a;){var s=a[0],l=a[1];if(2==s)return 0==i.length?l:null;if(4==s){if(0==i.length)return null;l=(n=l).element,o=i.shift(),a=n.comps[o]}else{if(0==i.length)return l;o+="."+i.shift(),a=n.comps[o]}}}else{var u=t.lastIndexOf("./");if(u>=0)return(c=e.componentOf(t.slice(0,u+2)))?c.elementOf(t.slice(u+2)):null;if("."==r){if((u=t.indexOf(".",1))>1){var p=qe.W(t.slice(0,u)),c=p&&p.component;if(c)return c.elementOf(t.slice(u+1))}}else if("/"==r&&"/"==t[1]){var f=e.parentOf();return f?f.elementOf(t.slice(2)):null}}return null}function Re(e){e.stopPropagation()}function He(){function e(t,r){Object.keys(t).forEach(function(n){if(n&&"_"!=n[n.length-1]){var i=t[n];if("object"==(void 0===i?"undefined":ze(i)))if(i.getDefaultProps){var o=i.getDefaultProps(),a=1;o["childInline."]&&(a=f(o.className||"","rewgt-unit")?2:3),3!=a&&(en[r+n]=a),o["isPre."]&&(tn[r+n]=!0)}else e(i,r+n+".")}})}return en||(en={},tn={},e(Ye,"")),[en,tn]}function We(e,t,r){for(var n,i=[],o=[],a=0;n=e.children[a];a++){var s=Je.scanNodeAttr(n,t,a);if(s){var l=s[0],u=s[1];if("RefDiv"==l)i.push(ht(Gr,u));else if("RefSpan"==l)i.push(ht(Kr,u));else{var p,c=l.split(".");if(1==c.length&&(p=l[0])>="a"&&p<="z"){var f=u["html."]||null;delete u["html."],delete u["isPre."],i.push(ht(h,u,f))}else{var h=S(l)[c.pop()],d=t+"["+a+"]."+l;if(!h){console.log("error: can not find WTC ("+d+")");continue}var g=n.nodeName,v=[];"DIV"!=g&&"SPAN"!=g||(v=We(n,d,r)),v.unshift(h,u),i.push(ht.apply(null,v))}}}else if(n.classList.contains("rewgt-static"))for(var y,_=0;y=n.childNodes[_];_++)o.push(y);else o.push(n)}if(0==i.length&&o.length){var m={className:"rewgt-static",name:qe.$staticNodes.push(o)-1+""};r||(m["data-marked"]="1"),i.push(ht("div",m))}return i}function Me(e,t,r){function n(t){o.removeNum+=o.comps.length,o.compIdx={},o.comps=[],o.statics={},a&&(e.firstScan=!0,e.cellKeys={},e.cellStyles={});for(var n,s=[],l=[],u=0;n=t.children[u];u++){var c=n.getAttribute("$"),h=n.nodeName;if(!c||"PRE"!=h&&"DIV"!=h){if(!c)if(a)if(p.length&&(i(o,p),p=[]),"HR"==h){N=ht("hr",{"markedRow.":!0});o.comps.push(N),a&&(s.push(l),l=[])}else"P"==n.nodeName&&""===n.innerHTML||p.push(n);else p.push(n)}else{p.length&&(i(o,p),p=[]);var d=Je.scanNodeAttr(n,"",0),g=d&&d[0];if(!d||"RefSpan"===g){console.log("error: invalid node (<"+h+" $="+c+">)");continue}var v,y=d[1],_="RefDiv"!=g,m=!1,b=null,w=null;if(_){var k,O=g.split(".");if(1==O.length&&(k=g[0])>="a"&&k<="z")m=!0,v=g;else{if(!(v=S(g)[O.pop()])){console.log("error: can not find WTC ("+g+")");continue}v.defaultProps&&!f(v.defaultProps.className||"",["rewgt-panel","rewgt-unit"])&&(b=v,w=y,v=Jt,y={})}}else v=Gr;var x,P=o.comps.length,$=y.key,j="",D="";$&&"string"==typeof $&&0!=$.search(rn)?(j=D=$,_||"$"==$[0]||($="$"+$),x=$):(D=x="auto"+(P+o.removeNum),$=_?x:x="$"+x);var N;if(m){y.key=$;var E=y["html."]||null;delete y["html."],delete y["isPre."],N=ht(v,y,E)}else{Object.assign(y,{"hookTo.":e.widget,"keyid.":x,key:$}),_||(y.style?y.style.display="":y.style={display:""});var I=[];"DIV"==h&&(I=We(n,"["+u+"]."+g,!1)),b&&(I.unshift(b,w),I=[ht.apply(null,I)]),I.unshift(v,y),N=ht.apply(null,I)}o.compIdx[$]=P,o.comps.push(N),j&&(a?s[j]=N:l[j]=N),l.push([D,N]),it&&!_&&st.push([e,$])}}p.length&&i(o,p),a?l.length&&s.push(l):s=l,r&&setTimeout(function(){r(!0,s)},0)}function i(e,t){if(!s){var r=e.comps.length,n=1048576+e.removeNum+r+"",i=r+e.removeNum+"",o={className:"rewgt-static",name:n,key:i};e.compIdx[i]=r,e.comps.push(ht("div",o)),e.statics[n]=t}}var o=e.$gui,a=e.props["markedTable."],s=e.props.noShow;try{var l=Ge.marked(t),u=document.createElement("div"),p=[];u.innerHTML=l;var c=[];o.comps.forEach(function(e){if(e&&e.props["hookTo."]){var t=b(e);t&&c.push("-"+t)}}),c.length&&e.isHooked?e.setChild(c,function(){n(u)}):n(u)}catch(e){console.log(e),r&&r(!1)}}var Fe=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(n)},Le=function(){function e(e,t){for(var r=0;r0,Je.appBase=function(){return"/app/files/rewgt/web"}}(window.location),Ge.version=function(){return"1.1.0"};var Ze=function(e){var t=e.match(/trident.*rv[ :]*([\d.]+)/);if(t){if(parseFloat(t[1])>=11)return["ie",t[1]]}else{if(t=e.match(/firefox\/([\d.]+)/))return["firefox",t[1]];if(t=e.match(/chrome\/([\d.]+)/))return["chrome",t[1]];if(t=e.match(/opera.([\d.]+)/))return["opera",t[1]];if(t=e.match(/safari\/([\d.]+)/))return["safari",t[1]];if(t=e.match(/webkit\/([\d.]+)/))return["webkit",t[1]]}return e.match(/msie ([\d.]+)/)?["ie",""]:["",""]}(window.navigator.userAgent.toLowerCase());Ge.vendorId=Ze;var Qe=/[^A-Za-z0-9\+\/\=]/g,et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",tt=Ge.Base64={encode:function(e){var t,r,n,i,o,a,s,l="",u=0;for(e=tt._utf8_encode(e);u>2,o=(3&t)<<4|(r=e.charCodeAt(u++))>>4,a=(15&r)<<2|(n=e.charCodeAt(u++))>>6,s=63&n,isNaN(r)?a=s=64:isNaN(n)&&(s=64),l=l+et.charAt(i)+et.charAt(o)+et.charAt(a)+et.charAt(s);return l},decode:function(e){var t,r,n,i,o,a,s="",l=0;for(e=e.replace(Qe,"");l>4,r=(15&i)<<4|(o=et.indexOf(e.charAt(l++)))>>2,n=(3&o)<<6|(a=et.indexOf(e.charAt(l++))),s+=String.fromCharCode(t),64!=o&&(s+=String.fromCharCode(r)),64!=a&&(s+=String.fromCharCode(n));return s=tt._utf8_decode(s)},_utf8_encode:function(e){for(var t="",r=0;r127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t},_utf8_decode:function(e){for(var t,r,n,i=0,o="";i191&&t<224?(r=e.charCodeAt(i+1),o+=String.fromCharCode((31&t)<<6|63&r),i+=2):(r=e.charCodeAt(i+1),n=e.charCodeAt(i+2),o+=String.fromCharCode((15&t)<<12|(63&r)<<6|63&n),i+=3);return o}},rt=null,nt=null,it=!0,ot=!1,at=!1,st=[],lt=!1,ut="",pt=null,ct=Ve.findDOMNode,ft=Be.cloneElement,ht=Be.createElement,dt=Be.isValidElement,gt=Be.Children.toArray,vt=tt.hasOwnProperty,yt={$:!0,styles:!0,"tagName.":!0,"isReference.":!0,"hookTo.":!0,width:!0,height:!0,className:!0,"childInline.":!0},_t=["for","if","elif","else"];Ge.isUnderBody=l,Ge.keyOfNode=function(e){return u(e)},Ge.dragInfo={inDragging:!1,justResized:!1};var mt=4;Ge.identicalId=p,Ge.classNameOf=c,Ge.hasClass=function(e,t){return f(c(e),t)},Ge.addClass=function(e,t){for(var r=e.state.klass||"",n=" "+(e.$gui.className||"")+" "+r+" ",i="",o=Array.isArray(t)?t:String(t).split(/ +/),a=o.length,s=0;s=0;o--){var a=r[o];if(a){var s=a[0];"-"==s?n.unshift(a.slice(1)):"+"==s?i.unshift(a.slice(1)):i.unshift(a)}}return Ge.removeClass(e,n,i)};var bt=["S1","S2","S3","S4","S5","S6"];Je.mergeClass=function(e,t,r){var n=v(r);return g(e,t,n[0],n[1])},Ge.mergeClass=function(e,t){var r=v(t),n=r[0],i=r[1];return Ge.removeClass(e,n,i)},Ge.klassNames=y,Ge.clearKlass=_,Ge.setupKlass=function(e,t){for(var r=[_(e,t)],n=arguments.length,i=2;i=2?O(void 0,e,arguments[1]):O(void 0,e)},Ge.setChildren=function(e,t,r,n){"function"==typeof r&&(n=r,r=void 0);var i=e.$gui;if(t||(t=i.comps),r&&(i.isPanel||e.widget===nt?(console.log("error: invalid argument (insertEle) for panel"),r=void 0):Array.isArray(r)?0==r.length&&(r=null):dt(r)&&void 0===r.props["childInline."]||(console.log("error: invalid argument (insertEle)"),r=null)),Array.isArray(t))if((r||null===r)&&(i.insertEle=r),t!==i.comps){for(var o=[],a=t.length,s=0;s=1.5?e.setState({id__:x(e.state.id__)},n):setTimeout(function(){e.setState({id__:x(e.state.id__)},n)},0)}else n&&(i.inSync?setTimeout(function(){n()},0):n())},Ge.getWTC=S;var kt={ie:"ms",firefox:"Moz",opera:"O",chrome:"Webkit",safari:"Webkit",webkit:"Webkit"};Xe.regist("vendor",function(){return kt[Ze[0]]||""}),Xe.regist("vendorId",function(){return"-"+(kt[Ze[0]]||"").toLowerCase()+"-"}),Xe.regist("__design__",function(){return parseInt(qe.__design__||0)}),Xe.regist("__debug__",function(){return parseInt(qe.__debug__||0)}),Xe.regist("time",function(e){return(e?new Date(e):new Date).valueOf()}),Xe.regist("isFalse",function(e){return!e}),Xe.regist("isTrue",function(e){return!!e}),Xe.regist("parseInt",function(e){return parseInt(e)}),Xe.regist("parseFloat",function(e){return parseFloat(e)}),Xe.regist("escape",function(e){return escape(e)}),Xe.regist("unescape",function(e){return unescape(e)}),Xe.regist("evalInfo",function(){var e=void 0,t=this.component;if(!t)return e;var r=t.widget,n=r&&r.$callspace;if(n&&(e=n.exprSpace.$info,n.forSpace)){var i=n.forSpace.exprSpace.$info;e?i&&i[2]>=e[2]&&(e=i):e=i}return e}),Xe.regist("tagValue",function(e){if("object"!=(void 0===e?"undefined":ze(e)))return e;var t,r=Object.assign({},e),n=r.$set;if(n){if("object"!=(void 0===n?"undefined":ze(n)))return e;n=r.$set=Object.assign({},n)}else{if(!(n=r.$merge))return t=Xe.time(),Object.keys(r).forEach(function(e){if("$"!=e[0]){var n=r[e];if("object"==(void 0===n?"undefined":ze(n))){var i=(n=r[e]=Object.assign({},n)).$set;if(i){if("object"!=(void 0===i?"undefined":ze(i)))return;(i=n.$set=Object.assign({},i)).time=t}else if(i=n.$merge){if("object"!=(void 0===i?"undefined":ze(i)))return;(i=n.$merge=Object.assign({},i)).time=t}else vt.call(n,"value")&&(n.time={$set:t})}}}),r;if("object"!=(void 0===n?"undefined":ze(n)))return e;n=r.$merge=Object.assign({},n)}return t=Xe.time(),Object.keys(n).forEach(function(e){if("$"!=e[0]){var r=n[e];"object"==(void 0===r?"undefined":ze(r))&&(r.time=t)}}),r}),Xe.regist("tagFired",function(){var e=arguments.length;if(e<2)return"";var t,r=arguments[0];for(t=1;t":"ex>",o<=0)t&&console.log(i);else{for(var a=0;a=2&&("number"==typeof(r=arguments[i-1])?(r<0&&(o=!1),i-=1):2==i&&Array.isArray(r)&&(i=(n=r).length)>=1&&"number"==typeof(r=n[i-1])&&(r<0&&(o=!1),i-=1));var a=[];if(n)for(s=0;sl?o?1:-1:o?-1:1}return 0}):u.sort(function(e,t){return o?e===t?0:e>t?1:-1:e===t?0:e>t?-1:1})}),Xe.regist("jsonp",function(e,t){var r=this.evalInfo(),n=null,i="";return r&&(n=r[0],i=r[1],t&&n&&vt.call(n.duals,i)&&void 0===n.state[i]&&(n.duals[i]=t)),e=Object.assign({},e),e.callback=function(e){n&&i&&vt.call(n.duals,i)&&(n.duals[i]=e)},Ge.jsonp(e),n&&i?n.state[i]:void 0}),Xe.regist("ajax",function(e,t){var r=this.evalInfo(),n=null,i="";return r&&(n=r[0],i=r[1],t&&n&&i&&vt.call(n.duals,i)&&void 0===n.state[i]&&(n.duals[i]=t)),e.success=function(e){n&&i&&vt.call(n.duals,i)&&(n.duals[i]={status:"success",data:e})},e.error=function(e,t){n&&i&&vt.call(n.duals,i)&&(n.duals[i]={status:t||"error",data:null})},Ge.ajax(e),n?n.state[i]:void 0}),j.defunct=function(e){throw new Error("Unexpected character ("+e+") at offset ("+(this.index-1)+")")};var Ot=new j,xt=[];Ot.addRule(/\s+/,function(e){return D(e,1,-1)}).addRule(/[0-9]+(?:\.[0-9]+)?\b/,function(e){return D(e,2,-1)}).addRule(/[_$A-Za-z](?:[_$A-Za-z0-9]+)?/,function(e){return D(e,3,-1)}).addRule(/(?:"((?:\\.|[^"])*)"|'((?:\\.|[^'])*)')/,function(e){return D(e,4,-1)}).addRule(/[?]/,function(e){return D(e,5,4)}).addRule(/[:]/,function(e){return D(e,6,-1)}).addRule(/[,]/,function(e){return D(e,7,-1)}).addRule(/[{]/,function(e){return D(e,8,-1)}).addRule(/[}]/,function(e){return D(e,9,-1)}).addRule(/[\[]/,function(e){return D(e,10,-1)}).addRule(/[\]]/,function(e){return D(e,11,-1)}).addRule(/[(]/,function(e){return D(e,12,-1)}).addRule(/[)]/,function(e){return D(e,13,-1)}).addRule(/[.]/,function(e){return D(e,14,18)}).addRule(/[*]/,function(e){return D(e,14,14)}).addRule(/[/]/,function(e){return D(e,14,14)}).addRule(/[%]/,function(e){return D(e,14,14)}).addRule(/[+]/,function(e){return D(e,14,13)}).addRule(/[-]/,function(e){return D(e,14,13)}).addRule(/[>]{3}/,function(e){return D(e,14,12)}).addRule(/[>]{2}/,function(e){return D(e,14,12)}).addRule(/[<]{2}/,function(e){return D(e,14,12)}).addRule(/[<][=]/,function(e){return D(e,14,11)}).addRule(/[<]/,function(e){return D(e,14,11)}).addRule(/[>][=]/,function(e){return D(e,14,11)}).addRule(/[>]/,function(e){return D(e,14,11)}).addRule(/[=]{3}/,function(e){return D(e,14,10)}).addRule(/[!][=]{2}/,function(e){return D(e,14,10)}).addRule(/[=]{2}/,function(e){return D(e,14,10)}).addRule(/[!][=]/,function(e){return D(e,14,10)}).addRule(/[&]{2}/,function(e){return D(e,14,6)}).addRule(/[&]/,function(e){return D(e,14,9)}).addRule(/[\^]/,function(e){return D(e,14,8)}).addRule(/[|]{2}/,function(e){return D(e,14,5)}).addRule(/[|]/,function(e){return D(e,14,7)}).addRule(/$/,function(e){return D(e,20,-1)});var Pt=[2,3,4,9,11,13,31,32,33,34,35,36,37,38,39,40,41,42,43],St=1,$t=["props","state","duals","item","count","index"],jt=0;Ge.triggerDual=F,Ge.popWin={showWindow:function(e,t,r,n){if(qe.__design__&&(it||ot))r&&r();else{var i=nt&&nt.$pop,o=i&&i.component;if(o&&e)if(f(e.props.className,["rewgt-panel","rewgt-unit"])){var a=t.frameElement||null;!a&&n&&(a=B(n,t));var s=void 0;n&&n.props["isOption."]&&vt.call(n.state,"data-checked")&&(s=n.state["data-checked"]),o.setChild(ht(Qr,{popOption:t,popFrame:a},e),function(){qe.__design__&&(rt&&rt.setDesignModal&&rt.setDesignModal(!0),void 0!==s&&n&&setTimeout(function(){n.state["data-checked"]=s},300)),r&&r()})}else Ge.instantShow("error: only panel, div, paragraph can use as popup window.")}},listWindow:function(){var e=nt&&nt.$pop,t=e&&e.component;if(!t)return[];var r=[];return t.$gui.comps.forEach(function(e){if(e){var t=b(e);if(t){var n=parseInt(t);n+""===t&&(t=n),r.push([t,e.props.popOption])}}}),r},closeAll:function(e){function t(){e&&e()}var r=nt&&nt.$pop,n=r&&r.component;if(!n)return t();var i=[];n.$gui.comps.length;if(n.$gui.comps.forEach(function(e){if(e){var t=b(e);t&&i.unshift("-"+t)}}),!i.length)return t();i.push(t),n.setChild.apply(n,i)},popWindow:function(e){var t=nt&&nt.$pop,r=t&&t.component;if(r){for(var n=null,i=r.$gui.comps,o=i.length-1;o>=0;){var a=i[o],s=a&&b(a);if(s&&(a=t[s])&&(n=a.component))break;o-=1}if(n){n.props.optPath;var l=n.$gui.keyid,u=n.state.popOption;if(0==arguments.length){var p=u&&u.beforeClose;"function"==typeof p&&(e=p())}var c=u&&u.callback;r.setChild("-"+l,function(){"function"==typeof c&&c(e)})}}}},Je.getCompRenewProp=V,Je.deepCloneReactEle=U;var Dt=null,Nt=0;Je.staticMouseDown=K,Je.staticDbClick=J,Ge.loadElement=function(){var e=[],t=arguments.length;if(1==t)return Z(e,arguments[0],qe.$staticNodes,qe.$cachedClass),1==e.length?e[0]:null;if(0==t)return null;for(var r=0;r0&&(i=e.slice(s),e=e.slice(0,s));var l=parseInt(e);l+""==e&&(e=l,a="number")}if("string"==a&&e){var u=this.namedPage[e];if("number"!=typeof u)return i="",r();e=u}else if("number"!=a)return i="",r();var p=this.keys.length;if(!p)return r();e>=p&&(e=p-1),e<0&&(e=0);var c=this.gotoPage_(this.keys,e);n=c[0],(o=c[1])||(i=""),r()}else t&&t("")},prevPage:function(){return this.gotoPage(this.pageIndex-1)},nextPage:function(){return this.gotoPage(this.pageIndex+1)},renewPages:function(e){var t=[],r={};e.forEach(function(e){var n=e[0];parseInt(n)+""!==n&&(r[n]=t.length),t.push(n)});var n=this.keys[this.pageIndex],i=!0;if("string"==typeof n){var o=t.indexOf(n);o>=0&&(this.pageIndex=o,i=!0)}this.keys=t,this.namedPage=r,i||(t.length?this.gotoPage(0):this.pageIndex=0)},setDisplay:function(e){function t(e){return(e=Math.max(e||0,0))<.9999?e*=window.innerWidth:e<1&&(e=window.innerWidth),e}vt.call(e,"leftCtrlWidth")&&(this.leftPanel.style.width=t(e.leftCtrlWidth)+"px"),vt.call(e,"rightCtrlWidth")&&(this.rightPanel.style.width=t(e.rightCtrlWidth)+"px")},destory:function(){this.leftPanel&&(this.leftPanel.parentNode.removeChild(this.leftPanel),this.leftPanel=null),this.rightPanel&&(this.rightPanel.parentNode.removeChild(this.rightPanel),this.rightPanel=null)}},Je.pageCtrl_=le,qe.$main.$$onLoad_=function(e){function t(e){var r=st.shift();r?se(r[0],r[1],function(){t(e)}):e()}function r(){var i=n.shift();i?i(r):t(function(){if(at=!1,it=!1,!qe.__design__&&rt&&!Ge.pageCtrl){var t=ue();t.length&&(Ge.pageCtrl=new le(t))}setTimeout(function(){if(qe.__design__)qe.$main.$onLoad=[],qe.$main.inRunning=!0,e&&e();else{var t,r=qe.$main.$onReady;if(Array.isArray(r))for(;t=r.shift();)t();else"function"==typeof r&&r();var n=qe.$main.$onLoad;if(Array.isArray(n))for(;t=n.shift();)t();qe.$main.inRunning=!0;var i=window.location.hash;i&&setTimeout(function(){Ge.gotoHash(i)},300)}},0)})}at=!0;var n=qe.$main.$$onLoading=(qe.$main.$$onLoad||[]).slice(0);r()};var It=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({onCopy:!0,onCut:!0,onPaste:!0,onCompositionEnd:!0,onCompositionStart:!0,onCompositionUpdate:!0,onKeyDown:!0,onKeyPress:!0,onKeyUp:!0,onFocus:!0,onBlur:!0,onChange:!0,onInput:!0,onSubmit:!0,onClick:!0,onContextMenu:!0,onDoubleClick:!0,onDrag:!0,onDragEnd:!0,onDragEnter:!0,onDragExit:!0,onDragLeave:!0,onDragOver:!0,onDragStart:!0,onDrop:!0,onMouseDown:!0,onMouseEnter:!0,onMouseLeave:!0,onMouseMove:!0,onMouseOut:!0,onMouseOver:!0,onMouseUp:!0,onSelect:!0,onTouchCancel:!0,onTouchEnd:!0,onTouchMove:!0,onTouchStart:!0,onScroll:!0,onWheel:!0,onAbort:!0,onCanPlay:!0,onCanPlayThrough:!0,onDurationChange:!0,onEmptied:!0,onEncrypted:!0,onEnded:!0,onError:!0,onLoadedData:!0,onLoadedMetadata:!0,onLoadStart:!0,onPause:!0,onPlay:!0,onPlaying:!0,onProgress:!0,onRateChange:!0,onSeeked:!0,onSeeking:!0,onStalled:!0,onSuspend:!0,onTimeUpdate:!0,onVolumeChange:!0,onWaiting:!0,onLoad:!0},"onError",!0),At={accept:1,acceptCharset:1,accessKey:1,action:1,allowFullScreen:1,allowTransparency:1,alt:1,async:1,autoComplete:1,autoFocus:1,autoPlay:1,capture:1,cellPadding:1,cellSpacing:1,challenge:1,charSet:1,checked:1,cite:1,classID:1,colSpan:1,cols:1,content:1,contentEditable:1,contextMenu:1,controls:1,coords:1,crossOrigin:1,data:1,dateTime:1,default:1,defer:1,dir:1,disabled:1,download:1,draggable:1,encType:1,form:1,formAction:1,formEncType:1,formMethod:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:1,hidden:1,high:1,href:1,hrefLang:1,htmlFor:1,httpEquiv:1,icon:1,id:1,inputMode:1,integrity:1,is:1,keyParams:1,keyType:1,kind:1,label:1,lang:1,list:1,loop:1,low:1,manifest:1,marginHeight:1,marginWidth:1,max:1,maxLength:1,media:1,mediaGroup:1,method:1,min:1,minLength:1,multiple:1,muted:1,name:1,noValidate:1,nonce:1,open:1,optimum:1,pattern:1,placeholder:1,poster:1,preload:1,profile:1,radioGroup:1,readOnly:1,rel:1,required:1,reversed:1,role:1,rowSpan:1,rows:1,sandbox:1,scope:1,scoped:1,scrolling:1,seamless:1,selected:1,shape:1,size:1,sizes:1,span:1,spellCheck:1,src:1,srcDoc:1,srcLang:1,srcSet:1,start:1,step:1,summary:1,tabIndex:1,target:1,title:1,type:1,useMap:1,value:1,wmode:1,wrap:1,about:2,datatype:2,inlist:2,prefix:2,property:2,resource:2,typeof:2,vocab:2,autoCapitalize:3,autoCorrect:3,color:3,itemProp:3,itemScope:3,itemType:3,itemRef:3,itemID:3,security:3,unselectable:3,results:3,autoSave:3,dangerouslySetInnerHTML:4,className:5,style:5,width:5,height:5};Je.renewWidgetSpared=ge;var Tt=/-(.)/g,Ct=["Top","Right","Bottom","Left"],Rt=function(){function e(t,r){o(this,e),this._className=t,this._classDesc=r||"",this._statedProp=["width","height","left","top"],this._silentProp=["className","hookTo.","keyid.","childInline.","tagName."],this._defaultProp={width:.9999,height:.9999,left:0,top:0},this._htmlText=!1,this._docUrl="doc"}return Le(e,[{key:"_desc",value:function(){return this._classDesc?"<"+this._className+":"+this._classDesc+">":"<"+this._className+">"}},{key:"_extend",value:function(e){if("string"==typeof e){if(qe.__design__)return null;(e=qe.$main[e])||console.log("warning: _extend('"+e+"') load nothing!")}var t=this._methods;if(!t){var r={},n={};t=this._methods={$eventset:[r,n]};for(var i={},o=Object.getPrototypeOf(this);o;){var a=Object.getPrototypeOf(o);if(!a)break;Object.getOwnPropertyNames(o).forEach(function(e){"_"!=e[0]&&(i[e]=!0)}),o=a}for(f in i)if("constructor"!=f){var s=this[f];if("function"==typeof s){if("$"==f[0]){var l=!1,u="$"==f[1]?(l=!0,f.slice(2)):f.slice(1);It[u]&&(l?n[u]=!0:r[u]=!0)}t[f]=s}}t.getShadowTemplate=function(e){return function(){return e}}(this)}var p=Object.assign({},t),c=p.$eventset,r=Object.assign({},c[0]),n=Object.assign({},c[1]);p.$eventset=[r,n,this._className],e||(e={});for(var f,h=Object.keys(e),d=0;f=h[d];d++){var g=e[f];if("$"==f[0]&&"function"==typeof g){var l=!1,u="$"==f[1]?(l=!0,f.slice(2)):f.slice(1);It[u]&&(l?n[u]=!0:r[u]=!0)}var v=p[f];"function"==typeof v&&"_"!=f[0]&&(p["_"+f]=function(e){return function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i=2)return console.log("error: can not define duals."+e+" after first render"),this;if(!s||!l)return this;void 0!==r&&l.initDuals0.push([e,r]);var u,p=Object.getOwnPropertyDescriptor(s,e),c=!1;if(p)t?(u=L(this,e,p.set,t.bind(this),n),Object.defineProperty(s,e,{enumerable:!0,configurable:!0,get:p.get,set:u[1]})):n&&(c=!0);else{t?u=L(this,e,null,t.bind(this),n):(n&&(c=!0),u=L(this,e,null)),Object.defineProperty(s,e,{enumerable:!0,configurable:!0,get:u[0],set:u[1]});var f=At[e];f&&5!=f&&l.tagAttrs.push(e)}return c&&console.log("warning: base.setter should use with setter."),this}},{key:"undefineDual",value:function(e){if(Array.isArray(e)){var t=e.length;for(s=0;s=2)return console.log("error: undefineDual("+e+") only can be called before first render"),this;if(!i||!n)return this;for(var o,a=[n.initDuals,n.initDuals0],s=0;o=a[s];s++)for(var l=o.length-1;l>=0;)o[l][0]===e&&o.splice(l,1),l-=1;delete i[e];var u=n.tagAttrs.indexOf(e);return u>=0&&n.tagAttrs.splice(u,1),this}},{key:"setEvent",value:function(e){var t,r=this.$gui;if(r&&(t=r.eventset)){if(r.compState>=2)console.log("error: can not call setEvent() after first render.");else for(var n,i=Object.keys(e),o=0;n=i[o];o++)if("$"==n[0]){var a=n.slice(1);if("$"!=a[0]){var s=e[n];"function"==typeof s&&(this[n]=t[a]=function(e,t,r){return function(){e.apply(r,arguments),t&&t.apply(r,arguments)}}(s,t[a],this))}}}else console.log("error: invalid state for setEvent().")}},{key:"getInitialState",value:function(){var e=this.getShadowTemplate();Object.defineProperty(this,"_",{enumerable:!1,configurable:!1,writable:!1,value:e}),this.isHooked=!1,this["hide."]=!1,this.duals={};var t=0==Ge.widgetNum(),r={inSync:!1,removeNum:0,className:this.props.className||"",compState:0,duals:{},initDuals:[],initDuals0:[],connectTo:{},connectBy:{},id__:0,id2__:0,sparedX:null,sparedY:null},n=r.eventset={},i=r.tagAttrs=[],o=r.dualAttrs={},a=r.dataset=[],s=r.exprAttrs=[],l="",u="",c="";r.forExpr=!1,r.hasIdSetter=!1;for(var h={},g=this.$eventset||[{},{}],v=g[0],y=g[1],_=null,m=Object.keys(this.props),w=0;C=m[w];w++)if(0==C.indexOf("data-"))"data-unit.path"!=C&&"data-span.path"!=C||(l=C,u=this.props[C]),a.push(C);else if(0==C.indexOf("dual-")){var k=C.slice(5).replace(Tt,function(e,t){return t.toUpperCase()});k&&(o[k]=C)}else if(0==C.indexOf("aria-"))a.push(C);else if("$"==C[0]&&C.length>1){var O=this.props[C],x=void 0===O?"undefined":ze(O);if("string"==x){if("$id__"!=C){var P=!1;"$for"==(C=C.slice(1))&&(C="for",P=!0),_t.indexOf(C)>=0?"for"==C?(r.forExpr?console.log("warning: reduplicate property ($for)"):(r.forExpr=P?2:1,s.push(C)),t&&console.log("error: can not use '$for' in topmost widget")):c?console.log("error: property ($"+C+") conflict with previous ($"+c+")"):(c=C,"else"!=C&&s.push(C)):"children"==C?vt.call(this.props,"for.index")&&(r.isChildExpr=!0,r.children2=this.props.children):"key"!=C&&s.push(C);continue}x=void 0===(O=Ke[O])?"undefined":ze(O)}if("function"==x){if("$"==C[1]){console.log("warning: invalid using props."+C);continue}var S=C.slice(1);"id__"==S?_=O:this[C]=h[S]=be(O)?O.bind(this):O}}else{var $=At[C];$&&5!=$&&i.push(C)}r.flowFlag=c,r.dataset2=a.slice(0);var j=this.props["keyid."];if(t&&!j&&(j="body"),j){var D=void 0===j?"undefined":ze(j);"string"!=D&&"number"!=D&&(j=void 0)}var N=this.props["hookTo."];t&&!N&&(N=qe),"string"==typeof N&&(N=qe.W(N)),Array.isArray(N)&&N.W&&(void 0!==j?N.$set(j,N.W(this)):j=N.push(N.W(this))-1,r.keyid=j);var E=this.props["data-rewgt-owner"];if(E){var I,A=r.eventset2={};if(N&&(I=N.component))for(var C,m=Object.keys(I.$gui.eventset),w=0;C=m[w];w++)n[C]=_e(this,C,E),A[C]=!0}var R=Object.assign({},v,h);for(var H in R)n[H]=_e(this,H,E);for(var H in y)n[H]=this["$$"+H];t&&(r.className=d(r.className,["rewgt-panel","row-reverse","reverse-row","col-reverse","reverse-col"])),Object.defineProperty(this,"$gui",{enumerable:!1,configurable:!1,writable:!1,value:r});var W={id__:0,childNumId:0,duals:[],"tagName.":this.props["tagName."],exprAttrs:s.slice(0)};if(qe.__design__){var F=e._getGroupOpt(this);W["data-group.opt"]=F.type+"/"+F.editable}Object.assign(W,{left:0,top:0,width:null,height:null,minWidth:0,maxWidth:0,minHeight:0,maxHeight:0,borderWidth:[0,0,0,0],padding:[0,0,0,0],margin:[0,0,0,0],klass:"",style:{}});var L=r.isPanel=f(r.className,"rewgt-panel"),z=!1,B=!1,V=this.props["childInline."];if(V||t||!L||(f(r.className+" "+this.props.klass,["col-reverse","reverse-col"])?B=!0:z=!0),r.useSparedX=!1,r.useSparedY=!1,r.respared=!1,r.sparedTotal=0,r.compIdx={},r.comps=gt(this.props.children),Object.defineProperty(this.duals,"keyid",{enumerable:!0,configurable:!0,get:function(){return this.$gui.keyid}.bind(this),set:function(e,t){throw new Error("property (keyid) is readonly")}}),this.defineDual("klass",function(e,t){this.state.klass=e||""}),this.defineDual("style",function(e,t){if(this.state["tagName."])this.state.style=Object.assign({},t,e);else{var r=Ge.eachComponent(this)[0];r&&(r.duals.style=e)}}),this.defineDual("left",function(e,t){this.state.left=isNaN(e)?null:e}),this.defineDual("top",function(e,t){this.state.top=isNaN(e)?null:e}),this.defineDual("width",function(e,t){var r,n=!1;if(isNaN(e)?r=null:(r=e,null!==e&&(n=!0)),this.state.width=r,n){var i=this.parentOf(!0);i&&i.$gui.useSparedX&&ge(i,!1)}}),this.defineDual("height",function(e,t){var r,n=!1;if(isNaN(e)?r=null:(r=e,null!==e&&(n=!0)),this.state.height=r,n){var i=this.parentOf(!0);i&&i.$gui.useSparedY&&ge(i,!1)}}),this.defineDual("minWidth",function(e,t){var r=e||0;r>0&&this.state.maxWidth>0&&this.state.maxWidth0&&this.state.minWidth>0&&this.state.minWidth>r?console.log("warning: invalid widget minWidth or maxWidth"):this.state.maxWidth=r}),this.defineDual("minHeight",function(e,t){var r=e||0;r>0&&this.state.maxHeight>0&&this.state.maxHeight0&&this.state.minHeight>0&&this.state.minHeight>r?console.log("warning: invalid widget minHeight or maxHeight"):this.state.maxHeight=r}),this.defineDual("borderWidth",function(e,t){var n=t||[0,0,0,0],i=this.state.borderWidth=r.isPanel?pe(e):ce(e),o=!1;this.$gui.useSparedX?n[1]===i[1]&&n[3]===i[3]||(o=!0):this.$gui.useSparedY&&(n[0]===i[0]&&n[2]===i[2]||(o=!0)),o&&ge(this,!1)}),this.defineDual("padding",function(e,t){var n,i=this.state.padding=r.isPanel?pe(e):ce(e);if((n=this.$gui.useSparedX)||this.$gui.useSparedX){var o=!1,a=t||[0,0,0,0];n?a[1]===i[1]&&a[3]===i[3]||(o=!0):a[0]===i[0]&&a[2]===i[2]||(o=!0),o&&ge(this,!1)}}),this.defineDual("margin",function(e,t){this.state.margin=r.isPanel?pe(e):ce(e)}),this.defineDual("id__",function(e,t){this.state.id__=e,r.id__=r.id2__=e}),_&&this.defineDual("id__",_),this.defineDual("trigger",ve),this.defineDual("cellSpacing"),this.defineDual("sizes"),N){var U=N&&N.component;U&&(U.props["isTableRow."]&&(this.props.tdStyle&&this.defineDual("tdStyle",function(e,t){this.state.tdStyle=Object.assign({},t,e),setTimeout(function(){U.reRender()},0)},this.props.tdStyle),this.props.colSpan&&this.defineDual("colSpan",function(e,t){this.state.colSpan=e,setTimeout(function(){U.reRender()},0)},this.props.colSpan),this.props.rowSpan&&this.defineDual("rowSpan",function(e,t){this.state.rowSpan=e,setTimeout(function(){U.reRender()},0)},this.props.rowSpan)),U.props["isScenePage."]&&(r.inScene=!0))}r.cssWidth=null,r.cssHeight=null;var q=null,Y=null,G=this.widget;if(N&&G)if(l&&(G.$callspace={flowFlag:"ref",forSpace:null},G.$callspace[l]=u,T(G.$callspace.exprSpace={},this)),t&&(nt=Je.topmostWidget_=G,(rt=Je.containNode_=document.getElementById("react-container"))||console.log("fatal error: can not find 'react-container' node.")),t&&rt){qe.__design__&&(rt.style.zIndex="3000",this.duals.style={zIndex:"-1000",overflow:"hidden"});var X=rt.frameInfo;X||(X=rt.frameInfo={topHi:0,leftWd:0,rightWd:0,bottomHi:0}),X.rootName="."+j;var Z=function(){var e=Math.max(100,window.innerWidth-X.leftWd-X.rightWd),t=Math.max(100,window.innerHeight-X.topHi-X.bottomHi),n=this.state.innerSize,i=[e,t],o={left:X.leftWd,top:X.topHi,parentWidth:e,parentHeight:t,innerSize:i};if(Ge.dragInfo.justResized&&(o.id__=p()),this.setState(o),vt.call(this.duals,"innerSize")){var a=r.connectTo.innerSize;a&&r.compState>=2&&setTimeout(function(){M(a,i,n,"innerSize")},0)}}.bind(this);rt.refreshFrame=Z,he(rt);var Q=function(){Ge.dragInfo.inDragging=!1,Ge.dragInfo.justResized=!0,setTimeout(function(){Ge.dragInfo.justResized=!1},1200),Z()},ee=0;r.onWinResize=function(e){Ge.dragInfo.inDragging=!0,ee&&clearTimeout(ee),ee=setTimeout(Q,500),Z()},this.duals.style=Object.assign({},this.props.style,{position:"absolute"}),this.duals.left=X.leftWd,this.duals.top=X.topHi,q=Math.max(100,window.innerWidth-X.leftWd-X.rightWd),Y=Math.max(100,window.innerHeight-X.topHi-X.bottomHi)}else{var te=N.component;te&&(q=te.$gui.cssWidth,Y=te.$gui.cssHeight)}return W.parentWidth=q,W.parentHeight=Y,this.defineDual("childNumId",function(e,n){var i=this,o=i.widget;if(o){var a=i.state.sizes,s=Array.isArray(a),l=r.compIdx,u=r.comps,p=i.props["isScenePage."],c=!1,h=!1,d=0,g=!1;u.forEach(function(e,n){if("string"==typeof e){if(0==n&&1==u.length&&vt.call(i.duals,"html."))return setTimeout(function(){i.duals["html."]=e},0),void(g=!0);if(!V)return u[n]=void 0,void console.log("warning: can not add text element to panel ("+o.getPath()+")");e=u[n]=ht(yr,{"html.":e})}else if(!e)return;var a,s=b(e),v=!1;if(s){var y=parseInt(s);a=y+""===s?y:s,"number"==typeof l[s]&&(v=!0)}else s=(a=n+r.removeNum)+"";if(f(e.props.className,"rewgt-static")){if(v)return void(l[a]=n);if(L)u[n]=void 0,console.log("warning: can not add rewgt-static to panel ("+o.getPath()+") directly.");else{var _=Object.assign({},e.props);_.key=s,!qe.__design__||i.props.$for||i.props.$$for||(_.onMouseDown=K,_.onDoubleClick=J.bind(i)),l[a]=n,u[n]=V?ht("span",_):ht("div",_)}}else{var m=e.props["childInline."];if(void 0===m)return l[a]=n,void(v||(u[n]=ft(e,{key:s})));if(V){if(!m)return console.log("error: can not add panel or div ("+s+") to paragraph ("+o.getPath()+")."),void(u[n]=void 0)}else if(!f(e.props.className,["rewgt-panel","rewgt-unit"]))return u[n]=void 0,void console.log("error: only panel, div, paragraph ("+a+") can add to panel or div ("+o.getPath()+").");var w=!1;e.props["isReference."]&&(w=!0,v||("$"!=s[0]&&(s=a="$"+s),it&&st.push([i,a])));var k=e.props.width,O=e.props.height,x="number"!=typeof k,P="number"!=typeof O;if(z)x?c=!0:k<0&&!w&&(h=!0,d+=-k);else if(B)P?c=!0:O<0&&!w&&(h=!0,d+=-O);else{var S="";!x&&k<0?S="width":!P&&O<0&&(S="height"),S&&console.log("error: can not use negative "+S+" under widget ("+o.getPath()+")")}if(v&&e.props["hookTo."]!==o&&(v=!1),v)l[a]=n;else{var $={"hookTo.":o,key:s,"keyid.":a};if(V){var j=f(e.props.className,"rewgt-unit");if(!x&&k>=0){var D=k>=1?k+"px":k>=.9999?"100%":100*k+"%";$.style=Object.assign({},e.props.style,{width:D}),j&&($.width=k)}else j&&($.width=null);if(!P&&O>=0){var N=O>=1?O+"px":O>=.9999?"100%":100*O+"%";$.style=Object.assign({},e.props.style,{height:N}),j&&($.height=O)}else j&&($.height=null)}else $.width=x?null:k,$.height=P?null:O,t&&e.props["isScenePage."]&&e.props.noShow&&!qe.__design__&&($["isTemplate."]=!0);if(p){var E=Object.assign({},e.props.style),I=(parseInt(E.zIndex)||0)+"";"0"!==I&&(E.zIndex=I),$.style=E}else qe.__debug__&&!t&&r.isPanel&&"absolute"==($.style||{}).display&&console.log("warning: can not use 'display:absolute' under a panel");l[a]=n,u[n]=ft(e,$)}}}),g&&u.splice(0),s||(h&&!c?((d>0||r.useSparedX!=z||r.useSparedY!=B)&&(r.respared=!0),r.sparedTotal=d,r.useSparedX=z,r.useSparedY=B):(r.sparedTotal=0,r.useSparedX=!1,r.useSparedY=!1)),t&&0==n&&(l.$pop=u.length+r.removeNum,u.push(ht(Ue(Ye.Panel._extend()),{"hookTo.":o,key:"$pop","keyid.":"$pop",left:0,top:0,width:0,height:0,style:{position:"absolute",zIndex:3016,overflow:"visible"}})))}}),W}},{key:"shouldComponentUpdate",value:function(e,t){var r=Ge.shouldUpdate(this,e,t);if(r&&this.props.children!==e.children&&!this.props["marked."]){var n=this.$gui,i=n.duals.children=e.children;n.comps=gt(i),n.removeNum+=1}return r}},{key:"componentWillReceiveProps",value:function(e){for(var t,r=this.$gui,n=this.duals,i=r.duals,o=Object.keys(n),a=0;t=o[a];a++){var s=e[t];if(void 0===s){var l=r.dualAttrs[t];if(!l)continue;if(void 0===(s=e[l]))continue}s!==i[t]&&(n[t]=i[t]=s)}}},{key:"componentDidMount",value:function(){this.isHooked=!!this.widget,this.props["hasStatic."]&&de(this);var e=this.$gui;if(e.syncExpr){for(var t;t=e.syncExpr.shift();)e.exprAttrs[t[0]]=t[1];delete e.syncExpr}var r=this.props.styles;if(r&&(this.props["data-span.path"]||this.props["data-unit.path"])){var n=this;Object.keys(r).forEach(function(e){var t=r[e];if("object"==(void 0===t?"undefined":ze(t))&&e){var i=n.componentOf(e);i&&(i.duals.style=t)}})}e.hasIdSetter&&(this.duals.id__=2)}},{key:"componentWillUnmount",value:function(){if(qe.__debug__){var e=this.props.teardown__;if("function"==typeof e)try{e.apply(this)}catch(e){console.log(e)}}var t=this.$gui;t.hasIdSetter&&(this.duals.id__=0);for(var r,n=Object.keys(t.connectBy),i=[],o=0;r=n[o];o++)(a=t.connectBy[r][0])!==this&&i.indexOf(a)<0&&i.push(a);for(var a,o=0;a=i[o];o++)a.unlisten("*",this);if(t.connectTo={},t.connectBy={},t.compState=0,Array.isArray(this.widget)){var s=this.widget.parent;if(Array.isArray(s)){var l=t.keyid,u=s.component;if(u){var p=u.$gui;if(!p.flowFlag&&!p.forExpr){var c=p.compIdx[l];"number"==typeof c&&(delete p.comps[c],delete p.compIdx[l])}}s.$unhook(this.widget,l)}delete this.widget.component,delete this.widget}t.eventset={},this.isHooked=!1}},{key:"reRender",value:function(e,t){if(this.isHooked)if(this.$gui.inSync){var r=this;setTimeout(function(){var n=x(r.state.id__),i=Object.assign({},t,{id__:n});r.setState(i,e)},0)}else{var n=x(this.state.id__),i=Object.assign({},t,{id__:n});this.setState(i,e)}else this.state.id__>1&&(qe.__design__||qe.__debug__)&&console.log("warning: reRender() failed when component unhooked."),e&&e()}},{key:"listen",value:function(e,t,r){function n(e){if(Object.getOwnPropertyDescriptor(o.duals,e))return!0;if(o.props["$"+e])return _t.indexOf(e)>0&&console.log("warning: '"+e+"' is not listenable."),!0;if(i.dataset.indexOf(e)>=0||i.tagAttrs.indexOf(e)>=0||vt.call(i.dualAttrs,e)){var t=L(o,e);return Object.defineProperty(o.duals,e,{enumerable:!0,configurable:!0,get:t[0],set:t[1]}),!0}return!1}var i=this.$gui,o=this;if("function"==typeof t){if(Array.isArray(e))p=e;else{if("string"!=typeof e||!e)return console.log("warning: invalid listen source."),this;p=[e]}for(var a,s=0;a=p[s];s++)if(n(a)){var l=i.connectTo[a];l||(l=i.connectTo[a]=[]),l.push([null,t,!1])}else console.log("warning: listen source ("+a+") inexistent.");return this}if(!t||!t.$gui)return console.log("warning: invalid listen target."),this;var u,p=[];if(Array.isArray(e))e.forEach(function(e){var t=("on-"+e).replace(Tt,function(e,t){return t.toUpperCase()});p.push([e,t])});else if("string"==(u=void 0===e?"undefined":ze(e)))r&&"string"==typeof r?p.push([e,r,r]):(r=("on-"+e).replace(Tt,function(e,t){return t.toUpperCase()}),p.push([e,r]));else{if(!action||"object"!=u)return this;Object.keys(e).forEach(function(t){p.push([t,e[t]])})}return p.forEach(function(e){var r=e[0],a=e[1],s=!1;if(r&&n(r)){if("function"!=typeof t[a]){var l=e[2];if(!l||!vt.call(t.duals,l))return void console.log("warning: invalid listen target ("+a+").");if(l===r&&t===o)return void console.log("warning: can not connect dual ("+r+") to self.");s=!0,a=l}var u=t.$gui.connectBy,p=-1,c=u[a];c?(p=c.findIndex(function(e){return e[0]===o&&e[1]===r}))>=0&&(c[p][2]=s):c=u[a]=[],p<0&&c.push([o,r,s]),p=-1,(c=i.connectTo[r])?(p=c.findIndex(function(e){return e[0]===t&&e[1]===a}))>=0&&(c[p][2]=s):c=i.connectTo[r]=[],p<0&&c.push([t,a,s])}else console.log("warning: listen source ("+r+") inexistent.")}),this}},{key:"unlisten",value:function(e,t,r){if("function"==typeof t){if("string"!=typeof e||!e)return console.log("warning: invalid unlisten source."),this;if(u=(a=this.$gui).connectTo[e]){var n=u.findIndex(function(e){return null===e[0]&&e[1]===t});n>=0&&(u.splice(n,1),0==u.length&&delete a.connectTo[e])}return this}if(!t||!t.$gui)return console.log("warning: invalid unlisten target."),this;var i,o=[],a=this.$gui;if(Array.isArray(e))e.forEach(function(e){var t=("on-"+e).replace(Tt,function(e,t){return t.toUpperCase()});o.push([e,t])});else if("string"==(i=void 0===e?"undefined":ze(e))){if("*"==e){var s=a.connectTo;return Object.keys(s).forEach(function(e){var r,n=s[e];if(n&&(r=n.length)>0){for(;--r>=0;)n[r][0]===t&&n.splice(r,1);0==n.length&&delete s[e]}}),this}if(r&&"string"==typeof r){if("*"==r){var l,u=(s=a.connectTo)[e];if(u&&(l=u.length)>0){for(;--l>=0;)u[l][0]===t&&u.splice(l,1);0==u.length&&delete s[e]}return this}}else r=("on-"+e).replace(Tt,function(e,t){return t.toUpperCase()});o.push([e,r])}else{if(!action||"object"!=i)return this;Object.keys(e).forEach(function(t){o.push([t,e[t]])})}return o.forEach(function(e){var r=e[0],n=e[1],i=a.connectTo[r];if(i){var o=i.findIndex(function(e){return e[0]===t&&e[1]===n});o>=0&&(i.splice(o,1),0==i.length&&delete a.connectTo[r])}}),this}},{key:"getHtmlNode",value:function(e){if(this.state["tagName."]||e)return ct(e||this);var t=this.widget;if(t){for(var r=Object.keys(t),n=r.length,i=null,o=0;o=l)return null;s+=1,n=a,a=(o=o.parent)&&o.component}else for(;t&&a&&a.state.role!==t;)a=(o=o.parent)&&o.component;return a||null}},{key:"childOf",value:function(e,t){var r,n=this,i=n.widget;if(t)for(;i;){var o=n.$gui.comps,a=o.length;for(r=0;r=a)return null}else if(e){var u=i[e];return u&&u.component||null}return null}},{key:"componentOf",value:function(e){var t=void 0===e?"undefined":ze(e);if("number"==t){var r=[],n=A(this,e,r,0);return n&&r[1]?n:(console.log("warning: locate callspace ("+e+") failed."),null)}if("string"!=t)return null;var i=e[0];if("."!=i&&"/"!=i){var o=this.widget,a=o&&o.W(e);return a&&a.component||null}return oe(this,e)}},{key:"elementOf",value:function(e){var t,r=null,n="",i=void 0===e?"undefined":ze(e);if("number"==i)r=(r=this.componentOf(e))&&r.widget;else if(e){if("string"!=i)return null;if("."!=(t=e[0])&&"/"!=t)r=this.widget,n=e;else{var o=e.lastIndexOf("./");if(o>=0){if(!(f=this.componentOf(e.slice(0,o+2))))return null;r=f.widget,n=e.slice(o+2)}else{if("."!=t)return"/"==t&&"/"==e[1]&&(h=this.parentOf())?h.elementOf(e.slice(2)):null;if(r=qe,!(n=e.slice(1)))return null}}}else r=this.widget;if(!r)return null;if(!n){if(f=r.component){var a=r.parent;if((h=a&&a.component)&&"number"==typeof(d=h.$gui.compIdx[f.$gui.keyid]))return h.$gui.comps[d]}return null}if(n.indexOf("/")>=0)return null;for(var s,l=n.split("."),u=l.length-1,p=0;s=l[p];p++){var c=r[s];if(!Array.isArray(c)||!c.W){var f=r.component;return f&&f.props["isTemplate."]?f.elementOf(l.slice(p).join(".")):null}if(!(p=0;o--){var a=n.comps[o];if(a){var s=b(a);return a=s&&e[s],a?a.component:void 0}}}}},{key:"nextSibling",value:function(){var e=this.widget,t=this.$gui.keyid,r=(e=e&&e.parent)&&e.component;if(r&&(t||0===t)){var n=r.$gui,i=n.compIdx[t];if("number"==typeof i)for(var o=n.comps.length,a=i+1;an)&&(Ge.instantShow("warning: invalid keyid ("+t+")"),t=n),[i&&t==n,t]}var r=void 0,n=!1,i=arguments.length;i>0&&("function"!=typeof(r=arguments[i-1])?r=void 0:i-=1);var o=this.widget,a=o===nt,s=this.$gui;if(!o)return Ge.instantShow("warning: invalid target widget in setChild()."),e();if(!this.isHooked)return Ge.instantShow("warning: can not add child to unhooked widget."),e();if(this.props["isTemplate."])if(at){for(var l=s.template,u=0;u=0;v--){var y,_=g[v],m=_&&b(_);m?(d.unshift(m),f(_.props.className,"rewgt-static")?g[v]=ft(_,{key:m}):(y=($=parseInt(m))+""===m?$:m)!==_.props["keyid."]&&(g[v]=ft(_,{"keyid.":y,key:m}))):(g.splice(v,1),h+=1,n=!0)}for(var w=void 0,k="",O=0;O=0&&(d.splice(R,1),g.splice(R,1),h+=1,n=!0),k="",w=void 0):"+"==k&&(R=d.indexOf(P))<0&&(k="")}else if(P&&dt(P)){if(f(P.props.className,"rewgt-static")){console.log("warning: setChild() not support rewgt-static."),k="",w=void 0;continue}var j=!0,D=P.props["childInline."];void 0===D||(1==p||2==p?f(P.props.className,["rewgt-panel","rewgt-unit"])||(j=!1):D||(j=!1));var N=void 0,E=!0;"+"==k&&void 0!==w?N=w:E=!1;var I,A=!1;if("+"!=k&&void 0!==w)I=w;else{var T=t(P);A=T[0],I=T[1]}if(j){P.props["isReference."]&&("string"==typeof I?"$"!=I[0]&&(I="$"+I):I="$"+I,it&&st.push([this,I]));var C=A||E?-1:d.indexOf(I+"");if(C>=0)g[C]=[I,P];else{var R=E?d.indexOf(N+""):-1;if(R>=0?(g.splice(R,0,[I,P]),d.splice(R,0,I+"")):(g.push([I,P]),d.push(I+"")),E&&!A){var H=d.indexOf(I+"");H>=0&&H==R&&R>=0&&(H=d.indexOf(I+"",R+1)),H>=0&&(g.splice(H,1),d.splice(H,1),h+=1)}}n=!0}else Ge.instantShow("error: display type of child widget ("+I+") mismatch to owner ("+o.getPath()+").");k="",w=void 0}else if(Array.isArray(P))for(var W=P.length,M="",F=void 0,L=0;L=0&&(d.splice(Z,1),g.splice(Z,1),h+=1,n=!0),M="",F=void 0):"+"==M&&(Z=d.indexOf(z))<0&&(M="")}else if(z&&dt(z)){if(f(z.props.className,"rewgt-static")){console.log("warning: setChild() not support rewgt-static."),M="",F=void 0;continue}var U=!0,q=z.props["childInline."];void 0===q||(1==p||2==p?f(z.props.className,["rewgt-panel","rewgt-unit"])||(U=!1):q||(U=!1));var Y=!0;"+"==M&&void 0!==F?F:"+"==k&&void 0!==w?insBefor2=w:Y=!1;var G,X=!1;if("+"!=M&&void 0!==F)G=F;else{var K=t(z);X=K[0],G=K[1]}if(U){z.props["isReference."]&&("string"==typeof G?"$"!=G[0]&&(G="$"+G):G="$"+G,it&&st.push([this,G]));var J=X||Y?-1:d.indexOf(G+"");if(J>=0)g[J]=[G,z];else{var Z=Y?d.indexOf(insBefor2+""):-1;if(Z>=0?(g.splice(Z,0,[G,z]),d.splice(Z,0,G+"")):(g.push([G,z]),d.push(G+"")),Y&&!X){var Q=d.indexOf(G+"");Q>=0&&Q==Z&&Z>=0&&(Q=d.indexOf(G+"",Z+1)),Q>=0&&(g.splice(Q,1),d.splice(Q,1),h+=1)}}n=!0}else Ge.instantShow("error: display type of child widget ("+G+") mismatch to owner ("+o.getPath()+").");M="",F=void 0}}}if(n){var ee=!1;!a&&s.isPanel&&(f(this.props.className+" "+this.props.klass,["col-reverse","reverse-col"])?ee=!0:!0);var te=null,re=0,ne=0;s.isPanel&&Array.isArray(this.props.sizes)&&(te=this.state.sizes,Array.isArray(te)&&(ee?ne=te.length:re=te.length));for(var ie=g.length,oe=[],ae={},v=0;v=1||0==n?n:n<=-1?r?0:n:"number"!=typeof e?null:n>=.9999?e:n>=0?n*e:r?0:n>-.9999?n*e:-e}function t(e,t,r){return null===e?"":e>=1?e+"px":0==e||r&&e<0?"0":e<=-1?e+"px":t?"0":e>=.9999?"100%":e<=-.9999?"-100%":100*e+"%"}function r(e,t,r,n){return null===t||t>=1?t:0==t||n&&t<0?0:t<=-1?t:"number"!=typeof e?null:r?0:t>=.9999?e:t<=-.9999?-e:t*e}var n=this.state.parentWidth,i=this.state.parentHeight,o="number"!=typeof n,a="number"!=typeof i,s=this.state.padding,l=this.state.borderWidth,u=this.state.margin,p=null,c=null;"number"==typeof this.state.left&&(p=e(n,this.state.left,!1)),"number"==typeof this.state.top&&(c=e(i,this.state.top,!1));var f=[0,0,0,0],h=[0,0,0,0],d=[0,0,0,0],g={};o?(s.forEach(function(e,r){g["padding"+Ct[r]]=t(e,!1,!0)}),l.forEach(function(e,r){g["border"+Ct[r]+"Width"]=t(e,!0,!0)}),u.forEach(function(e,r){g["margin"+Ct[r]]=t(e,!1,!1)})):(s.forEach(function(e,t){var i=r(n,e,!1,!0);g["padding"+Ct[t]]=null===i?"":i+"px",f[t]=i||0}),l.forEach(function(e,t){var i=r(n,e,!0,!0);g["border"+Ct[t]+"Width"]=null===i?"":i+"px",h[t]=i||0}),u.forEach(function(e,t){var i=r(n,e,!1,!1);g["margin"+Ct[t]]=null===i?"":i+"px",d[t]=i||0}));var v=this.widget,y=this.$gui,_=null,m=this.state.minWidth,b=this.state.maxWidth,w=this.state.minHeight,k=this.state.maxHeight,O=this.state.width,x=this.state.height,P=null,S="number"!=typeof O||!(O>=1||0==O)&&o,$=null,j="number"!=typeof x||!(x>=1||0==O)&&a,D=!1,N=!1;if(!S){var E=null;O<0?(_=this.parentOf(!0))?"number"==typeof(A=_.$gui.sparedX)&&(E=A*(0-O)):_=void 0:E=e(n,O,!0),"number"!=typeof E?S=!0:(m&&Eb&&(E=b),(P=E-f[3]-f[1]-h[3]-h[1])<0?P=null:y.cssWidth!==P&&(D=!0))}if(!j){var I=null;if(x<0)if(null===_&&(_=this.parentOf(!0)),_){var A=_.$gui.sparedY;"number"==typeof A&&(I=A*(0-x))}else _=void 0;else I=e(i,x,!0);"number"!=typeof I?j=!0:(w&&Ik&&(I=k),($=I-f[0]-f[2]-h[0]-h[2])<0?$=null:y.cssHeight!==$&&(N=!0))}m&&(m=Math.max(0,m-f[3]-f[1]-h[3]-h[1])),b&&(b=Math.max(0,b-f[3]-f[1]-h[3]-h[1])),w&&(w=Math.max(0,w-f[0]-f[2]-h[0]-h[2])),k&&(k=Math.max(0,k-f[0]-f[2]-h[0]-h[2])),y.cssWidth=P,y.cssHeight=$;var T=y.respared;if(y.respared=!1,v&&(y.isPanel||v===nt)&&(D||N||T||Ge.dragInfo.justResized)&&(y.useSparedX?(D||T)&&(y.sparedX=fe(this,v,!0,P),T=!0):y.useSparedY&&(N||T)&&(y.sparedY=fe(this,v,!1,$),T=!0),this.isHooked||T)){var C=this;setTimeout(function(){C.isHooked&&Q(C,Ge.dragInfo.inDragging)},0)}var R=Object.assign({},this.state.style,g);"number"!=typeof p?delete R.left:R.left=p+"px","number"!=typeof c?delete R.top:R.top=c+"px",S?delete R.width:R.width=P+f[3]+f[1]+h[3]+h[1]+"px",j?delete R.height:R.height=$+f[0]+f[2]+h[0]+h[2]+"px",m?R.minWidth=m+"px":delete R.minWidth,b?R.maxWidth=b+"px":delete R.maxWidth,w?R.minHeight=w+"px":delete R.minHeight,k?R.maxHeight=k+"px":delete R.maxHeight,this.state.style=R;var H=[];return y.comps.forEach(function(e){e&&H.push(e)}),H}},{key:"render",value:function(){if(z(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var t=this.prepareState(),r=k(this),n=this.$gui.insertEle;return n&&(t=me(n,t)),ht(e,r,t)}}]),e}();Ye.Widget_=Rt;var Ht=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"BodyPanel",r))}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.className="rewgt-unit",e["keyid."]="body",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return this.defineDual("innerSize",function(e,t){throw new Error("duals.innerSize is readonly")},[e.parentWidth,e.parentHeight]),this.defineDual("nodes",we,[]),e}},{key:"renewPages",value:function(){if(!qe.__design__&&this.isHooked&&Ge.pageCtrl){var e=this.$gui.comps,t=this.widget,r=[];e.forEach(function(e){if(e&&e.props["isScenePage."]&&!e.props.noShow){var n=b(e),i=n&&t[n];(i=i&&i.component)&&r.push([n,i])}});var n=!1,i=Ge.pageCtrl.keys;if(i.length!=r.length)n=!0;else for(var o,a=0;o=i[a];a++)if(o!==r[a][0]){n=!0;break}n&&setTimeout(function(){Ge.pageCtrl.renewPages(r)},0)}}},{key:"componentDidMount",value:function(){Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this);var e=this.$gui;e.onWinResize&&window.addEventListener("resize",e.onWinResize,!1);var r=ct(this);r&&u(r)}},{key:"componentWillUnmount",value:function(){var e=this.$gui;e.onWinResize&&(window.removeEventListener("resize",e.onWinResize,!1),e.onWinResize=null),Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this).call(this)}},{key:"render",value:function(){return this.widget!==nt&&console.log("warning: BodyPanel only can be topmost widget."),Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this)}}]),t}(Rt);Ye.BodyPanel_=Ht,Ye.BodyPanel=new Ht;var Wt=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Panel",r))}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200),i="[any]: null for auto, 0~1 for percent, 0.9999 for 100%, N pixels, -0.xx for spared percent",o=n.width,a=n.height;return o&&(o[3]=i),a&&(a[3]=i),n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.className="rewgt-panel",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return this.defineDual("nodes",we,[]),e}},{key:"isRow",value:function(){return!f(this.props.className+" "+this.state.klass,["col-reverse","reverse-col"])}},{key:"isReverse",value:function(){return f(this.props.className+" "+this.state.klass,["reverse-row","reverse-col"])}},{key:"render",value:function(){return this.state["tagName."]||console.log("warning: Panel can not be virtual widget."),Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this)}}]),t}(Rt);Ye.Panel_=Wt,Ye.Panel=new Wt;var Mt=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Unit",r))}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200),i="[any]: null for auto, 0~1 for percent, 0.9999 for 100%, N pixels, -0.xx for spared percent",o=n.width,a=n.height;return o&&(o[3]=i),a&&(a[3]=i),n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.className="rewgt-unit",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return l(this)&&(this.duals.style=Object.assign({},this.props.style,{position:"absolute"})),e}}]),t}(Rt);Ye.Unit_=Mt,Ye.Unit=new Mt;var Ft=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"SplitDiv",r));return i._defaultProp.width=4,i._defaultProp.height=4,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.width=4,e.height=4,e}},{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200),i="[number]: 0~1 for percent, 0.9999 for 100%, N pixels";return n.width=[r+1,"number",null,i],n.height=[r+2,"number",null,i],n}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);this.$gui.comps=[];var r=this.parentOf(!0),n=this.widget;if(!r)return Ge.instantShow("error: no owner widget for SplitDiv"),e;if(!f(r.props.className,"rewgt-panel"))return Ge.instantShow("error: owner of widget ("+n.getPath()+") is not rewgt-panel"),e;var i=!0;return f(r.props.className+" "+r.props.klass,["col-reverse","reverse-col"])&&(i=!1),Object.assign(this.$gui,{inRow:i,reversed:!1,inDrag:!1,dragStartX:0,dragStartY:0,resizeOwner:void 0,resizeTarg:void 0,sizingFunc:null}),this.defineDual("id__",function(e,t){if(1==t){var r=this.state;i?(("number"!=typeof r.width||r.width<1)&&(r.width=4),r.width>=1&&(r.minWidth=r.width,r.maxWidth=r.width),this.props.height>=1&&this.props.height<=4&&(r.height=.9999),void 0===this.props.minHeight&&(r.minHeight=10)):(("number"!=typeof r.height||r.height<1)&&(r.height=4),r.height>=1&&(r.minHeight=r.height,r.maxHeight=r.height),this.props.width>=1&&this.props.width<=4&&(r.width=.9999),void 0===this.props.minWidth&&(r.minWidth=10));var n={cursor:i?"ew-resize":"ns-resize"},o=!1;for(var a in r.style)if(0==a.indexOf("background")){o=!0;break}o||(n.backgroundColor="#ddd"),r.style=Object.assign({},r.style,n)}}),e}},{key:"$$onMouseDown",value:function(e){function t(e,t){var r=o.resizeOwner,n=o.resizeTarg;if(r&&n){var i=!1,a=-1,s=-1;if(o.inRow){a=n.state.width;var l=e-o.dragStartX;if(0!=l){var u=n.state.minWidth,p=n.state.maxWidth,c=a<1?a*n.state.parentWidth:a;if(a=o.reversed?c-l:c+l,u&&ap&&(a=p),a<1&&(a=1),a!=c){v=a-c;o.reversed&&(v=-v),v!=l&&(e+=v-l),o.dragStartX=e,o.dragStartY=t,o.sizingFunc?o.sizingFunc(n,a,s,!o.inDrag):(n.state.width=a,ge(r,!o.inDrag,function(){n.reRender()})),i=!0}}}else{s=n.state.height;var f=t-o.dragStartY;if(0!=f){var h=n.state.minHeight,d=n.state.maxHeight,g=s<1?s*n.state.parentHeight:s;if(s=o.reversed?g-f:g+f,h&&sd&&(s=d),s<1&&(s=1),s!=g){var v=s-g;o.reversed&&(v=-v),v!=f&&(t+=v-f),o.dragStartX=e,o.dragStartY=t,o.sizingFunc?o.sizingFunc(n,a,s,!o.inDrag):(n.state.height=s,ge(r,!o.inDrag,function(){n.reRender()})),i=!0}}}i||o.inDrag||!(a>=1||s>=1)||(o.sizingFunc?o.sizingFunc(n,a,s,!0):ge(r,!0,function(){n.reRender()}))}}function r(e){if(!o.inDrag){var r=i.parentOf(!0);if(!r||!r.$gui.isPanel)return;if(Array.isArray(r.props.sizes))return;var n=!1,a=o.inRow;if(a?Math.abs(e.clientX-o.dragStartX)>=4&&(n=!0):Math.abs(e.clientY-o.dragStartY)>=4&&(n=!0),n){for(var s=i.prevSibling();s;){var l=a?s.state.width:s.state.height,u=a?s.state.minWidth:s.state.minHeight,p=a?s.state.maxWidth:s.state.maxHeight;if("number"==typeof l&&l>0&&(0==u||0==p||u!=p)){o.reversed=f(r.props.className+" "+r.state.klass,["reverse-row","reverse-col"]),o.resizeOwner=r,o.resizeTarg=s,o.inDrag=!0,Ge.dragInfo.inDragging=!0;break}s=s.prevSibling()}var c;if(!o.inDrag&&!i.nextSibling()&&(c=r.parentOf(!0))&&r.$gui.sparedTotal>.989&&r.$gui.sparedTotal<=1.01){var l=a?r.state.width:r.state.height,u=a?r.state.minWidth:r.state.minHeight,p=a?r.state.maxWidth:r.state.maxHeight;if("number"==typeof l&&l>0&&.9999!=l&&(0==u||0==p||u!=p)&&(o.reversed=f(c.props.className+" "+c.state.klass,["reverse-row","reverse-col"]),o.resizeOwner=c,o.resizeTarg=r,o.inDrag=!0,Ge.dragInfo.inDragging=!0),!o.inDrag&&"number"==typeof l&&l>0&&c.$gui.sparedTotal>.989&&c.$gui.sparedTotal<=1.01){var h=c.parentOf(!0);if(h){var l=a?c.state.width:c.state.height,u=a?c.state.minWidth:c.state.minHeight,p=a?c.state.maxWidth:c.state.maxHeight;"number"==typeof l&&l>0&&.9999!=l&&(0==u||0==p||u!=p)&&(o.reversed=f(h.props.className+" "+h.state.klass,["reverse-row","reverse-col"]),o.resizeOwner=h,o.resizeTarg=c,o.inDrag=!0,Ge.dragInfo.inDragging=!0)}}if(o.inDrag){var d=o.resizeOwner.$gui.onCellSizing;d&&(o.sizingFunc=d)}}}}o.inDrag&&(e.stopPropagation(),t(e.clientX,e.clientY))}function n(e){Ge.dragInfo.inDragging=!1,o.inDrag=!1,setTimeout(function(){lt=!1},300),document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n),e.stopPropagation(),t(e.clientX,e.clientY),o.resizeOwner=null,o.resizeTarg=null,o.sizingFunc=null}var i=this,o=this.$gui;o.dragStartX=e.clientX,o.dragStartY=e.clientY,o.inDrag=!1,lt=!0,document.addEventListener("mouseup",n,!1),document.addEventListener("mousemove",r,!1),e.stopPropagation(),this.$onMouseDown&&this.$onMouseDown(e)}},{key:"$onClick",value:function(e){e.stopPropagation()}}]),t}(Mt);Ye.SplitDiv_=Ft,Ye.SplitDiv=new Ft;var Lt=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"GridPanel",r))}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return n.sizes=[r+1,"any",null,"[any]: [0.2,0.3,-0.4,-0.6], negative value stand for left space"],n.cellSpacing=[r+2,"number",null,"[number]: 0,1,2,..."],n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.sizes=[.3,.3,-1],e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);if(!Array.isArray(this.props.sizes))return e;var r=this.$gui;return r.inRow=!f(r.className+" "+this.props.klass,["col-reverse","reverse-col"]),this.defineDual("cellSpacing",function(e,t){r.comps.length&&(r.useSparedX||r.useSparedY)&&(r.respared=!0)}),e.sizes=null,this.defineDual("sizes",function(e,t){if(Array.isArray(e)){e=this.state.sizes=e.slice(0);var n=!1,i=!1,o=0,a=this.widget===nt;!a&&r.isPanel||(e.splice(0),n=!0,a&&console.log("error: only none-topmost panel can use props.sizes"));for(var s=e.length-1;s>=0;s--){var l=e[s];"number"!=typeof l||isNaN(l)?(e[s]=null,n=!0):l<0&&(i=!0,o+=-l)}var u=!1,p=!1;f(this.props.className+" "+this.state.klass,["col-reverse","reverse-col"])?p=!0:u=!0;var c=!q(e,t);if(!n&&i&&(u||p)){r.sparedTotal=o;var h=r.useSparedX,d=r.useSparedY;u?r.useSparedX=!0:r.useSparedY=!0,c||h==r.useSparedX&&d==r.useSparedY||(c=!0)}else r.sparedTotal=0,r.useSparedX=!1,r.useSparedY=!1;c&&(r.comps.length&&(r.removeNum+=1),r.respared=!0,this.reRender())}else this.state.sizes=null,r.sparedTotal=0,r.useSparedX=!1,r.useSparedY=!1,Array.isArray(t)&&(r.comps.length&&(r.removeNum+=1),this.reRender())}),this.defineDual("childNumId",function(e,t){var n=this.state.sizes;if(Array.isArray(n)){var i=0,o=n.length;r.comps.forEach(function(e,t){if(e)if(f(e.props.className,"rewgt-static"))i++;else if(e.props["isReference."])i++;else if(void 0!==e.props["childInline."]){var a=n[i++%o];r.inRow?e.props.width!==a&&(r.comps[t]=ft(e,{width:a})):e.props.height!==a&&(r.comps[t]=ft(e,{height:a}))}else i++})}}),r.onCellSizing=function(e,t,r,n){var i=e.$gui.keyid,o=this.state.sizes;if(Array.isArray(o)){var a=this.$gui,s=a.compIdx[i],l=null,u=this.widget;if("number"==typeof s&&s>=0&&(l=a.comps[s]),l&&u){var p=o.length;if(a.inRow){if("number"==typeof t&&t>=0){t<1&&("number"!=typeof a.cssWidth?t=null:t*=a.cssWidth),o[v=s%p]=t;g=[];for(var c in a.compIdx)"number"==typeof(_=a.compIdx[c])&&_>=0&&_%p==v&&(m=(m=u[c])&&m.component)&&(m.state.width=t,g.push(m));ge(this,n,function(){for(var e,t=0;e=g[t];t++)e.reRender()})}else if("number"==typeof r&&r>=0){y=(v=Math.floor(s/p))+p;for(var c in a.compIdx)if("number"==typeof(_=a.compIdx[c])&&_>=v&&_=0){var f=m.state.minHeight,h=m.state.maxHeight,d=r;"number"==typeof r&&r<1&&(d="number"!=typeof a.cssHeight?null:r*a.cssHeight),f&&("number"!=typeof d||dh)&&(d=h),b!==d&&m.setState({height:d})}}}else if("number"==typeof r&&r>=0){r<1&&("number"!=typeof a.cssHeight?r=null:r*=a.cssHeight),o[v=s%p]=r;var g=[];for(var c in a.compIdx)"number"==typeof(_=a.compIdx[c])&&_>=0&&_%p==v&&(m=(m=u[c])&&m.component)&&(m.state.height=r,g.push(m));ge(this,n,function(){for(var e,t=0;e=g[t];t++)e.reRender()})}else if("number"==typeof t&&t>=0){var v=Math.floor(s/p),y=v+p;for(var c in a.compIdx){var _=a.compIdx[c];if("number"==typeof _&&_>=v&&_=0){var f=m.state.minWidth,h=m.state.maxWidth,d=t;"number"==typeof t&&t<1&&(d="number"!=typeof a.cssWidth?null:t*a.cssWidth),f&&("number"!=typeof d||dh)&&(d=h),b!==d&&m.setState({width:d})}}}}}}}}.bind(this),e}},{key:"render",value:function(){if(z(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var t=this.prepareState();qe.__design__&&t.push(ht("div",{key:"$end",title:"end of GridPanel",style:{width:"100%",height:"10px",backgroundColor:"#eee"}}));var r=k(this),n=this.$gui.insertEle;return n&&(t=me(n,t)),ht(e,r,t)}}]),t}(Wt);Ye.GridPanel_=Lt,Ye.GridPanel=new Lt;var zt=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"TableRow",r));return i._silentProp.push("isTableRow."),i._defaultProp.height=null,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="tr",e["isTableRow."]=!0,e.height=null,e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);if(qe.__design__){var r=this;this.defineDual("childNumId",function(e,t){var n=r.parentOf(!0);n&&setTimeout(function(){n.reRender()},0)})}return e}},{key:"render",value:function(){var e=this.$gui,t=e.cssWidth,r=e.cssHeight;if(z(this),this["hide."])return null;var n=this.state["tagName."];if(!n)return ye(this);var i=e.cssWidth=this.state.parentWidth,o="number"!=typeof i||i<0,a=this.state.parentHeight,s=this.state.height,l="number"!=typeof s||s<0;l?a=e.cssHeight=null:s>=1?a=e.cssHeight=s:"number"==typeof a?s>=.9999?(e.cssHeight=a,("number"!=typeof a||a<0)&&(l=!0)):a=e.cssHeight=a*s:(a=e.cssHeight=null,l=!0);var u=t!==i,p=this.widget,c=[];if(this.$gui.comps.forEach(function(e){if(e){var t=b(e);if(t){var r,n,i,o,a,s=p&&p[t];(s=s&&s.component)?(r=s.state.width,n=s.state.height,i=s.state.colSpan,o=s.state.rowSpan,a=s.state.tdStyle):(r=e.props.width,n=e.props.height,i=e.props.colSpan,o=e.props.rowSpan,a=e.props.tdStyle);var f=t,h=parseInt(t);h+""===t&&(f=h);var d={key:t,"keyid.":f};i=parseInt(i),o=parseInt(o),i&&(d.colSpan=i+""),o&&(d.rowSpan=o+"");var g=null,v=null,y=!1;"number"==typeof r&&r>=0&&(g=r,d.style={width:r>=1?r+"px":r>=.9999?"100%":100*r+"%"}),"object"==(void 0===a?"undefined":ze(a))&&(d.style=Object.assign(d.style||{},a)),"number"==typeof n&&n>=0?n>=1?(v=n,!1):l?y=!0:v=n:!0,(u&&null!==g||y)&&(e=ft(e,{width:g,height:v})),c.push(ht("td",d,e))}}}),this.isHooked&&(!o&&t!==i||!l&&r!==a||Ge.dragInfo.justResized)){var f=this;setTimeout(function(){Q(f,Ge.dragInfo.inDragging)},0)}var h=Object.assign({},this.state.style);!l&&a>=0?h.height=a+"px":delete h.height;var d=k(this,h),g=e.insertEle;return g&&(c=me(g,c)),ht(n,d,c)}}]),t}(Mt);Ye.TableRow_=zt,Ye.TableRow=new zt;var Bt=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"TablePanel",r));return i._defaultProp.height=null,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="table",e.className="rewgt-unit rewgt-table",e.height=null,e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this),r=this;return this.defineDual("childNumId",function(e,t){r.$gui.respared=!0}),e}},{key:"render",value:function(){var e=this.$gui,t=e.cssWidth,r=e.cssHeight;if(z(this),this["hide."])return null;var n=this.state["tagName."];if(!n)return ye(this);var i=this.prepareState();if(this.isHooked&&("number"==typeof e.cssWidth&&t!==e.cssWidth||"number"==typeof e.cssHeight&&r!==e.cssHeight||Ge.dragInfo.justResized)){var o=this;setTimeout(function(){Q(o,Ge.dragInfo.inDragging)},0)}var a=this.widget;if(qe.__design__&&a){var s=2,l=[];i.forEach(function(e){if(e){var t=0,r=0,n=!1;ne(e,a).forEach(function(e){for(var i=l[t]||0;i>=2;)l[t++]=i-1,r+=1,i=l[t]||0;var o=parseInt(e.props.rowSpan||0),a=parseInt(e.props.colSpan||0);if(a>=2)for(;a>=2;){a-=1;var s=Math.max(0,(l[t]||0)-1);l[t++]=Math.max(s,o),r+=1}var u=e.props.width;("number"!=typeof u||u<0)&&(n=!0),l[t++]=o,r+=1}),l.splice(t),n||(r+=1),r>s&&(s=r)}});for(var u={style:{margin:"10px"}},p={style:{margin:"2px"}},c=[],f=0;f1){var w=this.props[I],k=void 0===w?"undefined":ze(w);if("string"==k){if("$id__"!=I){var O=!1;"$for"==(I=I.slice(1))&&(I="for",O=!0),_t.indexOf(I)>=0?"for"==I?t.forExpr?console.log("warning: reduplicate property ($for)"):(t.forExpr=O?2:1,a.push(I)):u?console.log("error: property ($"+I+") conflict with previous ($"+u+")"):(u=I,"else"!=I&&a.push(I)):"children"==I?vt.call(this.props,"for.index")&&(t.isChildExpr=!0,t.children2=this.props.children):"key"!=I&&a.push(I);continue}k=void 0===(w=Ke[w])?"undefined":ze(w)}if("function"==k){if("$"==I[1]){console.log("warning: invalid using props."+I);continue}var x=I.slice(1);"id__"==x?v=w:this[I]=p[x]=be(w)?w.bind(this):w}}else{var P=At[I];P&&5!=P&&n.push(I)}t.flowFlag=u,t.dataset2=o.slice(0);var S=this.props["keyid."];if(S){var $=void 0===S?"undefined":ze(S);"string"!=$&&"number"!=$&&(S=void 0)}var j=this.props["hookTo."];"string"==typeof j&&(j=qe.W(j)),Array.isArray(j)&&j.W&&(void 0!==S?j.$set(S,j.W(this)):S=j.push(j.W(this))-1,t.keyid=S);var D=this.props["data-rewgt-owner"];if(D){var N,E=t.eventset2={};if(j&&(N=j.component))for(var I,y=Object.keys(N.$gui.eventset),_=0;I=y[_];_++)r[I]=_e(this,I,D),E[I]=!0}var A=Object.assign({},d,p);for(var C in A)r[C]=_e(this,C,D);for(var C in g)r[C]=this["$$"+C];Object.defineProperty(this,"$gui",{enumerable:!1,configurable:!1,writable:!1,value:t}),qe.__design__&&(t.className=h(t.className,"rewgt-inline"));Object.assign({},this.props.style);var R={id__:0,childNumId:0,duals:[],"tagName.":this.props["tagName."],exprAttrs:a.slice(0),klass:"",style:{},"html.":null};if(qe.__design__){var H=e._getGroupOpt(this);R["data-group.opt"]=H.type+"/"+H.editable}t.compIdx={},t.comps=gt(this.props.children),Object.defineProperty(this.duals,"keyid",{enumerable:!0,configurable:!0,get:function(){return this.$gui.keyid}.bind(this),set:function(e,t){throw new Error("property (keyid) is readonly")}}),this.defineDual("klass",function(e,t){this.state.klass=e||""}),this.defineDual("style",function(e,t){if(this.state["tagName."])this.state.style=Object.assign({},t,e);else{var r=Ge.eachComponent(this)[0];r&&(r.duals.style=e)}}),this.defineDual("html.",function(e,t){this.state["html."]=e||null}),this.defineDual("id__",function(e,r){this.state.id__=e,t.id__=t.id2__=e}),v&&this.defineDual("id__",v),this.defineDual("trigger",ve);var W=this.widget;return j&&W&&s&&(W.$callspace={flowFlag:"ref",forSpace:null},W.$callspace[s]=l,T(W.$callspace.exprSpace={},this)),this.defineDual("childNumId",function(e,r){var n=this,i=this.widget;if(i){0==r&&i.parent===nt&&console.log("warning: can not hook inline widget to topmost directly.");var o=t.compIdx,a=t.comps,s=!1;a.forEach(function(e,r){if("string"==typeof e){if(0==r&&1==a.length&&vt.call(n.duals,"html."))return setTimeout(function(){n.duals["html."]=e},0),void(s=!0);e=a[r]=ht(yr,{"html.":e})}else if(!e)return;var l,u=b(e),p=!1;if(u){var c=parseInt(u);l=c+""===u?c:u,"number"==typeof o[u]&&(p=!0)}else u=(l=r+t.removeNum)+"";if(f(e.props.className,"rewgt-static")){if(p)return void(o[l]=r);var h=Object.assign({},e.props);return h.key=u,!qe.__design__||n.props.$for||n.props.$$for||(h.onMouseDown=K,h.onDoubleClick=J.bind(n)),o[l]=r,void(a[r]=ht("span",h))}var d=e.props["childInline."];return void 0===d?(o[l]=r,void(p||(a[r]=ft(e,{key:u})))):d?(!p&&e.props["isReference."]&&("$"!=u[0]&&(u=l="$"+u),it&&st.push([n,l])),p&&i!==e.props["hookTo."]&&(p=!1),o[l]=r,void(p||(a[r]=ft(e,{"hookTo.":i,key:u,"keyid.":l})))):(a[r]=void 0,void console.log("warning: widget ("+i.getPath()+"."+u+") can not be panel"))}),s&&a.splice(0)}}),R}},{key:"willResizing",value:function(e,t,r){return!1}},{key:"prepareState",value:function(){console.log("warning: inline widget not support prepareState()")}},{key:"render",value:function(){if(z(this),this["hide."])return ht("span",gr);var e=this.state["tagName."];if(!e)return ye(this);var t=k(this),r=this.$gui.comps,n=r.length,i=this.$gui.insertEle;return i&&(r=me(i,r),n=!0),ht(e,t,n?r:this.state["html."])}}]),t}(Rt);Ye.Span_=vr,Ye.Span=new vr;var yr=Ye.Span._createClass(null),_r=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"VirtualSpan",r))}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="",e}}]),t}(vr);Ye.VirtualSpan_=_r,Ye.VirtualSpan=new _r;var mr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"HiddenSpan",r))}return i(t,e),Le(t,[{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return qe.__design__||(this.duals.style={display:"none"}),e}}]),t}(vr);Ye.HiddenSpan_=mr,Ye.HiddenSpan=new mr;var br=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Br",r));return i._htmlText=!1,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="br",e}}]),t}(vr);Ye.Br_=br,Ye.Br=new br;var wr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"A",r))}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="a",e}},{key:"$$onClick",value:function(e){qe.__design__&&e.preventDefault(),this.$onClick&&this.$onClick(e)}}]),t}(vr);Ye.A_=wr,Ye.A=new wr,Ye.Q_=ke(vr,"Q"),Ye.Q=new Ye.Q_,Ye.Abbr_=ke(vr,"Abbr"),Ye.Abbr=new Ye.Abbr_;var kr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Audio",r))}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return n.src=[r+1,"string",null],n.autoPlay=[r+2,"string",["","1"]],n.controls=[r+3,"string",["","1"]],n.loop=[r+4,"string",["","1"]],n.muted=[r+5,"string",["","1"]],n.preload=[r+6,"string",["auto","meta","none"]],n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="audio",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return Oe(this),e}}]),t}(vr);Ye.Audio_=kr,Ye.Audio=new kr,Ye.Source_=ke(vr,"Source"),Ye.Source=new Ye.Source_,Ye.Track_=ke(vr,"Track"),Ye.Track=new Ye.Track_,Ye.Bdi_=ke(vr,"Bdi"),Ye.Bdi=new Ye.Bdi_,Ye.Bdo_=ke(vr,"Bdo"),Ye.Bdo=new Ye.Bdo_,Ye.Data_=ke(vr,"Data"),Ye.Data=new Ye.Data_,Ye.Mark_=ke(vr,"Mark"),Ye.Mark=new Ye.Mark_,Ye.Wbr_=ke(vr,"Wbr"),Ye.Wbr=new Ye.Wbr_,Ye.Button_=ke(vr,"Button"),Ye.Button=new Ye.Button_;var Or=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Textarea",r))}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return n.disabled=[r+1,"string",["","1"]],n.readonly=[r+2,"string",["","1"]],n.placeholder=[r+3,"string"],n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="textarea",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this),r=void 0!==this.props.value?this.props.value||"":this.props.defaultValue||"";return this.defineDual("value",null,r),e}},{key:"$$onChange",value:function(e){this.duals.value=e.target.value,this.$onChange&&this.$onChange(e)}}]),t}(vr);Ye.Textarea_=Or,Ye.Textarea=new Or;var xr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Progress",r))}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return n.value=[r+1,"string"],n.max=[r+2,"string"],n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="progress",e}}]),t}(vr);Ye.Progress_=xr,Ye.Progress=new xr;var Pr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Img",r));return i._htmlText=!1,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="img",e}},{key:"$$onDragStart",value:function(e){qe.__design__?e.preventDefault():this.$onDragStart&&this.$onDragStart(e)}}]),t}(vr);Ye.Img_=Pr,Ye.Img=new Pr;var Sr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Video",r))}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="video",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return Oe(this),e}}]),t}(vr);Ye.Video_=Sr,Ye.Video=new Sr,Ye.Canvas_=ke(vr,"Canvas"),Ye.Canvas=new Ye.Canvas_,Ye.Picture_=ke(vr,"Picture"),Ye.Picture=new Ye.Picture_,Ye.Map_=ke(vr,"Map"),Ye.Map=new Ye.Map_,Ye.Area_=ke(vr,"Area"),Ye.Area=new Ye.Area_,Ye.Time_=ke(vr,"Time"),Ye.Time=new Ye.Time_,Ye.Output_=ke(vr,"Output"),Ye.Output=new Ye.Output_;var $r=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"Input",r));return i._htmlText=!1,i}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return Object.assign(n,{type:[r+1,"string",["text","button","checkbox","file","hidden","image","password","radio","reset","submit","color","date","datetime","datetime-local","email","month","number","range","search","tel","time","url","week"]],checked:[r+2,"string",["","1"]],disabled:[r+3,"string",["","1"]],readonly:[r+4,"string",["","1"]],value:[r+5,"string"],placeholder:[r+6,"string"],min:[r+7,"string"],max:[r+8,"string"],step:[r+9,"string"],pattern:[r+10,"string"],src:[r+11,"string"],defaultValue:[r+12,"string"],defaultChecked:[r+13,"string"],required:[r+14,"string",["","required"]]}),n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="input",e.type="text",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this),r=this.props.type;if("checkbox"===r||"radio"===r){var n=s(void 0!==this.props.checked?this.props.checked:this.props.defaultChecked);this.defineDual("checked",null,n)}else if("select"==r&&this.props.multiple){i=this.props.value||this.props.defaultValue;Array.isArray(i)||(i=[]),this.defineDual("value",null,i)}else{var i=void 0!==this.props.value?this.props.value||"":this.props.defaultValue||"";this.defineDual("value",null,i)}return e}},{key:"$$onChange",value:function(e){var t=this.props.type,r=e.target;if("checkbox"===t||"radio"===t)this.duals.checked=r.checked;else if("select"==t&&this.props.multiple){for(var n=[],i=r.options,o=i&&i.length||0,a=0;a=0;o--){var p=r.navOrder[o];p[1]?e(p[0])<0&&i.splice(u,0,p):(s=e(p[0]))<0?r.navOrder.splice(o,1):u=s}r.navOrder=i},this.defineDual("childNumId",function(e,t){r.updateNavItems()}),e}},{key:"listOptComp",value:function(e){function t(n){var i=n.component;if(i)if(i.props["isOption."])if(e){if(e===i.$gui.keyid)return r.push(i),!0}else r.push(i);else{if(i.props["isNavigator."])return!1;for(var o=i.$gui.comps,a=o.length,s=0;s=0;)(s=t[i]).props["isPlayground."]&&(n&&n==b(s)?o=!0:t.splice(i,1)),i-=1;if(!o&&n){var a=this.$gui,s=a.navItems[n];if(s){var l=a.navOrder.findIndex(function(e){return e[0]===n});if(l<0)t.push(s);else{for(var u,p,c=a.navOrder.slice(l+1),f=0,h=!1;(u=c.findIndex(function(e,t){return t>=f&&!e[1]}))>=0;){if((p=function(e,t){for(var r,n=0;r=e[n];n++)if(t==b(r))return n;return-1}(t,c[u][0]))>=0){h=!0;break}f=u}h?t.splice(p,0,s):t.push(s)}}}}var d=k(this),g=this.$gui.insertEle;return g&&(t=me(g,t)),ht(e,d,t)}}]),t}(Wt);Ye.NavPanel_=Ir,Ye.NavPanel=new Ir;var Ar=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"NavDiv",r));return i._defaultProp.height=null,i._defaultProp.minHeight=20,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.className="rewgt-unit",e["isNavigator."]=2,e.height=null,e.minHeight=20,e}}]),t}(Ir);Ye.NavDiv_=Ar,Ye.NavDiv=new Ar;var Tr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"GroundPanel",r));return i._silentProp.push("isPlayground."),i._defaultProp.height=null,i._defaultProp.minHeight=20,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["isPlayground."]=1,e.width=.9999,e.height=null,e.minHeight=20,e}},{key:"render",value:function(){return qe.__design__?Pe(this,1):Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this)}}]),t}(Wt);Ye.GroundPanel_=Tr,Ye.GroundPanel=new Tr;var Cr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"GroundDiv",r));return i._silentProp.push("isPlayground."),i._defaultProp.height=null,i._defaultProp.minHeight=20,i._htmlText=!0,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.width=.9999,e.height=null,e.minHeight=20,e["isPlayground."]=2,e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return e["html."]=null,this.defineDual("html.",function(e,t){this.state["html."]=e||null}),e}},{key:"render",value:function(){if(qe.__design__)return Pe(this,2);if(z(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var t=this.prepareState(),r=t.length,n=k(this),i=this.$gui.insertEle;return i&&(t=me(i,t),r=!0),ht(e,n,r?t:this.state["html."])}}]),t}(Mt);Ye.GroundDiv_=Cr,Ye.GroundDiv=new Cr;var Rr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptSpan",r));return i._statedProp.push("data-checked"),i._silentProp.push("isOption."),i._defaultProp["data-checked"]="",i}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){return r=r||1200,Ee(Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200),r)}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["data-checked"]="",e["isOption."]=!0,e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return Ne(this,e),e}},{key:"findNavOwner",value:function(){return Se(this)}},{key:"fireTrigger",value:function(){O(void 0,this)}},{key:"clearChecked",value:function(){this.state["data-checked"]&&(this.duals["data-checked"]="")}},{key:"setChecked",value:function(e,t,r){De(this,e,t,r)}},{key:"$$onClick",value:function(e){qe.__design__&&e.stopPropagation(),this.state.disabled||(this.setChecked(null),this.$onClick&&this.$onClick(e))}}]),t}(vr);Ye.OptSpan_=Rr,Ye.OptSpan=new Rr;var Hr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptA",r))}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="a",e}},{key:"$$onClick",value:function(e){qe.__design__&&e.preventDefault(),Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"$$onClick",this).call(this,e)}}]),t}(Rr);Ye.OptA_=Hr,Ye.OptA=new Hr;var Wr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptImg",r));return i._htmlText=!1,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="img",e}}]),t}(Rr);Ye.OptImg_=Wr,Ye.OptImg=new Wr;var Mr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptButton",r))}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="button",e}}]),t}(Rr);Ye.OptButton_=Mr,Ye.OptButton=new Mr;var Fr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptOption",r));return i._silentProp.push("selected"),i}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return n.value=[r+1,"string"],n.label=[r+2,"string"],n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="option",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this),r=(this.$gui,this.parentOf(!0));return r&&("optgroup"==r.props["tagName."]&&(r=r.parentOf(!0)),r&&"select"==r.props["tagName."]?r.props.multiple?(console.log('error: can not use OptOption in multiple "select"'),r=null):r.listen("value",function(e,t){this.isHooked&&this.$gui.syncSelect()}.bind(this)):r=null),this.$gui.syncSelect=function(){if(r&&!this.state.disabled){var e=this.state.value;e&&(this.duals["data-checked"]=s(e===r.state.value))}}.bind(this),this.defineDual("data-checked",function(e,t){var n=s(e);vt.call(this.props,"selected")&&(this.state.selected=n);var i=this;setTimeout(function(){var e=i.getHtmlNode();if(e&&(e.selected=!!n,n&&r)){var t=i.state.value;t&&(r.duals.value=t)}},0)}),e}},{key:"componentDidMount",value:function(){Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this),this.$gui.syncSelect()}},{key:"$$onClick",value:function(e){this.$onClick&&this.$onClick(e)}}]),t}(Rr);Ye.OptOption_=Fr,Ye.OptOption=new Fr;var Lr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptDiv",r));return i._statedProp.push("data-checked"),i._silentProp.push("isOption."),i._defaultProp["data-checked"]="",i}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){return r=r||1200,Ee(Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200),r)}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["data-checked"]="",e["isOption."]=!0,e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return Ne(this,e),e}},{key:"findNavOwner",value:function(){return Se(this)}},{key:"fireTrigger",value:function(){O(void 0,this)}},{key:"clearChecked",value:function(){this.state["data-checked"]&&(this.duals["data-checked"]="")}},{key:"setChecked",value:function(e,t,r){De(this,e,t,r)}},{key:"$$onClick",value:function(e){qe.__design__&&e.stopPropagation(),this.state.disabled||(this.setChecked(null),this.$onClick&&this.$onClick(e))}}]),t}(Vt);Ye.OptDiv_=Lr,Ye.OptDiv=new Lr;var zr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptLi",r));return i._statedProp.push("data-checked"),i._silentProp.push("isOption."),i._defaultProp["data-checked"]="",i}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){return r=r||1200,Ee(Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200),r)}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="li",e["data-checked"]="",e["isOption."]=!0,e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return Ne(this,e),e}},{key:"findNavOwner",value:function(){return Se(this)}},{key:"fireTrigger",value:function(){O(void 0,this)}},{key:"clearChecked",value:function(){this.state["data-checked"]&&(this.duals["data-checked"]="")}},{key:"setChecked",value:function(e,t,r){De(this,e,t,r)}},{key:"$$onClick",value:function(e){qe.__design__&&e.stopPropagation(),this.state.disabled||(this.setChecked(null),this.$onClick&&this.$onClick(e))}}]),t}(Kt);Ye.OptLi_=zr,Ye.OptLi=new zr;var Br=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"OptInput",r));return i._htmlText=!1,i}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);return n.type=[r+1,"string",["checkbox","radio","button","image"]],n.value=[r+2,"string"],n.src=[r+3,"string"],n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["tagName."]="input",e.type="checkbox",e.checked="",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this),r=this.props.type;if("checkbox"===r||"radio"===r)void 0===this.props.checked&&this.$gui.tagAttrs.push("checked");else{var n=void 0!==this.props.value?this.props.value||"":this.props.defaultValue||"";this.defineDual("value",null,n)}return this.defineDual("data-checked",function(e,t){this.state.checked=s(e)}),e}},{key:"clearChecked",value:function(e){e||(e=this.getHtmlNode()),e&&(e.checked&&(e.checked=!1),this.state["data-checked"]&&(this.duals["data-checked"]=""))}},{key:"$$onChange",value:function(e){qe.__design__&&e.stopPropagation();var t=this.state.type,r=e.target;"checkbox"===t||"radio"===t?r.checked?this.setChecked(null):this.clearChecked(r):this.duals.value=r.value,this.$onChange&&this.$onChange(e)}},{key:"$$onClick",value:function(e){if(qe.__design__&&e.stopPropagation(),!this.state.disabled){var t=this.state.type;"checkbox"!==t&&"radio"!==t&&this.setChecked(null),this.$onClick&&this.$onClick(e)}}}]),t}(Rr);Ye.OptInput_=Br,Ye.OptInput=new Br;var Vr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"TempPanel",r));return i._silentProp.push("isTemplate.","data-temp.type"),i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["isTemplate."]=1,qe.__design__?e["data-temp.type"]=1:(e.width=0,e.height=0),e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);Te(this.$gui),this.isLibGui=!1;var r=this.props.style;if(l(this)&&(this.duals.style=r=Object.assign({},r,{position:"absolute"}),0==(this.$gui.keyid+"").indexOf("$$")&&(this.isLibGui=!0)),qe.__design__&&!this.isLibGui)this.duals.style=Object.assign({},r,{display:"none"}),Ae(this);else{var n=this.props.template;n instanceof ae?this.$gui.template=n:Ae(this),this.$gui.compIndex={},this.$gui.comps=[]}return e}},{key:"elementOf",value:function(e){return Ce(this,e)}},{key:"render",value:function(){if(qe.__design__&&!this.isLibGui)return Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this);if(z(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var r=k(this,Object.assign({},this.state.style,{width:"0px",height:"0px",display:"none"}));return ht(e,r)}}]),t}(Wt);Ye.TempPanel_=Vr,Ye.TempPanel=new Vr;var Ur=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"TempDiv",r));return i._silentProp.push("isTemplate.","data-temp.type"),i._htmlText=!0,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["isTemplate."]=2,qe.__design__?e["data-temp.type"]=2:(e.width=0,e.height=0),e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);Te(this.$gui),this.isLibGui=!1;var r=this.props.style;if(l(this)&&(this.duals.style=r=Object.assign({},r,{position:"absolute"}),0==(this.$gui.keyid+"").indexOf("$$")&&(this.isLibGui=!0)),qe.__design__&&!this.isLibGui)this.duals.style=Object.assign({},r,{display:"none"}),Ae(this);else{var n=this.props.template;n instanceof ae?this.$gui.template=n:Ae(this),this.$gui.compIndex={},this.$gui.comps=[]}return e}},{key:"elementOf",value:function(e){return Ce(this,e)}},{key:"render",value:function(){if(qe.__design__&&!this.isLibGui)return Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this);if(z(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var r=k(this,Object.assign({},this.state.style,{width:"0px",height:"0px",display:"none"}));return ht(e,r)}}]),t}(Mt);Ye.TempDiv_=Ur,Ye.TempDiv=new Ur;var qr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"TempSpan",r));return i._silentProp.push("isTemplate.","data-temp.type"),i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["isTemplate."]=3,qe.__design__&&(e["data-temp.type"]=3),e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);if(Te(this.$gui),this.isLibGui=!1,qe.__design__)this.duals.style=Object.assign({},this.props.style,{display:"none"}),Ae(this);else{var r=this.props.template;r instanceof ae?this.$gui.template=r:Ae(this),this.$gui.compIndex={},this.$gui.comps=[]}return e}},{key:"elementOf",value:function(e){return Ce(this,e)}},{key:"render",value:function(){if(qe.__design__)return Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this);if(z(this),this["hide."])return ht("span",gr);var e=this.state["tagName."];if(!e)return ye(this);var r=k(this,Object.assign({},this.state.style,{width:"0px",height:"0px",display:"none"}));return ht(e,r)}}]),t}(vr);Ye.TempSpan_=qr,Ye.TempSpan=new qr;var Yr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"RefDiv",r));return i._silentProp.push("isReference."),i._htmlText=!0,i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.width=0,e.height=0,e["isReference."]=1,e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return l(this)&&Ge.instantShow("warning: can not add RefDiv to topmost widget."),e}},{key:"componentDidMount",value:function(){Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this);var e;if(!it&&(e=this.widget)){var r=(e=e.parent)&&e.component;r&&se(r,this.$gui.keyid+"",function(){})}}},{key:"render",value:function(){var e=c(this),t={style:{width:"0px",height:"0px"}};return e&&(t.className=e),ht("div",t)}}]),t}(Mt);Ye.RefDiv_=Yr,Ye.RefDiv=new Yr;var Gr=Ye.RefDiv._createClass(null),Xr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"RefSpan",r));return i._silentProp.push("isReference."),i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["isReference."]=2,e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return l(this)&&Ge.instantShow("error: can not hook RefSpan to topmost widget."),e}},{key:"componentDidMount",value:function(){Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this);var e;if(!it&&(e=this.widget)){var r=(e=e.parent)&&e.component;r&&se(r,this.$gui.keyid+"",function(){})}}},{key:"render",value:function(){var e=c(this),t={style:{width:"0px",height:"0px"}};return e&&(t.className=e),ht("span",t)}}]),t}(vr);Ye.RefSpan_=Xr,Ye.RefSpan=new Xr;var Kr=Ye.RefSpan._createClass(null),Jr=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"ScenePage",r));return i._silentProp.push("isScenePage.","isTemplate."),i._defaultProp.noShow="",i}return i(t,e),Le(t,[{key:"_getSchema",value:function(e,r){r=r||1200;var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_getSchema",this).call(this,e,r+200);n.noShow=[r+1,"string",["","1"],"[string]: disable show content"];var i="[number]: 0~1 for percent, 0.9999 for 100%, N pixels",o=n.width,a=n.height;return o&&(o[1]="number",o[3]=i),a&&(a[1]="number",a[3]=i),n}},{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.noShow="",e["tagName."]="article",e["isScenePage."]=1,e.className="rewgt-panel rewgt-scene",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);l(this)||Ge.instantShow("error: ScenePage only hook to topmost widget.");var r=Object.assign({},this.props.style,{position:"absolute",display:"none"});r.zIndex||(r.zIndex="0"),this.duals.style=r;var n=this.props.width,i=this.props.height;if("number"==typeof n&&n>0||console.log("warning: invalid width of ScenePage ("+this.$gui.keyid+")"),"number"==typeof i&&i>0||console.log("warning: invalid height of ScenePage ("+this.$gui.keyid+")"),qe.__design__)this.$gui.currSelected="";else if(this.props["isTemplate."]){Te(this.$gui),this.isLibGui=!1;var o=this.props.template;o instanceof ae?this.$gui.template=o:Ae(this),this.$gui.compIndex={},this.$gui.comps=[]}return e}},{key:"elementOf",value:function(e){return this.props["isTemplate."]?Ce(this,e):Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"elementOf",this).call(this,e)}},{key:"setSelected",value:function(e){function t(e,t){var n=r&&r[e];if(n=n&&n.component){var i=parseInt(n.state.style.zIndex)||0;t?i>=-997&&i<=999&&n.setState({style:Object.assign({},n.state.style,{zIndex:i+2e3})}):i>=1e3&&i<=2999&&n.setState({style:Object.assign({},n.state.style,{zIndex:i-2e3})})}}if(qe.__design__){var r=this.widget,n=this.$gui;if(n.currSelected){if(e==n.currSelected)return;t(n.currSelected,!1),n.currSelected=""}e&&(t(e,!0),n.currSelected=e)}}},{key:"render",value:function(){if(z(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);if(this.props["isTemplate."]){o=k(this,r=Object.assign({},this.state.style,{width:"0px",height:"0px",display:"none"}));return ht("div",o)}var t=this.prepareState(),r=void 0;this.props.noShow&&!qe.__design__&&((r=Object.assign({},this.state.style)).display="none");var n=this.$gui.insertEle;n&&(t=me(n,t));var i=ht("div",{className:"rewgt-center"},t),o=k(this,r);return ht(e,o,i)}}]),t}(Wt);Ye.ScenePage_=Jr,Ye.ScenePage=new Jr;Ye.ScenePage._createClass(null);var Zr=function(e){function t(e,r){return o(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"MaskPanel",r))}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e.klass="noselect-txt",e}},{key:"getInitialState",value:function(){function e(e,t,r){return e<1&&(e>=.9999?e=t:e>0?e*=t:e=r),e}function r(e,t,r){return"number"!=typeof e?e=(t-r)/2:e<1&&(e*=t),e<0&&(e=0),e}var n=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return this.defineDual("popOption"),this.defineDual("id__",function(t,n){if(1===n){var i,o=null,a=null,s=this.$gui,l=this.props.popOption;l&&((i=l.frame)?(a=this.props.popFrame)&&!a.props&&(a=null):i={},this.props.children&&(o=gt(this.props.children)[0]),s.compIdx={},s.comps=[]);var u=this.widget;if(o&&u&&rt){var p=rt.frameInfo,c=window.innerWidth,f=window.innerHeight;this.state.left=0,this.state.top=0,this.state.width=c-p.leftWd-p.rightWd,this.state.height=f-p.topHi-p.bottomHi,this.state.style=Object.assign({},this.state.style,{position:"absolute",zIndex:"auto",backgroundColor:l.maskColor||"rgba(238,238,238,0.84)"});var h=this.state.width,d=this.state.height;if(a){var g=e(i.width||.9,h,4),v=e(i.height||.9,d,4),y=r(i.left,h,g),_=r(i.top,d,v),m={"hookTo.":u,"keyid.":"",key:"",style:Object.assign({},a.props.style,{position:"absolute",zIndex:"auto"}),left:y,top:_,width:g,height:v};s.compIdx[0]=0,s.comps.push(ft(a,m))}var w=e(l.width||.8,h,6),k=e(l.height||.8,d,6),O=r(l.left,h,w),x=r(l.top,d,k);!a&&O>0&&x>0&&O+w24||(n.isHooked?Me(n,e,function(e,t){e&&(n.props.noShow&&(n.$gui.compIdx={},n.$gui.comps=[]),n.reRender(function(){de(n,!0);var e=null;0==n.state.nodes.length?t&&t.length&&(e=t):e=t||[],e&&setTimeout(function(){n.duals.nodes=e},10)}))}):i.delayTid=setTimeout(function(){r()},100))}if(this.widget&&"string"==typeof e){var o=0;r()}}),r.nodes=[],this.defineDual("nodes"),r}},{key:"willResizing",value:function(e,t,r){if(!r&&this.isHooked){var n=this;setTimeout(function(){Q(n,!1)},0)}return!0}},{key:"render",value:function(){if(z(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var t=this.prepareState(),r=k(this),n=this.$gui.insertEle;return n&&(t=me(n,t)),ht(e,r,t)}}]),t}(Vt);Ye.MarkedDiv_=nn,Ye.MarkedDiv=new nn;var on=function(e){function t(e,r){o(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e||"MarkedTable",r));return i._silentProp.push("markedTable."),i}return i(t,e),Le(t,[{key:"getDefaultProps",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getDefaultProps",this).call(this);return e["markedTable."]=!0,e["tagName."]="table",e}},{key:"getInitialState",value:function(){var e=Fe(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getInitialState",this).call(this);return this.firstScan=!0,this.cellKeys={},this.cellStyles={},e}},{key:"render",value:function(){if(z(this),this["hide."])return null;var e=this.state["tagName."];if(!e)return ye(this);var t=this.prepareState(),r=k(this);if(this.props.noShow)return ht("div",r);0==t.length&&t.push(ht(Jt,{"html.":" "}));var n=["tbody",null],i=null,o=this,a=this.firstScan;this.firstScan=!1,t.forEach(function(e){if(e.props["markedRow."])i&&n.push(ht.apply(null,i)),i=["tr",null];else{i||(i=["tr",null]);var t=e.props["keyid."],r=void 0,s=void 0,l=null;if(void 0!==t&&(t+=""),t&&e.props["marked."])if(a){var u,p;(u=e.props.rowSpan)&&!isNaN(p=parseInt(u))&&(r=p+""),(u=e.props.colSpan)&&!isNaN(p=parseInt(u))&&(s=p+""),o.cellKeys[t]=[r,s],l=o.cellStyles[t]=e.props.tdStyle}else{var c=o.cellKeys[t];Array.isArray(c)&&(r=c[0],s=c[1]),l=o.cellStyles[t]}var f=null;t&&(f={key:t,rowSpan:r,colSpan:s},l&&(f.style=l)),i.push(ht("td",f,e))}}),i&&n.push(ht.apply(null,i));var s=ht.apply(null,n);return ht(e,r,s)}}]),t}(nn);Ye.MarkedTable_=on,Ye.MarkedTable=new on,t.exports=Ye},{"./react_widget":9,"create-react-class":2,react:void 0,"react-dom":void 0}],11:[function(e,t,r){function n(e){if(u===setTimeout)return setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function i(e){if(p===clearTimeout)return clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function o(){d&&f&&(d=!1,f.length?h=f.concat(h):g=-1,h.length&&a())}function a(){if(!d){var e=n(o);d=!0;for(var t=h.length;t;){for(f=h,h=[];++g1)for(var r=1;r