/* ========================================================================== *
UTILITIES                                                                 *
==========================================================================
971338
function EmitContinuation (stream) {

  stream._processing++;

  var self = function (err, data) {
    if (err)
      self.err = err;
    else if (Array.isArray(data))
      self.data = data;
    else
      self.data = [data];

    self.done = true;

    stream._processing--;

    stream._next();
  };
  return self;
}
759664
function HttpBackend() {
    this.requests = [];
    this.expectedRequests = [];
    const self = this;

    // All the promises our flush requests have returned. When all these promises are
    // resolved or rejected, there are no more flushes in progress.
    // For simplicity we never remove promises from this loop: this is a mock utility
    // for short duration tests, so this keeps it simpler.
    this._flushPromises = [];

    // the request function dependency that the SDK needs.
    this.requestFn = function(opts, callback) {
        const req = new Request(opts, callback);
        console.log(`${Date.now()} HTTP backend received request: ${req}`);
        self.requests.push(req);

        const abort = function() {
            const idx = self.requests.indexOf(req);
            if (idx >= 0) {
                console.log("Aborting HTTP request: %s %s", opts.method,
                            opts.uri);
                self.requests.splice(idx, 1);
                req.callback("aborted");
            }
        };

        return {
            abort: abort,
        };
    };

    // very simplistic mapping from the whatwg fetch interface onto the request
    // interface, so we can use the same mock backend for both.
    this.fetchFn = function(input, init) {
        init = init || {};
        const requestOpts = {
            uri: input,
            method: init.method || 'GET',
            body: init.body,
        };

        return new Promise((resolve, reject) => {
            function callback(err, response, body) {
                if (err) {
                    reject(err);
                }
                resolve({
                    ok: response.statusCode >= 200 && response.statusCode < 300,
                    json: () => JSON.parse(body),
                });
            };

            const req = new Request(requestOpts, callback);
            console.log(`HTTP backend received request: ${req}`);
            self.requests.push(req);
        });
    };
}
735177
function helper(pluginOptions, doValidation) {
  const options = mergeOptions(pluginOptions);

  return through.obj((file, encoding, callback) => {
    let oldContent;
    let newContent;
    let type = null;

    if (file.isNull()) {
      callback(null, file);
      return;
    }

    if (file.isStream()) {
      callback(new PluginError(PLUGIN_NAME, 'Streaming not supported'));
      return;
    }

    // Check if current file should be treated as JavaScript, HTML, CSS or if it should be ignored
    ['js', 'css', 'html'].some((value) => {
      // Check if at least one element in 'file_types' is suffix of file basename
      if (options[value].file_types.some(suffix => path.basename(file.path).endsWith(suffix))) {
        type = value;
        return true;
      }

      return false;
    });

    // Initialize properties for reporter
    file.jsbeautify = {};
    file.jsbeautify.type = type;
    file.jsbeautify.beautified = false;
    file.jsbeautify.canBeautify = false;

    if (type) {
      oldContent = file.contents.toString('utf8');
      newContent = beautify[type](oldContent, options);

      if (oldContent.toString() !== newContent.toString()) {
        if (doValidation) {
          file.jsbeautify.canBeautify = true;
        } else {
          file.contents = Buffer.from(newContent);
          file.jsbeautify.beautified = true;
        }
      }
    }

    callback(null, file);
  });
}
259284
public static function dump()
	{
		if (\Fuel::$is_cli)
		{
			// no fancy flying, jump dump 'm
			foreach (func_get_args() as $arg)
			{
				var_dump($arg);
			}
		}
		else
		{
			$backtrace = debug_backtrace();

			// locate the first file entry that isn't this class itself
			foreach ($backtrace as $stack => $trace)
			{
				if (isset($trace['file']))
				{
					// If being called from within, show the file above in the backtrack
					if (strpos($trace['file'], 'core/classes/debug.php') !== false)
					{
						$callee = $backtrace[$stack+1];
						$label = \Inflector::humanize($backtrace[$stack+1]['function']);
					}
					else
					{
						$callee = $trace;
						$label = 'Debug';
					}

					$callee['file'] = \Fuel::clean_path($callee['file']);

					break;
				}
			}

			$arguments = func_get_args();

			if ( ! static::$js_displayed)
			{
				echo <<<JS
	<script type="text/javascript">function fuel_debug_toggle(a){if(document.getElementById){if(document.getElementById(a).style.display=="none"){document.getElementById(a).style.display="block"}else{document.getElementById(a).style.display="none"}}else{if(document.layers){if(document.id.display=="none"){document.id.display="block"}else{document.id.display="none"}}else{if(document.all.id.style.display=="none"){document.all.id.style.display="block"}else{document.all.id.style.display="none"}}}};</script>
JS;
				static::$js_displayed = true;
			}
			echo '<div class="fuelphp-dump" style="font-size: 13px;background: #EEE !important; border:1px solid #666; color: #000 !important; padding:10px;">';
			echo '<h1 style="border-bottom: 1px solid #CCC; padding: 0 0 5px 0; margin: 0 0 5px 0; font: bold 120% sans-serif;">'.$callee['file'].' @ line: '.$callee['line'].'</h1>';
			echo '<pre style="overflow:auto;font-size:100%;">';

			$count = count($arguments);
			for ($i = 1; $i <= $count; $i++)
			{
				echo '<strong>Variable #'.$i.':</strong>'.PHP_EOL;
				echo static::format('', $arguments[$i - 1]);
				echo PHP_EOL.PHP_EOL;
			}

			echo "</pre>";
			echo "</div>";
		}
	}
688476
function(_path){
        var str = "";
        var x, y;
        var path= $options.snippetsName;

        if(!path){
            console.log("[Error] please input widget or page name!");
            return false;
        }
        

        for(x in $options.fileType){
            var files = $fs.readFileSync( $path.join(__dirname, "view/widget_tpl." + $options.fileType[x]), "utf8");

            if($options.fileType[x] == "html" || $options.fileType[x] == "css"){
                files = snippets.fn.extTpl(files, $options.snippetsName);
            }else if($options.fileType[x] == "js"){
                var fileName = $options.snippetsName.split("-");
                for(y in fileName){
                    if(y == 0){
                        continue;
                    }else{
                        fileName[y] = snippets.fn.firstUpper(fileName[y]);
                    }
                };
                fileName = fileName.join("");
                files = snippets.fn.extTpl(files, fileName);
            }else{
                return;
            }

            snippets.fn.writeFile(path, $options.fileType[x], files);
        };

        console.log("[Success] "+path+" is builded success!");
    }
1252548
function main(options = util.getDefaultOptions()) {
  createLogger(options.debug);
  log.info(`Preparing '${options.sdk}' schemas in version '${options.version || 'latest'}'...`);

  let allLibs = {};

  // do the downloading and encapsulate in Promise
  const dlPromise = new Promise((resolve, reject) => {
    download.allLibsFile(options)
      .then((allLibsJSON) => {
        allLibs = allLibsJSON;
        download.schemas(options, allLibs)
          .then((values) => {
            resolve(values);
          })
          .catch((e) => {
            reject(e);
          });
      })
      .catch((e) => {
        reject(e);
      });
  });


  dlPromise.then(() => {
    log.info('Yay, all schema files were successfully downloaded!');
    if (options.upgrade) {
      upgrade(options, allLibs);
    }
    if (options.link) {
      link(options, allLibs);
    }
  }, (e) => {
    log.error('Damn... Something went all wrong while downloading the schema files!');
    log.error(`Are you sure the version '${options.version}' is still available on '${options.sdk}' download pages?`);
    log.error(e);
  });
}
258923
function builder (config, configPath, callback) {
	var inc = new Include(config)
	inc
		.on('drain', function () {
			// All files and their dependencies loaded, root files (files with no parent file) built
			inc.build(function () {

				var output = path.resolve( configPath, config.output.path )
				var outputFiles = []

				debug('Include DONE: %d roots found output=%s', inc.roots.length, output)
				async.forEach(
					inc.roots
				, function (file, cb) {
						var relfile = path.join( output, path.relative(configPath, file.id) )

						outputFiles.push(relfile)

						debug('Include WRITING: file=%s', relfile)
						var w = fstream
							.Writer({
								path: relfile
							, mode: config.output.mode
							})
							w
							.on('close', cb)

							if (file.content)
								w.end(file.content)
							else
								fs.createReadStream(file.id).pipe(w)
				  }
				, function (err) {
						if (err) return callback(err)
						debug('%d files written out to %s', inc.roots.length, output)
						callback(
							null
						, outputFiles
						, inc.sourceFiles
						, inc.roots.map(function(root) {
								return root.id
							})
						)
					}
				)
			})
		})

	debug( path.resolve( configPath, config.input.include || '*.js' ) )
	debug( config.input.include || '*.js' )
	debug( config.input.exclude || '' )
	fileset(
		config.input.include || '*.js'
	, config.input.exclude || ''
	, { cwd: configPath }
	, function (err, files) {
			if (err) throw err

			debug('files', files)
			files
				.forEach(function (file) {
					inc.add( path.resolve( configPath, file) )
				})
		}
	)
}
556945
function process( $tpl, &$textElements, $functionName, $functionChildren, $functionParameters, $functionPlacement, $rootNamespace, $currentNamespace )
    {
        $params = $functionParameters;
        switch ( $functionName )
        {
            case $this->BlockName:
            {
                $viewMode = "full";
                $name = $currentNamespace;
                // Read ini file
                $toolbarIni = eZINI::instance( "toolbar.ini" );

                if ( isset( $functionParameters["view"] ) )
                {
                    $viewMode = $tpl->elementValue( $functionParameters["view"], $rootNamespace, $currentNamespace, $functionPlacement );
                }

                if ( isset( $functionParameters["name"] ) )
                {
                    reset( $params );
                    $whatParamsShouldBeUnset = array();
                    $whatParamsShouldBeReplaced = array();
                    while ( ( $key = key( $params ) ) !== null )
                    {
                        $item =& $params[$key];
                        switch ( $key )
                        {
                            case "name":
                            case "view":
                                break;

                            default:
                            {
                                if ( !$tpl->hasVariable( $key, $name ) )
                                {
                                    $whatParamsShouldBeUnset[] = $key; // Tpl vars should be removed after including
                                }
                                else
                                {
                                    $whatParamsShouldBeReplaced[$key] = $tpl->variable( $key, $name ); // Tpl vars should be replaced after including
                                }

                                $item_value = $tpl->elementValue( $item, $rootNamespace, $currentNamespace, $functionPlacement );
                                $tpl->setVariable( $key, $item_value, $name );
                            } break;
                        }
                        next( $params );
                    }
                    $toolbarPosition = $tpl->elementValue( $functionParameters["name"], $rootNamespace, $currentNamespace, $functionPlacement );
                    $definedVariables = array();
                    $toolbarName = "Toolbar_" . $toolbarPosition;
                    $toolArray = $toolbarIni->variable( $toolbarName, 'Tool' );

                    if ( !is_array( $toolArray ) )
                        $toolArray = array();

                    $actionParameters = array();
                    foreach ( array_keys( $toolArray ) as $toolKey )
                    {
                        $definedVariables = array();
                        $tool = $toolArray[$toolKey];
                        $placement = $toolKey + 1;
                        if ( $toolbarIni->hasGroup( "Tool_" . $tool ) )
                        {
                            $actionParameters = $toolbarIni->group( "Tool_" . $tool );
                        }
                        if ( $toolbarIni->hasGroup( "Tool_" . $toolbarPosition . "_" . $tool . "_" . $placement ) )
                        {
                            $actionParameters = array_merge( $actionParameters, $toolbarIni->group( "Tool_" . $toolbarPosition . "_" . $tool . "_" . $placement ) );
                        }
                        foreach ( array_keys( $actionParameters ) as $key )
                        {
                            $itemValue = $actionParameters[$key];
                            $tpl->setVariable( $key, $itemValue, $name );
                            $definedVariables[] = $key;
                        }
                        $toolIDValue =  "Tool_" . $toolbarPosition . "_" . $tool . "_" . $placement;
                        $tpl->setVariable( "tool_id", $toolIDValue, $name );
                        $definedVariables[] = "tool_id";
                        $toolOffset = $placement;
                        $tpl->setVariable( "offset", $toolOffset, $name );
                        $definedVariables[] = "offset";
                        $uri = "design:toolbar/$viewMode/$tool.tpl";

                        if ( $placement == 1 )
                        {
                            if ( count( $toolArray ) == 1 )
                            {
                                $tpl->setVariable( "first", true );
                                $tpl->setVariable( "last", true );
                                $tpl->setVariable( "placement", "last" );
                                $definedVariables[] = "first";
                                $definedVariables[] = "last";
                                $definedVariables[] = "placement";
                            }
                            else
                            {
                                $tpl->setVariable( "first", true );
                                $tpl->setVariable( "last", false );
                                $tpl->setVariable( "placement", "first" );
                                $definedVariables[] = "first";
                                $definedVariables[] = "last";
                                $definedVariables[] = "placement";
                            }
                        }
                        else if ( $placement == count( $toolArray ) )
                        {
                            $tpl->setVariable( "first", false );
                            $tpl->setVariable( "last", true );
                            $tpl->setVariable( "placement", "last" );
                            $definedVariables[] = "first";
                            $definedVariables[] = "last";
                            $definedVariables[] = "placement";
                        }
                        else
                        {
                            $tpl->setVariable( "first", false );
                            $tpl->setVariable( "last",  false );
                            $tpl->setVariable( "placement", "" );
                            $definedVariables[] = "placement";
                        }
                        $tpl->processURI( $uri, true, $extraParameters, $textElements, $name, $name );
                        // unset var
                        foreach ( $whatParamsShouldBeUnset as $key )
                        {
                            $tpl->unsetVariable( $key, $name );
                        }
                        // replace var
                        foreach ( $whatParamsShouldBeReplaced as $key => $item_value )
                        {
                            $tpl->setVariable( $key, $item_value, $name );
                        }
                    }
                }
            }
        }
    }
1296874
function help() {
  console.log("Usage:");
  console.log("  qrcode-svg [options] <content>");
  console.log("");
  console.log("Options:");
  console.log("  --help                 Print this message");
  console.log("  --padding [value]      Offset in number of modules");
  console.log("  --width [px]           Image width in pixels");
  console.log("  --height [px]          Image height in pixels");
  console.log("  --color [color]        Foreground color, hex or name");
  console.log("  --background [color]   Background color, hex or name");
  console.log("  --ecl [value]          Error correction level: L, M, H, Q");
  console.log("  -o [file]              Output file name");
  console.log("  -f                     Force overwrite");
  console.log("  -v                     Print version number");
  console.log("");
  console.log("Examples:");
  console.log("  qrcode-svg http://github.com");
  console.log("  qrcode-svg -f -o hello.svg \"Hello World\"");
  console.log("  qrcode-svg --padding 2 --width 120 --height 120 \"Little fox...\"");
  console.log("  qrcode-svg --color blue --background #ececec \"...jumps over\"");
}
1270854
function Widget(options) {
  this.__data = {};
  try {
    var e;
    if (typeof options === 'undefined') options = {};
    if (typeof options.innerHTML !== 'undefined' && typeof options.childNodes !== 'undefined') {
      // On passe directement un élément.
      options = {element: options};
    }
    if (typeof options.tag === 'undefined') options.tag = "div";
    if (options.element) {
      this.element(options.element);
    } else if (typeof options.id !== 'undefined') {
      e = window.document.getElementById(options.id);
      if (!e) {
        throw Error("Can't find element with id: \"" + options.id + "\"!");
      }
      this.element(e);
    } else {
      this.element(window.document.createElement(options.tag));
      this.addClass("wdg", "custom");
    }
  }
  catch (ex) {
    console.error("[widget] ", ex);
    console.error("[Widget] ", JSON.stringify(options));
    throw Error(ex);
  }
}
1027385
function condor_classads_stream(cmd, opts, cb) {
    var deferred = Q.defer();
    var p = spawn(cmd, opts, {env: get_condor_env()});//, {cwd: __dirname});
    var buffer = "";
    var items = [];
    
    var parser = new xml2js.Parser();
    function getblock() {
        //look for start / end delimiter
        var s = buffer.indexOf("\n<c>\n");
        var e = buffer.indexOf("\n</c>\n");
        if(s != -1 && e != -1) {
            //var block = buffer.splice(spos, epos);
            xml = buffer.substring(s, e+5);
            buffer = buffer.substring(e+5);
            //XML.parse(xml, function(err, attrs) {
            parser.parseString(xml, function(err, attrs) {
                //console.dir(xml);
                if(err) {
                    console.log("failed to parse job xml (skipping)");
                    console.error(err);
                    console.log(xml);
                } else {
                    var event = {};
                    if(!attrs.c || !attrs.c.a) {
                        event._no_attributes = true;
                        //event.dump = attrs;
                    } else {
                        if(!attrs.c.a.forEach) {
                            attrs.c.a = [attrs.c.a];
                        }
                        attrs.c.a.forEach(function(attr) {
                            var name = attr.$.n;
                            event[name] = parse_attrvalue(attr);
                        });
                    }
                    if(cb) {
                        cb(null, event);
                    }
                    items.push(event);
                }
            });
            return true;
        } else {
            return false;
        }
    }
    p.stdout.on('data', function (data) {
        buffer += data.toString();
        while(getblock());
    });

    var stderr = "";
    p.stderr.on('data', function (data) {
        stderr += data;
    });
    p.on('error', function(err) {
        console.error(err);
        deferred.reject(err);
        cb(err);
    });
    p.on('close', function (code, signal) {
        while(getblock());
        if (signal) {
            deferred.reject(cmd+ " was killed by signal "+ signal);
            if(cb) {
                cb({code: code, signal: signal, stdout: buffer, stderr: stderr});
            }
        } else if (code !== 0) {
            deferred.reject(cmd+ " failed with exit code "+ code+ "\nSTDERR:"+ stderr + "\nbuffer:"+ buffer);
            if(cb) {
                cb({code: code, signal: signal, stdout: buffer, stderr: stderr});
            }
        } else {
            deferred.resolve(items);
        }
    });
    return deferred.promise;
}
488825
async function getBuildConfig() {
	const entries = await $C(vinyl.src(path.join(entry(), '*.js'), {read: false}))
		.async
		.to({})
		.reduce((res, el) => {
			const
				src = el.path,
				name = path.basename(src, '.js');

			let source;
			function getSource() {
				source = source || fs.readFileSync(src, 'utf-8');
				return source;
			}

			res[name] = {
				path: src,

				get source() {
					return getSource();
				},

				get parent() {
					return $C(getEntryParents(getSource())).one.get();
				},

				get parents() {
					return getEntryParents(getSource());
				},

				getRuntimeDependencies({cache} = {}) {
					return getEntryRuntimeDependencies(path.dirname(src), getSource(), {cache});
				}
			};

			return res;
		});

	function factory(entries) {
		function filter(cb) {
			return factory($C(entries).filter(cb).map());
		}

		return {
			entries,
			filter,
			getUnionEntryPoints({cache} = {}) {
				return getUnionEntryPoints(entries, {cache});
			}
		};
	}

	return factory(entries);
}
1000589
function mine(js) {
		var names = [];
		var state = 0;
		var ident;
		var quote;
		var name;

		var isIdent = /[a-z0-9_.]/i;
		var isWhitespace = /[ \r\n\t]/;

		function $start(char) {
			if (char === "/") {
				return $slash;
			}
			if (char === "'" || char === '"') {
				quote = char;
				return $string;
			}
			if (isIdent.test(char)) {
				ident = char;
				return $ident;
			}
			return $start;
		}

		function $ident(char) {
			if (isIdent.test(char)) {
				ident += char;
				return $ident;
			}
			if (char === "(" && ident === "require") {
				ident = undefined;
				return $call;
			}
			return $start(char);
		}

		function $call(char) {
			if (isWhitespace.test(char)) return $call;
			if (char === "'" || char === '"') {
				quote = char;
				name = "";
				return $name;
			}
			return $start(char);
		}

		function $name(char) {
			if (char === quote) {
				return $close;
			}
			name += char;
			return $name;
		}

		function $close(char) {
			if (isWhitespace.test(char)) return $close;
			if (char === ")" || char === ',') {
				names.push(name);
			}
			name = undefined;
			return $start(char);
		}

		function $string(char) {
			if (char === "\\") {
				return $escape;
			}
			if (char === quote) {
				return $start;
			}
			return $string;
		}

		function $escape(char) {
			return $string;
		}

		function $slash(char) {
			if (char === "/") return $lineComment;
			if (char === "*") return $multilineComment;
			return $start(char);
		}

		function $lineComment(char) {
			if (char === "\r" || char === "\n") return $start;
			return $lineComment;
		}

		function $multilineComment(char) {
			if (char === "*") return $multilineEnding;
			return $multilineComment;
		}

		function $multilineEnding(char) {
			if (char === "/") return $start;
			if (char === "*") return $multilineEnding;
			return $multilineComment;
		}

		var state = $start;
		for (var i = 0, l = js.length; i < l; i++) {
			state = state(js[i]);
		}
		return names;
	}
951199
function () {


/*Line 40 - 'AtomWizard.js' */                var vs = this._viewPresenter;

