You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by he...@apache.org on 2013/03/13 22:29:34 UTC

[14/30] git commit: Added ./bin/create script for b2g

Added ./bin/create script for b2g


Project: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/commit/050bb3c7
Tree: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/tree/050bb3c7
Diff: http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/diff/050bb3c7

Branch: refs/heads/master
Commit: 050bb3c7946167f91d44cae19af562a809357640
Parents: 68340ce
Author: Gord Tanner <gt...@gmail.com>
Authored: Sat Jan 26 13:56:57 2013 -0500
Committer: hermwong <he...@gmail.com>
Committed: Wed Mar 13 14:22:03 2013 -0700

----------------------------------------------------------------------
 .gitignore                                         |    6 +
 LICENSE                                            |  268 +
 VERSION                                            |    1 +
 bin/create                                         |   70 +
 bin/templates/project/README.md                    |   21 +
 bin/templates/project/package.json                 |   16 +
 bin/templates/project/tools/build.js               |   10 +
 bin/templates/project/tools/manifest.appcache      |   11 +
 bin/templates/project/tools/oneless.js             |   92 +
 bin/templates/project/tools/volo                   |12898 +++++++++++++++
 bin/templates/project/volofile                     |  197 +
 bin/templates/project/www/css/index.css            |  115 +
 bin/templates/project/www/img/logo.png             |  Bin 0 -> 21814 bytes
 bin/templates/project/www/index.html               |   42 +
 bin/templates/project/www/js/index.js              |   49 +
 bin/templates/project/www/manifest.webapp          |   16 +
 .../project/www/res/icon/android/icon-36-ldpi.png  |  Bin 0 -> 3096 bytes
 .../project/www/res/icon/android/icon-48-mdpi.png  |  Bin 0 -> 4090 bytes
 .../project/www/res/icon/android/icon-72-hdpi.png  |  Bin 0 -> 6080 bytes
 .../project/www/res/icon/android/icon-96-xhdpi.png |  Bin 0 -> 7685 bytes
 .../project/www/res/icon/b2g/icon-128.png          |  Bin 0 -> 11401 bytes
 bin/templates/project/www/res/icon/b2g/icon-48.png |  Bin 0 -> 4111 bytes
 .../www/res/icon/bada-wac/icon-48-type5.png        |  Bin 0 -> 4111 bytes
 .../www/res/icon/bada-wac/icon-50-type3.png        |  Bin 0 -> 5758 bytes
 .../www/res/icon/bada-wac/icon-80-type4.png        |  Bin 0 -> 7287 bytes
 .../project/www/res/icon/bada/icon-128.png         |  Bin 0 -> 11401 bytes
 .../project/www/res/icon/blackberry/icon-80.png    |  Bin 0 -> 7287 bytes
 .../project/www/res/icon/ios/icon-57-2x.png        |  Bin 0 -> 7869 bytes
 bin/templates/project/www/res/icon/ios/icon-57.png |  Bin 0 -> 3908 bytes
 .../project/www/res/icon/ios/icon-72-2x.png        |  Bin 0 -> 11706 bytes
 bin/templates/project/www/res/icon/ios/icon-72.png |  Bin 0 -> 4944 bytes
 .../project/www/res/icon/tizen/icon-128.png        |  Bin 0 -> 11401 bytes
 .../project/www/res/icon/webos/icon-64.png         |  Bin 0 -> 5463 bytes
 .../www/res/icon/windows-phone/icon-173-tile.png   |  Bin 0 -> 22878 bytes
 .../project/www/res/icon/windows-phone/icon-48.png |  Bin 0 -> 4111 bytes
 .../www/res/icon/windows-phone/icon-62-tile.png    |  Bin 0 -> 7324 bytes
 .../res/screen/android/screen-hdpi-landscape.png   |  Bin 0 -> 218302 bytes
 .../res/screen/android/screen-hdpi-portrait.png    |  Bin 0 -> 222148 bytes
 .../res/screen/android/screen-ldpi-landscape.png   |  Bin 0 -> 42616 bytes
 .../res/screen/android/screen-ldpi-portrait.png    |  Bin 0 -> 42034 bytes
 .../res/screen/android/screen-mdpi-landscape.png   |  Bin 0 -> 92347 bytes
 .../res/screen/android/screen-mdpi-portrait.png    |  Bin 0 -> 90555 bytes
 .../res/screen/android/screen-xhdpi-landscape.png  |  Bin 0 -> 489604 bytes
 .../res/screen/android/screen-xhdpi-portrait.png   |  Bin 0 -> 504508 bytes
 .../www/res/screen/bada-wac/screen-type3.png       |  Bin 0 -> 90555 bytes
 .../www/res/screen/bada-wac/screen-type4.png       |  Bin 0 -> 222148 bytes
 .../www/res/screen/bada-wac/screen-type5.png       |  Bin 0 -> 107580 bytes
 .../www/res/screen/bada/screen-portrait.png        |  Bin 0 -> 222148 bytes
 .../www/res/screen/blackberry/screen-225.png       |  Bin 0 -> 16776 bytes
 .../res/screen/ios/screen-ipad-landscape-2x.png    |  Bin 0 -> 1534088 bytes
 .../www/res/screen/ios/screen-ipad-landscape.png   |  Bin 0 -> 407370 bytes
 .../www/res/screen/ios/screen-ipad-portrait-2x.png |  Bin 0 -> 1610434 bytes
 .../www/res/screen/ios/screen-ipad-portrait.png    |  Bin 0 -> 422441 bytes
 .../res/screen/ios/screen-iphone-landscape-2x.png  |  Bin 0 -> 339639 bytes
 .../www/res/screen/ios/screen-iphone-landscape.png |  Bin 0 -> 92301 bytes
 .../res/screen/ios/screen-iphone-portrait-2x.png   |  Bin 0 -> 350593 bytes
 .../www/res/screen/ios/screen-iphone-portrait.png  |  Bin 0 -> 93897 bytes
 .../project/www/res/screen/tizen/README.md         |    3 +
 .../project/www/res/screen/webos/screen-64.png     |  Bin 0 -> 5463 bytes
 .../res/screen/windows-phone/screen-portrait.jpg   |  Bin 0 -> 22066 bytes
 bin/templates/project/www/spec.html                |   68 +
 bin/templates/project/www/spec/helper.js           |   33 +
 bin/templates/project/www/spec/index.js            |   67 +
 .../project/www/spec/lib/jasmine-1.2.0/MIT.LICENSE |   20 +
 .../www/spec/lib/jasmine-1.2.0/jasmine-html.js     |  616 +
 .../project/www/spec/lib/jasmine-1.2.0/jasmine.css |   81 +
 .../project/www/spec/lib/jasmine-1.2.0/jasmine.js  | 2529 +++
 javascript/cordova.b2g.js                          |    6 +
 68 files changed, 17235 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/050bb3c7/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index fd29596..7fcb202 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,8 @@
+<<<<<<< HEAD
 # OS X
 .DS_Store