/*Line 42 - 'AtomWizard.js' */                this.disposeChildren(vs);

/*Line 44 - 'AtomWizard.js' */                var vt = this._viewTemplate;

/*Line 46 - 'AtomWizard.js' */                var i = 0;

/*Line 48 - 'AtomWizard.js' */                var ae = new ChildEnumerator(vt);
/*Line 49 - 'AtomWizard.js' */                while (ae.next()) {
/*Line 50 - 'AtomWizard.js' */                    i++;
/*Line 51 - 'AtomWizard.js' */                    var item = AtomUI.cloneNode(ae.current());
/*Line 52 - 'AtomWizard.js' */                    //$(vs).append(item);
/*Line 53 - 'AtomWizard.js' */                    vs.appendChild(item);
/*Line 54 - 'AtomWizard.js' */                    var type = AtomUI.getAtomType(item);
/*Line 55 - 'AtomWizard.js' */                    if (!type) {
/*Line 56 - 'AtomWizard.js' */                        type = "AtomViewBox";
/*Line 57 - 'AtomWizard.js' */                        AtomUI.attr(item, "data-atom-type", type);
/*Line 58 - 'AtomWizard.js' */                    }

/*Line 60 - 'AtomWizard.js' */                    //var s = new AtomScope(this, this.get_scope(), atomApplication);

/*Line 62 - 'AtomWizard.js' */                    var ct = AtomUI.getAtomType(item) || WebAtoms.AtomControl;
/*Line 63 - 'AtomWizard.js' */                    var cc = AtomUI.createControl(item, ct);
/*Line 64 - 'AtomWizard.js' */                    cc.init();
/*Line 65 - 'AtomWizard.js' */                }
/*Line 66 - 'AtomWizard.js' */                AtomBinder.setValue(this, "steps", i);

/*Line 68 - 'AtomWizard.js' */                if (i) {
/*Line 69 - 'AtomWizard.js' */                    AtomBinder.setValue(this, "currentStep", 0);
/*Line 70 - 'AtomWizard.js' */                }
/*Line 71 - 'AtomWizard.js' */            }
439025
function () {
/*Line 74 - 'AtomWizard.js' */                $(this._element).addClass('atom-wizard');

/*Line 76 - 'AtomWizard.js' */                baseType.init.call(this);

/*Line 78 - 'AtomWizard.js' */                var _this = this;

/*Line 80 - 'AtomWizard.js' */                var vs = this._viewPresenter;

/*Line 82 - 'AtomWizard.js' */                this.goNextCommand = function (scope, sender, evt) {
/*Line 83 - 'AtomWizard.js' */                    if (_this.get_isLastStep()) {
/*Line 84 - 'AtomWizard.js' */                        _this.invokeAction(_this._next, evt);
/*Line 85 - 'AtomWizard.js' */                        AtomBinder.setValue(_this, "canMoveBack", false);
/*Line 86 - 'AtomWizard.js' */                    } else {
/*Line 87 - 'AtomWizard.js' */                        AtomBinder.setValue(_this, "currentStep", _this._currentStep + 1);
/*Line 88 - 'AtomWizard.js' */                    }
/*Line 89 - 'AtomWizard.js' */                };

/*Line 91 - 'AtomWizard.js' */                this.goPrevCommand = function () {
/*Line 92 - 'AtomWizard.js' */                    AtomBinder.setValue(_this, "currentStep", _this._currentStep - 1);
/*Line 93 - 'AtomWizard.js' */                };

/*Line 95 - 'AtomWizard.js' */                this.resetCommand = function () {
/*Line 96 - 'AtomWizard.js' */                    _this.createWizard();
/*Line 97 - 'AtomWizard.js' */                    AtomBinder.setValue(_this, "currentStep", 0);
/*Line 98 - 'AtomWizard.js' */                    AtomBinder.setValue(_this, "canMoveBack", true);
/*Line 99 - 'AtomWizard.js' */                };

/*Line 101 - 'AtomWizard.js' */                // create children...
/*Line 102 - 'AtomWizard.js' */                this.createWizard();

/*Line 104 - 'AtomWizard.js' */                this.nextCommand = function (scope, sender, evt) {
/*Line 105 - 'AtomWizard.js' */                    var child = vs.atomControl.get_selectedChild().atomControl;
/*Line 106 - 'AtomWizard.js' */                    if (child._next) {
/*Line 107 - 'AtomWizard.js' */                        child.invokeAction(child._next);
/*Line 108 - 'AtomWizard.js' */                        return;
/*Line 109 - 'AtomWizard.js' */                    } else {
/*Line 110 - 'AtomWizard.js' */                        _this.goNextCommand(scope, sender, evt);
/*Line 111 - 'AtomWizard.js' */                    }
/*Line 112 - 'AtomWizard.js' */                };

/*Line 114 - 'AtomWizard.js' */            }
575141
function init() {
    if (tokens) {
      return;
    }
    if (fromString) {
      tokens = cbml.parse(contentString);
    }
    else {
      tokens = cbml.parse(fs.readFileSync(filename));
    }
    /*<debug>
    console.log(JSON.stringify(tokens, null, '  '));
    //</debug>*/
  }