+=======
+node_modules/
+.DS_Store
+example/
+>>>>>>> Added ./bin/create script for b2g

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/050bb3c7/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..ee6a935
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,268 @@
+
+                               Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+For the template/project/lib/ant-contrib/ant-contrib-1.0b3.jar component:
+
+   The Apache Software License, Version 1.1
+
+   Copyright (c) 2001-2003 Ant-Contrib project.  All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+   1. Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in
+      the documentation and/or other materials provided with the
+      distribution.
+
+   3. The end-user documentation included with the redistribution, if
+      any, must include the following acknowlegement:
+         "This product includes software developed by the
+          Ant-Contrib project (http://sourceforge.net/projects/ant-contrib)."
+      Alternately, this acknowlegement may appear in the software itself,
+      if and wherever such third-party acknowlegements normally appear.
+
+   4. The name Ant-Contrib must not be used to endorse or promote products
+      derived from this software without prior written permission. For
+      written permission, please contact
+      ant-contrib-developers@lists.sourceforge.net.
+
+   5. Products derived from this software may not be called "Ant-Contrib"
+      nor may "Ant-Contrib" appear in their names without prior written
+      permission of the Ant-Contrib project.
+
+   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+   OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+   DISCLAIMED.  IN NO EVENT SHALL THE ANT-CONTRIB PROJECT OR ITS
+   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+   USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+   SUCH DAMAGE.
+   ====================================================================
+
+For the template/project/www/json2.js component:
+
+    http://www.JSON.org/json2.js
+    2010-03-20
+
+    Public Domain.
+
+    NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+
+    See http://www.JSON.org/js.html
+
+
+    This code should be minified before deployment.
+    See http://javascript.crockford.com/jsmin.html
+
+    USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
+    NOT CONTROL.

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/050bb3c7/VERSION
----------------------------------------------------------------------
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..197c4d5
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+2.4.0

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/050bb3c7/bin/create
----------------------------------------------------------------------
diff --git a/bin/create b/bin/create
new file mode 100755
index 0000000..e036dd8
--- /dev/null
+++ b/bin/create
@@ -0,0 +1,70 @@
+#! /bin/sh
+#       Licensed to the Apache Software Foundation (ASF) under one
+#       or more contributor license agreements.  See the NOTICE file
+#       distributed with this work for additional information
+#       regarding copyright ownership.  The ASF licenses this file
+#       to you under the Apache License, Version 2.0 (the
+#       "License"); you may not use this file except in compliance
+#       with the License.  You may obtain a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#       Unless required by applicable law or agreed to in writing,
+#       software distributed under the License is distributed on an
+#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#       KIND, either express or implied.  See the License for the
+#       specific language governing permissions and limitations
+#       under the License.
+#
+# create a cordova/blackberry project
+# 
+# USAGE
+#   ./create [path appname]
+#
+set -e
+
+if [ -n "$1" ] && [ "$1" == "-h" ]
+then
+    echo 'usage: create path appname'
+    echo 'After you have created your application, make sure to customize the project.properties file inside your app directory with your environment specifics!'
+    exit 0
+fi
+
+BUILD_PATH="$( cd "$( dirname "$0" )/.." && pwd )"
+VERSION=$(cat "$BUILD_PATH/VERSION")
+
+PROJECT_PATH="${1:-"./example"}"
+APPNAME=${2:-"cordovaExample"}
+MANIFEST_PATH="$PROJECT_PATH/www/manifest.webapp"
+
+# clobber any existing example
+if [ -d "$PROJECT_PATH" ]
+then
+    echo "Project already exists! Delete and recreate"
+    exit 1
+fi
+
+# cleanup after exit and/or on error
+function on_exit {
+    echo "Finished"
+}
+
+function on_error {
+    echo "An error occured. Deleting project..."
+    [ -d "$PROJECT_PATH" ] && rm -rf "$PROJECT_PATH"
+}
+
+
+# we do not want the script to silently fail
+trap on_error ERR
+trap on_exit EXIT
+
+echo "Copying assets and resources ..."
+cp -r $BUILD_PATH/bin/templates/project $PROJECT_PATH
+
+echo "Building cordova-$VERSION.js ..."
+cp $BUILD_PATH/javascript/cordova.b2g.js $PROJECT_PATH/www/cordova-$VERSION.js
+
+# interpolate the app name into manifest.webapp
+echo "Updating manifest.webapp ..."
+sed -i '' -e "s/__NAME__/${APPNAME}/g" "$MANIFEST_PATH"

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/050bb3c7/bin/templates/project/README.md
----------------------------------------------------------------------
diff --git a/bin/templates/project/README.md b/bin/templates/project/README.md
new file mode 100644
index 0000000..3680525
--- /dev/null
+++ b/bin/templates/project/README.md
@@ -0,0 +1,21 @@
+# A Blank Template for Open Web Apps
+
+The is a minimal template that has a little HTML, CSS, and js to help
+you start writing an Open Web App.
+
+This is part of the [mortar](https://github.com/mozilla/mortar/)
+template collection for building Open Web Apps.
+
+# Usage
+
+There are a few ways to get this template:
+
+* git clone git://github.com/mozilla/mortar-app-stub.git myapp
+* volo create myapp mozilla/mortar-app-stub
+
+If you have node installed, you can run a development server with volo:
+
+1. cd myapp
+2. volo serve
+
+View the app at http://localhost:8008/.

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/050bb3c7/bin/templates/project/package.json
----------------------------------------------------------------------
diff --git a/bin/templates/project/package.json b/bin/templates/project/package.json
new file mode 100644
index 0000000..1dffaa3
--- /dev/null
+++ b/bin/templates/project/package.json
@@ -0,0 +1,16 @@
+{
+  "name": "mortar",
+  "version": "0.0.1",
+  "dependencies": {
+    "volo-ghdeploy": "0.0.3",
+    "connect": "~2.4.4",
+    "less-middleware": "~0.1.5"
+  },
+  "amd": {},
+  "volo": {
+    "dependencies": {
+      "zepto": "github:madrobby/zepto/v0.8"
+    },
+    "baseUrl": "www/js/lib"
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/050bb3c7/bin/templates/project/tools/build.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/tools/build.js b/bin/templates/project/tools/build.js
new file mode 100644
index 0000000..45bf796
--- /dev/null
+++ b/bin/templates/project/tools/build.js
@@ -0,0 +1,10 @@
+({
+    baseUrl: "js/lib",
+    map: { '*': { 'jquery': 'zepto' } },
+    dir: "../www-built",
+    appDir: "../www",
+    removeCombined: true,
+    modules: [
+        { name: "../app" }
+    ]
+})
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/050bb3c7/bin/templates/project/tools/manifest.appcache
----------------------------------------------------------------------
diff --git a/bin/templates/project/tools/manifest.appcache b/bin/templates/project/tools/manifest.appcache
new file mode 100644
index 0000000..d337bb4
--- /dev/null
+++ b/bin/templates/project/tools/manifest.appcache
@@ -0,0 +1,11 @@
+CACHE MANIFEST
+# {stamp}
+
+CACHE:
+{files}
+
+# catch-all for anything else
+NETWORK:
+*
+http://*
+https://*
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/050bb3c7/bin/templates/project/tools/oneless.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/tools/oneless.js b/bin/templates/project/tools/oneless.js
new file mode 100755
index 0000000..afee5b0
--- /dev/null
+++ b/bin/templates/project/tools/oneless.js
@@ -0,0 +1,92 @@
+#!/usr/bin/env node
+//
+// LESS - Leaner CSS v@VERSION
+// http://lesscss.org
+// 
+// Copyright (c) 2009-2011, Alexis Sellier
+// Licensed under the Apache 2.0 License.
+//
+(function(B){function l(c){return c==="../lib/less"?p:c==="./parser"?p:c.indexOf(".")===0?p[c.split("/")[1]]:B(c)}exports.tree={};var f=exports.tree,p;if(typeof environment==="object"&&{}.toString.call(environment)==="[object Environment]")p=typeof window==="undefined"?{}:window.less={},f=p.tree={},p.mode="rhino";else if(typeof window==="undefined")p=exports,f=l("./tree"),p.mode="node";else{if(typeof window.less==="undefined")window.less={};p=window.less;f=window.less.tree={};p.mode="browser"}p.Parser=
+function(c){function a(){u=q[o];v=j;t=j}function b(){q[o]=u;j=v;t=j}function e(){j>t&&(q[o]=q[o].slice(j-t),t=j)}function d(d){var a,b,c,g;if(d instanceof Function)return d.call(x.parsers);else if(typeof d==="string")d=k.charAt(j)===d?d:null,a=1,e();else if(e(),d=d.exec(q[o]))a=d[0].length;else return null;if(d){g=j+=a;for(c=j+q[o].length-a;j<c;){b=k.charCodeAt(j);if(!(b===32||b===10||b===9))break;j++}q[o]=q[o].slice(a+(j-g));t=j;q[o].length===0&&o<q.length-1&&o++;return typeof d==="string"?d:d.length===
+1?d[0]:d}}function i(a,b){var c=d(a);if(c)return c;else g(b||(typeof a==="string"?"expected '"+a+"' got '"+k.charAt(j)+"'":"unexpected token"))}function g(d,a){throw{index:j,type:a||"Syntax",message:d};}function h(d){return typeof d==="string"?k.charAt(j)===d:d.test(q[o])?!0:!1}function n(d,a){for(var b=d,c=-1;b>=0&&a.charAt(b)!=="\n";b--)c++;return{line:typeof d==="number"?(a.slice(0,d).match(/\n/g)||"").length:null,column:c}}function m(d,a){var b=d.filename&&a.filename&&d.filename!==a.filename?
+x.imports.contents[p.mode==="node"?l("path").basename(d.filename):d.filename.match(/[^\/]+$/)[0]]:k,c=n(d.index,b),e=c.line,c=c.column,g=b.split("\n");this.type=d.type||"Syntax";this.message=d.message;this.filename=d.filename||a.filename;this.index=d.index;this.line=typeof e==="number"?e+1:null;this.callLine=d.call&&n(d.call,b).line+1;this.callExtract=g[n(d.call,b).line];this.stack=d.stack;this.column=c;this.extract=[g[e-1],g[e],g[e+1]]}var k,j,o,u,v,y,q,t,x,A=function(){},z=this.imports={paths:c&&
+c.paths||[],queue:[],files:{},contents:{},mime:c&&c.mime,error:null,push:function(d,a){var b=this;this.queue.push(d);p.Parser.importer(d,this.paths,function(c,e,g){b.queue.splice(b.queue.indexOf(d),1);b.files[d]=e;b.contents[d]=g;if(c&&!b.error)b.error=c;a(c,e);b.queue.length===0&&A()},c)}};this.env=c=c||{};this.optimization="optimization"in this.env?this.env.optimization:1;this.env.filename=this.env.filename||null;return x={imports:z,parse:function(a,b){var e,g,i,h=null;j=o=t=y=0;k=a.replace(/\r\n/g,
+"\n");q=function(d){for(var a=0,b=/[^"'`\{\}\/\(\)\\]+/g,e=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,w=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`\\\r\n]|\\.)*)`/g,g=0,i,s=d[0],j,f=0,r,n;f<k.length;f++){b.lastIndex=f;if((i=b.exec(k))&&i.index===f)f+=i[0].length,s.push(i[0]);r=k.charAt(f);e.lastIndex=w.lastIndex=f;if((i=w.exec(k))&&i.index===f)f+=i[0].length,s.push(i[0]),r=k.charAt(f);if(!j&&r==="/"&&(n=k.charAt(f+1),n==="/"||n==="*"))if((i=e.exec(k))&&i.index===f)f+=i[0].length,s.push(i[0]),
+r=k.charAt(f);switch(r){case "{":if(!j){g++;s.push(r);break}case "}":if(!j){g--;s.push(r);d[++a]=s=[];break}case "(":if(!j){j=!0;s.push(r);break}case ")":if(j){j=!1;s.push(r);break}default:s.push(r)}}g>0&&(h=new m({index:f,type:"Parse",message:"missing closing `}`",filename:c.filename},c));return d.map(function(d){return d.join("")})}([[]]);if(h)return b(h);try{e=new f.Ruleset([],d(this.parsers.primary)),e.root=!0}catch(n){return b(new m(n,c))}e.toCSS=function(d){return function(a,b){var e=[],a=a||
+{};typeof b==="object"&&!Array.isArray(b)&&(b=Object.keys(b).map(function(d){var a=b[d];a instanceof f.Value||(a instanceof f.Expression||(a=new f.Expression([a])),a=new f.Value([a]));return new f.Rule("@"+d,a,!1,0)}),e=[new f.Ruleset(null,b)]);try{var w=d.call(this,{frames:e}).toCSS([],{compress:a.compress||!1})}catch(g){throw new m(g,c);}if(e=x.imports.error)if(e instanceof m)throw e;else throw new m(e,c);return a.yuicompress&&p.mode==="node"?l("./cssmin").compressor.cssmin(w):a.compress?w.replace(/(\s)+/g,
+"$1"):w}}(e.eval);if(j<k.length-1){j=y;i=k.split("\n");g=(k.slice(0,j).match(/\n/g)||"").length+1;for(var u=j,v=-1;u>=0&&k.charAt(u)!=="\n";u--)v++;h={type:"Parse",message:"Syntax Error on line "+g,index:j,filename:c.filename,line:g,column:v,extract:[i[g-2],i[g-1],i[g]]}}this.imports.queue.length>0?A=function(){b(h,e)}:b(h,e)},parsers:{primary:function(){for(var a,b=[];(a=d(this.mixin.definition)||d(this.rule)||d(this.ruleset)||d(this.mixin.call)||d(this.comment)||d(this.directive))||d(/^[\s\n]+/);)a&&
+b.push(a);return b},comment:function(){var a;if(k.charAt(j)==="/")if(k.charAt(j+1)==="/")return new f.Comment(d(/^\/\/.*/),!0);else if(a=d(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))return new f.Comment(a)},entities:{quoted:function(){var a;a=j;var b;k.charAt(a)==="~"&&(a++,b=!0);if(!(k.charAt(a)!=='"'&&k.charAt(a)!=="'")&&(b&&d("~"),a=d(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/)))return new f.Quoted(a[0],a[1]||a[2],b)},keyword:function(){var a;if(a=d(/^[_A-Za-z-][_A-Za-z0-9-]*/))return f.colors.hasOwnProperty(a)?
+new f.Color(f.colors[a].slice(1)):new f.Keyword(a)},call:function(){var a,b,e=j;if(a=/^([\w-]+|%|progid:[\w\.]+)\(/.exec(q[o])){a=a[1].toLowerCase();if(a==="url")return null;else j+=a.length;if(a==="alpha")return d(this.alpha);d("(");b=d(this.entities.arguments);if(d(")")&&a)return new f.Call(a,b,e,c.filename)}},arguments:function(){for(var a=[],b;b=d(this.entities.assignment)||d(this.expression);)if(a.push(b),!d(","))break;return a},literal:function(){return d(this.entities.dimension)||d(this.entities.color)||
+d(this.entities.quoted)},assignment:function(){var a,b;if((a=d(/^\w+(?=\s?=)/i))&&d("=")&&(b=d(this.entity)))return new f.Assignment(a,b)},url:function(){var a;if(k.charAt(j)==="u"&&d(/^url\(/))return a=d(this.entities.quoted)||d(this.entities.variable)||d(this.entities.dataURI)||d(/^[-\w%@$\/.&=:;#+?~]+/)||"",i(")"),new f.URL(a.value||a.data||a instanceof f.Variable?a:new f.Anonymous(a),z.paths)},dataURI:function(){var a;if(d(/^data:/)&&(a={},a.mime=d(/^[^\/]+\/[^,;)]+/)||"",a.charset=d(/^;\s*charset=[^,;)]+/)||
+"",a.base64=d(/^;\s*base64/)||"",a.data=d(/^,\s*[^)]+/),a.data))return a},variable:function(){var a,b=j;if(k.charAt(j)==="@"&&(a=d(/^@@?[\w-]+/)))return new f.Variable(a,b,c.filename)},color:function(){var a;if(k.charAt(j)==="#"&&(a=d(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new f.Color(a[1])},dimension:function(){var a;a=k.charCodeAt(j);if(!(a>57||a<45||a===47))if(a=d(/^(-?\d*\.?\d+)(px|%|em|rem|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn)?/))return new f.Dimension(a[1],a[2])},javascript:function(){var a;
+a=j;var b;k.charAt(a)==="~"&&(a++,b=!0);if(k.charAt(a)==="`"&&(b&&d("~"),a=d(/^`([^`]*)`/)))return new f.JavaScript(a[1],j,b)}},variable:function(){var a;if(k.charAt(j)==="@"&&(a=d(/^(@[\w-]+)\s*:/)))return a[1]},shorthand:function(){var a,b;if(h(/^[@\w.%-]+\/[@\w.-]+/)&&(a=d(this.entity))&&d("/")&&(b=d(this.entity)))return new f.Shorthand(a,b)},mixin:{call:function(){var a=[],b,e,g,i=j;b=k.charAt(j);var n=!1;if(!(b!=="."&&b!=="#")){for(;b=d(/^[#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/);)a.push(new f.Element(e,
+b,j)),e=d(">");d("(")&&(g=d(this.entities.arguments))&&d(")");d(this.important)&&(n=!0);if(a.length>0&&(d(";")||h("}")))return new f.mixin.Call(a,g||[],i,c.filename,n)}},definition:function(){var c,e=[],g,n,m,l=!1;if(!(k.charAt(j)!=="."&&k.charAt(j)!=="#"||h(/^[^{]*(;|})/)))if(a(),c=d(/^([#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+)\s*\(/)){c=c[1];do if(k.charAt(j)==="."&&d(/^\.{3}/)){l=!0;break}else if(g=d(this.entities.variable)||d(this.entities.literal)||d(this.entities.keyword))if(g instanceof
+f.Variable)if(d(":"))n=i(this.expression,"expected expression"),e.push({name:g.name,value:n});else if(d(/^\.{3}/)){e.push({name:g.name,variadic:!0});l=!0;break}else e.push({name:g.name});else e.push({value:g});else break;while(d(","));i(")");d(/^when/)&&(m=i(this.conditions,"expected condition"));if(g=d(this.block))return new f.mixin.Definition(c,e,g,m,l);else b()}}},entity:function(){return d(this.entities.literal)||d(this.entities.variable)||d(this.entities.url)||d(this.entities.call)||d(this.entities.keyword)||
+d(this.entities.javascript)||d(this.comment)},end:function(){return d(";")||h("}")},alpha:function(){var a;if(d(/^\(opacity=/i)&&(a=d(/^\d+/)||d(this.entities.variable)))return i(")"),new f.Alpha(a)},element:function(){var a,b,c;b=d(this.combinator);(a=d(/^(?:\d+\.\d+|\d+)%/)||d(/^(?:[.#]?|:*)(?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/)||d("*")||d(this.attribute)||d(/^\([^)@]+\)/))||d("(")&&(c=d(this.entities.variable))&&d(")")&&(a=new f.Paren(c));if(a)return new f.Element(b,a,j);if(b.value&&
+b.value.charAt(0)==="&")return new f.Element(b,null,j)},combinator:function(){var a;a=k.charAt(j);if(a===">"||a==="+"||a==="~"){for(j++;k.charAt(j)===" ";)j++;return new f.Combinator(a)}else if(a==="&"){a="&";j++;for(k.charAt(j)===" "&&(a="& ");k.charAt(j)===" ";)j++;return new f.Combinator(a)}else return k.charAt(j-1)===" "?new f.Combinator(" "):new f.Combinator(null)},selector:function(){var a,b=[],c;if(d("("))return a=d(this.entity),i(")"),new f.Selector([new f.Element("",a,j)]);for(;a=d(this.element);)if(c=
+k.charAt(j),b.push(a),c==="{"||c==="}"||c===";"||c===",")break;if(b.length>0)return new f.Selector(b)},tag:function(){return d(/^[a-zA-Z][a-zA-Z-]*[0-9]?/)||d("*")},attribute:function(){var a="",b,c,e;if(d("[")){if(b=d(/^[a-zA-Z-]+/)||d(this.entities.quoted))a=(e=d(/^[|~*$^]?=/))&&(c=d(this.entities.quoted)||d(/^[\w-]+/))?[b,e,c.toCSS?c.toCSS():c].join(""):b;if(d("]")&&a)return"["+a+"]"}},block:function(){var a;if(d("{")&&(a=d(this.primary))&&d("}"))return a},ruleset:function(){var e=[],g,i;for(a();g=
+d(this.selector);){e.push(g);d(this.comment);if(!d(","))break;d(this.comment)}if(e.length>0&&(i=d(this.block)))return new f.Ruleset(e,i,c.strictImports);else y=j,b()},rule:function(){var c,e;c=k.charAt(j);var g;a();if(!(c==="."||c==="#"||c==="&"))if(c=d(this.variable)||d(this.property))if(c.charAt(0)!="@"&&(e=/^([^@+\/'"*`(;{}-]*);/.exec(q[o]))?(j+=e[0].length-1,e=new f.Anonymous(e[1])):e=c==="font"?d(this.font):d(this.value),g=d(this.important),e&&d(this.end))return new f.Rule(c,e,g,v);else y=j,
+b()},"import":function(){var a,b,c=j;if(d(/^@import\s+/)&&(a=d(this.entities.quoted)||d(this.entities.url)))if(b=d(this.mediaFeatures),d(";"))return new f.Import(a,z,b,c)},mediaFeature:function(){var a,b,c=[];do if(a=d(this.entities.keyword))c.push(a);else if(d("("))if(b=d(this.property),a=d(this.entity),d(")"))if(b&&a)c.push(new f.Paren(new f.Rule(b,a,null,j,!0)));else if(a)c.push(new f.Paren(a));else return null;else return null;while(a);if(c.length>0)return new f.Expression(c)},mediaFeatures:function(){var a,
+b=[];do if(a=d(this.mediaFeature)){if(b.push(a),!d(","))break}else if(a=d(this.entities.variable))if(b.push(a),!d(","))break;while(a);return b.length>0?b:null},media:function(){var a,b;if(d(/^@media/)&&(a=d(this.mediaFeatures),b=d(this.block)))return new f.Media(b,a)},directive:function(){var a,b,c;if(k.charAt(j)==="@")if(b=d(this["import"])||d(this.media))return b;else if(a=d(/^@page|@keyframes/)||d(/^@(?:-webkit-|-moz-|-o-|-ms-)[a-z0-9-]+/)){if(c=(d(/^[^{]+/)||"").trim(),b=d(this.block))return new f.Directive(a+
+" "+c,b)}else if(a=d(/^@[-a-z]+/))if(a==="@font-face"){if(b=d(this.block))return new f.Directive(a,b)}else if((b=d(this.entity))&&d(";"))return new f.Directive(a,b)},font:function(){for(var a=[],b=[],c;c=d(this.shorthand)||d(this.entity);)b.push(c);a.push(new f.Expression(b));if(d(","))for(;c=d(this.expression);)if(a.push(c),!d(","))break;return new f.Value(a)},value:function(){for(var a,b=[];a=d(this.expression);)if(b.push(a),!d(","))break;if(b.length>0)return new f.Value(b)},important:function(){if(k.charAt(j)===
+"!")return d(/^! *important/)},sub:function(){var a;if(d("(")&&(a=d(this.expression))&&d(")"))return a},multiplication:function(){var a,b,c,e;if(a=d(this.operand)){for(;!h(/^\/\*/)&&(c=d("/")||d("*"))&&(b=d(this.operand));)e=new f.Operation(c,[e||a,b]);return e||a}},addition:function(){var a,b,c,e;if(a=d(this.multiplication)){for(;(c=d(/^[-+]\s+/)||k.charAt(j-1)!=" "&&(d("+")||d("-")))&&(b=d(this.multiplication));)e=new f.Operation(c,[e||a,b]);return e||a}},conditions:function(){var a,b,c=j,e;if(a=
+d(this.condition)){for(;d(",")&&(b=d(this.condition));)e=new f.Condition("or",e||a,b,c);return e||a}},condition:function(){var a,b,c,e,h=j,k=!1;d(/^not/)&&(k=!0);i("(");if(a=d(this.addition)||d(this.entities.keyword)||d(this.entities.quoted))return(e=d(/^(?:>=|=<|[<=>])/))?(b=d(this.addition)||d(this.entities.keyword)||d(this.entities.quoted))?c=new f.Condition(e,a,b,h,k):g("expected expression"):c=new f.Condition("=",a,new f.Keyword("true"),h,k),i(")"),d(/^and/)?new f.Condition("and",c,d(this.condition)):
+c},operand:function(){var a,b=k.charAt(j+1);if(k.charAt(j)==="-"&&(b==="@"||b==="("))a=d("-");b=d(this.sub)||d(this.entities.dimension)||d(this.entities.color)||d(this.entities.variable)||d(this.entities.call);return a?new f.Operation("*",[new f.Dimension(-1),b]):b},expression:function(){for(var a,b=[];a=d(this.addition)||d(this.entity);)b.push(a);if(b.length>0)return new f.Expression(b)},property:function(){var a;if(a=d(/^(\*?-?[-a-z_0-9]+)\s*:/))return a[1]}}}};if(p.mode==="browser"||p.mode==="rhino")p.Parser.importer=
+function(c,a,b,e){!/^([a-z]+:)?\//.test(c)&&a.length>0&&(c=a[0]+c);loadStyleSheet({href:c,title:c,type:e.mime},function(d){d&&typeof e.errback==="function"?e.errback.call(null,c,a,b,e):b.apply(null,arguments)},!0)};(function(c){function a(a){return c.functions.hsla(a.h,a.s,a.l,a.a)}function b(a){if(a instanceof c.Dimension)return parseFloat(a.unit=="%"?a.value/100:a.value);else if(typeof a==="number")return a;else throw{error:"RuntimeError",message:"color functions take numbers as parameters"};}function e(a){return Math.min(1,
+Math.max(0,a))}c.functions={rgb:function(a,b,c){return this.rgba(a,b,c,1)},rgba:function(a,e,g,h){a=[a,e,g].map(function(a){return b(a)});h=b(h);return new c.Color(a,h)},hsl:function(a,b,c){return this.hsla(a,b,c,1)},hsla:function(a,c,e,h){function f(a){a=a<0?a+1:a>1?a-1:a;return a*6<1?k+(m-k)*a*6:a*2<1?m:a*3<2?k+(m-k)*(2/3-a)*6:k}var a=b(a)%360/360,c=b(c),e=b(e),h=b(h),m=e<=0.5?e*(c+1):e+c-e*c,k=e*2-m;return this.rgba(f(a+1/3)*255,f(a)*255,f(a-1/3)*255,h)},hue:function(a){return new c.Dimension(Math.round(a.toHSL().h))},
+saturation:function(a){return new c.Dimension(Math.round(a.toHSL().s*100),"%")},lightness:function(a){return new c.Dimension(Math.round(a.toHSL().l*100),"%")},alpha:function(a){return new c.Dimension(a.toHSL().a)},saturate:function(d,b){var c=d.toHSL();c.s+=b.value/100;c.s=e(c.s);return a(c)},desaturate:function(b,c){var g=b.toHSL();g.s-=c.value/100;g.s=e(g.s);return a(g)},lighten:function(b,c){var g=b.toHSL();g.l+=c.value/100;g.l=e(g.l);return a(g)},darken:function(b,c){var g=b.toHSL();g.l-=c.value/
+100;g.l=e(g.l);return a(g)},fadein:function(b,c){var g=b.toHSL();g.a+=c.value/100;g.a=e(g.a);return a(g)},fadeout:function(b,c){var g=b.toHSL();g.a-=c.value/100;g.a=e(g.a);return a(g)},fade:function(b,c){var g=b.toHSL();g.a=c.value/100;g.a=e(g.a);return a(g)},spin:function(b,c){var e=b.toHSL(),h=(e.h+c.value)%360;e.h=h<0?360+h:h;return a(e)},mix:function(a,b,e){var e=e.value/100,h=e*2-1,f=a.toHSL().a-b.toHSL().a,h=((h*f==-1?h:(h+f)/(1+h*f))+1)/2,f=1-h;return new c.Color([a.rgb[0]*h+b.rgb[0]*f,a.rgb[1]*
+h+b.rgb[1]*f,a.rgb[2]*h+b.rgb[2]*f],a.alpha*e+b.alpha*(1-e))},greyscale:function(a){return this.desaturate(a,new c.Dimension(100))},e:function(a){return new c.Anonymous(a instanceof c.JavaScript?a.evaluated:a)},escape:function(a){return new c.Anonymous(encodeURI(a.value).replace(/=/g,"%3D").replace(/:/g,"%3A").replace(/#/g,"%23").replace(/;/g,"%3B").replace(/\(/g,"%28").replace(/\)/g,"%29"))},"%":function(a){for(var b=Array.prototype.slice.call(arguments,1),e=a.value,h=0;h<b.length;h++)e=e.replace(/%[sda]/i,
+function(a){var d=a.match(/s/i)?b[h].value:b[h].toCSS();return a.match(/[A-Z]$/)?encodeURIComponent(d):d});e=e.replace(/%%/g,"%");return new c.Quoted('"'+e+'"',e)},round:function(a){return this._math("round",a)},ceil:function(a){return this._math("ceil",a)},floor:function(a){return this._math("floor",a)},_math:function(a,e){if(e instanceof c.Dimension)return new c.Dimension(Math[a](b(e)),e.unit);else if(typeof e==="number")return Math[a](e);else throw{type:"Argument",message:"argument must be a number"};
+},argb:function(a){return new c.Anonymous(a.toARGB())},percentage:function(a){return new c.Dimension(a.value*100,"%")},color:function(a){if(a instanceof c.Quoted)return new c.Color(a.value.slice(1));else throw{type:"Argument",message:"argument must be a string"};},iscolor:function(a){return this._isa(a,c.Color)},isnumber:function(a){return this._isa(a,c.Dimension)},isstring:function(a){return this._isa(a,c.Quoted)},iskeyword:function(a){return this._isa(a,c.Keyword)},isurl:function(a){return this._isa(a,
+c.URL)},ispixel:function(a){return a instanceof c.Dimension&&a.unit==="px"?c.True:c.False},ispercentage:function(a){return a instanceof c.Dimension&&a.unit==="%"?c.True:c.False},isem:function(a){return a instanceof c.Dimension&&a.unit==="em"?c.True:c.False},_isa:function(a,b){return a instanceof b?c.True:c.False}}})(l("./tree"));(function(c){c.colors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",
+blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",
+darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",
+ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",
+magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",
+palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",
+tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}})(l("./tree"));(function(c){c.Alpha=function(a){this.value=a};c.Alpha.prototype={toCSS:function(){return"alpha(opacity="+(this.value.toCSS?this.value.toCSS():this.value)+")"},eval:function(a){if(this.value.eval)this.value=this.value.eval(a);return this}}})(l("../tree"));(function(c){c.Anonymous=function(a){this.value=
+a.value||a};c.Anonymous.prototype={toCSS:function(){return this.value},eval:function(){return this}}})(l("../tree"));(function(c){c.Assignment=function(a,b){this.key=a;this.value=b};c.Assignment.prototype={toCSS:function(){return this.key+"="+(this.value.toCSS?this.value.toCSS():this.value)},eval:function(a){if(this.value.eval)this.value=this.value.eval(a);return this}}})(l("../tree"));(function(c){c.Call=function(a,b,c,d){this.name=a;this.args=b;this.index=c;this.filename=d};c.Call.prototype={eval:function(a){var b=
+this.args.map(function(b){return b.eval(a)});if(this.name in c.functions)try{return c.functions[this.name].apply(c.functions,b)}catch(e){throw{type:e.type||"Runtime",message:"error evaluating function `"+this.name+"`"+(e.message?": "+e.message:""),index:this.index,filename:this.filename};}else return new c.Anonymous(this.name+"("+b.map(function(a){return a.toCSS()}).join(", ")+")")},toCSS:function(a){return this.eval(a).toCSS()}}})(l("../tree"));(function(c){c.Color=function(a,b){this.rgb=Array.isArray(a)?
+a:a.length==6?a.match(/.{2}/g).map(function(a){return parseInt(a,16)}):a.split("").map(function(a){return parseInt(a+a,16)});this.alpha=typeof b==="number"?b:1};c.Color.prototype={eval:function(){return this},toCSS:function(){return this.alpha<1?"rgba("+this.rgb.map(function(a){return Math.round(a)}).concat(this.alpha).join(", ")+")":"#"+this.rgb.map(function(a){a=Math.round(a);a=(a>255?255:a<0?0:a).toString(16);return a.length===1?"0"+a:a}).join("")},operate:function(a,b){var e=[];b instanceof c.Color||
+(b=b.toColor());for(var d=0;d<3;d++)e[d]=c.operate(a,this.rgb[d],b.rgb[d]);return new c.Color(e,this.alpha+b.alpha)},toHSL:function(){var a=this.rgb[0]/255,b=this.rgb[1]/255,c=this.rgb[2]/255,d=this.alpha,i=Math.max(a,b,c),g=Math.min(a,b,c),h,f=(i+g)/2,m=i-g;if(i===g)h=g=0;else{g=f>0.5?m/(2-i-g):m/(i+g);switch(i){case a:h=(b-c)/m+(b<c?6:0);break;case b:h=(c-a)/m+2;break;case c:h=(a-b)/m+4}h/=6}return{h:h*360,s:g,l:f,a:d}},toARGB:function(){return"#"+[Math.round(this.alpha*255)].concat(this.rgb).map(function(a){a=
+Math.round(a);a=(a>255?255:a<0?0:a).toString(16);return a.length===1?"0"+a:a}).join("")}}})(l("../tree"));(function(c){c.Comment=function(a,b){this.value=a;this.silent=!!b};c.Comment.prototype={toCSS:function(a){return a.compress?"":this.value},eval:function(){return this}}})(l("../tree"));(function(c){c.Condition=function(a,b,c,d,i){this.op=a.trim();this.lvalue=b;this.rvalue=c;this.index=d;this.negate=i};c.Condition.prototype.eval=function(a){var b=this.lvalue.eval(a),c=this.rvalue.eval(a),d=this.index,
+i;i=function(a){switch(a){case "and":return b&&c;case "or":return b||c;default:if(b.compare)i=b.compare(c);else if(c.compare)i=c.compare(b);else throw{type:"Type",message:"Unable to perform comparison",index:d};switch(i){case -1:return a==="<"||a==="=<";case 0:return a==="="||a===">="||a==="=<";case 1:return a===">"||a===">="}}}(this.op);return this.negate?!i:i}})(l("../tree"));(function(c){c.Dimension=function(a,b){this.value=parseFloat(a);this.unit=b||null};c.Dimension.prototype={eval:function(){return this},
+toColor:function(){return new c.Color([this.value,this.value,this.value])},toCSS:function(){return this.value+this.unit},operate:function(a,b){return new c.Dimension(c.operate(a,this.value,b.value),this.unit||b.unit)},compare:function(a){return a instanceof c.Dimension?a.value>this.value?-1:a.value<this.value?1:0:-1}}})(l("../tree"));(function(c){c.Directive=function(a,b){this.name=a;Array.isArray(b)?(this.ruleset=new c.Ruleset([],b),this.ruleset.allowImports=!0):this.value=b};c.Directive.prototype=
+{toCSS:function(a,b){return this.ruleset?(this.ruleset.root=!0,this.name+(b.compress?"{":" {\n  ")+this.ruleset.toCSS(a,b).trim().replace(/\n/g,"\n  ")+(b.compress?"}":"\n}\n")):this.name+" "+this.value.toCSS()+";\n"},eval:function(a){a.frames.unshift(this);this.ruleset=this.ruleset&&this.ruleset.eval(a);a.frames.shift();return this},variable:function(a){return c.Ruleset.prototype.variable.call(this.ruleset,a)},find:function(){return c.Ruleset.prototype.find.apply(this.ruleset,arguments)},rulesets:function(){return c.Ruleset.prototype.rulesets.apply(this.ruleset)}}})(l("../tree"));
+(function(c){c.Element=function(a,b,e){this.combinator=a instanceof c.Combinator?a:new c.Combinator(a);this.value=typeof b==="string"?b.trim():b?b:"";this.index=e};c.Element.prototype.eval=function(a){return new c.Element(this.combinator,this.value.eval?this.value.eval(a):this.value,this.index)};c.Element.prototype.toCSS=function(a){return this.combinator.toCSS(a||{})+(this.value.toCSS?this.value.toCSS(a):this.value)};c.Combinator=function(a){this.value=a===" "?" ":a==="& "?"& ":a?a.trim():""};c.Combinator.prototype.toCSS=
+function(a){return{"":""," ":" ","&":"","& ":" ",":":" :","+":a.compress?"+":" + ","~":a.compress?"~":" ~ ",">":a.compress?">":" > "}[this.value]}})(l("../tree"));(function(c){c.Expression=function(a){this.value=a};c.Expression.prototype={eval:function(a){return this.value.length>1?new c.Expression(this.value.map(function(b){return b.eval(a)})):this.value.length===1?this.value[0].eval(a):this},toCSS:function(a){return this.value.map(function(b){return b.toCSS?b.toCSS(a):""}).join(" ")}}})(l("../tree"));
+(function(c){c.Import=function(a,b,e,d){var i=this;this.index=d;this._path=a;this.features=e&&new c.Value(e);this.path=a instanceof c.Quoted?/\.(le?|c)ss(\?.*)?$/.test(a.value)?a.value:a.value+".less":a.value.value||a.value;(this.css=/css(\?.*)?$/.test(this.path))||b.push(this.path,function(a,b){if(a)a.index=d;i.root=b||new c.Ruleset([],[])})};c.Import.prototype={toCSS:function(a){a=this.features?" "+this.features.toCSS(a):"";return this.css?"@import "+this._path.toCSS()+a+";\n":""},eval:function(a){var b;
+this.features&&this.features.eval(a);if(this.css)return this;else{b=new c.Ruleset([],this.root.rules.slice(0));for(var e=0;e<b.rules.length;e++)b.rules[e]instanceof c.Import&&Array.prototype.splice.apply(b.rules,[e,1].concat(b.rules[e].eval(a)));return this.features?new c.Media(b.rules,this.features.value):b.rules}}}})(l("../tree"));(function(c){c.JavaScript=function(a,b,c){this.escaped=c;this.expression=a;this.index=b};c.JavaScript.prototype={eval:function(a){var b,e=this,d={},i=this.expression.replace(/@\{([\w-]+)\}/g,
+function(b,d){return c.jsify((new c.Variable("@"+d,e.index)).eval(a))});try{i=new Function("return ("+i+")")}catch(g){throw{message:"JavaScript evaluation error: `"+i+"`",index:this.index};}for(var h in a.frames[0].variables())d[h.slice(1)]={value:a.frames[0].variables()[h].value,toJS:function(){return this.value.eval(a).toCSS()}};try{b=i.call(d)}catch(f){throw{message:"JavaScript evaluation error: '"+f.name+": "+f.message+"'",index:this.index};}return typeof b==="string"?new c.Quoted('"'+b+'"',b,
+this.escaped,this.index):Array.isArray(b)?new c.Anonymous(b.join(", ")):new c.Anonymous(b)}}})(l("../tree"));(function(c){c.Keyword=function(a){this.value=a};c.Keyword.prototype={eval:function(){return this},toCSS:function(){return this.value},compare:function(a){return a instanceof c.Keyword?a.value===this.value?0:1:-1}};c.True=new c.Keyword("true");c.False=new c.Keyword("false")})(l("../tree"));(function(c){c.Media=function(a,b){var e=new c.Element("&",null,0),e=[new c.Selector([e])];this.features=
+new c.Value(b);this.ruleset=new c.Ruleset(e,a);this.ruleset.allowImports=!0};c.Media.prototype={toCSS:function(a,b){var c=this.features.toCSS(b);this.ruleset.root=a.length===0||a[0].multiMedia;return"@media "+c+(b.compress?"{":" {\n  ")+this.ruleset.toCSS(a,b).trim().replace(/\n/g,"\n  ")+(b.compress?"}":"\n}\n")},eval:function(a){if(!a.mediaBlocks)a.mediaBlocks=[],a.mediaPath=[];var b=a.mediaBlocks.length;a.mediaPath.push(this);a.mediaBlocks.push(this);var e=new c.Media([],[]);e.features=this.features.eval(a);
+a.frames.unshift(this.ruleset);e.ruleset=this.ruleset.eval(a);a.frames.shift();a.mediaBlocks[b]=e;a.mediaPath.pop();return a.mediaPath.length===0?e.evalTop(a):e.evalNested(a)},variable:function(a){return c.Ruleset.prototype.variable.call(this.ruleset,a)},find:function(){return c.Ruleset.prototype.find.apply(this.ruleset,arguments)},rulesets:function(){return c.Ruleset.prototype.rulesets.apply(this.ruleset)},evalTop:function(a){var b=this;if(a.mediaBlocks.length>1)b=new c.Element("&",null,0),b=[new c.Selector([b])],
+b=new c.Ruleset(b,a.mediaBlocks),b.multiMedia=!0;delete a.mediaBlocks;delete a.mediaPath;return b},evalNested:function(a){var b,e=a.mediaPath.concat([this]);for(b=0;b<e.length;b++)a=e[b].features instanceof c.Value?e[b].features.value:e[b].features,e[b]=Array.isArray(a)?a:[a];this.features=new c.Value(this.permute(e).map(function(a){a=a.map(function(a){return a.toCSS?a:new c.Anonymous(a)});for(b=a.length-1;b>0;b--)a.splice(b,0,new c.Anonymous("and"));return new c.Expression(a)}));return new c.Ruleset([],
+[])},permute:function(a){if(a.length===0)return[];else if(a.length===1)return a[0];else{for(var b=[],c=this.permute(a.slice(1)),d=0;d<c.length;d++)for(var i=0;i<a[0].length;i++)b.push([a[0][i]].concat(c[d]));return b}}}})(l("../tree"));(function(c){c.mixin={};c.mixin.Call=function(a,b,e,d,i){this.selector=new c.Selector(a);this.arguments=b;this.index=e;this.filename=d;this.important=i};c.mixin.Call.prototype={eval:function(a){var b,c,d=[],i=!1;for(c=0;c<a.frames.length;c++)if((b=a.frames[c].find(this.selector)).length>
+0){c=this.arguments&&this.arguments.map(function(b){return b.eval(a)});for(var g=0;g<b.length;g++)if(b[g].match(c,a))try{Array.prototype.push.apply(d,b[g].eval(a,this.arguments,this.important).rules),i=!0}catch(h){throw{message:h.message,index:this.index,filename:this.filename,stack:h.stack};}if(i)return d;else throw{type:"Runtime",message:"No matching definition was found for `"+this.selector.toCSS().trim()+"("+this.arguments.map(function(a){return a.toCSS()}).join(", ")+")`",index:this.index,filename:this.filename};
+}throw{type:"Name",message:this.selector.toCSS().trim()+" is undefined",index:this.index,filename:this.filename};}};c.mixin.Definition=function(a,b,e,d,i){this.name=a;this.selectors=[new c.Selector([new c.Element(null,a)])];this.params=b;this.condition=d;this.variadic=i;this.arity=b.length;this.rules=e;this._lookups={};this.required=b.reduce(function(a,b){return!b.name||b.name&&!b.value?a+1:a},0);this.parent=c.Ruleset.prototype;this.frames=[]};c.mixin.Definition.prototype={toCSS:function(){return""},
+variable:function(a){return this.parent.variable.call(this,a)},variables:function(){return this.parent.variables.call(this)},find:function(){return this.parent.find.apply(this,arguments)},rulesets:function(){return this.parent.rulesets.apply(this)},evalParams:function(a,b){for(var e=new c.Ruleset(null,[]),d,i=0,g;i<this.params.length;i++)if(g=this.params[i].name)if(this.params[i].variadic&&b){d=[];for(var h=i;h<b.length;h++)d.push(b[h].eval(a));e.rules.unshift(new c.Rule(g,(new c.Expression(d)).eval(a)))}else if(d=
+b&&b[i]||this.params[i].value)e.rules.unshift(new c.Rule(g,d.eval(a)));else throw{type:"Runtime",message:"wrong number of arguments for "+this.name+" ("+b.length+" for "+this.arity+")"};return e},eval:function(a,b,e){for(var d=this.evalParams(a,b),i=[],g=0;g<Math.max(this.params.length,b&&b.length);g++)i.push(b[g]||this.params[g].value);d.rules.unshift(new c.Rule("@arguments",(new c.Expression(i)).eval(a)));b=e?this.rules.map(function(a){return new c.Rule(a.name,a.value,"!important",a.index)}):this.rules.slice(0);
+return(new c.Ruleset(null,b)).eval({frames:[this,d].concat(this.frames,a.frames)})},match:function(a,b){var c=a&&a.length||0;if(!this.variadic){if(c<this.required)return!1;if(c>this.params.length)return!1;if(this.required>0&&c>this.params.length)return!1}if(this.condition&&!this.condition.eval({frames:[this.evalParams(b,a)].concat(b.frames)}))return!1;for(var c=Math.min(c,this.arity),d=0;d<c;d++)if(!this.params[d].name&&a[d].eval(b).toCSS()!=this.params[d].value.eval(b).toCSS())return!1;return!0}}})(l("../tree"));
+(function(c){c.Operation=function(a,b){this.op=a.trim();this.operands=b};c.Operation.prototype.eval=function(a){var b=this.operands[0].eval(a),a=this.operands[1].eval(a),e;if(b instanceof c.Dimension&&a instanceof c.Color)if(this.op==="*"||this.op==="+")e=a,a=b,b=e;else throw{name:"OperationError",message:"Can't substract or divide a color from a number"};return b.operate(this.op,a)};c.operate=function(a,b,c){switch(a){case "+":return b+c;case "-":return b-c;case "*":return b*c;case "/":return b/
+c}}})(l("../tree"));(function(c){c.Paren=function(a){this.value=a};c.Paren.prototype={toCSS:function(a){return"("+this.value.toCSS(a)+")"},eval:function(a){return new c.Paren(this.value.eval(a))}}})(l("../tree"));(function(c){c.Quoted=function(a,b,c,d){this.escaped=c;this.value=b||"";this.quote=a.charAt(0);this.index=d};c.Quoted.prototype={toCSS:function(){return this.escaped?this.value:this.quote+this.value+this.quote},eval:function(a){var b=this,e=this.value.replace(/`([^`]+)`/g,function(d,e){return(new c.JavaScript(e,
+b.index,!0)).eval(a).value}).replace(/@\{([\w-]+)\}/g,function(d,e){var g=(new c.Variable("@"+e,b.index)).eval(a);return"value"in g?g.value:g.toCSS()});return new c.Quoted(this.quote+e+this.quote,e,this.escaped,this.index)}}})(l("../tree"));(function(c){c.Rule=function(a,b,e,d,i){this.name=a;this.value=b instanceof c.Value?b:new c.Value([b]);this.important=e?" "+e.trim():"";this.index=d;this.inline=i||!1;this.variable=a.charAt(0)==="@"?!0:!1};c.Rule.prototype.toCSS=function(a){return this.variable?
+"":this.name+(a.compress?":":": ")+this.value.toCSS(a)+this.important+(this.inline?"":";")};c.Rule.prototype.eval=function(a){return new c.Rule(this.name,this.value.eval(a),this.important,this.index,this.inline)};c.Shorthand=function(a,b){this.a=a;this.b=b};c.Shorthand.prototype={toCSS:function(a){return this.a.toCSS(a)+"/"+this.b.toCSS(a)},eval:function(){return this}}})(l("../tree"));(function(c){c.Ruleset=function(a,b,c){this.selectors=a;this.rules=b;this._lookups={};this.strictImports=c};c.Ruleset.prototype=
+{eval:function(a){var b=this.selectors&&this.selectors.map(function(b){return b.eval(a)}),b=new c.Ruleset(b,this.rules.slice(0),this.strictImports);b.root=this.root;b.allowImports=this.allowImports;a.frames.unshift(b);if(b.root||b.allowImports||!b.strictImports)for(var e=0;e<b.rules.length;e++)b.rules[e]instanceof c.Import&&Array.prototype.splice.apply(b.rules,[e,1].concat(b.rules[e].eval(a)));for(e=0;e<b.rules.length;e++)if(b.rules[e]instanceof c.mixin.Definition)b.rules[e].frames=a.frames.slice(0);
+for(e=0;e<b.rules.length;e++)b.rules[e]instanceof c.mixin.Call&&Array.prototype.splice.apply(b.rules,[e,1].concat(b.rules[e].eval(a)));for(var e=0,d;e<b.rules.length;e++)d=b.rules[e],d instanceof c.mixin.Definition||(b.rules[e]=d.eval?d.eval(a):d);a.frames.shift();return b},match:function(a){return!a||a.length===0},variables:function(){return this._variables?this._variables:this._variables=this.rules.reduce(function(a,b){b instanceof c.Rule&&b.variable===!0&&(a[b.name]=b);return a},{})},variable:function(a){return this.variables()[a]},
+rulesets:function(){return this._rulesets?this._rulesets:this._rulesets=this.rules.filter(function(a){return a instanceof c.Ruleset||a instanceof c.mixin.Definition})},find:function(a,b){var b=b||this,e=[],d=a.toCSS();if(d in this._lookups)return this._lookups[d];this.rulesets().forEach(function(d){if(d!==b)for(var g=0;g<d.selectors.length;g++)if(a.match(d.selectors[g])){a.elements.length>d.selectors[g].elements.length?Array.prototype.push.apply(e,d.find(new c.Selector(a.elements.slice(1)),b)):e.push(d);
+break}});return this._lookups[d]=e},toCSS:function(a,b){var e=[],d=[],i=[],g=[],h;this.root||(a.length===0?g=this.selectors.map(function(a){return[a]}):this.joinSelectors(g,a,this.selectors));for(var f=0;f<this.rules.length;f++)h=this.rules[f],h.rules||h instanceof c.Directive||h instanceof c.Media?i.push(h.toCSS(g,b)):h instanceof c.Comment?h.silent||(this.root?i.push(h.toCSS(b)):d.push(h.toCSS(b))):h.toCSS&&!h.variable?d.push(h.toCSS(b)):h.value&&!h.variable&&d.push(h.value.toString());i=i.join("");
+this.root?e.push(d.join(b.compress?"":"\n")):d.length>0&&(g=g.map(function(a){return a.map(function(a){return a.toCSS(b)}).join("").trim()}).join(b.compress?",":",\n"),e.push(g,(b.compress?"{":" {\n  ")+d.join(b.compress?"":"\n  ")+(b.compress?"}":"\n}\n")));e.push(i);return e.join("")+(b.compress?"\n":"")},joinSelectors:function(a,b,c){for(var d=0;d<c.length;d++)this.joinSelector(a,b,c[d])},joinSelector:function(a,b,e){for(var d=[],i=[],g=[],h=[],f=!1,l,k=0;k<e.elements.length;k++)l=e.elements[k],
+l.combinator.value.charAt(0)==="&"&&(f=!0),f?h.push(l):g.push(l);f||(h=g,g=[]);g.length>0&&d.push(new c.Selector(g));h.length>0&&i.push(new c.Selector(h));for(e=0;e<b.length;e++)a.push(d.concat(b[e]).concat(i))}}})(l("../tree"));(function(c){c.Selector=function(a){this.elements=a;if(this.elements[0].combinator.value==="")this.elements[0].combinator.value=" "};c.Selector.prototype.match=function(a){var b=this.elements.length,c=a.elements.length,d=Math.min(b,c);if(b<c)return!1;else for(b=0;b<d;b++)if(this.elements[b].value!==
+a.elements[b].value)return!1;return!0};c.Selector.prototype.eval=function(a){return new c.Selector(this.elements.map(function(b){return b.eval(a)}))};c.Selector.prototype.toCSS=function(a){return this._css?this._css:this._css=this.elements.map(function(b){return typeof b==="string"?" "+b.trim():b.toCSS(a)}).join("")}})(l("../tree"));(function(c){c.URL=function(a,b){if(a.data)this.attrs=a;else{if(typeof window!=="undefined"&&!/^(?:https?:\/\/|file:\/\/|data:|\/)/.test(a.value)&&b.length>0)a.value=
+b[0]+(a.value.charAt(0)==="/"?a.value.slice(1):a.value);this.value=a;this.paths=b}};c.URL.prototype={toCSS:function(){return"url("+(this.attrs?"data:"+this.attrs.mime+this.attrs.charset+this.attrs.base64+this.attrs.data:this.value.toCSS())+")"},eval:function(a){return this.attrs?this:new c.URL(this.value.eval(a),this.paths)}}})(l("../tree"));(function(c){c.Value=function(a){this.value=a;this.is="value"};c.Value.prototype={eval:function(a){return this.value.length===1?this.value[0].eval(a):new c.Value(this.value.map(function(b){return b.eval(a)}))},
+toCSS:function(a){return this.value.map(function(b){return b.toCSS(a)}).join(a.compress?",":", ")}}})(l("../tree"));(function(c){c.Variable=function(a,b,c){this.name=a;this.index=b;this.file=c};c.Variable.prototype={eval:function(a){var b,e,d=this.name;d.indexOf("@@")==0&&(d="@"+(new c.Variable(d.slice(1))).eval(a).value);if(b=c.find(a.frames,function(b){if(e=b.variable(d))return e.value.eval(a)}))return b;else throw{type:"Name",message:"variable "+d+" is undefined",filename:this.file,index:this.index};
+}}})(l("../tree"));(function(c){c.find=function(a,b){for(var c=0,d;c<a.length;c++)if(d=b.call(a,a[c]))return d;return null};c.jsify=function(a){return Array.isArray(a.value)&&a.value.length>1?"["+a.value.map(function(a){return a.toCSS(!1)}).join(", ")+"]":a.toCSS(!1)}})(l("./tree"));(function(){var c=l("path"),a=l("util"),b=l("fs"),e={version:[1,3,0],Parser:l("./parser").Parser,importer:l("./parser").importer,tree:l("./tree"),render:function(a,b,c){b=b||{};typeof b==="function"&&(c=b,b={});var d=
+new e.Parser(b),f;if(c)d.parse(a,function(a,d){c(a,d&&d.toCSS&&d.toCSS(b))});else return f=new (l("events").EventEmitter),process.nextTick(function(){d.parse(a,function(a,c){a?f.emit("error",a):f.emit("success",c.toCSS(b))})}),f},writeError:function(b,c){var c=c||{},d="",f=b.extract,l=[],k=c.color?e.stylize:function(a){return a};if(!c.silent){if(b.stack)return a.error(k(b.stack,"red"));if(!b.hasOwnProperty("index"))return a.error(b.stack||b.message);typeof f[0]==="string"&&l.push(k(b.line-1+" "+f[0],
+"grey"));f[1]&&l.push(b.line+" "+f[1].slice(0,b.column)+k(k(k(f[1][b.column],"bold")+f[1].slice(b.column+1),"red"),"inverse"));typeof f[2]==="string"&&l.push(k(b.line+1+" "+f[2],"grey"));l=l.join("\n")+"\u001b[0m\n";d+=k(b.type+"Error: "+b.message,"red");b.filename&&(d+=k(" in ","red")+b.filename+k(":"+b.line+":"+b.column,"grey"));a.error(d,l);b.callLine&&(a.error(k("from ","red")+(b.filename||"")),a.error(k(b.callLine,"grey")+" "+b.callExtract))}}};"color,directive,operation,dimension,keyword,variable,ruleset,element,selector,quoted,expression,rule,call,url,alpha,import,mixin,comment,anonymous,value,javascript,assignment,condition,paren,media".split(",").forEach(function(a){l("./tree/"+
+a)});e.Parser.importer=function(a,d,f,l){var m;d.unshift(".");for(var k=0;k<d.length;k++)try{m=c.join(d[k],a);b.statSync(m);break}catch(j){m=null}m?b.readFile(m,"utf-8",function(a,b){if(a)return f(a);(new e.Parser({paths:[c.dirname(m)].concat(d),filename:m})).parse(b,function(a,c){f(a,c,b)})}):typeof l.errback==="function"?l.errback(a,d,f):f({type:"File",message:"'"+a+"' wasn't found.\n"})};l("./functions");l("./colors");for(var d in e)exports[d]=e[d];e.stylize=function(a,b){var c={bold:[1,22],inverse:[7,
+27],underline:[4,24],yellow:[33,39],green:[32,39],red:[31,39],grey:[90,39]};return"\u001b["+c[b][0]+"m"+a+"\u001b["+c[b][1]+"m"}})();(function(){var c=l("path"),a=l("fs"),b=l("util"),e=l("os"),d=l("../lib/less"),f=process.argv.slice(1),g={compress:!1,yuicompress:!1,optimization:1,silent:!1,paths:[],color:!0,strictImports:!1},f=f.filter(function(a){var f;if(f=a.match(/^-I(.+)$/))return g.paths.push(f[1]),!1;if(f=a.match(/^--?([a-z][0-9a-z-]*)(?:=([^\s]+))?$/i))a=f[1];else return a;switch(a){case "v":case "version":b.puts("lessc "+
+d.version.join(".")+" (LESS Compiler) [JavaScript]"),process.exit(0);case "verbose":g.verbose=!0;break;case "s":case "silent":g.silent=!0;break;case "strict-imports":g.strictImports=!0;break;case "h":case "help":b.puts("usage: lessc source [destination]"),process.exit(0);case "x":case "compress":g.compress=!0;break;case "yui-compress":g.yuicompress=!0;break;case "no-color":g.color=!1;break;case "include-path":g.paths=f[2].split(e.type().match(/Windows/)?";":":").map(function(a){if(a)return c.resolve(process.cwd(),
+a)});break;case "O0":g.optimization=0;break;case "O1":g.optimization=1;break;case "O2":g.optimization=2}}),h=f[1];h&&h!="-"&&(h=c.resolve(process.cwd(),h));var n=f[2];n&&(n=c.resolve(process.cwd(),n));var m,k;h||(b.puts("lessc: no input files"),process.exit(1));var j=function(e,f){e&&(b.puts("lessc: "+e.message),process.exit(1));(new d.Parser({paths:[c.dirname(h)].concat(g.paths),optimization:g.optimization,filename:h,strictImports:g.strictImports})).parse(f,function(c,e){if(c)d.writeError(c,g),process.exit(1);
+else try{m=e.toCSS({compress:g.compress,yuicompress:g.yuicompress}),n?(k=a.openSync(n,"w"),a.writeSync(k,m,0,"utf8")):b.print(m)}catch(f){d.writeError(f,g),process.exit(2)}})};if(h!="-")a.readFile(h,"utf-8",j);else{process.stdin.resume();process.stdin.setEncoding("utf8");var o="";process.stdin.on("data",function(a){o+=a});process.stdin.on("end",function(){j(!1,o)})}})()})(require);