198197
function inits() {
  log( "init", "step="+step+" ajaxOngoing="+ajaxOngoing );
  if ( getParam( 'nc' ) == 'true' ) {
    noCache = "?nc="+ Math.random();
  }

  if ( ajaxOngoing == 0 ) { 
    if ( step == "load-lang" ) {
      ajaxOngoing++;
      log( 'init', 'Start to load module list...');
      loadLang();
      step = "loadmodulemap";
    } else if ( step == "loadmodulemap" ) {
      ajaxOngoing++;
      log( 'init', 'Start to load module list...');
      loadModuleList();
      step = "loaddecor";
    } else if ( step == "loaddecor" ) {
      ajaxOngoing++;
      log( 'init', 'Start to load decor config...');
      loadDecorList();
      step = "loadstructure";
    } else  if ( step == "loadstructure" ) {
      ajaxOngoing++;
      log( 'init', 'Load Structure File ...');
      loadStructure();
      step = "loadincludes";
    } else if ( step == "loadincludes" ) {
      ajaxOngoing++;
      log( 'init', 'Start to load include JS modules ...');
      checkModules( );
      loadIncludes();
      step = "loadmodules";
    } else if ( step == "loadmodules" ) {
      ajaxOngoing++;
      log( 'init', 'Start to load JS modules ...');
      loadModules();
      if ( layout.theme != null ) {
        loadCSSrelPath( 'css-custom/'+layout.theme+'.css' );
        //jQuery('head').append('<link rel="stylesheet" rel="nofollow" href="css-custom/'+layout.theme+'.css" type="text/css" />');        
      }
      loadCSSrelPath( "css-custom/custom.css" );
      if ( pageInfo["layoutMode"] == 'tablet' ) {
        loadCSSrelPath( "css-custom/custom-t.css" );
        //jQuery('head').append('<link rel="stylesheet" rel="nofollow" href="css-custom/custom-t.css" type="text/css" />');        
      } else if ( pageInfo["layoutMode"] == 'mobile' ) {
        loadCSSrelPath( "css-custom/custom-m.css" );
        //jQuery('head').append('<link rel="st<ylesheet" rel="nofollow" href="css-custom/custom-m.css" type="text/css" />');
      } 
      step = "initmodules";
    } else  if ( step == "initmodules" ) {
      ajaxOngoing++;
      log( 'init', 'Load Structure File ...');
      initModules( layout );
      step = "buildstructure";
    } else  if ( step == "buildstructure" ) {
      ajaxOngoing++;
      log( 'init', 'Start to build HTML ...');
      buildStructure( layout );
      step = "loadres-ht";
    } else  if ( step == "loadres-ht" ) {
      ajaxOngoing++;
      log( 'init', 'Start to load resources HTML ...');
      loadResourcesHT();
      step = "call-hooks";
    } else  if ( step == "call-hooks" ) {
      log( 'init', 'Call module hooks ...');
      callHooks();
      step = "loadres-js";
    } else  if ( step == "loadres-js" ) {
      ajaxOngoing++;
      log( 'init', 'Start to load resources JS ...');
      loadResourcesJS();
      step = "callbacks";
    } else  if ( step == "callbacks" ) {
      log( 'init', 'Start callback methods for resources...');
      resourceCallbacks();
      step = "dialogs";
    } else  if ( step == "dialogs" ) {
      log( 'init', 'Start load dialogs for resources...');
      resourceDialogs();
      step = "afterInit";
    } else  if ( step == "afterInit" ) {
      log( 'init', 'Start load dialogs for resources...');
      startModulesAfterPageLoad( layout );
      clearInterval( initTimerId );
      step = "done";
    }
  }  
}